From 1d13b710f9e7d24fbc12495f7ec217667f96a179 Mon Sep 17 00:00:00 2001 From: hondacrx Date: Tue, 6 Feb 2024 10:03:36 -0500 Subject: [PATCH] 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) --- Source/Game/Entities/Creature/Creature.cs | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/Source/Game/Entities/Creature/Creature.cs b/Source/Game/Entities/Creature/Creature.cs index f07f3285f..7d0a0ad8a 100644 --- a/Source/Game/Entities/Creature/Creature.cs +++ b/Source/Game/Entities/Creature/Creature.cs @@ -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())