public void RemoveItemFromPanel(BankItemRecord obj, int quantity) { if (obj.IsNull()) { return; } if (obj.Quantity == (uint)-quantity) { SaveTask.RemoveElement(obj); var existing = Client.Character.Inventory.Items.ExistingItem(obj); if (existing != null) { existing.Quantity += (uint)-quantity; SaveTask.UpdateElement(existing); Client.Character.Inventory.Refresh(); } else { Client.Character.Inventory.Add(obj); } Client.Send(new StorageObjectRemoveMessage(obj.UID)); } else { obj.Quantity = (uint)(obj.Quantity + quantity); SaveTask.UpdateElement(obj); Client.Character.Inventory.Add(obj, (uint)-quantity); Client.Send(new StorageObjectUpdateMessage(obj.GetObjectItem())); } }
void m_items_OnItemAdded(BankItemRecord obj) { obj.AddElement(); this.Character.Client.Send(new StorageObjectUpdateMessage(obj.GetObjectItem())); }
void m_items_OnItemStacked(BankItemRecord arg1, uint arg2) { arg1.UpdateElement(); this.Character.Client.Send(new StorageObjectUpdateMessage(arg1.GetObjectItem())); }