巅峰赛提交
parent
e505a2e773
commit
cd176b3418
|
@ -106,10 +106,10 @@ public class CheckFight {
|
||||||
int[] resultCache = new int[8];//对方阵容走配置 Todo 后面结构走配置
|
int[] resultCache = new int[8];//对方阵容走配置 Todo 后面结构走配置
|
||||||
resultCache[0]=status;
|
resultCache[0]=status;
|
||||||
resultCache[1]=duration;
|
resultCache[1]=duration;
|
||||||
LOGGER.info(" lua check test fight result : "+ status);
|
// LOGGER.info(" lua check test fight result : "+ status);
|
||||||
for (int i = 1; i <= result.length(); i++) {
|
for (int i = 1; i <= result.length(); i++) {
|
||||||
resultCache[i+1] = result.rawget(i).toint();
|
resultCache[i+1] = result.rawget(i).toint();
|
||||||
LOGGER.info(i+" --> 单位剩余血量 : "+ resultCache[i+1]);
|
// LOGGER.info(i+" --> 单位剩余血量 : "+ resultCache[i+1]);
|
||||||
}
|
}
|
||||||
|
|
||||||
return resultCache;
|
return resultCache;
|
||||||
|
|
|
@ -84,6 +84,20 @@ function BattleLogic.Init(data, optionData, maxRound)
|
||||||
BattleLogManager.Init(fightData)
|
BattleLogManager.Init(fightData)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
-- 检测先手阵营
|
||||||
|
function BattleLogic.CheckFirstCamp()
|
||||||
|
-- 默认我方先手
|
||||||
|
BattleLogic.FirstCamp = 0
|
||||||
|
-- 数据不存在时,兼容老战斗数据
|
||||||
|
if not fightData.playerData.firstCamp and not fightData.enemyData[BattleLogic.CurOrder].firstCamp then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
-- 敌方先手
|
||||||
|
if fightData.playerData.firstCamp == 0 and fightData.enemyData[BattleLogic.CurOrder].firstCamp == 1 then
|
||||||
|
BattleLogic.FirstCamp = 1
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
function BattleLogic.StartOrder()
|
function BattleLogic.StartOrder()
|
||||||
--
|
--
|
||||||
BattleLogic.CurOrder = BattleLogic.CurOrder + 1
|
BattleLogic.CurOrder = BattleLogic.CurOrder + 1
|
||||||
|
@ -104,7 +118,8 @@ function BattleLogic.StartOrder()
|
||||||
RoleManager.AddRole(orderList[i], orderList[i].position)
|
RoleManager.AddRole(orderList[i], orderList[i].position)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
-- 检测先后手
|
||||||
|
BattleLogic.CheckFirstCamp()
|
||||||
-- 开始战斗,延时一帧执行,避免战斗还没开始就释放了技能
|
-- 开始战斗,延时一帧执行,避免战斗还没开始就释放了技能
|
||||||
BattleLogic.TurnRoundNextFrame()
|
BattleLogic.TurnRoundNextFrame()
|
||||||
end
|
end
|
||||||
|
@ -156,7 +171,7 @@ function BattleLogic.TurnRound(debugTurn)
|
||||||
-- 第一次进入 或者 本轮结束 初始化流程状态
|
-- 第一次进入 或者 本轮结束 初始化流程状态
|
||||||
if CurRound == 0 or (CurSkillPos[0] == 6 and CurSkillPos[1] == 6) then
|
if CurRound == 0 or (CurSkillPos[0] == 6 and CurSkillPos[1] == 6) then
|
||||||
CurRound = CurRound + 1
|
CurRound = CurRound + 1
|
||||||
CurCamp = 0
|
CurCamp = BattleLogic.FirstCamp -- 判断先手阵营
|
||||||
CurSkillPos[0] = 0
|
CurSkillPos[0] = 0
|
||||||
CurSkillPos[1] = 0
|
CurSkillPos[1] = 0
|
||||||
--
|
--
|
||||||
|
|
|
@ -92,6 +92,7 @@ public interface GlobalsDef {
|
||||||
int EXPEDITION_TEAM =1001; //
|
int EXPEDITION_TEAM =1001; //
|
||||||
int CAR_DELAY_TEAM =1101; //车迟斗法
|
int CAR_DELAY_TEAM =1101; //车迟斗法
|
||||||
int DEATH_PATH_TEAM = 1201;//十绝阵
|
int DEATH_PATH_TEAM = 1201;//十绝阵
|
||||||
|
int CHAMPION_TEAM = 1301; //巅峰赛
|
||||||
|
|
||||||
//特权解锁类型
|
//特权解锁类型
|
||||||
int LEVEL_UNLOCK_PRIVILEGE = 1;
|
int LEVEL_UNLOCK_PRIVILEGE = 1;
|
||||||
|
|
|
@ -77,11 +77,9 @@ public class ChampinGetHandler extends BaseHandler {
|
||||||
List<String> strings = RedisUtil.getInstence().lGet(RedisKey.CHAMPION_MY_BATTLLE_IDS, Integer.toString(uid), 0, -1);
|
List<String> strings = RedisUtil.getInstence().lGet(RedisKey.CHAMPION_MY_BATTLLE_IDS, Integer.toString(uid), 0, -1);
|
||||||
|
|
||||||
int state = -1;
|
int state = -1;
|
||||||
Gson gson = new Gson();
|
|
||||||
for (String redisId : strings) {
|
for (String redisId : strings) {
|
||||||
ArenaRecord record = RedisUtil.getInstence().getMapValue(RedisKey.CHAMPION_ARENA_RECORD, "", redisId, ArenaRecord.class);
|
ArenaRecord record = RedisUtil.getInstence().getMapValue(RedisKey.CHAMPION_ARENA_RECORD, "", redisId, ArenaRecord.class);
|
||||||
if ((!record.getId().equals(arenaRecord.getId())) && record.getRoundTims() == roundTims) {
|
if ((!record.getId().equals(arenaRecord.getId())) && record.getRoundTims() == roundTims) {
|
||||||
// System.out.println("record = " +gson.toJson(record));
|
|
||||||
if (record.getFightResult() == 1) {
|
if (record.getFightResult() == 1) {
|
||||||
if (state == -1) {
|
if (state == -1) {
|
||||||
state = 2;
|
state = 2;
|
||||||
|
@ -99,24 +97,37 @@ public class ChampinGetHandler extends BaseHandler {
|
||||||
state = record.getFightResult();
|
state = record.getFightResult();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
System.out.println(state+"record = " +gson.toJson(record));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(schedule==2){
|
if(ChampionshipLogic.getProgress()==-2){
|
||||||
if( realTimes < 6 && roundTims - 7 != realTimes) {
|
if(arenaRecord.getRoundTims()-7==5){
|
||||||
builder.setLoser(true);
|
if(state==0&&attackId==uid){
|
||||||
|
builder.setLoser(true);
|
||||||
|
}else {
|
||||||
|
builder.setLoser(false);
|
||||||
|
}
|
||||||
}else {
|
}else {
|
||||||
builder.setLoser(false);
|
|
||||||
}
|
|
||||||
}else if(schedule==1){
|
|
||||||
if(roundTims!=roundTimes){
|
|
||||||
builder.setLoser(true);
|
builder.setLoser(true);
|
||||||
}else {
|
|
||||||
builder.setLoser(false);
|
|
||||||
}
|
}
|
||||||
|
}else {
|
||||||
|
if(schedule==2){
|
||||||
|
if( roundTims - 7 != realTimes) {
|
||||||
|
builder.setLoser(true);
|
||||||
|
}else {
|
||||||
|
builder.setLoser(false);
|
||||||
|
}
|
||||||
|
}else if(schedule==1){
|
||||||
|
if(roundTims!=roundTimes){
|
||||||
|
builder.setLoser(true);
|
||||||
|
}else {
|
||||||
|
builder.setLoser(false);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
builder.setProcess(state);
|
builder.setProcess(state);
|
||||||
builder.setChampionBattleInfo(builder1
|
builder.setChampionBattleInfo(builder1
|
||||||
.setMyInfo(ChampionshipLogic.getChampionBattleInfo(attackId))
|
.setMyInfo(ChampionshipLogic.getChampionBattleInfo(attackId))
|
||||||
|
|
|
@ -15,6 +15,7 @@ import com.ljsd.jieling.util.MessageUtil;
|
||||||
import util.StringUtil;
|
import util.StringUtil;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取竞猜信息
|
* 获取竞猜信息
|
||||||
|
@ -55,11 +56,25 @@ public class ChampionBetInfoHandler extends BaseHandler<ArenaInfoProto.ChampionG
|
||||||
|
|
||||||
int myGuessID = 0;
|
int myGuessID = 0;
|
||||||
Integer mineBetCoins = 0;
|
Integer mineBetCoins = 0;
|
||||||
List<String> strings = RedisUtil.getInstence().lGet(RedisKey.CHAMPION_MY_BATTLLE_IDS, Integer.toString(arenaRecord.getAttackId()), 0,-1);
|
|
||||||
|
// Map<String, Integer> states = RedisUtil.getInstence().getMapValues(RedisKey.CHAMPION_ARENA_RECORD_THREE, "", String.class, Integer.class);
|
||||||
|
// String key = String.valueOf(v.getAttackId() * 2222 + String.valueOf(v.getDefUid()));
|
||||||
int state =-1;
|
int state =-1;
|
||||||
|
// Integer stateInteger = states.get(key);
|
||||||
|
// if (null!=stateInteger) {
|
||||||
|
// state =stateInteger
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
List<String> strings = RedisUtil.getInstence().lGet(RedisKey.CHAMPION_MY_BATTLLE_IDS, Integer.toString(arenaRecord.getAttackId()), 0,-1);
|
||||||
|
//
|
||||||
|
|
||||||
|
|
||||||
for (String redisId:strings) {
|
for (String redisId:strings) {
|
||||||
ArenaRecord record = RedisUtil.getInstence().getMapValue(RedisKey.CHAMPION_ARENA_RECORD, "", redisId, ArenaRecord.class);
|
ArenaRecord record = RedisUtil.getInstence().getMapValue(RedisKey.CHAMPION_ARENA_RECORD, "", redisId, ArenaRecord.class);
|
||||||
|
|
||||||
|
if(record.getTurn()==-1){
|
||||||
|
continue;
|
||||||
|
}
|
||||||
if((!record.getId().equals(arenaRecord.getId()))&&record.getRoundTims()==(arenaRecord.getRoundTims())){
|
if((!record.getId().equals(arenaRecord.getId()))&&record.getRoundTims()==(arenaRecord.getRoundTims())){
|
||||||
if(record.getFightResult()==0){
|
if(record.getFightResult()==0){
|
||||||
if(state==-1){
|
if(state==-1){
|
||||||
|
|
|
@ -42,6 +42,10 @@ public class ChampionGetMyHistoryHandler extends BaseHandler {
|
||||||
List<ArenaRecord> myArenaRecordInfos = RedisUtil.getInstence().getMapEntrys(RedisKey.CHAMPION_ARENA_RECORD, "", ids, ArenaRecord.class);
|
List<ArenaRecord> myArenaRecordInfos = RedisUtil.getInstence().getMapEntrys(RedisKey.CHAMPION_ARENA_RECORD, "", ids, ArenaRecord.class);
|
||||||
Map<Integer, SArenaRobotConfig> robotConfigMap = STableManager.getConfig(SArenaRobotConfig.class);
|
Map<Integer, SArenaRobotConfig> robotConfigMap = STableManager.getConfig(SArenaRobotConfig.class);
|
||||||
for (ArenaRecord arenaRecord : myArenaRecordInfos) {
|
for (ArenaRecord arenaRecord : myArenaRecordInfos) {
|
||||||
|
if(arenaRecord.getTurn()==-1){
|
||||||
|
//3局两胜 跳过
|
||||||
|
continue;
|
||||||
|
}
|
||||||
int attackUid = arenaRecord.getAttackId();
|
int attackUid = arenaRecord.getAttackId();
|
||||||
int enemyId = arenaRecord.getDefUid();
|
int enemyId = arenaRecord.getDefUid();
|
||||||
int fightResult = arenaRecord.getFightResult();
|
int fightResult = arenaRecord.getFightResult();
|
||||||
|
|
|
@ -69,6 +69,9 @@ public class ChampionViewFinalHandler extends BaseHandler<ArenaInfoProto.Champio
|
||||||
|
|
||||||
for (ArenaRecord arenaRecord : arenaRecords) {
|
for (ArenaRecord arenaRecord : arenaRecords) {
|
||||||
|
|
||||||
|
if(arenaRecord.getTurn()==-1){
|
||||||
|
continue;
|
||||||
|
}
|
||||||
int attackId = arenaRecord.getAttackId();
|
int attackId = arenaRecord.getAttackId();
|
||||||
int defUid = arenaRecord.getDefUid();
|
int defUid = arenaRecord.getDefUid();
|
||||||
|
|
||||||
|
|
|
@ -118,7 +118,7 @@ public class BloodLogic {
|
||||||
.setUnitId(Integer.toString(entry.getValue().getTempleteId()))
|
.setUnitId(Integer.toString(entry.getValue().getTempleteId()))
|
||||||
.setUnitSkillIds(heroSkill)//.substring(0, heroSkill.length() - 1)
|
.setUnitSkillIds(heroSkill)//.substring(0, heroSkill.length() - 1)
|
||||||
.setProperty(property.substring(0, property.length() - 1))
|
.setProperty(property.substring(0, property.length() - 1))
|
||||||
.setPosition(++index)
|
.setPosition(entry.getValue().getPosition())
|
||||||
.setStar(entry.getValue().getStar())
|
.setStar(entry.getValue().getStar())
|
||||||
.build();
|
.build();
|
||||||
heroDefendFightInfos.add(heroFightInfo);
|
heroDefendFightInfos.add(heroFightInfo);
|
||||||
|
|
|
@ -209,8 +209,7 @@ public class ChampionshipLogic {
|
||||||
if(schedule==2){
|
if(schedule==2){
|
||||||
String key = String.valueOf(v.getAttackId() * 2222 + String.valueOf(v.getDefUid()));
|
String key = String.valueOf(v.getAttackId() * 2222 + String.valueOf(v.getDefUid()));
|
||||||
Integer state = states.get(key);
|
Integer state = states.get(key);
|
||||||
System.out.println("scoe state = " + state);
|
if (null!=state&&state == 0) {
|
||||||
if (state == 0) {
|
|
||||||
winnerUid = v.getDefUid();
|
winnerUid = v.getDefUid();
|
||||||
failerUid = v.getAttackId();
|
failerUid = v.getAttackId();
|
||||||
}
|
}
|
||||||
|
@ -488,7 +487,7 @@ public class ChampionshipLogic {
|
||||||
MemberInfo memberInfo = RedisUtil.getInstence().getMapEntry(RedisKey.CHAMPION_JOIN, "", Integer.toString(uid), MemberInfo.class);
|
MemberInfo memberInfo = RedisUtil.getInstence().getMapEntry(RedisKey.CHAMPION_JOIN, "", Integer.toString(uid), MemberInfo.class);
|
||||||
FamilyFightInfo fightInfo = memberInfo.getFightInfo();
|
FamilyFightInfo fightInfo = memberInfo.getFightInfo();
|
||||||
if(fightInfo == null){
|
if(fightInfo == null){
|
||||||
return PlayerLogic.getInstance().getUserTeamOneInfo(uid,GlobalsDef.TEAM_ARENA_DEFENSE);
|
return PlayerLogic.getInstance().getUserTeamOneInfo(uid,GlobalsDef.CHAMPION_TEAM);
|
||||||
}
|
}
|
||||||
//fix 整个过程都不能调整编队
|
//fix 整个过程都不能调整编队
|
||||||
|
|
||||||
|
@ -630,7 +629,7 @@ public class ChampionshipLogic {
|
||||||
|
|
||||||
|
|
||||||
public static void snapOneFightInfo(int uid, Map<Integer, MemberInfo> joinMembers) throws Exception {
|
public static void snapOneFightInfo(int uid, Map<Integer, MemberInfo> joinMembers) throws Exception {
|
||||||
int snapTeamId = GlobalsDef.TEAM_ARENA_DEFENSE;
|
int snapTeamId = GlobalsDef.CHAMPION_TEAM;
|
||||||
|
|
||||||
Map<Integer, SArenaRobotConfig> config = STableManager.getConfig(SArenaRobotConfig.class);
|
Map<Integer, SArenaRobotConfig> config = STableManager.getConfig(SArenaRobotConfig.class);
|
||||||
if (config.containsKey(uid)) {
|
if (config.containsKey(uid)) {
|
||||||
|
@ -755,6 +754,7 @@ public class ChampionshipLogic {
|
||||||
delKeys.add(RedisUtil.getInstence().getKey(RedisKey.CHAMPION_RANK, ""));
|
delKeys.add(RedisUtil.getInstence().getKey(RedisKey.CHAMPION_RANK, ""));
|
||||||
delKeys.add(RedisUtil.getInstence().getKey(RedisKey.CHAMPION_FINAL_RECODED_IDS, ""));
|
delKeys.add(RedisUtil.getInstence().getKey(RedisKey.CHAMPION_FINAL_RECODED_IDS, ""));
|
||||||
delKeys.add(RedisUtil.getInstence().getKey(RedisKey.CHAMPION_GUESSS_UIDS, ""));
|
delKeys.add(RedisUtil.getInstence().getKey(RedisKey.CHAMPION_GUESSS_UIDS, ""));
|
||||||
|
delKeys.add(RedisUtil.getInstence().getKey(RedisKey.CHAMPION_ARENA_RECORD_THREE, ""));
|
||||||
|
|
||||||
//我的历史结果
|
//我的历史结果
|
||||||
joinUids.forEach(uid -> {
|
joinUids.forEach(uid -> {
|
||||||
|
@ -1114,9 +1114,9 @@ public class ChampionshipLogic {
|
||||||
if (null == user) {
|
if (null == user) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
int totalForce = HeroLogic.getInstance().calTeamTotalForce(user, GlobalsDef.TEAM_ARENA_DEFENSE, false);
|
int totalForce = HeroLogic.getInstance().calTeamTotalForce(user, GlobalsDef.CHAMPION_TEAM, false);
|
||||||
if (type == 0) {
|
if (type == 0) {
|
||||||
List<TeamPosHeroInfo> teamPosHeroInfoList = user.getTeamPosManager().getTeamPosForHero().get(GlobalsDef.TEAM_ARENA_DEFENSE);
|
List<TeamPosHeroInfo> teamPosHeroInfoList = user.getTeamPosManager().getTeamPosForHero().get(GlobalsDef.CHAMPION_TEAM);
|
||||||
Map<String, Hero> heroMap = user.getHeroManager().getHeroMap();
|
Map<String, Hero> heroMap = user.getHeroManager().getHeroMap();
|
||||||
List<Integer> heroTids = new ArrayList<>(teamPosHeroInfoList.size());
|
List<Integer> heroTids = new ArrayList<>(teamPosHeroInfoList.size());
|
||||||
for (TeamPosHeroInfo teamPosHeroInfo : teamPosHeroInfoList) {
|
for (TeamPosHeroInfo teamPosHeroInfo : teamPosHeroInfoList) {
|
||||||
|
@ -1242,7 +1242,6 @@ public class ChampionshipLogic {
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
try {
|
try {
|
||||||
|
|
||||||
snapPlayFightInfo(true);
|
snapPlayFightInfo(true);
|
||||||
|
|
||||||
List<String> curArenaRecordIds = RedisUtil.getInstence().lGet(RedisKey.CHAMPION_CUR_JOIN_IDS, "", 0, -1);
|
List<String> curArenaRecordIds = RedisUtil.getInstence().lGet(RedisKey.CHAMPION_CUR_JOIN_IDS, "", 0, -1);
|
||||||
|
|
|
@ -15,55 +15,44 @@ public class AreFightPro implements EndFightProcessor {
|
||||||
public void endfightProcess(FightResult fightResult) {
|
public void endfightProcess(FightResult fightResult) {
|
||||||
int result = fightResult.getCheckResult()[0];
|
int result = fightResult.getCheckResult()[0];
|
||||||
arenaRecord.setFightResult(fightResult.getCheckResult()[0]);
|
arenaRecord.setFightResult(fightResult.getCheckResult()[0]);
|
||||||
int winnerUid = arenaRecord.getAttackId();
|
|
||||||
int failerUid = arenaRecord.getDefUid();
|
|
||||||
if(result == 0){
|
|
||||||
winnerUid = arenaRecord.getDefUid();
|
|
||||||
failerUid = arenaRecord.getAttackId();
|
|
||||||
}
|
|
||||||
String key = String.valueOf(arenaRecord.getAttackId() * 2222 + String.valueOf(arenaRecord.getDefUid()));
|
|
||||||
|
|
||||||
//胜负结果出了之后 选择一局记分
|
|
||||||
Integer state = RedisUtil.getInstence().getMapValue(RedisKey.CHAMPION_ARENA_RECORD_THREE, "", key, Integer.class);
|
|
||||||
boolean jump=false;
|
|
||||||
if(null == state){
|
|
||||||
state=0;
|
|
||||||
}else if(state<2){
|
|
||||||
jump=true;
|
|
||||||
}
|
|
||||||
if(ChampionshipLogic.getSchedule()==2){
|
if(ChampionshipLogic.getSchedule()==2){
|
||||||
if(result==1){
|
String key = String.valueOf(arenaRecord.getAttackId() * 2222 + String.valueOf(arenaRecord.getDefUid()));
|
||||||
if(state==0){
|
//胜负结果出了之后 选择一局记分
|
||||||
state=2;
|
boolean jump=false;
|
||||||
}else if(state==3){
|
Integer state = RedisUtil.getInstence().getMapValue(RedisKey.CHAMPION_ARENA_RECORD_THREE, "", key, Integer.class);
|
||||||
state=5;
|
if(null ==state){
|
||||||
}else {
|
state=0;
|
||||||
state=result;
|
}else if(state<2){
|
||||||
|
if(arenaRecord.getTurn()==3){
|
||||||
|
arenaRecord.setTurn(-1);
|
||||||
}
|
}
|
||||||
}else {
|
jump =true;
|
||||||
if(state==0){
|
|
||||||
state=3;
|
|
||||||
}else if(state==2){
|
|
||||||
state=4;
|
|
||||||
}else{
|
|
||||||
state=result;}
|
|
||||||
}
|
}
|
||||||
RedisUtil.getInstence().putMapEntry(RedisKey.CHAMPION_ARENA_RECORD_THREE,"",key,state);
|
if(!jump){
|
||||||
|
if(result==1){
|
||||||
|
if(state==0){
|
||||||
|
state=2;
|
||||||
|
}else if(state==3){
|
||||||
|
state=5;
|
||||||
|
}else {
|
||||||
|
state=result;
|
||||||
|
}
|
||||||
|
}else {
|
||||||
|
if(state==0){
|
||||||
|
state=3;
|
||||||
|
}else if(state==2){
|
||||||
|
state=4;
|
||||||
|
}else{
|
||||||
|
state=result;}
|
||||||
|
}
|
||||||
|
System.out.println("keykeykeykeykeykeykey"+key+": "+arenaRecord.getId()+": "+arenaRecord.getTurn()+" : "+arenaRecord.getAttackId()+"AreFightPro state = " + state);
|
||||||
|
RedisUtil.getInstence().putMapEntry(RedisKey.CHAMPION_ARENA_RECORD_THREE,"",key,state);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!jump) {
|
|
||||||
if (ChampionshipLogic.getSchedule() == 2&&state<2) {
|
|
||||||
if (state == 0) {
|
|
||||||
winnerUid = arenaRecord.getDefUid();
|
|
||||||
failerUid = arenaRecord.getAttackId();
|
|
||||||
} else {
|
|
||||||
winnerUid = arenaRecord.getAttackId();
|
|
||||||
failerUid = arenaRecord.getDefUid();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
System.out.println(arenaRecord.getId()+": "+arenaRecord.getTurn()+" : "+arenaRecord.getAttackId()+"AreFightPro state = " + state);
|
|
||||||
// ChampionshipLogic.setScoreForSuccess(winnerUid,failerUid,state<2);
|
|
||||||
}
|
|
||||||
int warTime = STableManager.getFigureConfig(CommonStaticConfig.class).getsChampionshipSetting().getWarTime();
|
int warTime = STableManager.getFigureConfig(CommonStaticConfig.class).getsChampionshipSetting().getWarTime();
|
||||||
CommonProto.FightData build = CommonProto.FightData.newBuilder().setFightType(9).setHeroFightInfos(fightResult.getFightTeamInfo()).addMonsterList(fightResult.getDefFightTeamInfo()).setFightSeed(fightResult.getSeed()).setFightMaxTime(warTime).build();
|
CommonProto.FightData build = CommonProto.FightData.newBuilder().setFightType(9).setHeroFightInfos(fightResult.getFightTeamInfo()).addMonsterList(fightResult.getDefFightTeamInfo()).setFightSeed(fightResult.getSeed()).setFightMaxTime(warTime).build();
|
||||||
arenaRecord.setFightData(build.toByteArray());
|
arenaRecord.setFightData(build.toByteArray());
|
||||||
|
|
|
@ -141,6 +141,7 @@ public class FightUtil {
|
||||||
|
|
||||||
LuaValue getFightData ;
|
LuaValue getFightData ;
|
||||||
if(((PVPFightEvent) fightEvent).isRever()){
|
if(((PVPFightEvent) fightEvent).isRever()){
|
||||||
|
deffightTeamInfo = CommonProto.FightTeamInfo.newBuilder().mergeFrom(deffightTeamInfo).setFirstCamp(1).build();
|
||||||
getFightData = FightDataUtil.getFinalPlayerFightData(fightTeamInfo, deffightTeamInfo,true);//对方先手
|
getFightData = FightDataUtil.getFinalPlayerFightData(fightTeamInfo, deffightTeamInfo,true);//对方先手
|
||||||
}else {
|
}else {
|
||||||
getFightData = FightDataUtil.getFinalPlayerFightData(fightTeamInfo, deffightTeamInfo);
|
getFightData = FightDataUtil.getFinalPlayerFightData(fightTeamInfo, deffightTeamInfo);
|
||||||
|
|
|
@ -173,7 +173,7 @@ public class FightDataUtil {
|
||||||
}
|
}
|
||||||
|
|
||||||
public static LuaValue getPlayerData(CommonProto.FightTeamInfo heroTeam,int position) {
|
public static LuaValue getPlayerData(CommonProto.FightTeamInfo heroTeam,int position) {
|
||||||
return getPlayerData(heroTeam, position);
|
return getPlayerData(heroTeam, position,false);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static LuaValue getPlayerData(CommonProto.FightTeamInfo heroTeam,int position,boolean first) {
|
public static LuaValue getPlayerData(CommonProto.FightTeamInfo heroTeam,int position,boolean first) {
|
||||||
|
|
Loading…
Reference in New Issue