扫荡计数

wangyuan 2019-07-08 21:22:26 +08:00
parent aaa50d506f
commit 4f2b52a685
4 changed files with 11 additions and 7 deletions

View File

@ -218,7 +218,7 @@ public class GMRequestHandler extends BaseHandler{
Map<Integer, LevelDifficulty> levelDifficultyInfosMap = levelDifficultyManager.getLevelDifficultyInfosMap();
for (Map.Entry<Integer,LevelDifficulty> entry :levelDifficultyInfosMap.entrySet()){
entry.getValue().setState(Global.FIGHT_CLEARANCE);
user.getUserMissionManager().onGameEvent(user, GameEvent.STORY_FIGHT, entry.getValue().getFightId(),0);
user.getUserMissionManager().onGameEvent(user, GameEvent.STORY_FIGHT, entry.getValue().getFightId(),0,1);
}
}

View File

@ -1330,7 +1330,7 @@ public class MapLogic {
stars = new HashSet<>();
}
stars.add(STAR_1);
user.getUserMissionManager().onGameEvent(user, GameEvent.STORY_FIGHT, mapManager.getCurMapId(), 1);
user.getUserMissionManager().onGameEvent(user, GameEvent.STORY_FIGHT, mapManager.getCurMapId(), 1,1);
mapManager.setStars(stars);
//todo 死亡次数
SChallengeConfig sChallengeConfig = SChallengeConfig.sChallengeConfigs.get(mapManager.getCurMapId());
@ -1496,6 +1496,7 @@ public class MapLogic {
CommonProto.Drop.Builder dropBuilder = ItemUtil.drop(user, sChallengeMapConfig.getSweepingAward(), 1, 0, BIReason.MAP_SWEEP_REWARD);
mapSweepResponse.addDrop(dropBuilder);
}
user.getUserMissionManager().onGameEvent(user, GameEvent.STORY_FIGHT, mapManager.getCurMapId(),1,count);
MessageUtil.sendMessage(session, 1, messageType.getNumber(), mapSweepResponse.build(), true);
}
@ -1801,7 +1802,7 @@ public class MapLogic {
reward = sLevelDifficultyConfig.getFirstReward();
levelDifficulty.setState(Global.FIGHT_CLEARANCE);
}
user.getUserMissionManager().onGameEvent(user, GameEvent.STORY_FIGHT, fightId, 0);
user.getUserMissionManager().onGameEvent(user, GameEvent.STORY_FIGHT, fightId, 0,1);
CommonProto.Drop.Builder drop = ItemUtil.drop(user, reward, 1, 0, BIReason.LEVELDIFFICULTY_FIGHT_REWARD);
levelDifficulty.setChallengeTimes(levelDifficulty.getChallengeTimes() + 1);
//开启关卡
@ -1926,7 +1927,7 @@ public class MapLogic {
crossInfo.getStars().add(STAR_3);
crossInfoMap.put(i, crossInfo);
mapManager.updateCrossInfoMap(i, crossInfo);
user.getUserMissionManager().onGameEvent(user, GameEvent.STORY_FIGHT, i, 1);
user.getUserMissionManager().onGameEvent(user, GameEvent.STORY_FIGHT, i, 1,1);
}
}

View File

@ -6,6 +6,7 @@ import com.ljsd.jieling.globals.Global;
import com.ljsd.jieling.handler.map.behavior.BaseBehavior;
import com.ljsd.jieling.logic.dao.*;
import com.ljsd.jieling.logic.dao.root.User;
import com.ljsd.jieling.logic.mission.GameEvent;
import com.ljsd.jieling.network.session.ISession;
import com.ljsd.jieling.protocols.CommonProto;
import com.ljsd.jieling.protocols.FightInfoProto;
@ -101,6 +102,7 @@ public class SweepLogic {
FightInfoProto.SweepRightResponse.Builder builder = FightInfoProto.SweepRightResponse.newBuilder();
builder.addAllDrop(dropList);
levelDifficulty.setChallengeTimes(levelDifficulty.getChallengeTimes() +sweepTimes);
user.getUserMissionManager().onGameEvent(user, GameEvent.STORY_FIGHT, fightId, 0,sweepTimes);
MessageUtil.sendMessage(session, 1, messageType.getNumber(), builder.build(), true);
}
}

View File

@ -11,9 +11,10 @@ public class FightDataManager implements BaseDataManager{
CumulationData.Result result = null;
int fightId = (int)parm[0];
int fightType = (int)parm[1];// 0: 故事副本 1 普通副本
int fightTimes = (int)parm[2];// 0: 故事副本 1 普通副本
if(fightType == 0){
if(missionType == MissionType.LEVEL_STORY_TIMES){
data.levelStoryTimes++;
data.levelStoryTimes+=fightTimes;
result = new CumulationData.Result(missionType);
}else if(missionType == MissionType.LEVEL_STORY_PASS){
LevelDifficulty levelDifficulty = SLevelDifficultyConfig.getLevelDifficultyMap().get(fightId);
@ -34,10 +35,10 @@ public class FightDataManager implements BaseDataManager{
if(fightType == 1){
if(missionType == MissionType.GENERAL_STORY_TIMES){
data.generalStoryTimes++;
data.generalStoryTimes+=fightTimes;
result = new CumulationData.Result(missionType);
}else if(missionType == MissionType.HERO_LEVLE_TIMES){
data.heroStoryTimes++;
data.heroStoryTimes+=fightTimes;
result = new CumulationData.Result(missionType);
}else if(missionType == MissionType.GENERAL_STORY_PASS || missionType == MissionType.HERO_STORY_PASS){
data.addExploreFight(fightId);