大闹天宫 优化
parent
1c97143e97
commit
86103f1067
|
@ -84,30 +84,9 @@ public class EndConfirmExpeditionBattleRequestHandler extends BaseHandler<Expedi
|
||||||
SnapFightInfo deffightInfo = nodeInfo.getSnapFightInfo();
|
SnapFightInfo deffightInfo = nodeInfo.getSnapFightInfo();
|
||||||
|
|
||||||
//添加被动技能
|
//添加被动技能
|
||||||
ExpeditionManager expeditionManager = user.getExpeditionManager();
|
|
||||||
Set<SExpeditionHolyConfig> expeditionHolyConfigs = ExpeditionLogic.getFirstRankHoly(expeditionManager);
|
|
||||||
|
|
||||||
StringBuilder passiveSkillResult = new StringBuilder();
|
|
||||||
if(deffightInfo.getPassiveSkills().length()!=0){
|
|
||||||
passiveSkillResult.append("|");
|
|
||||||
}
|
|
||||||
for (SExpeditionHolyConfig config:expeditionHolyConfigs) {
|
|
||||||
//如果是英雄专属的 不加进去
|
|
||||||
if(config.getPassiveSkillId()!=0){
|
|
||||||
passiveSkillResult.append(String.valueOf(config.getPassiveSkillId())).append("|");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
String holySkill = passiveSkillResult.length()!=0?passiveSkillResult.substring(0,passiveSkillResult.length()-1):"";
|
|
||||||
|
|
||||||
LuaValue getFightData;
|
LuaValue getFightData;
|
||||||
// if(ExpeditionLogic.NODETYPE_GREED == nodeInfo.getType()){
|
CommonProto.FightTeamInfo deffightTeamInfo = FightUtil.makeFightBySnapDataWithDouble(new DefFightSnapData(deffightInfo.getHeroAttribute(),deffightInfo.getHeroSkills(),deffightInfo.getPokenmonSkills(),deffightInfo.getPassiveSkills()),nodeInfo.getBossHP());
|
||||||
// int tid = deffightInfo.getUid();
|
|
||||||
// List<CommonProto.FightTeamInfo> gropFightTeamInfoWithDouble = ExpeditionLogic.getGropFightTeamInfoWithDouble(tid, nodeInfo.getBossHP());
|
|
||||||
// getFightData = FightDataUtil.getFinalFightData(fightTeamInfo, gropFightTeamInfoWithDouble);
|
|
||||||
// }else {
|
|
||||||
CommonProto.FightTeamInfo deffightTeamInfo = FightUtil.makeFightBySnapDataWithDouble(new DefFightSnapData(deffightInfo.getHeroAttribute(),deffightInfo.getHeroSkills(),deffightInfo.getPokenmonSkills(),deffightInfo.getPassiveSkills()+holySkill),nodeInfo.getBossHP());
|
|
||||||
getFightData = FightDataUtil.getFinalPlayerFightData(fightTeamInfo, deffightTeamInfo);
|
getFightData = FightDataUtil.getFinalPlayerFightData(fightTeamInfo, deffightTeamInfo);
|
||||||
// }
|
|
||||||
|
|
||||||
LuaValue getOptionData = FightDataUtil.getOptionData(uid+"");
|
LuaValue getOptionData = FightDataUtil.getOptionData(uid+"");
|
||||||
long[] checkResult = CheckFight.getInstance().checkFight(seed, maxTime, getFightData, getOptionData, GameFightType.Expediton.getFightType());
|
long[] checkResult = CheckFight.getInstance().checkFight(seed, maxTime, getFightData, getOptionData, GameFightType.Expediton.getFightType());
|
||||||
|
|
|
@ -88,7 +88,7 @@ public class TakeHolyEquipRequest extends BaseHandler<Expedition.TakeHolyEquipRe
|
||||||
|
|
||||||
//添加专属英雄圣物缓存
|
//添加专属英雄圣物缓存
|
||||||
if(sExpeditionHolyConfig.getHeroId() > 0){
|
if(sExpeditionHolyConfig.getHeroId() > 0){
|
||||||
expeditionManager.getHeroItems().put(sExpeditionHolyConfig.getHeroId(),sExpeditionHolyConfig);
|
expeditionManager.addHeroItems(sExpeditionHolyConfig);
|
||||||
}
|
}
|
||||||
|
|
||||||
//notify client
|
//notify client
|
||||||
|
|
|
@ -54,7 +54,7 @@ public class Cmd_addholy extends GmRoleAbstract{
|
||||||
}
|
}
|
||||||
//添加专属英雄圣物缓存
|
//添加专属英雄圣物缓存
|
||||||
if(sExpeditionHolyConfig.getHeroId() > 0){
|
if(sExpeditionHolyConfig.getHeroId() > 0){
|
||||||
expeditionManager.getHeroItems().put(sExpeditionHolyConfig.getHeroId(),sExpeditionHolyConfig);
|
expeditionManager.addHeroItems(sExpeditionHolyConfig);
|
||||||
}
|
}
|
||||||
|
|
||||||
//notify client
|
//notify client
|
||||||
|
|
|
@ -31,7 +31,7 @@ public class ExpeditionManager extends MongoBase {
|
||||||
private int freshTime;//刷新时间
|
private int freshTime;//刷新时间
|
||||||
@Transient
|
@Transient
|
||||||
private Map<Integer, SExpeditionHolyConfig> effectItems = new HashMap<>();//圣物叠加 不入库
|
private Map<Integer, SExpeditionHolyConfig> effectItems = new HashMap<>();//圣物叠加 不入库
|
||||||
private Map<Integer, SExpeditionHolyConfig> heroItems = new HashMap<>();//英雄专属圣物 不入库
|
private Map<Integer, Integer> heroItems = new HashMap<>();//英雄专属圣物
|
||||||
private Set<Integer> getHeroSet = new HashSet<>();//招募英雄id组 不入库
|
private Set<Integer> getHeroSet = new HashSet<>();//招募英雄id组 不入库
|
||||||
|
|
||||||
private Map<String, Hero> heroMap = new HashMap<>();
|
private Map<String, Hero> heroMap = new HashMap<>();
|
||||||
|
@ -293,7 +293,7 @@ public class ExpeditionManager extends MongoBase {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Map<Integer, SExpeditionHolyConfig> getHeroItems() {
|
public Map<Integer, Integer> getHeroItems() {
|
||||||
return heroItems;
|
return heroItems;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -301,4 +301,15 @@ public class ExpeditionManager extends MongoBase {
|
||||||
return getHeroSet;
|
return getHeroSet;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void addHeroItems(SExpeditionHolyConfig config) {
|
||||||
|
this.heroItems.put(config.getHeroId(),config.getId());
|
||||||
|
updateString("heroItems", this.heroItems);
|
||||||
|
}
|
||||||
|
|
||||||
|
public void clearHeroItems() {
|
||||||
|
this.heroItems.clear();
|
||||||
|
updateString("heroItems", this.heroItems);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -115,7 +115,7 @@ public class ExpeditionLogic {
|
||||||
manager.clearEquipToTemp();
|
manager.clearEquipToTemp();
|
||||||
manager.clearEquip();//删除多余装备
|
manager.clearEquip();//删除多余装备
|
||||||
manager.getEffectItems().clear();
|
manager.getEffectItems().clear();
|
||||||
manager.getHeroItems().clear();
|
manager.clearHeroItems();
|
||||||
manager.getGHeroSet().clear();
|
manager.getGHeroSet().clear();
|
||||||
manager.setFreshTime((int)(openTimeOfFuntionCacheByType.getStartTime()/1000));
|
manager.setFreshTime((int)(openTimeOfFuntionCacheByType.getStartTime()/1000));
|
||||||
SGlobalSystemConfig sGlobalSystemConfig = STableManager.getConfig(SGlobalSystemConfig.class).get(FunctionIdEnum.Expedition.getFunctionType());
|
SGlobalSystemConfig sGlobalSystemConfig = STableManager.getConfig(SGlobalSystemConfig.class).get(FunctionIdEnum.Expedition.getFunctionType());
|
||||||
|
@ -843,7 +843,8 @@ public class ExpeditionLogic {
|
||||||
* 处理圣物英雄技能
|
* 处理圣物英雄技能
|
||||||
*/
|
*/
|
||||||
private static void disposeWithHeroHoly(User user,Hero hero,StringBuilder skillSb){
|
private static void disposeWithHeroHoly(User user,Hero hero,StringBuilder skillSb){
|
||||||
SExpeditionHolyConfig con = user.getExpeditionManager().getHeroItems().get(hero.getTemplateId());
|
int holyId = user.getExpeditionManager().getHeroItems().get(hero.getTemplateId());
|
||||||
|
SExpeditionHolyConfig con = STableManager.getConfig(SExpeditionHolyConfig.class).get(holyId);
|
||||||
if( con != null ){
|
if( con != null ){
|
||||||
int[][] skillModify = con.getSkillModify();
|
int[][] skillModify = con.getSkillModify();
|
||||||
for(int i = 0 ; i < skillModify.length ; i++){
|
for(int i = 0 ; i < skillModify.length ; i++){
|
||||||
|
|
|
@ -232,7 +232,7 @@ public class FightDataUtil {
|
||||||
LuaValue passivityDataPer= new LuaTable();
|
LuaValue passivityDataPer= new LuaTable();
|
||||||
for(int i=0;i<unitSkill.length;i++){
|
for(int i=0;i<unitSkill.length;i++){
|
||||||
LuaValue detail = new LuaTable();
|
LuaValue detail = new LuaTable();
|
||||||
if(StringUtil.isEmpty(unitSkill[i])){
|
if(StringUtil.isEmpty(unitSkill[i]) || unitSkill[i].equals("0")){
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
int passivityId = Integer.parseInt(unitSkill[i]);
|
int passivityId = Integer.parseInt(unitSkill[i]);
|
||||||
|
|
Loading…
Reference in New Issue