对手数据判空处理
parent
79daca78ee
commit
41f90ab191
|
@ -477,6 +477,7 @@ public class ChampionshipLogic {
|
||||||
builder.setJoinState(1);
|
builder.setJoinState(1);
|
||||||
String key = RedisUtil.getInstence().getKey(RedisKey.CHAMPION_MY_BATTLLE_IDS, Integer.toString(uid));
|
String key = RedisUtil.getInstence().getKey(RedisKey.CHAMPION_MY_BATTLLE_IDS, Integer.toString(uid));
|
||||||
Object latestKey = RedisUtil.getInstence().lGetIndex(key, -1);
|
Object latestKey = RedisUtil.getInstence().lGetIndex(key, -1);
|
||||||
|
if(latestKey!=null){
|
||||||
ArenaRecord arenaRecord = RedisUtil.getInstence().getMapValue(RedisKey.CHAMPION_ARENA_RECORD, "", latestKey.toString(), ArenaRecord.class);
|
ArenaRecord arenaRecord = RedisUtil.getInstence().getMapValue(RedisKey.CHAMPION_ARENA_RECORD, "", latestKey.toString(), ArenaRecord.class);
|
||||||
int enemyId = arenaRecord.getDefUid();
|
int enemyId = arenaRecord.getDefUid();
|
||||||
int attackId = arenaRecord.getAttackId();
|
int attackId = arenaRecord.getAttackId();
|
||||||
|
@ -493,6 +494,9 @@ public class ChampionshipLogic {
|
||||||
.setEnemyInfo(getChampionBattleInfo(enemyId))
|
.setEnemyInfo(getChampionBattleInfo(enemyId))
|
||||||
.setResult(fightResult)
|
.setResult(fightResult)
|
||||||
.build());
|
.build());
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
MessageUtil.sendMessage(session,1, MessageTypeProto.MessageType.CHAMPION_GET_RESPONSE_VALUE,builder.build(),true);
|
MessageUtil.sendMessage(session,1, MessageTypeProto.MessageType.CHAMPION_GET_RESPONSE_VALUE,builder.build(),true);
|
||||||
|
|
Loading…
Reference in New Issue