心魔快速战斗适配战力调整机制补充
parent
3f56e5edd8
commit
a6cdc946e7
|
|
@ -1,6 +1,5 @@
|
|||
package com.ljsd.jieling.handler.monsterAttack;
|
||||
|
||||
import com.ljsd.fight.FightType;
|
||||
import com.ljsd.jieling.exception.ErrorCode;
|
||||
import com.ljsd.jieling.exception.ErrorCodeException;
|
||||
import com.ljsd.jieling.globals.BIReason;
|
||||
|
|
@ -13,7 +12,10 @@ import com.ljsd.jieling.logic.activity.ActivityType;
|
|||
import com.ljsd.jieling.logic.dao.TeamPosHeroInfo;
|
||||
import com.ljsd.jieling.logic.dao.UserManager;
|
||||
import com.ljsd.jieling.logic.dao.root.User;
|
||||
import com.ljsd.jieling.logic.fight.*;
|
||||
import com.ljsd.jieling.logic.fight.FightDispatcher;
|
||||
import com.ljsd.jieling.logic.fight.FightRecordLogic;
|
||||
import com.ljsd.jieling.logic.fight.GameFightType;
|
||||
import com.ljsd.jieling.logic.fight.PVEFightEvent;
|
||||
import com.ljsd.jieling.logic.fight.result.FightResult;
|
||||
import com.ljsd.jieling.logic.mission.GameEvent;
|
||||
import com.ljsd.jieling.logic.mission.MissionType;
|
||||
|
|
@ -22,9 +24,6 @@ import com.ljsd.jieling.logic.rank.RankEnum;
|
|||
import com.ljsd.jieling.logic.store.BuyGoodsNewLogic;
|
||||
import com.ljsd.jieling.logic.store.newRechargeInfo.PushRechargeType;
|
||||
import com.ljsd.jieling.network.session.ISession;
|
||||
import rpc.protocols.CommonProto;
|
||||
import rpc.protocols.FightInfoProto;
|
||||
import rpc.protocols.MessageTypeProto;
|
||||
import com.ljsd.jieling.util.ItemUtil;
|
||||
import com.ljsd.jieling.util.MessageUtil;
|
||||
import config.SFloodConfig;
|
||||
|
|
@ -32,6 +31,9 @@ import manager.STableManager;
|
|||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.stereotype.Component;
|
||||
import rpc.protocols.CommonProto;
|
||||
import rpc.protocols.FightInfoProto;
|
||||
import rpc.protocols.MessageTypeProto;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
|
@ -74,7 +76,7 @@ public class QuickStartMonsterFighter extends BaseHandler<FightInfoProto.QuickSt
|
|||
user.getUserMissionManager().onGameEvent(user, GameEvent.ONE_MISSION_TYPE_CONSUME,MissionType.JOIN_MONSTER_ATTACK_TIMES);
|
||||
int groupId = sFloodConfig.getMonster();
|
||||
int mostTime = sFloodConfig.getBattleTime();
|
||||
PVEFightEvent pveFightEvent = new PVEFightEvent(uid,teamId, mostTime, "", GameFightType.MonterFight, groupId, 3);
|
||||
PVEFightEvent pveFightEvent = new PVEFightEvent(uid,teamId, mostTime, "", GameFightType.MonterQuickFight, groupId, 3);
|
||||
FightResult fightResult = FightDispatcher.dispatcher(pveFightEvent);
|
||||
|
||||
//校验结果码 1:胜利
|
||||
|
|
@ -83,15 +85,7 @@ public class QuickStartMonsterFighter extends BaseHandler<FightInfoProto.QuickSt
|
|||
throw new ErrorCodeException(ErrorCode.FIGHT_EXCEPTION);
|
||||
}
|
||||
|
||||
CommonProto.FightData fightDataBuild = CommonProto.FightData.newBuilder()
|
||||
.setFightMaxTime(mostTime)
|
||||
.setFightSeed(fightResult.getSeed())
|
||||
.setHeroFightInfos(fightResult.getFightTeamInfo())
|
||||
.addAllMonsterList(fightResult.getMonsterTeamList())
|
||||
.setFightType(FightType.MonterFight.getType())
|
||||
.setFightId(FightUtil.getFightId(uid,FightType.MonterFight.getType()))
|
||||
.build();
|
||||
|
||||
CommonProto.FightData fightDataBuild = fightResult.getFightData();
|
||||
// 记录战报
|
||||
FightRecordLogic.getInstance().addRecordMap(user,fightDataBuild);
|
||||
|
||||
|
|
|
|||
|
|
@ -19,11 +19,11 @@ import com.ljsd.jieling.logic.fight.eventhandler.*;
|
|||
*/
|
||||
public enum GameFightType {
|
||||
StoryFight(FightType.StoryFight,new MainLineOrInnerDemonFightHandler(), RedisKey.LEVE_DIFFICULTY_FIGHT),
|
||||
EndMonsterAttackFight(FightType.MonterFight,new MainLineOrInnerDemonFightHandler(),RedisKey.CHALLENGE_MONSTER_ATTACK),
|
||||
MonterQuickFight(FightType.MonterFight,new MainLineOrInnerQuickFightHandler(),null),//心魔快速战斗
|
||||
MapFastFight(FightType.MapExploreFight,new DefaultWithoutHandFightHandler(),null),
|
||||
MapEndFight(FightType.MapExploreFight,new DefaultOfRedisCacheFightHandler(),RedisKey.FIGHT),
|
||||
EndSuddlenlyFight(FightType.MapExploreFight,new DefaultOfRedisCacheFightHandler(),RedisKey.SUDDLENLY_FIGHT),
|
||||
EndMonsterAttackFight(FightType.MonterFight,new MainLineOrInnerDemonFightHandler(),RedisKey.CHALLENGE_MONSTER_ATTACK),
|
||||
MonterFight(FightType.MonterFight,new MainLineOrInnerQuickFightHandler(),null),//心魔快速战斗
|
||||
ArenaPersonFight(FightType.ArenaFight,new PVPFightHandler(),null),
|
||||
ArenaRobotFight(FightType.ArenaFight,new PVPFightHandler(),null),
|
||||
Expediton(FightType.EXPEDITION,new PVPFightHandler(),null),
|
||||
|
|
|
|||
|
|
@ -74,9 +74,6 @@ public class MainLineOrInnerDemonFightHandler implements IFightEventProcesor {
|
|||
|
||||
FightResult.Builder builder = FightResult.newBuilder();
|
||||
builder.setCheckResult(fightResultInfo);
|
||||
builder.setSeed(seed);
|
||||
builder.setFightTeamInfo(fightTeamInfo);
|
||||
builder.setMonsterTeamList(monsterTeamList);
|
||||
String fightId = FightUtil.getFightId(playerId, fightType);
|
||||
CommonProto.FightData fightData = CommonProto.FightData.newBuilder()
|
||||
.setFightType(fightType.getFightType().getType())
|
||||
|
|
|
|||
Loading…
Reference in New Issue