diff --git a/serverlogic/src/main/java/com/ljsd/jieling/logic/family/GuildLogic.java b/serverlogic/src/main/java/com/ljsd/jieling/logic/family/GuildLogic.java index fa3599549..770f911d9 100644 --- a/serverlogic/src/main/java/com/ljsd/jieling/logic/family/GuildLogic.java +++ b/serverlogic/src/main/java/com/ljsd/jieling/logic/family/GuildLogic.java @@ -4,9 +4,11 @@ import com.google.protobuf.GeneratedMessage; import com.ljsd.jieling.config.SErrorCodeEerverConfig; import com.ljsd.jieling.config.SGuildSetting; import com.ljsd.jieling.core.GlobalsDef; +import com.ljsd.jieling.db.mongo.MongoUtil; import com.ljsd.jieling.db.redis.RedisKey; import com.ljsd.jieling.db.redis.RedisUtil; import com.ljsd.jieling.globals.BIReason; +import com.ljsd.jieling.globals.Global; import com.ljsd.jieling.handler.map.MapManager; import com.ljsd.jieling.handler.map.behavior.BehaviorUtil; import com.ljsd.jieling.logic.OnlineUserManager; @@ -18,6 +20,7 @@ import com.ljsd.jieling.logic.dao.root.User; import com.ljsd.jieling.logic.fight.CheckFight; import com.ljsd.jieling.logic.hero.HeroAttributeEnum; import com.ljsd.jieling.logic.hero.HeroLogic; +import com.ljsd.jieling.logic.mail.MailLogic; import com.ljsd.jieling.network.session.ISession; import com.ljsd.jieling.protocols.CommonProto; import com.ljsd.jieling.protocols.Family; @@ -587,6 +590,11 @@ public class GuildLogic { public static void releaseGuild(GuildInfo guildInfo) throws Exception { Map> members = guildInfo.getMembers(); Family.FamilyKickIndication build = Family.FamilyKickIndication.newBuilder().setType(2).build(); + String title = SErrorCodeEerverConfig.getI18NMessage("guild_breakup_title"); + Set chairmans = guildInfo.getMembers().get(GlobalsDef.CHAIRMAN); + Integer chairmanUid = chairmans.iterator().next(); + User chairmanUser = UserManager.getUser(chairmanUid); + String content = SErrorCodeEerverConfig.getI18NMessage("guild_breakup_txt",new String[]{guildInfo.getName(),chairmanUser.getPlayerInfoManager().getNickName()}); for(Set items : members.values()){ for(Integer sendUid : items){ ISession session = OnlineUserManager.getSessionByUid(sendUid); @@ -595,10 +603,11 @@ public class GuildLogic { } User user = UserManager.getUser(sendUid); user.getPlayerInfoManager().setGuildId(0); + MailLogic.getInstance().sendMail(user.getId(),title,content,"",(int)(System.currentTimeMillis()/1000), Global.MAIL_EFFECTIVE_TIME); } } - GuilidManager.removeGuildInfo(guildInfo); + MongoUtil.getInstence().lastUpdate(); } diff --git a/serverlogic/src/main/java/com/ljsd/jieling/logic/hero/HeroLogic.java b/serverlogic/src/main/java/com/ljsd/jieling/logic/hero/HeroLogic.java index 59b69aef0..6eb593782 100644 --- a/serverlogic/src/main/java/com/ljsd/jieling/logic/hero/HeroLogic.java +++ b/serverlogic/src/main/java/com/ljsd/jieling/logic/hero/HeroLogic.java @@ -159,12 +159,14 @@ public class HeroLogic { } } + boolean isSpecial = false; if(sLotterySetting.getOrderBoxPool()!=null && sLotterySetting.getOrderBoxPool().length>0){ pooId = getOrderBoxPoolId(sLotterySetting); if(pooId == 0){ MessageUtil.sendErrorResponse(session, 0, MessageTypeProto.MessageType.HERO_RAND_RESPONSE_VALUE,""); return; } + isSpecial =true; } //检验消耗 @@ -215,7 +217,10 @@ public class HeroLogic { if(reward!=null){ dropHeroAndItem[j++] = reward; } - pooId=0; + if(!isSpecial){ + pooId=0; + } + } //1群英招募 @@ -913,7 +918,6 @@ public class HeroLogic { } public Map calHeroNotBufferAttribute(User user, Hero hero,boolean isForce,int teamId){ - LOGGER.info("cal herotid = {}",hero.getTemplateId()); Map heroAllAttribute = calHeroAllAttribute(hero,isForce); heroAllAttribute.put(HeroAttributeEnum.CurHP.getPropertyId(),heroAllAttribute.get(GlobalsDef.HP_TYPE)); Collection values = hero.getEquipByPositionMap().values(); @@ -1122,7 +1126,7 @@ public class HeroLogic { float score = sPropertyConfig.getScore(); result += propertyValue*score; - LOGGER.info("the propertyId={} the value is ={},propertyValue={},score={},result ={},the value={}",propertyId,propertyValue*score,propertyValue,score,result,propertyValue*score); + //LOGGER.info("the propertyId={} the value is ={},propertyValue={},score={},result ={},the value={}",propertyId,propertyValue*score,propertyValue,score,result,propertyValue*score); } return (int)result; } @@ -1135,7 +1139,7 @@ public class HeroLogic { propertyValue += heroAttributeMap.get(propertyId); } heroAttributeMap.put(propertyId,propertyValue); - LOGGER.info("the propertyId={} the propertyValue is ={},",propertyId,propertyValue); + // LOGGER.info("the propertyId={} the propertyValue is ={},",propertyId,propertyValue); } } public void combinedAttribute(int[][] otherAttriMap,Map heroAttributeMap){ diff --git a/serverlogic/src/main/java/com/ljsd/jieling/util/MessageUtil.java b/serverlogic/src/main/java/com/ljsd/jieling/util/MessageUtil.java index 5ebe34515..3d93ddf7f 100644 --- a/serverlogic/src/main/java/com/ljsd/jieling/util/MessageUtil.java +++ b/serverlogic/src/main/java/com/ljsd/jieling/util/MessageUtil.java @@ -33,7 +33,7 @@ public class MessageUtil { backMessage = new byte[0]; } else { backMessage = generatedMessage.toByteArray(); - LOGGER.info(JsonFormat.printToString(generatedMessage)); + // LOGGER.info(JsonFormat.printToString(generatedMessage)); } int length = PackageConstant.UID_FIELD_LEN + PackageConstant.TOKEN_LEN