void OnRunesSaleHandler(C2G.RunesSale send, C2G.RunesSaleAck recv) { foreach (long rune_idx in send.rune_idxes) { RuneManager.Instance.RemoveRune(rune_idx); RuneItem item = m_Runes.Find(r => r.Rune.RuneIdx == rune_idx); if (item == null) { item = m_HeroRunes.Find(r => r.Rune.RuneIdx == rune_idx); if (item == null) { continue; } } RemoveRune(item); } m_selected_runes.Clear(); Network.PlayerInfo.AddGoods(recv.add_goods); GameMain.Instance.UpdatePlayerInfo(); RefreshInfo(); //InitRuneItem(); InitBatchLabel(); Tooltip.Instance.ShowMessageKey("RuneSaleSuccess"); }
void OnSaleConfirm(StoreConfirmParam param) { C2G.RunesSale packet = new C2G.RunesSale(); packet.rune_idxes = new List <long>(); packet.rune_grades = new List <long>(); packet.rune_idxes.Add(param.rune_item.RuneIdx); packet.rune_grades.Add(param.rune_item.Info.Grade); Network.GameServer.JsonAsync <C2G.RunesSale, C2G.RunesSaleAck>(packet, OnRunesSaleHandler); }
public void OnClickBatchSellConfirm() { C2G.RunesSale packet = new C2G.RunesSale(); packet.rune_idxes = new List <long>(); packet.rune_grades = new List <long>(); foreach (RuneItem item in m_selected_runes) { packet.rune_grades.Add(item.Rune.Info.Grade); packet.rune_idxes.Add(item.Rune.RuneIdx); } if (packet.rune_idxes.Count > 0) { Network.GameServer.JsonAsync <C2G.RunesSale, C2G.RunesSaleAck>(packet, OnRunesSaleHandler); } else { InitBatchLabel(); } }