Skip to content

Commit

Permalink
fix: Fixes dropping gold/bank checks in a bank box when it is full
Browse files Browse the repository at this point in the history
  • Loading branch information
kamronbatman committed Jan 2, 2025
1 parent 867dd6e commit 94cc6b9
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions Projects/Server/Items/Containers.cs
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,18 @@ public override bool OnDragDropInto(Mobile from, Item item, Point3D p) =>
(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.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)
Expand Down

0 comments on commit 94cc6b9

Please sign in to comment.