public bool OnAvatarReviveRsp(AvatarReviveRsp rsp) { if (rsp.get_retcode() == null) { if (rsp.get_revive_timesSpecified()) { int num = this._levelScoreManager.maxReviveNum - ((int)rsp.get_revive_times()); if (this._levelScoreManager.avaiableReviveNum > num) { this._levelScoreManager.avaiableReviveNum = num; this._levelActor.ReviveAvatarByID(this._reviveContext.avatarRuntimeID, this._reviveContext.revivePosition); this.Destroy(); Singleton <WwiseAudioManager> .Instance.Post("BGM_PauseMenu_Off", null, null, null); this._reviveContext.OnReviveConfirm(); } } } else { GeneralDialogContext dialogContext = new GeneralDialogContext { type = GeneralDialogContext.ButtonType.SingleButton, title = LocalizationGeneralLogic.GetText("Menu_Title_ExchangeFail", new object[0]), desc = LocalizationGeneralLogic.GetNetworkErrCodeOutput(rsp.get_retcode(), new object[0]) }; Singleton <MainUIManager> .Instance.ShowDialog(dialogContext, UIType.Any); } return(false); }
public static AvatarReviveRsp GetAvatarReviveRsp() { AvatarReviveRsp rsp = new AvatarReviveRsp(); rsp.set_retcode(0); rsp.set_revive_times(1); return(rsp); }