竞技场重写六版,竞技场跨服战斗
parent
45eb1165f8
commit
c41462be94
|
|
@ -147,32 +147,35 @@ public class FightUtil {
|
|||
|
||||
public static FightResult getFightForPVP(FightEvent fightEvent, int seed) throws Exception {
|
||||
PVPFightEvent pvpFightEvent = (PVPFightEvent) fightEvent;
|
||||
CommonProto.FightTeamInfo fightTeamInfo = null;
|
||||
int attackUid = pvpFightEvent.getAttackUid();
|
||||
int defUid = pvpFightEvent.getDefUid();
|
||||
|
||||
CommonProto.FightTeamInfo deffightTeamInfo;
|
||||
if (pvpFightEvent.getAttackFightSnapData() != null) {
|
||||
fightTeamInfo = makeFightWithSnapData(pvpFightEvent.getAttackFightSnapData());
|
||||
}
|
||||
if (pvpFightEvent.getDefFightSnapData() != null) {
|
||||
deffightTeamInfo = makeFightWithSnapData(pvpFightEvent.getDefFightSnapData());
|
||||
} else {
|
||||
if (fightEvent.getFightType() == GameFightType.ArenaPersonFight || fightEvent.getFightType() == GameFightType.CarPersonChallenge) {
|
||||
User defInMem = UserManager.getUserNotCache(pvpFightEvent.getDefUid());
|
||||
User defInMem = PlayerLogic.getInstance().getUserByRpc(defUid);
|
||||
deffightTeamInfo = makePersonFightData(defInMem, pvpFightEvent.getDefTeamId(), null, null);
|
||||
} else {
|
||||
deffightTeamInfo = makeRobotFightData(pvpFightEvent.getDefUid());
|
||||
deffightTeamInfo = makeRobotFightData(defUid);
|
||||
}
|
||||
}
|
||||
|
||||
CommonProto.FightTeamInfo fightTeamInfo = null;
|
||||
if (pvpFightEvent.getAttackFightSnapData() != null) {
|
||||
fightTeamInfo = makeFightWithSnapData(pvpFightEvent.getAttackFightSnapData());
|
||||
}
|
||||
if (fightTeamInfo == null) {
|
||||
if (fightEvent.getFightType() != GameFightType.TOPArena2RobotFight) {
|
||||
if (SArenaRobotConfig.getsArenaRobotConfigById(pvpFightEvent.getAttackUid()) != null) {
|
||||
fightTeamInfo = makeRobotFightData(pvpFightEvent.getAttackUid());
|
||||
if (SArenaRobotConfig.getsArenaRobotConfigById(attackUid) != null) {
|
||||
fightTeamInfo = makeRobotFightData(attackUid);
|
||||
} else {
|
||||
User userInMem = UserManager.getUserNotCache(pvpFightEvent.getAttackUid());
|
||||
User userInMem = PlayerLogic.getInstance().getUserByRpc(attackUid);
|
||||
fightTeamInfo = makePersonFightData(userInMem, pvpFightEvent.getTeamId(), pvpFightEvent.getAttackBloodMap(), null);
|
||||
}
|
||||
} else {
|
||||
fightTeamInfo = makeRobotFightData(pvpFightEvent.getAttackUid());
|
||||
fightTeamInfo = makeRobotFightData(attackUid);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -183,7 +186,7 @@ public class FightUtil {
|
|||
} else {
|
||||
getFightData = FightDataUtil.getFinalPlayerFightData(fightTeamInfo, deffightTeamInfo);
|
||||
}
|
||||
LuaValue getOptionData = FightDataUtil.getOptionData(String.valueOf(pvpFightEvent.getAttackUid()));
|
||||
LuaValue getOptionData = FightDataUtil.getOptionData(String.valueOf(attackUid));
|
||||
long[] fightResult = CheckFight.getInstance().checkFight(seed, fightEvent.getMostTime(), getFightData, getOptionData, fightEvent.getFightType().getFightType());
|
||||
|
||||
FightResult.Builder builder = FightResult.newBuilder();
|
||||
|
|
|
|||
Loading…
Reference in New Issue