宝器战力问题
parent
7a02f3271b
commit
3e04227362
|
@ -374,11 +374,29 @@ public class CoreService implements RPCRequestIFace.Iface {
|
|||
jsonObject.getJSONObject("itemManager").put("itemMap",new HashMap<>());
|
||||
jsonObject.remove("mailManager");
|
||||
jsonObject.remove("storeManager");
|
||||
jsonObject.getJSONObject("equipManager").put("jewelMap", getJewelManager(user));
|
||||
return jsonObject.toString();
|
||||
}
|
||||
return "";
|
||||
}
|
||||
|
||||
public HashMap<String, Jewel> getJewelManager(User user){
|
||||
HashMap<String, Jewel> jewelMap = new HashMap<>();
|
||||
try {
|
||||
Map<String, com.ljsd.jieling.logic.dao.PropertyItem> equipMap = user.getEquipManager().getEquipMap();
|
||||
for (Map.Entry<String, com.ljsd.jieling.logic.dao.PropertyItem> entry : equipMap.entrySet()) {
|
||||
com.ljsd.jieling.logic.dao.PropertyItem propertyItem = entry.getValue();
|
||||
if (propertyItem instanceof Jewel){
|
||||
Jewel jewel = (Jewel) propertyItem;
|
||||
jewelMap.put(entry.getKey(), jewel);
|
||||
}
|
||||
}
|
||||
}catch (Exception e){
|
||||
e.printStackTrace();
|
||||
}
|
||||
return jewelMap;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateUserInfoByRpc(int uid, String userStr, int type) throws TException {
|
||||
User thisUser = null;
|
||||
|
|
|
@ -2,6 +2,7 @@ package com.ljsd.jieling.logic.dao;
|
|||
|
||||
import com.ljsd.common.mogodb.MongoBase;
|
||||
import com.ljsd.jieling.logic.dao.root.User;
|
||||
import org.springframework.data.annotation.Transient;
|
||||
|
||||
import java.util.*;
|
||||
|
||||
|
@ -11,9 +12,8 @@ public class EquipManager extends MongoBase {
|
|||
private final Map<String,Faxiang> faxiangMap = new HashMap<>();
|
||||
private final Set<Integer> equipBookEnabled = new HashSet<>();
|
||||
private final Set<Integer> equipList = new HashSet<>();
|
||||
|
||||
// private Equip unDetermined;
|
||||
|
||||
@Transient
|
||||
private final Map<String,Jewel> jewelMap = new HashMap<>();
|
||||
private final Map<Integer,Integer> equipHandBook;
|
||||
|
||||
private int soulEquipPool;//占星装备卡池
|
||||
|
@ -56,6 +56,10 @@ public class EquipManager extends MongoBase {
|
|||
}
|
||||
}
|
||||
|
||||
public Map<String, Jewel> getJewelMap() {
|
||||
return jewelMap;
|
||||
}
|
||||
|
||||
public Map<String, PropertyItem> getEquipMap() {
|
||||
return equipMap;
|
||||
}
|
||||
|
|
|
@ -27,12 +27,10 @@ import com.ljsd.jieling.logic.activity.eventhandler.PokemonFiveStarGetEventHandl
|
|||
import com.ljsd.jieling.logic.activity.eventhandler.SaveHeroForceEventHandler;
|
||||
import com.ljsd.jieling.logic.activity.fourChallenge.FourChallengeLogic;
|
||||
import com.ljsd.jieling.logic.dao.*;
|
||||
import com.ljsd.jieling.logic.dao.cross.CSPlayer;
|
||||
import com.ljsd.jieling.logic.dao.root.User;
|
||||
import com.ljsd.jieling.logic.dao.vo.HeroVo;
|
||||
import com.ljsd.jieling.logic.expedition.ExpeditionLogic;
|
||||
import com.ljsd.jieling.logic.fight.CombatLogic;
|
||||
import com.ljsd.jieling.logic.fight.DuoduiTowerLogic;
|
||||
import com.ljsd.jieling.logic.fight.passiveSkillCal.PassiveskillCalEnum;
|
||||
import com.ljsd.jieling.logic.fight.specialparm.SpecialForTeamBuildEnum;
|
||||
import com.ljsd.jieling.logic.help.HelpHero;
|
||||
|
@ -3090,11 +3088,12 @@ public class HeroLogic {
|
|||
if (propertyItem instanceof Jewel){
|
||||
jewel = (Jewel) propertyItem;
|
||||
}else {
|
||||
jewel = new Jewel();
|
||||
jewel.setHeroId(propertyItem.getHeroId());
|
||||
jewel.setLevel(propertyItem.getLevel());
|
||||
jewel.setEquipId(propertyItem.getEquipId());
|
||||
jewel.setBuildLevel(1);
|
||||
Map<String, Jewel> jewelMap = equipManager.getJewelMap();
|
||||
jewel = jewelMap.get(jewelId);
|
||||
if (jewel == null){
|
||||
LOGGER.error("计算战力,英雄:{}-{},宝器:{},数据库内找不到",hero.getId(),hero.getTemplateId(),jewelId);
|
||||
continue;
|
||||
}
|
||||
}
|
||||
SJewelConfig config = STableManager.getConfig(SJewelConfig.class).get(jewel.getEquipId());
|
||||
// 进阶
|
||||
|
|
Loading…
Reference in New Issue