aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorOvahlord <dreadkiller@gmx.de>2024-01-16 23:49:03 +0100
committerGitHub <noreply@github.com>2024-01-16 23:49:03 +0100
commitba627c1d1c4289c02252a28196fdf53ce532e390 (patch)
tree6b1d085e44f0f655a66123c4e600505111eeb485 /src
parent2f6ed2c203b16a1d1e85f61a8b8e2cf3d1a4e784 (diff)
Core/Creatures: fixed a logic mistake in personal skinning loot that was causing creatures without loot to despawn instantly (#29586)
Diffstat (limited to 'src')
-rw-r--r--src/server/game/Entities/Creature/Creature.cpp14
1 files changed, 11 insertions, 3 deletions
diff --git a/src/server/game/Entities/Creature/Creature.cpp b/src/server/game/Entities/Creature/Creature.cpp
index d83653c9bcf..6905966e567 100644
--- a/src/server/game/Entities/Creature/Creature.cpp
+++ b/src/server/game/Entities/Creature/Creature.cpp
@@ -2962,11 +2962,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)