车迟斗法挑战人数问题处理,修改完善
parent
eb8327464a
commit
8aeef0695d
|
@ -229,10 +229,6 @@ public class FastChallengeHandler extends BaseHandler<FightInfoProto.FastFightCh
|
|||
new Object[]{nameColor, user.getPlayerInfoManager().getNickName()});
|
||||
}
|
||||
}
|
||||
|
||||
// 公会人数处理
|
||||
carDealyFightPeopleNum(uid,guildInfo.getId());
|
||||
|
||||
hurt = fightResult.getDuration();
|
||||
String key;
|
||||
String challengeKey;
|
||||
|
@ -256,6 +252,9 @@ public class FastChallengeHandler extends BaseHandler<FightInfoProto.FastFightCh
|
|||
|
||||
}
|
||||
|
||||
// 公会人数处理
|
||||
carDealyFightPeopleNum(uid,guildInfo.getId());
|
||||
|
||||
CrossServiceLogic.getInstance().saveBasicPlayerToRedis(user);
|
||||
|
||||
fightData.toBuilder().setFightId(FightUtil.getFightId(uid,fightData.getFightType()));
|
||||
|
@ -265,7 +264,6 @@ public class FastChallengeHandler extends BaseHandler<FightInfoProto.FastFightCh
|
|||
//扣除次数
|
||||
PlayerLogic.getInstance().checkAndUpdate(user, privilege, 1);
|
||||
|
||||
guildInfo.addCarFightSb(uid);
|
||||
user.getGuildMyInfo().setCarPlayTime(TimeUtils.nowInt());
|
||||
user.getGuildMyInfo().setCarPlayProgress(GuildFightLogic.carDelayProgressIndication.getProgress());
|
||||
FightInfoProto.FastFightChallengeResponse build = FightInfoProto.FastFightChallengeResponse.newBuilder().setHurt(hurt).setScore((long) gainScore).setFightData(fightData).build();
|
||||
|
@ -273,8 +271,17 @@ public class FastChallengeHandler extends BaseHandler<FightInfoProto.FastFightCh
|
|||
ReportUtil.onReportEvent(user, ReportEventEnum.COMPLETE_CHECHI.getType(),sWorldBossSetting.getid(),type,1,gainScore);
|
||||
}
|
||||
|
||||
/**
|
||||
* 计算车迟挑战人数
|
||||
* @param uid
|
||||
* @param guildId
|
||||
* @return
|
||||
*/
|
||||
public static int carDealyFightPeopleNum(int uid, int guildId){
|
||||
HashSet value = RedisUtil.getInstence().getMapValue(RedisKey.CAR_DEALY_GUILD_FIGHT_PEOPLE_NUM, "", String.valueOf(guildId), HashSet.class);
|
||||
if (value == null){
|
||||
value = new HashSet();
|
||||
}
|
||||
if (!value.contains(uid) && uid != 0){
|
||||
value.add(uid);
|
||||
RedisUtil.getInstence().putMapEntry(RedisKey.CAR_DEALY_GUILD_FIGHT_PEOPLE_NUM, "", String.valueOf(guildId),value);
|
||||
|
|
|
@ -19,6 +19,7 @@ import com.ljsd.jieling.logic.OnlineUserManager;
|
|||
import com.ljsd.jieling.logic.activity.ActivityLogic;
|
||||
import com.ljsd.jieling.logic.activity.ActivityType;
|
||||
import com.ljsd.jieling.logic.activity.ActivityTypeEnum;
|
||||
import com.ljsd.jieling.logic.activity.crossService.CrossServiceLogic;
|
||||
import com.ljsd.jieling.logic.activity.event.*;
|
||||
import com.ljsd.jieling.logic.dao.*;
|
||||
import com.ljsd.jieling.logic.dao.root.*;
|
||||
|
@ -198,6 +199,8 @@ public class GuildLogic {
|
|||
addGuildLog(guildInfo.getId(),GuildDef.Log.CREATE,user.getPlayerInfoManager().getNickName());
|
||||
// 创建公会
|
||||
CrossDeathPathLogic.setCrossGuild(guildInfo);
|
||||
// 更新redis
|
||||
CrossServiceLogic.getInstance().saveBasicPlayerToRedis(user);
|
||||
|
||||
PlayerInfoCache cache = RedisUtil.getInstence().getMapEntry(RedisKey.PLAYER_INFO_CACHE, "", String.valueOf(uid), PlayerInfoCache.class);
|
||||
cache.setGuildPosition(GlobalsDef.CHAIRMAN);
|
||||
|
|
Loading…
Reference in New Issue