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

Port From (https://github.com/TrinityCore/TrinityCore/commit/ba627c1d1c4289c02252a28196fdf53ce532e390)
This commit is contained in:
hondacrx
2024-02-06 10:03:36 -05:00
parent aac60cf9a8
commit 1d13b710f9
+10 -3
View File
@@ -2718,11 +2718,18 @@ namespace Game.Entities
if (_loot != null && _loot.loot_type == LootType.Skinning && _loot.IsLooted())
return true;
bool hasSkinningLoot = false;
foreach (var (_, loot) in m_personalLoot)
if (loot.loot_type != LootType.Skinning || !loot.IsLooted())
return false;
{
if (loot.loot_type == LootType.Skinning)
{
if (!loot.IsLooted())
return false;
hasSkinningLoot = true;
}
}
return true;
return hasSkinningLoot;
}
if (isFullySkinned())