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