private void OnSureEnhanceAllClick(object obj) { if ((long)Globals.Instance.Player.Data.Money < (long)((ulong)this.mEnhanceTotalCost)) { GameMessageBox.ShowMoneyLackMessageBox(); } else { SocketDataEx curSelectSocketData = this.GetCurSelectSocketData(); if (curSelectSocketData != null) { this.oldEquipEnhanceMasterLevel = curSelectSocketData.EquipMasterEnhanceLevel; } PetDataEx curSelectPetData = this.GetCurSelectPetData(); curSelectPetData.GetAttribute(ref GameUIManager.mInstance.uiState.mOldHpNum, ref GameUIManager.mInstance.uiState.mOldAttackNum, ref GameUIManager.mInstance.uiState.mOldWufangNum, ref GameUIManager.mInstance.uiState.mOldFafangNum); int curSelectIndex = this.GetCurSelectIndex(); MC2S_EquipEnhance mC2S_EquipEnhance = new MC2S_EquipEnhance(); mC2S_EquipEnhance.Type = 0; mC2S_EquipEnhance.Value = (ulong)((long)curSelectIndex); Globals.Instance.CliSession.Send(520, mC2S_EquipEnhance); } }
private void SendEnhanceRequest2Server(bool isFiveTimes) { if (!this.mBaseScene.mEquipData.CanEnhance()) { GameUIManager.mInstance.ShowMessageTipByKey("equipImprove28", 0f, 0f); return; } if (Tools.MoneyNotEnough(ECurrencyType.ECurrencyT_Money, (int)this.mBaseScene.mEquipData.GetEquipEnhanceCost(), 0)) { return; } this.oldEnhanceLevel = this.mBaseScene.mEquipData.GetEquipEnhanceLevel(); if (this.mBaseScene.mSocketData != null) { this.oldMasterLevel = this.mBaseScene.mSocketData.EquipMasterEnhanceLevel; } MC2S_EquipEnhance mC2S_EquipEnhance = new MC2S_EquipEnhance(); mC2S_EquipEnhance.Type = ((!isFiveTimes) ? 2 : 1); mC2S_EquipEnhance.Value = this.mBaseScene.mEquipData.Data.ID; Globals.Instance.CliSession.Send(520, mC2S_EquipEnhance); }