void Buyresult(ArkCrossEngine.Network.GeneralOperationResult result) { try { if (result == ArkCrossEngine.Network.GeneralOperationResult.LC_Succeed) { SetGoldBuyInfo(); ArkCrossEngine.RoleInfo ri = ArkCrossEngine.LobbyClient.Instance.CurrentRole; if (ri != null) { ArkCrossEngine.BuyMoneyConfig bmc = ArkCrossEngine.BuyMoneyConfigProvider.Instance.GetDataById(ri.BuyMoneyCount); if (bmc != null) { BuyMoneyTip(bmc.m_GainMoney); } } } else { int i = 0; if (result == ArkCrossEngine.Network.GeneralOperationResult.LC_Failure_CostError) { i = 123; } if (result == ArkCrossEngine.Network.GeneralOperationResult.LC_Failure_Overflow) { i = 150; } if (signtenbuy) { if (signshowtip) { return; } else { signshowtip = true; } } ArkCrossEngine.LogicSystem.EventChannelForGfx.Publish("ge_show_dialog", "ui", ArkCrossEngine.StrDictionaryProvider.Instance.GetDictString(i), ArkCrossEngine.StrDictionaryProvider.Instance.GetDictString(140), null, null, null, false); } } catch (Exception ex) { ArkCrossEngine.LogicSystem.LogFromGfx("[Error]:Exception:{0}\n{1}", ex.Message, ex.StackTrace); } }
void SetGoldBuyInfo() { ArkCrossEngine.RoleInfo ri = ArkCrossEngine.LobbyClient.Instance.CurrentRole; if (ri != null) { UnityEngine.Transform tf = transform.Find("bk/tip"); if (tf != null) { UILabel ul = tf.gameObject.GetComponent <UILabel>(); if (ul != null) { ArkCrossEngine.VipConfig config_data = ArkCrossEngine.VipConfigProvider.Instance.GetDataById(ri.Vip); ul.text = ArkCrossEngine.StrDictionaryProvider.Instance.Format(145, ri.BuyMoneyCount, null == config_data ? (ri.Vip > 0 ? ri.Vip * 10 : 10) : config_data.m_BuyGold); } } ArkCrossEngine.BuyMoneyConfig bmc = ArkCrossEngine.BuyMoneyConfigProvider.Instance.GetDataById(ri.BuyMoneyCount + 1); if (bmc != null) { tf = transform.Find("bk/money/mount"); if (tf != null) { UILabel ul = tf.gameObject.GetComponent <UILabel>(); if (ul != null) { ul.text = bmc.m_GainMoney.ToString(); } } tf = transform.Find("bk/zuan/mount"); if (tf != null) { UILabel ul = tf.gameObject.GetComponent <UILabel>(); if (ul != null) { ul.text = bmc.m_CostGold.ToString(); } } } } }