public override void MoveItem(uint uid, int quantity) { if (quantity > 0) { CharacterItemRecord item = this.Character.Inventory.GetItem(uid); if (item != null && item.Quantity >= quantity && item.CanBeExchanged()) { BankItemRecord bankItem = item.ToBankItemRecord(this.Character.Client.Account.Id); bankItem.Quantity = (uint)quantity; this.Character.Inventory.RemoveItem(item.UId, (uint)quantity); this.m_items.AddItem(bankItem); } } else { BankItemRecord item = this.m_items.GetItem(uid); uint removedQuantity = (uint)Math.Abs(quantity); if (item != null && item.Quantity >= removedQuantity) { CharacterItemRecord characterItemRecord = item.ToCharacterItemRecord(this.Character.Id); characterItemRecord.Quantity = removedQuantity; this.m_items.RemoveItem(uid, removedQuantity); this.Character.Inventory.AddItem(characterItemRecord); } } }