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