From e305ba852b35342e416ca180f963ca20bdb360b0 Mon Sep 17 00:00:00 2001 From: Paul Coene Date: Fri, 19 May 2023 22:28:01 -0400 Subject: [PATCH] [Bug Fix] NPC Armor Upgrade to a slot not handled correctly (#3366) * [NPC Armor - Bug] NPC upgardes in armor not correct * Revert "[NPC Armor - Bug] NPC upgardes in armor not correct" This reverts commit d5a68654a791073a60aa6d2457250481633cb579. * [NPC item bonuses] Upgrades not processed correctly * Update loottables.cpp --------- Co-authored-by: Kinglykrab --- zone/loottables.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/zone/loottables.cpp b/zone/loottables.cpp index 2df0b258f..45b1017bf 100644 --- a/zone/loottables.cpp +++ b/zone/loottables.cpp @@ -395,9 +395,15 @@ void NPC::AddLootDrop( foundslot = i; } else { + // Unequip old item + auto* olditem = GetItem(i); + + olditem->equip_slot = EQ::invslot::SLOT_INVALID; + equipment[i] = item2->ID; + foundslot = i; - found = true; + found = true; } } // end if ac }