Core/Creatures: fixed a logic mistake in personal skinning loot that was causing creatures without loot to despawn instantly (#29586)

(cherry picked from commit ba627c1d1c)
This commit is contained in:
Ovahlord
2024-01-16 23:49:03 +01:00
committed by funjoker
parent 8b6a1db202
commit f048824279

View File

@@ -2955,11 +2955,19 @@ void Creature::AllLootRemovedFromCorpse()
if (m_loot && m_loot->loot_type == LOOT_SKINNING && m_loot->isLooted())
return true;
bool hasSkinningLoot = false;
for (auto const& [_, loot] : m_personalLoot)
if (loot->loot_type != LOOT_SKINNING || !loot->isLooted())
return false;
{
if (loot->loot_type == LOOT_SKINNING)
{
if (!loot->isLooted())
return false;
return true;
hasSkinningLoot = true;
}
}
return hasSkinningLoot;
}();
if (isFullySkinned)