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:
@@ -2718,11 +2718,18 @@ namespace Game.Entities
|
|||||||
if (_loot != null && _loot.loot_type == LootType.Skinning && _loot.IsLooted())
|
if (_loot != null && _loot.loot_type == LootType.Skinning && _loot.IsLooted())
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
|
bool hasSkinningLoot = false;
|
||||||
foreach (var (_, loot) in m_personalLoot)
|
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())
|
if (isFullySkinned())
|
||||||
|
|||||||
Reference in New Issue
Block a user