工会副本修改
parent
171bbd248d
commit
52cbb01232
|
@ -87,9 +87,9 @@ public class GuildChallengeLogic {
|
|||
int size = STableManager.getConfig(SGuildCheckpointConfig.class).size();
|
||||
if(guildInfo.getBossHpRemain()==-1){
|
||||
if(size>currBossId){
|
||||
currBossId++;
|
||||
guildInfo.setCurrBossId(currBossId+1);
|
||||
guildInfo.setBossHpRemain(0);
|
||||
currBossId++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -203,6 +203,7 @@ public class GuildChallengeLogic {
|
|||
int damageInt = checkResult[1];
|
||||
|
||||
if(checkResult[0]==1) {
|
||||
if(guildInfo.getBossHpRemain()!=-1){
|
||||
kill = 1;
|
||||
//重置boss血量
|
||||
if(guildInfo.getCurrBossId()!=configMap.size()){
|
||||
|
@ -220,6 +221,7 @@ public class GuildChallengeLogic {
|
|||
} else {
|
||||
guildInfo.updateExp(guildInfo.getExp() + config.getLegionExp());
|
||||
}
|
||||
}
|
||||
}else if(checkResult[0]==0){
|
||||
//怪物保持在第四位
|
||||
if(guildInfo.getBossHpRemain()!=-1){
|
||||
|
@ -267,14 +269,13 @@ public class GuildChallengeLogic {
|
|||
if(!error.isEmpty()){
|
||||
throw new ErrorCodeException(ErrorCode.SERVER_SELF_DEFINE);
|
||||
}
|
||||
if(guildInfo.getBossHpRemain()!=-1){
|
||||
if(guildInfo.getBossHpRemain()!=-1||kill==1){
|
||||
AbstractRank rank = RankContext.getRankEnum(RankEnum.GUILD_CHALLENGE_RANK.getType());
|
||||
long score = Double.valueOf(rank.getScoreById(user.getId(), guildId+":"+bossId)).longValue();
|
||||
rank.addRank(uid,guildId+":"+bossId,score==-1?damage:score+damage);
|
||||
}
|
||||
if(kill==1){
|
||||
//如果不是最后一个boss更特权
|
||||
if(guildInfo.getCurrBossId()-1!=configMap.size()){
|
||||
GuildLogic.sendFamilyBaseUpdateIndication(guildInfo);
|
||||
Map<Integer, Set<Integer>> members = guildInfo.getMembers();
|
||||
for(Set<Integer> items : members.values()){
|
||||
|
@ -304,7 +305,7 @@ public class GuildChallengeLogic {
|
|||
ProtocolsManager.getInstance().updateAyncWorker(worker);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//异步发奖
|
||||
Runnable runnable = () -> sendRankReward(guildId,bossId);
|
||||
runnable.run();
|
||||
|
|
Loading…
Reference in New Issue