Merge branch 'master' of http://60.1.1.230/backend/jieling_server
commit
1638c42ea1
|
@ -95,7 +95,7 @@ public class SGlobalActivity implements BaseConfig {
|
|||
long serverOpenTime = GameApplication.serverConfig.getCacheOpenTime();
|
||||
startTime = serverOpenTime + baseTime*1000;
|
||||
}else if(time == ActivityType.OPEN_TYPE_ROLE){
|
||||
startTime =createUserTime+baseTime*1000;
|
||||
startTime = TimeUtils.getAppointTimeInXDay(createUserTime,0) + baseTime*1000;
|
||||
}
|
||||
return startTime;
|
||||
}
|
||||
|
|
|
@ -108,7 +108,7 @@ public class SRechargeCommodityConfig implements BaseConfig {
|
|||
long serverOpenTime = GameApplication.serverConfig.getCacheOpenTime();
|
||||
startTime = serverOpenTime + baseTime*1000;
|
||||
}else if(time == ActivityType.OPEN_TYPE_ROLE){
|
||||
startTime =createUserTime+baseTime*1000;
|
||||
startTime = TimeUtils.getAppointTimeInXDay(createUserTime,0)+baseTime*1000;
|
||||
}
|
||||
return startTime;
|
||||
}
|
||||
|
|
|
@ -115,6 +115,7 @@ public class RedisKey {
|
|||
|
||||
public static final String FAMILY_FIGHT = "FAMILY_FIGHT" ;
|
||||
public static final String FAMILY_FIGHT_RANK = "FAMILY_FIGHT_RANK";
|
||||
public static final String FAMILY_FIGHT_MATCHING_RANK ="FAMILY_FIGHT_MATCHING_RANK";
|
||||
|
||||
public static final String OPERATE_FAMILY = "OPERATE_FAMILY";
|
||||
public static final String OPERATE_FAMILY_APPLY = "OPERATE_FAMILY_APPLY";
|
||||
|
|
|
@ -8,7 +8,7 @@ import java.util.ArrayList;
|
|||
import java.util.List;
|
||||
|
||||
public class GuildMyInfo extends MongoBase {
|
||||
private static int speed = 500;
|
||||
private static int speed = 200;
|
||||
private static int initPos = 0;
|
||||
|
||||
|
||||
|
|
|
@ -66,6 +66,7 @@ public class GuildLogic {
|
|||
for(Set<Integer> members : guildInfo.getMembers().values()){
|
||||
for(int uidOfMember : members){
|
||||
User userMember = UserManager.getUser(uidOfMember);
|
||||
userMember.getGuildMyInfo().move(System.currentTimeMillis());
|
||||
builder.addFamilyWalkIndicaiton(CBean2Proto.getFamilyWalkIndicaiton(userMember));
|
||||
}
|
||||
}
|
||||
|
@ -231,6 +232,7 @@ public class GuildLogic {
|
|||
addGuildLog(guildInfo.getId(),GuildDef.Log.JOIN,user.getPlayerInfoManager().getNickName());
|
||||
Family.FamilyJoinIndicaion build = Family.FamilyJoinIndicaion.newBuilder().setFamilyBaseInfo(CBean2Proto.getFamilyBaseInfo(guildInfo)).setFamilyUserInfo(CBean2Proto.getFamilyUserInfo(user, GlobalsDef.MEMBER)).build();
|
||||
Family.FamilyJoinResponse response = Family.FamilyJoinResponse.newBuilder().setFamilyJoinIndicaion(build).build();
|
||||
|
||||
MessageUtil.sendMessage(session,1,msgId,response,true);
|
||||
}
|
||||
|
||||
|
@ -400,6 +402,8 @@ public class GuildLogic {
|
|||
targetUser.getPlayerInfoManager().setGuildId(guildInfo.getId());
|
||||
GuilidManager.removeMineApplyGuildInfos(guildInfo.getId(),applyId);
|
||||
GuilidManager.removeOneApplyGuildInfos(guildInfo.getId(),applyId);
|
||||
Family.FamilyWalkIndicaiton familyWalkIndicaiton = CBean2Proto.getFamilyWalkIndicaiton(targetUser);
|
||||
sendIndicationToMember(guildInfo, MessageTypeProto.MessageType.FAMILY_WALK_INDICATION,familyWalkIndicaiton);
|
||||
}catch (Exception e){
|
||||
LOGGER.error("the exception={}",e);
|
||||
}finally {
|
||||
|
@ -703,16 +707,21 @@ public class GuildLogic {
|
|||
return;
|
||||
}
|
||||
GuildMyInfo guildMyInfo = user.getGuildMyInfo();
|
||||
LOGGER.info("cur ={},path={}",guildMyInfo.getCurPos(),path);
|
||||
|
||||
|
||||
user.getGuildMyInfo().move(System.currentTimeMillis());
|
||||
LOGGER.info("old ={},path={}",guildMyInfo.getCurPos(),path);
|
||||
boolean continuous = CellUtil.isContinuous(guildMyInfo.getCurPos(),path);
|
||||
if(!continuous){
|
||||
MessageUtil.sendErrorResponse(session,0,msgId,"路线有误");
|
||||
return;
|
||||
}
|
||||
user.getGuildMyInfo().move(path);
|
||||
LOGGER.info("cur ={},path={}",guildMyInfo.getCurPos(),path);
|
||||
Family.FamilyWalkIndicaiton familyWalkIndicaiton = CBean2Proto.getFamilyWalkIndicaiton(user);
|
||||
GuildInfo guildInfo = GuilidManager.guildInfoMap.get(guildId);
|
||||
sendIndicationToMember(guildInfo, MessageTypeProto.MessageType.FAMILY_WALK_INDICATION,familyWalkIndicaiton);
|
||||
MessageUtil.sendMessage(session,1,msgId,null,true);
|
||||
}
|
||||
|
||||
public static void updateMyPos(User user) {
|
||||
|
@ -877,7 +886,7 @@ public class GuildLogic {
|
|||
for(Map.Entry<Integer, Integer> entry:defendInfo.entrySet()){
|
||||
Family.FamilyFightPlayerInfo.Builder playerInfo = Family.FamilyFightPlayerInfo.newBuilder();
|
||||
playerInfo.setBuildId(entry.getValue());
|
||||
playerInfo.setBuildId(5);
|
||||
playerInfo.setStarCount(5);
|
||||
PlayerManager playerManager = UserManager.getUser(entry.getKey()).getPlayerInfoManager();
|
||||
Family.FamilyUserInfo.Builder userInfo =Family.FamilyUserInfo.newBuilder()
|
||||
.setRoleUid(entry.getKey())
|
||||
|
@ -925,9 +934,13 @@ public class GuildLogic {
|
|||
Set<String> rank = redisUtil.getZset(RedisKey.FAMILY_FIGHT_RANK, 0, redisUtil.getZsetSize(RedisKey.FAMILY_FIGHT_RANK));
|
||||
for(Integer gid:guildIds){
|
||||
GuildInfo guildInfo = GuilidManager.guildInfoMap.get(gid);
|
||||
if(!rank.contains(gid.toString())){
|
||||
if(guildInfo.getDefendInfo()!=null&&guildInfo.getDefendInfo().size()>0){
|
||||
redisUtil.zsetAddOne(RedisKey.FAMILY_FIGHT_RANK,gid.toString(),100);
|
||||
if(guildInfo.getDefendInfo()!=null&&guildInfo.getDefendInfo().size()>0) {
|
||||
if (!rank.contains(gid.toString())) {
|
||||
String key = RedisKey.getKey(RedisKey.FAMILY_FIGHT_MATCHING_RANK, gid.toString(), false);
|
||||
redisUtil.zsetAddOne(key, gid.toString(), 100);
|
||||
} else {
|
||||
Double zSetScore = redisUtil.getZSetScore(RedisKey.FAMILY_FIGHT_RANK, "", gid.toString());
|
||||
redisUtil.zsetAddOne(RedisKey.FAMILY_FIGHT_MATCHING_RANK, gid.toString(), zSetScore);
|
||||
}
|
||||
}
|
||||
Map<Integer, Integer> defendInfo = guildInfo.getDefendInfo();
|
||||
|
@ -1011,4 +1024,7 @@ public class GuildLogic {
|
|||
}
|
||||
RedisUtil.getInstence().putMapEntry(RedisKey.FAMILY_FIGHT,String.valueOf(defendGuildId),String.valueOf(userDefend.getId()),defendInfo);
|
||||
}
|
||||
public void accountFamilyFightResult(){
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
@ -948,12 +948,12 @@ public class HeroLogic {
|
|||
Equip equip = equipManager.getEquipMap().get(equipId);
|
||||
Map<Integer, Integer> propertyValueByIdMap = equip.getPropertyValueByIdMap();
|
||||
Map<Integer, Integer> secondValueByIdMap = equip.getSecondValueByIdMap();
|
||||
LOGGER.info("cal equip = {}",equip.getEquipId());
|
||||
// LOGGER.info("cal equip = {}",equip.getEquipId());
|
||||
combinedAttribute(propertyValueByIdMap,heroAllAttribute);
|
||||
combinedAttribute(secondValueByIdMap,heroAllAttribute);
|
||||
SEquipConfig sEquipConfig = SEquipConfig.getsEquipConfigById(equip.getEquipId());
|
||||
equipForce+=sEquipConfig.getScore();
|
||||
LOGGER.info("cal equip = {} end",equip.getEquipId());
|
||||
// LOGGER.info("cal equip = {} end",equip.getEquipId());
|
||||
}
|
||||
//天赋异妖加成
|
||||
Map<Integer, Pokemon> ringFireMap = pokemonManager.getRingFireMap();
|
||||
|
@ -1015,7 +1015,7 @@ public class HeroLogic {
|
|||
heroAllAttribute.put(HeroAttributeEnum.CurHP.getPropertyId(),heroAllAttribute.get(GlobalsDef.HP_TYPE));
|
||||
//装备战力保存
|
||||
heroAllAttribute.put(HeroAttributeEnum.EquipForce.getPropertyId(),equipForce);
|
||||
LOGGER.info("cal herotid = {},end",hero.getTemplateId());
|
||||
// LOGGER.info("cal herotid = {},end",hero.getTemplateId());
|
||||
return heroAllAttribute;
|
||||
}
|
||||
|
||||
|
@ -1116,7 +1116,7 @@ public class HeroLogic {
|
|||
Integer propertyId = item.getKey();
|
||||
float propertyValue = item.getValue();
|
||||
if(propertyId == HeroAttributeEnum.EquipForce.getPropertyId()){
|
||||
LOGGER.info("the equipScore={}",propertyValue);
|
||||
// LOGGER.info("the equipScore={}",propertyValue);
|
||||
continue;
|
||||
}
|
||||
SPropertyConfig sPropertyConfig = SPropertyConfig.getsPropertyConfigByPID(propertyId);
|
||||
|
|
|
@ -137,7 +137,7 @@ public class PlayerLogic {
|
|||
private boolean checkName(ISession iSession, String name, int msgId) throws Exception {
|
||||
int length = getStrLength(name);
|
||||
if (length == -1) {
|
||||
MessageUtil.sendErrorResponse(iSession, 0, msgId, "");
|
||||
MessageUtil.sendErrorResponse(iSession, Global.RENAME_DIRTY, msgId, "名字不合法");
|
||||
return true;
|
||||
}
|
||||
if (length > SGameSetting.getGameSetting().getMaxNameLength() || length < 1) {
|
||||
|
|
Loading…
Reference in New Issue