验证此次公会战加入的

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 List<Integer> path = new ArrayList<>(); //行走路线
private int curPos=STableManager.getFigureConfig(CommonStaticConfig.class).getInitPos();//当前位置 private int curPos=STableManager.getFigureConfig(CommonStaticConfig.class).getInitPos();//当前位置
private long preMoveTimestamp; //上次更新时间 private long preMoveTimestamp; //上次更新时间
private long joinTime;
public void clearOfLevelGuild(){ public void clearOfLevelGuild(){
path.clear(); path.clear();
@ -87,4 +88,12 @@ public class GuildMyInfo extends MongoBase {
return preMoveTimestamp; 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) .setStartTime(startFightTime)
.setRoundStartTime(roundStartTime) .setRoundStartTime(roundStartTime)
.setRoundEndTime(roundEndTime) .setRoundEndTime(roundEndTime)
.setAttackCount(attackCount) .setAttackCount(attackCount);
.setJoinType(1); // long joinTime = UserManager.getUser(session.getUid()).getGuildMyInfo().getJoinTime();
// if(guildId==0){ if(guildId!=0&&status!=0&&!GuilidManager.guildInfoMap.get(guildId).getDefendInfo().keySet().contains(session.getUid())){
// response.setType(-1); response.setJoinType(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;
// }
if (enemyFamily != -1) { if (enemyFamily != -1) {
GuildCache enemyInfo = RedisUtil.getInstence().getMapEntry(RedisKey.FAMILY_INFO, "", String.valueOf(enemyFamily), GuildCache.class); GuildCache enemyInfo = RedisUtil.getInstence().getMapEntry(RedisKey.FAMILY_INFO, "", String.valueOf(enemyFamily), GuildCache.class);
// GuildInfo guildInfo = GuilidManager.guildInfoMap.get(enemyFamily);
if(enemyInfo!=null){ if(enemyInfo!=null){
Family.EnemyFamily familyInfo = Family.EnemyFamily.newBuilder() Family.EnemyFamily familyInfo = Family.EnemyFamily.newBuilder()
.setId(enemyFamily) .setId(enemyFamily)

View File

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