【ID1007808】【ID1007804】【ID1007810】【公会援助】公会援助报错 和猎妖之路圣物不生效
parent
0f21f209d4
commit
761fb9901d
|
@ -89,32 +89,32 @@ public class Repot37EventUtil {
|
|||
|
||||
|
||||
public static boolean Report37Chat(User user,Object... parm){
|
||||
ServerProperties serverProperties = GameApplication.serverProperties;
|
||||
if(!serverProperties.isSendlog37()){
|
||||
return true;
|
||||
}
|
||||
final ExecutorService exec = Executors.newFixedThreadPool(1);
|
||||
Callable<Report37Response> call = new Callable<Report37Response>() {
|
||||
@Override
|
||||
public Report37Response call(){
|
||||
Report37Response report37Response = hadResReport(Report37Response.class, user, Report37EventType.CHECK_CHAT_CONTENT, parm);
|
||||
return report37Response;
|
||||
}
|
||||
};
|
||||
try {
|
||||
Future<Report37Response> future = exec.submit(call);
|
||||
Report37Response response = future.get(1000*2,TimeUnit.MILLISECONDS);
|
||||
if(response.getState()==1){
|
||||
return true;
|
||||
}
|
||||
}catch (TimeoutException ex){
|
||||
return true;
|
||||
}catch (Exception e){
|
||||
e.printStackTrace();
|
||||
}finally {
|
||||
exec.shutdown();
|
||||
}
|
||||
return false;
|
||||
// ServerProperties serverProperties = GameApplication.serverProperties;
|
||||
// if(!serverProperties.isSendlog37()){
|
||||
// return true;
|
||||
// }
|
||||
// final ExecutorService exec = Executors.newFixedThreadPool(1);
|
||||
// Callable<Report37Response> call = new Callable<Report37Response>() {
|
||||
// @Override
|
||||
// public Report37Response call(){
|
||||
// Report37Response report37Response = hadResReport(Report37Response.class, user, Report37EventType.CHECK_CHAT_CONTENT, parm);
|
||||
// return report37Response;
|
||||
// }
|
||||
// };
|
||||
// try {
|
||||
// Future<Report37Response> future = exec.submit(call);
|
||||
// Report37Response response = future.get(1000*2,TimeUnit.MILLISECONDS);
|
||||
// if(response.getState()==1){
|
||||
// return true;
|
||||
// }
|
||||
// }catch (TimeoutException ex){
|
||||
// return true;
|
||||
// }catch (Exception e){
|
||||
// e.printStackTrace();
|
||||
// }finally {
|
||||
// exec.shutdown();
|
||||
// }
|
||||
return true;
|
||||
}
|
||||
|
||||
public enum Report37EventType {
|
||||
|
|
|
@ -82,7 +82,9 @@ public class EndConfirmExpeditionBattleRequestHandler extends BaseHandler<Expedi
|
|||
throw new ErrorCodeException(ErrorCode.CFG_NULL);
|
||||
}
|
||||
int maxTime = sExpeditionSetting.getFightTime();
|
||||
CommonProto.FightTeamInfo fightTeamInfo = FightUtil.makePersonFightDataWithDouble(user,teamId,user.getExpeditionManager().getHeroHP());
|
||||
//CommonProto.FightTeamInfo fightTeamInfo = FightUtil.makePersonFightDataWithDouble(user,teamId,user.getExpeditionManager().getHeroHP());
|
||||
CommonProto.FightTeamInfo fightTeamInfo = ExpeditionLogic.getFightTeamInfoWithDouble(user,teamId,user.getExpeditionManager().getHeroHP());
|
||||
|
||||
|
||||
|
||||
SnapFightInfo deffightInfo = nodeInfo.getSnapFightInfo();
|
||||
|
|
|
@ -44,13 +44,18 @@ public class GuildSendHelpMessageRequestHandler extends BaseHandler<Family.Guild
|
|||
boolean isfinish =true;
|
||||
SGuildHelpConfig sGuildHelpConfig = STableManager.getConfig(SGuildHelpConfig.class).get(1);
|
||||
|
||||
for (Map.Entry<Integer,Integer> entry:guildMyInfo.getGuidHelpHadTakeInfo().entrySet()) {
|
||||
if(entry.getValue()<sGuildHelpConfig.getRecourseTime()[1]){
|
||||
isfinish = false;
|
||||
break;
|
||||
if(guildMyInfo.getGuidHelpInfo().size()!=sGuildHelpConfig.getRecourseTime()[0]){
|
||||
isfinish = false;
|
||||
}else {
|
||||
for (Map.Entry<Integer,Integer> entry:guildMyInfo.getGuidHelpInfo().entrySet()) {
|
||||
if(entry.getValue()<sGuildHelpConfig.getRecourseTime()[1]){
|
||||
isfinish = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
if(!isfinish){
|
||||
|
||||
if(isfinish){
|
||||
throw new ErrorCodeException("求援已完成");
|
||||
}
|
||||
//send time out
|
||||
|
|
|
@ -72,10 +72,12 @@ public class GuildSendHelpRequestHandler extends BaseHandler<Family.GuildSendHel
|
|||
Family.GuildHelpInfoIndication.Builder builder = Family.GuildHelpInfoIndication.newBuilder();
|
||||
for (int type:typeList) {
|
||||
guildMyInfo.putGuidHelpInfo(type,0);
|
||||
|
||||
}
|
||||
for (Map.Entry<Integer, Integer> entry : user.getGuildMyInfo().getGuidHelpInfo().entrySet()) {
|
||||
builder.addGuildHelpInfo(CommonProto.GuildHelpInfo.newBuilder().setHadtakenum(user.getGuildMyInfo().getGuidHelpHadTakeInfo().getOrDefault(entry.getKey(),0)).setType(entry.getKey()).setHadtakenum(0).setNum(0));
|
||||
builder.addGuildHelpInfo(CommonProto.GuildHelpInfo.newBuilder()
|
||||
.setHadtakenum(user.getGuildMyInfo().getGuidHelpHadTakeInfo().getOrDefault(entry.getKey(),0))
|
||||
.setType(entry.getKey())
|
||||
.setNum(0));
|
||||
}
|
||||
|
||||
//notify all change
|
||||
|
|
|
@ -184,7 +184,7 @@ public class ExpeditionLogic {
|
|||
.setState(state)
|
||||
.build());
|
||||
|
||||
if(nodeInfo1.getType()==ExpeditionLogic.NODETYPE_SHOP){
|
||||
if(nodeInfo1.getType()==ExpeditionLogic.NODETYPE_SHOP&&newlay==nodeInfo1.getLay()){
|
||||
try {
|
||||
//更新商店
|
||||
StoreLogic.initOneStore(user, 56);
|
||||
|
@ -940,12 +940,24 @@ public class ExpeditionLogic {
|
|||
}
|
||||
StringBuilder skillSb = new StringBuilder();
|
||||
StringBuilder propertySb = new StringBuilder();
|
||||
String heroSkill = HeroLogic.getInstance().getHeroSkills(user,hero,skillSb).toString();
|
||||
HeroLogic.getInstance().getHeroSkills(user,hero,skillSb).toString();
|
||||
|
||||
if(teamId==GlobalsDef.EXPEDITION_TEAM){
|
||||
ExpeditionManager expeditionManager = user.getExpeditionManager();
|
||||
Set<SExpeditionHolyConfig> expeditionHolyConfigs = ExpeditionLogic.getFirstRankHoly(expeditionManager);
|
||||
for (SExpeditionHolyConfig expeditionHolyConfig:expeditionHolyConfigs) {
|
||||
SPassiveSkillLogicConfig config = SPassiveSkillLogicConfig.getConfig(expeditionHolyConfig.getPassiveSkillId());
|
||||
if(config!=null &&config.getEffectiveRange()==1){
|
||||
skillSb.append(expeditionHolyConfig.getPassiveSkillId()).append("#");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
String property = HeroLogic.getInstance().getHeroPropertyBuilder(propertySb, hero.getTemplateId(),hero.getLevel(), heroAttributeMap).toString();
|
||||
CommonProto.FightUnitInfo heroFightInfo = CommonProto.FightUnitInfo
|
||||
.newBuilder()
|
||||
.setUnitId(Integer.toString(hero.getTemplateId()))
|
||||
.setUnitSkillIds(heroSkill.substring(0,heroSkill.length()-1))
|
||||
.setUnitSkillIds(skillSb.substring(0,skillSb.length()-1))
|
||||
.setProperty(property.substring(0, property.length()-1))
|
||||
.setPosition(teamPosHeroInfo.getPosition())
|
||||
.setStar(hero.getStar())
|
||||
|
@ -956,22 +968,22 @@ public class ExpeditionLogic {
|
|||
//TOO 添加被动技能
|
||||
String pokenmonPassiveSkills = HeroLogic.getInstance().getPokenmonPassiveSkills(user, teamId);
|
||||
|
||||
ExpeditionManager expeditionManager = user.getExpeditionManager();
|
||||
Set<SExpeditionHolyConfig> expeditionHolyConfigs = ExpeditionLogic.getFirstRankHoly(expeditionManager);
|
||||
StringBuilder passiveSkillResult = new StringBuilder();
|
||||
if(pokenmonPassiveSkills.length()!=0){
|
||||
passiveSkillResult.append("|");
|
||||
}
|
||||
for (SExpeditionHolyConfig config:expeditionHolyConfigs) {
|
||||
passiveSkillResult.append(String.valueOf(config.getPassiveSkillId())).append("|");
|
||||
}
|
||||
|
||||
String holySkill = passiveSkillResult.length()!=0?passiveSkillResult.substring(0,passiveSkillResult.length()-1):"";
|
||||
// ExpeditionManager expeditionManager = user.getExpeditionManager();
|
||||
// Set<SExpeditionHolyConfig> expeditionHolyConfigs = ExpeditionLogic.getFirstRankHoly(expeditionManager);
|
||||
// StringBuilder passiveSkillResult = new StringBuilder();
|
||||
// if(pokenmonPassiveSkills.length()!=0){
|
||||
// passiveSkillResult.append("|");
|
||||
// }
|
||||
// for (SExpeditionHolyConfig config:expeditionHolyConfigs) {
|
||||
// passiveSkillResult.append(String.valueOf(config.getPassiveSkillId())).append("|");
|
||||
// }
|
||||
//
|
||||
// String holySkill = passiveSkillResult.length()!=0?passiveSkillResult.substring(0,passiveSkillResult.length()-1):"";
|
||||
return CommonProto.FightTeamInfo.
|
||||
newBuilder()
|
||||
.addAllFightUnitList(heroFightInfos)
|
||||
.setTeamSkillList(HeroLogic.getInstance().getPokenmonSkills(user,teamId))
|
||||
.setTeamPassiveList(pokenmonPassiveSkills+holySkill)
|
||||
.setTeamPassiveList(pokenmonPassiveSkills)
|
||||
.setSpecialPassive(SpecialForTeamBuildEnum.toParm(teamId,user))
|
||||
.build();
|
||||
}
|
||||
|
|
|
@ -1403,7 +1403,7 @@ public class GuildLogic {
|
|||
|
||||
boolean isfinish =true;
|
||||
SGuildHelpConfig sGuildHelpConfig = STableManager.getConfig(SGuildHelpConfig.class).get(1);
|
||||
if(guildMyInfo.getGuidHelpInfo().size()==sGuildHelpConfig.getRecourseTime()[0]){
|
||||
if(guildMyInfo.getGuidHelpHadTakeInfo().size()==sGuildHelpConfig.getRecourseTime()[0]){
|
||||
for (Map.Entry<Integer,Integer> entry:guildMyInfo.getGuidHelpHadTakeInfo().entrySet()) {
|
||||
if(entry.getValue()<sGuildHelpConfig.getRecourseTime()[1]){
|
||||
isfinish = false;
|
||||
|
@ -1415,6 +1415,7 @@ public class GuildLogic {
|
|||
}
|
||||
if(isfinish&&!guildMyInfo.isGuildHelpReward()){
|
||||
list.add(sGuildHelpConfig.getReward());
|
||||
guildMyInfo.setGuildHelpReward(true);
|
||||
}
|
||||
|
||||
String mailReward = ItemUtil.getMailReward(list);
|
||||
|
|
|
@ -18,6 +18,7 @@ import com.ljsd.jieling.logic.activity.event.*;
|
|||
import com.ljsd.jieling.logic.activity.eventhandler.HeroFiveStarGetEventHandler;
|
||||
import com.ljsd.jieling.logic.dao.*;
|
||||
import com.ljsd.jieling.logic.dao.root.User;
|
||||
import com.ljsd.jieling.logic.expedition.ExpeditionLogic;
|
||||
import com.ljsd.jieling.logic.fight.CombatLogic;
|
||||
import com.ljsd.jieling.logic.fight.passiveSkillCal.PassiveskillCalEnum;
|
||||
import com.ljsd.jieling.logic.item.ItemLogic;
|
||||
|
@ -1434,14 +1435,29 @@ public class HeroLogic{
|
|||
|
||||
//被动技能加成
|
||||
List<Integer> heroSkillList = CombatLogic.getInstance().passiveskillEffect(user, hero,teamId);
|
||||
|
||||
if(teamId==GlobalsDef.EXPEDITION_TEAM){
|
||||
ExpeditionManager expeditionManager = user.getExpeditionManager();
|
||||
Set<SExpeditionHolyConfig> expeditionHolyConfigs = ExpeditionLogic.getFirstRankHoly(expeditionManager);
|
||||
for (SExpeditionHolyConfig config:expeditionHolyConfigs) {
|
||||
heroSkillList.add(config.getPassiveSkillId());
|
||||
}
|
||||
}
|
||||
|
||||
Map<Integer, Integer> heroSkillAdMap = new HashMap<>();
|
||||
heroSkillList.forEach(skill->{
|
||||
SPassiveSkillLogicConfig config = SPassiveSkillLogicConfig.getConfig(skill);
|
||||
if(null!=config.getValue()&&config.getValue().length>2&&config.getValue()[2] !=4){
|
||||
PassiveskillCalEnum.calEnumMap.get(config.getType()).getPassiveSkillProcessor().process(config,hero,heroSkillAdMap);
|
||||
PassiveskillCalEnum passiveskillCalEnum = PassiveskillCalEnum.calEnumMap.get(config.getType());
|
||||
if(null!= passiveskillCalEnum){
|
||||
passiveskillCalEnum.getPassiveSkillProcessor().process(config,hero,heroSkillAdMap);
|
||||
}
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
|
||||
|
||||
if(!heroSkillAdMap.isEmpty()){
|
||||
combinedAttribute(heroSkillAdMap,heroAllAttribute);
|
||||
heroSkillAdMap.clear();
|
||||
|
@ -1469,7 +1485,10 @@ public class HeroLogic{
|
|||
heroSkillList.forEach(skill->{
|
||||
SPassiveSkillLogicConfig configTmp = SPassiveSkillLogicConfig.getConfig(skill);
|
||||
if(null!=configTmp.getValue()&&configTmp.getValue().length>2&&configTmp.getValue()[2] ==4){
|
||||
PassiveskillCalEnum.calEnumMap.get(configTmp.getType()).getPassiveSkillProcessor().process(configTmp,hero,heroSkillAdMap);
|
||||
PassiveskillCalEnum passiveskillCalEnum = PassiveskillCalEnum.calEnumMap.get(configTmp.getType());
|
||||
if(null!= passiveskillCalEnum){
|
||||
passiveskillCalEnum.getPassiveSkillProcessor().process(configTmp,hero,heroSkillAdMap);
|
||||
}
|
||||
}
|
||||
});
|
||||
if(!heroSkillAdMap.isEmpty()){
|
||||
|
|
Loading…
Reference in New Issue