From 1586a8e6ba1c58ccf8be1763c0e6763079227bf4 Mon Sep 17 00:00:00 2001 From: Kamron Batman <3953314+kamronbatman@users.noreply.github.com> Date: Wed, 1 Jan 2025 16:47:32 -0800 Subject: [PATCH] fix: Fixes dropping gold/bank checks in a bank box when it is full (#2044) --- Projects/Server/Items/Containers.cs | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/Projects/Server/Items/Containers.cs b/Projects/Server/Items/Containers.cs index a7d905e32..e436b78c0 100644 --- a/Projects/Server/Items/Containers.cs +++ b/Projects/Server/Items/Containers.cs @@ -113,6 +113,18 @@ public class BankBox : Container (from == Owner && Opened || from.AccessLevel >= AccessLevel.GameMaster) && base.OnDragDropInto(from, item, p); + public override bool CheckHold(Mobile m, Item item, bool message, bool checkItems, int plusItems, int plusWeight) + { + // This is a horrible hack. + // TODO: Refactor this by moving BankBox out of the core. + if (AccountGold.Enabled && AccountGold.ConvertOnBank && item.GetType().Name is "Gold" or "BankCheck") + { + return true; + } + + return base.CheckHold(m, item, message, checkItems, plusItems, plusWeight); + } + public override int GetTotal(TotalType type) { if (AccountGold.Enabled && Owner?.Account != null && type == TotalType.Gold)