[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 <kinglykrab@gmail.com>
This commit is contained in:
Paul Coene 2023-05-19 22:28:01 -04:00 committed by GitHub
parent b8c91cf4f9
commit e305ba852b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

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