mirror of
https://github.com/EQEmu/Server.git
synced 2026-05-22 16:28:28 +00:00
[Bug Fix] Fix issue with NPCs no longer using some armor. (#3318)
* [BugFix/NPCs] Fix issue with NPCs no longer using some armor. * Removed redundant memory clear
This commit is contained in:
+6
-2
@@ -361,11 +361,12 @@ void NPC::AddLootDrop(
|
||||
SetArrowEquipped(true);
|
||||
}
|
||||
|
||||
bool found = false; // track if we found an empty slot we fit into
|
||||
|
||||
if (loot_drop.equip_item > 0) {
|
||||
uint8 eslot = 0xFF;
|
||||
char newid[20];
|
||||
const EQ::ItemData* compitem = nullptr;
|
||||
bool found = false; // track if we found an empty slot we fit into
|
||||
int32 foundslot = -1; // for multi-slot items
|
||||
|
||||
// Equip rules are as follows:
|
||||
@@ -500,7 +501,6 @@ void NPC::AddLootDrop(
|
||||
|
||||
}
|
||||
if (found) {
|
||||
CalcBonuses(); // This is less than ideal for bulk adding of items
|
||||
item->equip_slot = foundslot;
|
||||
}
|
||||
}
|
||||
@@ -510,6 +510,10 @@ void NPC::AddLootDrop(
|
||||
}
|
||||
else safe_delete(item);
|
||||
|
||||
if (found) {
|
||||
CalcBonuses();
|
||||
}
|
||||
|
||||
if (IsRecordLootStats()) {
|
||||
m_rolled_items.emplace_back(item->item_id);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user