mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-20 09:17:36 +01:00
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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user