验证此次公会战加入的

lvxinran 2019-11-09 19:04:54 +08:00
parent b41d7217ca
commit cdf7a2ba30
3 changed files with 15 additions and 9 deletions

View File

@ -13,6 +13,7 @@ public class GuildMyInfo extends MongoBase {
private List<Integer> path = new ArrayList<>(); //行走路线
private int curPos=STableManager.getFigureConfig(CommonStaticConfig.class).getInitPos();//当前位置
private long preMoveTimestamp; //上次更新时间
private long joinTime;
public void clearOfLevelGuild(){
path.clear();
@ -87,4 +88,12 @@ public class GuildMyInfo extends MongoBase {
return preMoveTimestamp;
}
public long getJoinTime() {
return joinTime;
}
public void setJoinTime(long joinTime) {
this.joinTime = joinTime;
updateString("joinTime",joinTime);
}
}

View File

@ -560,17 +560,13 @@ public class GuildFightLogic {
.setStartTime(startFightTime)
.setRoundStartTime(roundStartTime)
.setRoundEndTime(roundEndTime)
.setAttackCount(attackCount)
.setJoinType(1);
// if(guildId==0){
// response.setType(-1);
// response.setRoundEndTime((int) (TimeUtils.getAppointTime(sGuildSetting.getSettleTime()[1][0], sGuildSetting.getSettleTime()[1][1]) / 1000));
// MessageUtil.sendMessage(session, 1, messageType.getNumber(), response.build(), true);
// return;
// }
.setAttackCount(attackCount);
// long joinTime = UserManager.getUser(session.getUid()).getGuildMyInfo().getJoinTime();
if(guildId!=0&&status!=0&&!GuilidManager.guildInfoMap.get(guildId).getDefendInfo().keySet().contains(session.getUid())){
response.setJoinType(1);
}
if (enemyFamily != -1) {
GuildCache enemyInfo = RedisUtil.getInstence().getMapEntry(RedisKey.FAMILY_INFO, "", String.valueOf(enemyFamily), GuildCache.class);
// GuildInfo guildInfo = GuilidManager.guildInfoMap.get(enemyFamily);
if(enemyInfo!=null){
Family.EnemyFamily familyInfo = Family.EnemyFamily.newBuilder()
.setId(enemyFamily)

View File

@ -505,6 +505,7 @@ public class GuildLogic {
cache.setGuildPosition(GlobalsDef.MEMBER);
RedisUtil.getInstence().putMapEntry(RedisKey.PLAYER_INFO_CACHE,"",String.valueOf(applyId),cache);
targetUser.getUserMissionManager().onGameEvent(targetUser, GameEvent.JOIN_FAMILY);
targetUser.getGuildMyInfo().setJoinTime(TimeUtils.now());
}catch (Exception e){
LOGGER.error("the exception={}",e);
}finally {