public void OnPopupOk(StoreConfirmParam parm) { C2G.StuffPurchase packet = new C2G.StuffPurchase(); packet.stuff_idn = m_Item.Info.IDN; Network.GameServer.JsonAsync <C2G.StuffPurchase, C2G.StuffPurchaseAck>(packet, OnPurchaseStuffHandler); }
public void OnPurchaseStuffHandler(C2G.StuffPurchase send, C2G.StuffPurchaseAck recv) { m_Item.AddPiece((short)(m_Info.PieceCountMax - m_Item.PieceCount)); m_LabelStuffPurchaseValue.text = ((m_Info.PieceCountMax - m_Item.PieceCount) * m_Info.StuffPurchaseValue).ToString(); ItemManager.Instance.ItemMadeList.Clear(); Network.PlayerInfo.UseGoods(new PacketInfo.pd_GoodsData(PacketInfo.pe_GoodsType.token_gem, m_Info.StuffPurchaseValue * (m_Info.PieceCountMax - m_Item.PieceCount))); GameMain.Instance.UpdateNotify(false); GameMain.Instance.UpdatePlayerInfo(); GameMain.Instance.UpdateMenu(); Tooltip.Instance.ShowMessageKey("SuccessPurchased"); }