back_recharge
lvxinran 2021-03-10 17:32:25 +08:00
parent f0abc728be
commit cfd88aa051
2 changed files with 5 additions and 5 deletions

View File

@ -92,7 +92,7 @@ public class GetWorldArenaChallengeRequestHandler extends gtGBaseHandler<WorldPr
boolean isRevert = proto.getTotalForce() < force;
FightResult fightResult = FightUtil.getFightForPVP(rpcMessage.getUid(), proto.getChallengeUid(), proto.getFightTeamInfo(), teamInfo, FightUtil.getFightSeed(), isRevert);
builder1.setFightResult(fightResult.getCheckResult()[0]);
builder1.setFightResult((int)fightResult.getCheckResult()[0]);
int seed = fightResult.getSeed();
CommonProto.FightData build = CommonProto.FightData.newBuilder()
.setFightMaxTime(SArenaSetting.getSArenaSetting().getMostTime())
@ -104,7 +104,7 @@ public class GetWorldArenaChallengeRequestHandler extends gtGBaseHandler<WorldPr
CommonProto.ArenaInfo.Builder arenaInfoBuild = CommonProto.ArenaInfo.newBuilder();
WorldProto.WroldBattleRecord.Builder builder = WorldProto.WroldBattleRecord.newBuilder();
builder.setFightData(fightResult.getFightData());
builder.setResult(fightResult.getCheckResult()[0]);
builder.setResult((int)fightResult.getCheckResult()[0]);
String s = KeyGenUtils.produceIdByModule(UUIDEnum.ARENARECORD, rpcMessage.getUid());
builder.setRecordId(s);
builder.setAttackTime((int)(System.currentTimeMillis()/1000));

View File

@ -37,7 +37,7 @@ public class FightUtil {
getFightData = FightDataUtil.getFinalPlayerFightData(fightTeamInfo, deffightTeamInfo);
}
LuaValue getOptionData = FightDataUtil.getOptionData(attachId+"");
int[] fightResult = CheckFight.getInstance().checkFight(seed, SArenaSetting.getSArenaSetting().getMostTime(), getFightData, getOptionData, FightType.ArenaFight);
long[] fightResult = CheckFight.getInstance().checkFight(seed, SArenaSetting.getSArenaSetting().getMostTime(), getFightData, getOptionData, FightType.ArenaFight);
FightResult.Builder builder = FightResult.newBuilder();
builder.setCheckResult(fightResult);
@ -72,10 +72,10 @@ public class FightUtil {
int[] differDemonsId = sArenaRobotConfig.getDifferDemonsId();
int differDemonsLv = sArenaRobotConfig.getDifferDemonsLv();
int robotLevel = sArenaRobotConfig.getRoleLv();
Map<Integer, Integer> robotHeroAttribute =HeroLogic.getInstance(). calRobotHeroAttribute(scHero, robotLevel, 0, differDemonsId, differDemonsLv,false);
Map<Integer, Long> robotHeroAttribute =HeroLogic.getInstance(). calRobotHeroAttribute(scHero, robotLevel, 0, differDemonsId, differDemonsLv,false);
if(remainHp!=null&&remainHp.containsKey(heroTid.toString())){
robotHeroAttribute.put(HeroAttributeEnum.CurHP.getPropertyId(),(int)(remainHp.getOrDefault(heroTid.toString(),1d)*robotHeroAttribute.get(HeroAttributeEnum.Hp.getPropertyId())));
robotHeroAttribute.put(HeroAttributeEnum.CurHP.getPropertyId(),(long)(remainHp.getOrDefault(heroTid.toString(),1d)*robotHeroAttribute.get(HeroAttributeEnum.Hp.getPropertyId())));
}
String property = HeroLogic.getInstance().getRobotHeroProperty(sArenaRobotConfig,scHero,propertySb,robotHeroAttribute).toString();