From f0488242795625807f2a32bf89ffe42520e4a3ff Mon Sep 17 00:00:00 2001 From: Ovahlord Date: Tue, 16 Jan 2024 23:49:03 +0100 Subject: Core/Creatures: fixed a logic mistake in personal skinning loot that was causing creatures without loot to despawn instantly (#29586) (cherry picked from commit ba627c1d1c4289c02252a28196fdf53ce532e390) --- src/server/game/Entities/Creature/Creature.cpp | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) (limited to 'src') diff --git a/src/server/game/Entities/Creature/Creature.cpp b/src/server/game/Entities/Creature/Creature.cpp index f82d87dbe11..1ef09dd39b0 100644 --- a/src/server/game/Entities/Creature/Creature.cpp +++ b/src/server/game/Entities/Creature/Creature.cpp @@ -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) -- cgit v1.2.3