From 551078670d97b1615edc8535d99fef414fb28a20 Mon Sep 17 00:00:00 2001 From: Kamron Batman <3953314+kamronbatman@users.noreply.github.com> Date: Sun, 26 Sep 2021 19:07:42 -0700 Subject: [PATCH] fix: Fixes quiver logic (#805) --- .../UOContent/Items/Quivers/BaseQuiver.cs | 24 +++++++++++++------ 1 file changed, 17 insertions(+), 7 deletions(-) diff --git a/Projects/UOContent/Items/Quivers/BaseQuiver.cs b/Projects/UOContent/Items/Quivers/BaseQuiver.cs index 544c6965d..02a832003 100644 --- a/Projects/UOContent/Items/Quivers/BaseQuiver.cs +++ b/Projects/UOContent/Items/Quivers/BaseQuiver.cs @@ -181,19 +181,29 @@ namespace Server.Items public override bool CheckHold(Mobile m, Item item, bool message, bool checkItems, int plusItems, int plusWeight) { - if (CheckType(item)) + if (!CheckType(item)) { - return Items.Count >= DefaultMaxItems && !checkItems && Ammo?.Deleted == false && - Ammo.Amount + item.Amount <= m_Capacity || item.Amount <= m_Capacity && - base.CheckHold(m, item, message, checkItems, plusItems, plusWeight); + if (message) + { + m.SendLocalizedMessage( 1074836 ); // The container can not hold that type of object. + } + + return false; } - if (message) + if (Items.Count < DefaultMaxItems) { - m.SendLocalizedMessage(1074836); // The container can not hold that type of object. + return item.Amount <= m_Capacity && base.CheckHold(m, item, message, checkItems, plusItems, plusWeight); } - return false; + if (checkItems) + { + return false; + } + + Item ammo = Ammo; + + return ammo?.Deleted == false && ammo.Amount + item.Amount <= m_Capacity; } public override void AddItem(Item dropped)