aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorOvahlord <dreadkiller@gmx.de>2024-01-16 23:49:03 +0100
committerfunjoker <funjoker109@gmail.com>2024-01-29 21:47:15 +0100
commitf0488242795625807f2a32bf89ffe42520e4a3ff (patch)
tree342ad735802d7dae03d97375610f53d35a3f97a0 /src
parent8b6a1db20215ba54a43789c0f809152855fd2fbc (diff)
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)
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 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)