Merge branch 'master' of http://60.1.1.230/backend/jieling_server
commit
1fe64c05cb
|
@ -4,9 +4,11 @@ import com.google.protobuf.GeneratedMessage;
|
||||||
import com.ljsd.jieling.config.SErrorCodeEerverConfig;
|
import com.ljsd.jieling.config.SErrorCodeEerverConfig;
|
||||||
import com.ljsd.jieling.config.SGuildSetting;
|
import com.ljsd.jieling.config.SGuildSetting;
|
||||||
import com.ljsd.jieling.core.GlobalsDef;
|
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.RedisKey;
|
||||||
import com.ljsd.jieling.db.redis.RedisUtil;
|
import com.ljsd.jieling.db.redis.RedisUtil;
|
||||||
import com.ljsd.jieling.globals.BIReason;
|
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.MapManager;
|
||||||
import com.ljsd.jieling.handler.map.behavior.BehaviorUtil;
|
import com.ljsd.jieling.handler.map.behavior.BehaviorUtil;
|
||||||
import com.ljsd.jieling.logic.OnlineUserManager;
|
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.fight.CheckFight;
|
||||||
import com.ljsd.jieling.logic.hero.HeroAttributeEnum;
|
import com.ljsd.jieling.logic.hero.HeroAttributeEnum;
|
||||||
import com.ljsd.jieling.logic.hero.HeroLogic;
|
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.network.session.ISession;
|
||||||
import com.ljsd.jieling.protocols.CommonProto;
|
import com.ljsd.jieling.protocols.CommonProto;
|
||||||
import com.ljsd.jieling.protocols.Family;
|
import com.ljsd.jieling.protocols.Family;
|
||||||
|
@ -587,6 +590,11 @@ public class GuildLogic {
|
||||||
public static void releaseGuild(GuildInfo guildInfo) throws Exception {
|
public static void releaseGuild(GuildInfo guildInfo) throws Exception {
|
||||||
Map<Integer, Set<Integer>> members = guildInfo.getMembers();
|
Map<Integer, Set<Integer>> members = guildInfo.getMembers();
|
||||||
Family.FamilyKickIndication build = Family.FamilyKickIndication.newBuilder().setType(2).build();
|
Family.FamilyKickIndication build = Family.FamilyKickIndication.newBuilder().setType(2).build();
|
||||||
|
String title = SErrorCodeEerverConfig.getI18NMessage("guild_breakup_title");
|
||||||
|
Set<Integer> 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<Integer> items : members.values()){
|
for(Set<Integer> items : members.values()){
|
||||||
for(Integer sendUid : items){
|
for(Integer sendUid : items){
|
||||||
ISession session = OnlineUserManager.getSessionByUid(sendUid);
|
ISession session = OnlineUserManager.getSessionByUid(sendUid);
|
||||||
|
@ -595,10 +603,11 @@ public class GuildLogic {
|
||||||
}
|
}
|
||||||
User user = UserManager.getUser(sendUid);
|
User user = UserManager.getUser(sendUid);
|
||||||
user.getPlayerInfoManager().setGuildId(0);
|
user.getPlayerInfoManager().setGuildId(0);
|
||||||
|
MailLogic.getInstance().sendMail(user.getId(),title,content,"",(int)(System.currentTimeMillis()/1000), Global.MAIL_EFFECTIVE_TIME);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
GuilidManager.removeGuildInfo(guildInfo);
|
GuilidManager.removeGuildInfo(guildInfo);
|
||||||
|
MongoUtil.getInstence().lastUpdate();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -159,12 +159,14 @@ public class HeroLogic {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
boolean isSpecial = false;
|
||||||
if(sLotterySetting.getOrderBoxPool()!=null && sLotterySetting.getOrderBoxPool().length>0){
|
if(sLotterySetting.getOrderBoxPool()!=null && sLotterySetting.getOrderBoxPool().length>0){
|
||||||
pooId = getOrderBoxPoolId(sLotterySetting);
|
pooId = getOrderBoxPoolId(sLotterySetting);
|
||||||
if(pooId == 0){
|
if(pooId == 0){
|
||||||
MessageUtil.sendErrorResponse(session, 0, MessageTypeProto.MessageType.HERO_RAND_RESPONSE_VALUE,"");
|
MessageUtil.sendErrorResponse(session, 0, MessageTypeProto.MessageType.HERO_RAND_RESPONSE_VALUE,"");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
isSpecial =true;
|
||||||
}
|
}
|
||||||
|
|
||||||
//检验消耗
|
//检验消耗
|
||||||
|
@ -215,7 +217,10 @@ public class HeroLogic {
|
||||||
if(reward!=null){
|
if(reward!=null){
|
||||||
dropHeroAndItem[j++] = reward;
|
dropHeroAndItem[j++] = reward;
|
||||||
}
|
}
|
||||||
pooId=0;
|
if(!isSpecial){
|
||||||
|
pooId=0;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//1群英招募
|
//1群英招募
|
||||||
|
@ -913,7 +918,6 @@ public class HeroLogic {
|
||||||
}
|
}
|
||||||
|
|
||||||
public Map<Integer,Integer> calHeroNotBufferAttribute(User user, Hero hero,boolean isForce,int teamId){
|
public Map<Integer,Integer> calHeroNotBufferAttribute(User user, Hero hero,boolean isForce,int teamId){
|
||||||
LOGGER.info("cal herotid = {}",hero.getTemplateId());
|
|
||||||
Map<Integer, Integer> heroAllAttribute = calHeroAllAttribute(hero,isForce);
|
Map<Integer, Integer> heroAllAttribute = calHeroAllAttribute(hero,isForce);
|
||||||
heroAllAttribute.put(HeroAttributeEnum.CurHP.getPropertyId(),heroAllAttribute.get(GlobalsDef.HP_TYPE));
|
heroAllAttribute.put(HeroAttributeEnum.CurHP.getPropertyId(),heroAllAttribute.get(GlobalsDef.HP_TYPE));
|
||||||
Collection<String> values = hero.getEquipByPositionMap().values();
|
Collection<String> values = hero.getEquipByPositionMap().values();
|
||||||
|
@ -1122,7 +1126,7 @@ public class HeroLogic {
|
||||||
float score = sPropertyConfig.getScore();
|
float score = sPropertyConfig.getScore();
|
||||||
|
|
||||||
result += 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);
|
//LOGGER.info("the propertyId={} the value is ={},propertyValue={},score={},result ={},the value={}",propertyId,propertyValue*score,propertyValue,score,result,propertyValue*score);
|
||||||
}
|
}
|
||||||
return (int)result;
|
return (int)result;
|
||||||
}
|
}
|
||||||
|
@ -1135,7 +1139,7 @@ public class HeroLogic {
|
||||||
propertyValue += heroAttributeMap.get(propertyId);
|
propertyValue += heroAttributeMap.get(propertyId);
|
||||||
}
|
}
|
||||||
heroAttributeMap.put(propertyId,propertyValue);
|
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<Integer,Integer> heroAttributeMap){
|
public void combinedAttribute(int[][] otherAttriMap,Map<Integer,Integer> heroAttributeMap){
|
||||||
|
|
|
@ -33,7 +33,7 @@ public class MessageUtil {
|
||||||
backMessage = new byte[0];
|
backMessage = new byte[0];
|
||||||
} else {
|
} else {
|
||||||
backMessage = generatedMessage.toByteArray();
|
backMessage = generatedMessage.toByteArray();
|
||||||
LOGGER.info(JsonFormat.printToString(generatedMessage));
|
// LOGGER.info(JsonFormat.printToString(generatedMessage));
|
||||||
}
|
}
|
||||||
|
|
||||||
int length = PackageConstant.UID_FIELD_LEN + PackageConstant.TOKEN_LEN
|
int length = PackageConstant.UID_FIELD_LEN + PackageConstant.TOKEN_LEN
|
||||||
|
|
Loading…
Reference in New Issue