public override void SetBattleEnd() { base.SetBattleEnd(); PVP.bUpdateInfo = battleEndType == pe_EndBattle.Win; C2G.PvpEnd packet = new C2G.PvpEnd(); packet.enemy_account_idx = Network.PVPBattleInfo.enemy_info.account_idx; packet.enemy_rank = Network.PVPBattleInfo.enemy_info.rank; packet.is_win = battleEndType == pe_EndBattle.Win; Network.GameServer.JsonAsync <C2G.PvpEnd, C2G.PvpEndAck>(packet, OnPvpBattleEnd); }
void OnPvpBattleEnd(C2G.PvpEnd packet, C2G.PvpEndAck ack) { _pvp_battle_end_param = new EventParamPVPBattleEnd(); _pvp_battle_end_param.end_type = battleEndType; _pvp_battle_end_param.rank = ack.rank; _pvp_battle_end_param.rank_up = ack.rank_up; if (_pvp_battle_end_param.end_type == pe_EndBattle.Exit) { GameMain.SetBattleMode(eBattleMode.None); } }