public static void OnBoughtSoldCard() { var pkt = ConnectAPI.GetCardSaleResult(); long balance = NetCache.Get().GetNetObject <NetCache.NetCacheArcaneDustBalance>().Balance; HSMPClient.Get().SendDebugMessage("OnBoughtSoldCard: " + balance + " +- " + pkt.Amount); switch (pkt.Action) { case Network.CardSaleResult.SaleResult.CARD_WAS_BOUGHT: HSMPClient.Get().Send(new MsgCurrencyBalance(MsgCurrencyBalance.CurrencyType.DUST, balance - pkt.Amount)); break; case Network.CardSaleResult.SaleResult.CARD_WAS_SOLD: HSMPClient.Get().Send(new MsgCurrencyBalance(MsgCurrencyBalance.CurrencyType.DUST, balance + pkt.Amount)); break; } }