公会提示,怪物战力计算
parent
d93f8c2242
commit
c9ae1a8ccd
|
|
@ -139,6 +139,7 @@ public enum ErrorCode implements IErrorCode {
|
|||
MAP_IN(105,"在地图探索中,不可以操作"),
|
||||
HERO_LIVE_AGAIN(106,"英雄{0}秒后复活"),
|
||||
REWARD_COLLECTING(107,"奖励正在积攒中!"),
|
||||
JOINED_OTHER_FAMILY(108,"您已加入其他公会,无法创建公会!")
|
||||
|
||||
;
|
||||
private static final Set<Integer> CodeSet = new HashSet<>();
|
||||
|
|
|
|||
|
|
@ -138,6 +138,9 @@ public class GuildLogic {
|
|||
if(!enough){
|
||||
throw new ErrorCodeException(ErrorCode.ITEM_NOT_ENOUGH);
|
||||
}
|
||||
if(user.getPlayerInfoManager().getGuildId()!=0){
|
||||
throw new ErrorCodeException(ErrorCode.JOINED_OTHER_FAMILY);
|
||||
}
|
||||
return "";
|
||||
}
|
||||
|
||||
|
|
@ -283,8 +286,6 @@ public class GuildLogic {
|
|||
}
|
||||
try {
|
||||
applyToJoin(guildInfo,uid,false);
|
||||
}catch (Exception e){
|
||||
LOGGER.error("the exception={}",e);
|
||||
}finally {
|
||||
RedisUtil.getInstence().releaseDistributedLock(RedisKey.OPERATE_FAMILY,Integer.toString(guildId), Integer.toString(uid));
|
||||
}
|
||||
|
|
@ -476,8 +477,6 @@ public class GuildLogic {
|
|||
MessageUtil.sendIndicationMessage(OnlineUserManager.getSessionByUid(applyId),1, MessageTypeProto.MessageType.FAMILY_REFUSE_JOIN_INDICATION_VALUE,refuseName,true);
|
||||
break;
|
||||
}
|
||||
}catch (Exception e){
|
||||
LOGGER.error("the exception={}",e);
|
||||
}finally {
|
||||
RedisUtil.getInstence().releaseDistributedLock(RedisKey.OPERATE_FAMILY_APPLY,Integer.toString(guildId), Integer.toString(uid));
|
||||
}
|
||||
|
|
@ -496,10 +495,6 @@ public class GuildLogic {
|
|||
return;
|
||||
}
|
||||
GuilidManager.removeOneApplyGuildInfos(guildInfo.getId(),applyId);
|
||||
if(targetUser.getPlayerInfoManager().getGuildId()!=0){
|
||||
// MessageUtil.sendErrorResponse();
|
||||
return;
|
||||
}
|
||||
guildInfo.addMembers(GlobalsDef.MEMBER,applyId);
|
||||
targetUser.getPlayerInfoManager().setGuildId(guildInfo.getId());
|
||||
PlayerInfoCache cache = RedisUtil.getInstence().getMapEntry(RedisKey.PLAYER_INFO_CACHE, "", String.valueOf(applyId), PlayerInfoCache.class);
|
||||
|
|
@ -508,8 +503,6 @@ public class GuildLogic {
|
|||
AyyncWorker ayyncWorker = new AyyncWorker(targetUser, true, new AynMissionWorker(GameEvent.JOIN_FAMILY));
|
||||
ProtocolsManager.getInstance().updateAyncWorker(ayyncWorker);
|
||||
// targetUser.getUserMissionManager().onGameEvent(targetUser, GameEvent.JOIN_FAMILY);
|
||||
}catch (Exception e){
|
||||
LOGGER.error("the exception={}",e);
|
||||
}finally {
|
||||
RedisUtil.getInstence().releaseDistributedLock(RedisKey.OPERATE_FAMILY_APPLY_JOIN,Integer.toString(applyId), Integer.toString(applyId));
|
||||
}
|
||||
|
|
|
|||
|
|
@ -94,7 +94,7 @@ public class MonsterUtil {
|
|||
totalMonsterForce+=monsterForce;
|
||||
}
|
||||
}
|
||||
totalMonsterForce = (int)(totalMonsterForce*(1.1-0.1*monsterCount));
|
||||
totalMonsterForce = (int)(totalMonsterForce*((1.1-0.1*monsterCount)>0.8?(1.1-0.1*monsterCount):0.8));
|
||||
if(totalMonsterForce>maxForce){
|
||||
maxForce = totalMonsterForce;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue