兽潮战斗数据给前端

back_recharge
zhangshanxue 2019-11-11 17:19:38 +08:00
parent ee60381725
commit cfb59d2db7
1 changed files with 10 additions and 0 deletions

View File

@ -111,12 +111,21 @@ public class QuickStartMonsterFighter extends BaseHandler<FightInfoProto.QuickSt
throw new ErrorCodeException(ErrorCode.FIGHT_EXCEPTION);
}
CommonProto.FightData fightDataBuild = CommonProto.FightData.newBuilder()
.setFightMaxTime(mostTime)
.setFightSeed(seed)
.setHeroFightInfos(fightTeamInfo)
.addAllMonsterList(monsterTeamList)
.build();
LOGGER.error(fightDataBuild.toString());
if (resultCode == 0) {
ItemUtil.itemCost(user,cost, BIReason.MONSTERATTACK_CONSUME, fightId);
CommonProto.Drop.Builder dropBuilder = CommonProto.Drop.newBuilder();
FightInfoProto.QuickStartMonsterFightResponse builder = FightInfoProto.QuickStartMonsterFightResponse.newBuilder()
.setResult(resultCode)
.setEnventDrop(dropBuilder)
.setFightData(fightDataBuild)
.build();
MessageUtil.sendMessage(iSession, 1,MessageTypeProto.MessageType.QUICK_START_MONSTERFIGHTER_REPONSE_VALUE, builder, true);
return;
@ -130,6 +139,7 @@ public class QuickStartMonsterFighter extends BaseHandler<FightInfoProto.QuickSt
FightInfoProto.QuickStartMonsterFightResponse builder = FightInfoProto.QuickStartMonsterFightResponse.newBuilder()
.setResult(resultCode)
.setEnventDrop(drop)
.setFightData(fightDataBuild)
.build();
user.getMapManager().setLastMonsterAttack(fightId + 1);