fix 【车迟斗法】挑战和抢夺按钮共同冷却,挑战冷却时过渡到抢夺阶段 【车迟斗法】挑战和抢夺按钮共同冷却,挑战冷却时过渡到抢夺阶段

【车迟斗法】规则是更早到达的排名在前
back_recharge
wangyuan 2020-05-25 14:14:46 +08:00
parent bfa0c6416c
commit 1753fba53e
4 changed files with 24 additions and 6 deletions

View File

@ -77,7 +77,7 @@ public class FastChallengeHandler extends BaseHandler<FightInfoProto.FastFightCh
int challeageId = proto.getChalleageId();
int battleRound = sWorldBossSetting.getBattleRound();
CommonProto.FightData fightData= null;
boolean isNew = guildInfo.addCarFightSb(uid);
boolean isNew = !guildInfo.getCarFightSb().containsKey(uid);
switch (type){
case 1:{
int monsterId = STableManager.getConfig(SWorldBossConfig.class).get(GuildFightLogic.carDelayProgressIndication.getBossIndexId()).getMonsterId();
@ -86,8 +86,11 @@ public class FastChallengeHandler extends BaseHandler<FightInfoProto.FastFightCh
hurt = fightResult.getCheckResult()[1];
fightData = fightResult.getFightData();
gainScore = (int) (hurt*(sWorldBossSetting.getScorePercent()/10000F));
RankEnum.toRank(RankEnum.CAR_DEALY_RANK.getType()).incrementRankScore(uid,"",gainScore);
double myscore = gainScore;
if(isNew){
myscore+=TimeUtils.getDoubleTime();
}
RankEnum.toRank(RankEnum.CAR_DEALY_RANK.getType()).incrementRankScore(uid,"",myscore);
RankEnum.toRank(RankEnum.CAR_DEALY_GUILD_RANK.getType()).incrementRankScore(guildInfo.getId(),"",gainScore,isNew?1:0);
@ -133,7 +136,8 @@ public class FastChallengeHandler extends BaseHandler<FightInfoProto.FastFightCh
throw new ErrorCodeException(ErrorCode.SERVER_DEFINE);
}
user.getGuildMyInfo().setCarPlayTime(TimeUtils.nowInt());
guildInfo.addCarFightSb(uid);
user.getGuildMyInfo().setCarPlayTime(TimeUtils.nowInt());
FightInfoProto.FastFightChallengeResponse build = FightInfoProto.FastFightChallengeResponse.newBuilder().setHurt(hurt).setScore(gainScore).setFightData(fightData).build();
MessageUtil.sendMessage(iSession,1, MessageTypeProto.MessageType.FAST_FIGHT_CHALLENGE_RESPONSE_VALUE,build,true);
}

View File

@ -36,6 +36,7 @@ public class GuildMyInfo extends MongoBase {
private long guildHelpSendTime;//公会求助信息时间 5分钟
private int carPlayTime; //车迟上次玩的时间
private int carPlayProgress; // 车迟玩的阶段
@ -267,4 +268,13 @@ public class GuildMyInfo extends MongoBase {
public int getCarPlayTime() {
return carPlayTime;
}
public int getCarPlayProgress() {
return carPlayProgress;
}
public void setCarPlayProgress(int carPlayProgress) {
this.carPlayProgress = carPlayProgress;
updateString("carPlayProgress",carPlayProgress);
}
}

View File

@ -149,6 +149,10 @@ public class GuildLogic {
}
}
builder.setCarDelayProgressIndication(GuildFightLogic.carDelayProgressIndication);
if(GuildFightLogic.carDelayProgressIndication.getProgress() != user.getGuildMyInfo().getCarPlayProgress()){
user.getGuildMyInfo().setCarPlayTime(0);
user.getGuildMyInfo().setCarPlayProgress(GuildFightLogic.carDelayProgressIndication.getProgress());
}
builder.setCarPlayTime(user.getGuildMyInfo().getCarPlayTime());
MessageUtil.sendMessage(session,1,msgId,builder.build(),true);
}

View File

@ -320,10 +320,10 @@ public class MissionLoigc {
}
public static void getAchieveMission(User user ,List<CommonProto.UserMissionInfo> missionList){
SGlobalSystemConfig sGlobalSystemConfig = STableManager.getConfig(SGlobalSystemConfig.class).get(FunctionIdEnum.Achieve.getFunctionType());
/* SGlobalSystemConfig sGlobalSystemConfig = STableManager.getConfig(SGlobalSystemConfig.class).get(FunctionIdEnum.Achieve.getFunctionType());
if (sGlobalSystemConfig!=null&&!HandlerLogicThread.checkOpen(user,sGlobalSystemConfig)) {
return;
}
}*/
UserMissionManager userMissionManager = user.getUserMissionManager();
AchieveMissionIdsType achievementMissionTypMap = userMissionManager.getAchievementMissionTypMap();