fix: Fixes dropping gold/bank checks in a bank box when it is full (#2044)

This commit is contained in:
Kamron Batman 2025-01-01 16:47:32 -08:00 committed by GitHub
parent 867dd6eb78
commit 1586a8e6ba
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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)