private void HandleArenaStartCmd(CommandParser.Command param) { ulong num = 0uL; ulong.TryParse(param.GetParam(1), out num); int rank = 0; int.TryParse(param.GetParam(2), out rank); Globals.Instance.Player.PvpSystem.SetArenaTargetID(num); MC2S_PvpArenaStart mC2S_PvpArenaStart = new MC2S_PvpArenaStart(); mC2S_PvpArenaStart.TargetID = num; mC2S_PvpArenaStart.Rank = rank; Globals.Instance.CliSession.Send(803, mC2S_PvpArenaStart); }
public void OnPkTraget(GameObject go) { Globals.Instance.EffectSoundMgr.Play("ui/ui_001"); if (this.data == null || this.data.RankData == null) { return; } LocalPlayer player = Globals.Instance.Player; bool flag = player.Data.ID == this.data.RankData.Data.GUID; if (flag) { return; } if (player.Data.Stamina < GameConst.GetInt32(36)) { GUIShortcutBuyItem.Show(GUIShortcutBuyItem.BuyType.Stamina); return; } if (this.data.IsFarmRebot) { this.SendFarmMsg(1); return; } if (player.PvpSystem.Rank > GameConst.GetInt32(68) && this.data.RankData.Rank <= 10) { GameUIManager.mInstance.ShowMessageTip(string.Format(Singleton<StringManager>.Instance.GetString("pvp4Top"), GameConst.GetInt32(68)), 0f, 0f); return; } Globals.Instance.Player.PvpSystem.SetArenaTargetID(this.data.RankData.Data.GUID); MC2S_PvpArenaStart mC2S_PvpArenaStart = new MC2S_PvpArenaStart(); mC2S_PvpArenaStart.TargetID = this.data.RankData.Data.GUID; mC2S_PvpArenaStart.Rank = this.data.RankData.Rank; Globals.Instance.CliSession.Send(803, mC2S_PvpArenaStart); GameUIState uiState = GameUIManager.mInstance.uiState; uiState.PlayerLevel = player.Data.Level; uiState.PlayerEnergy = player.Data.Energy; uiState.PlayerExp = player.Data.Exp; uiState.PlayerMoney = player.Data.Money; uiState.ArenaHighestRank = player.Data.ArenaHighestRank; uiState.SetOldFurtherData(player.TeamSystem.GetPet(0)); }