助战报错
parent
24e60ab8c5
commit
0ff0bc218c
|
|
@ -4,10 +4,7 @@ import com.ljsd.jieling.logic.dao.Baubles;
|
|||
import com.ljsd.jieling.logic.dao.Hero;
|
||||
import com.ljsd.jieling.logic.dao.PropertyItem;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.*;
|
||||
|
||||
/**
|
||||
* @author hj
|
||||
|
|
@ -58,6 +55,8 @@ public class HelpHero {
|
|||
|
||||
private List<Baubles> baublesList = new ArrayList<>();
|
||||
|
||||
private Set<Integer> heroGiftEquipList = new HashSet<>();//礼物装备列表
|
||||
|
||||
public int getUid() {
|
||||
return uid;
|
||||
}
|
||||
|
|
@ -145,4 +144,16 @@ public class HelpHero {
|
|||
public void setBaublesList(List<Baubles> baublesList) {
|
||||
this.baublesList = baublesList;
|
||||
}
|
||||
|
||||
public Map<Integer, Integer> getHomeEquipMap() {
|
||||
return homeEquipMap;
|
||||
}
|
||||
|
||||
public Set<Integer> getHeroGiftEquipList() {
|
||||
return heroGiftEquipList;
|
||||
}
|
||||
|
||||
public void setHeroGiftEquipList(Set<Integer> heroGiftEquipList) {
|
||||
this.heroGiftEquipList = heroGiftEquipList;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -7000,18 +7000,17 @@ public class HeroLogic {
|
|||
|
||||
HeroInfoProto.PotentialUpLvResponse.Builder builder = HeroInfoProto.PotentialUpLvResponse.newBuilder();
|
||||
builder.setUpLv(hero.getPotentialLv(type));
|
||||
builder.setGiftLv(getGiftPotentialLv(user, heroId));
|
||||
builder.setGiftLv(getGiftPotentialLv(user, hero));
|
||||
MessageUtil.sendMessage(iSession, 1, MessageTypeProto.MessageType.PotentialUpLvResponse_VALUE, builder.build(), true);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取礼物加成得潜能等级
|
||||
*/
|
||||
public int getGiftPotentialLv(User user, String heroId) {
|
||||
public int getGiftPotentialLv(User user, Hero hero) {
|
||||
Map<Integer, SEquipConfig> configMap = SEquipConfig.equipConfigMap;
|
||||
Set<Integer> playerGiftEquipList = user.getPlayerInfoManager().getPlayerGiftEquipList();
|
||||
|
||||
Hero hero = user.getHeroManager().getHero(heroId);
|
||||
Set<Integer> heroGiftEquipList = hero.getHeroGiftEquipList();
|
||||
|
||||
HashSet<Integer> set = new HashSet<>();
|
||||
|
|
@ -7081,7 +7080,7 @@ public class HeroLogic {
|
|||
if (!openPotential) {
|
||||
return 0;
|
||||
}
|
||||
int giftPotentialLv = getGiftPotentialLv(user, hero.getId());
|
||||
int giftPotentialLv = getGiftPotentialLv(user, hero);
|
||||
int potentialLv = hero.getPotentialLv(type);
|
||||
SPotentialNew potentialNew = SPotentialNew.typeMap.get(type).get(potentialLv + giftPotentialLv);
|
||||
if (potentialNew == null) {
|
||||
|
|
|
|||
|
|
@ -1065,7 +1065,7 @@ public class PlayerLogic {
|
|||
|
||||
builder.setForce(HeroLogic.getInstance().calForce(heroNotBufferAttribute));
|
||||
builder.setHero(CBean2Proto.getHongmengHero(userInMem, hero));
|
||||
builder.setPlayerGiftLv(HeroLogic.getInstance().getGiftPotentialLv(userInMem, heroId));
|
||||
builder.setPlayerGiftLv(HeroLogic.getInstance().getGiftPotentialLv(userInMem, hero));
|
||||
Map<Integer, Integer> guildSkill = userInMem.getGuildMyInfo().getGuildSkill();
|
||||
int profession = SCHero.getsCHero().get(hero.getTemplateId()).getProfession();
|
||||
Integer skill = guildSkill.getOrDefault(profession, 0);
|
||||
|
|
|
|||
Loading…
Reference in New Issue