From 799609fb212e72dc363171c11a9a71bc8ab81d8c Mon Sep 17 00:00:00 2001 From: Mitch Freeman <65987027+neckkola@users.noreply.github.com> Date: Wed, 26 Mar 2025 22:38:13 -0300 Subject: [PATCH] [Fix] AllowFVNoDrop Flag trades (#4809) --- common/item_instance.cpp | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/common/item_instance.cpp b/common/item_instance.cpp index 823990539..c25ea09d2 100644 --- a/common/item_instance.cpp +++ b/common/item_instance.cpp @@ -906,24 +906,32 @@ bool EQ::ItemInstance::IsSlotAllowed(int16 slot_id) const { bool EQ::ItemInstance::IsDroppable(bool recurse) const { - if (!m_item) + if (!m_item) { return false; + } /*if (m_ornamentidfile) // not implemented return false;*/ - if (m_attuned) + if (m_attuned) { return false; - /*if (m_item->FVNoDrop != 0) // not implemented - return false;*/ - if (m_item->NoDrop == 0) + } + + if (RuleI(World, FVNoDropFlag) == FVNoDropFlagRule::Enabled && m_item->FVNoDrop == 0) { + return true; + } + + if (m_item->NoDrop == 0) { return false; + } if (recurse) { - for (auto iter : m_contents) { - if (!iter.second) + for (auto iter: m_contents) { + if (!iter.second) { continue; + } - if (!iter.second->IsDroppable(recurse)) + if (!iter.second->IsDroppable(recurse)) { return false; + } } }