diff options
author | linencloth <none@none> | 2010-09-17 15:16:26 +0200 |
---|---|---|
committer | linencloth <none@none> | 2010-09-17 15:16:26 +0200 |
commit | 8622446ab909467632c54dfbd475d1bfcfe20fe1 (patch) | |
tree | ecaf43e6ae4684ff775387a16241e3667173e9fa /src | |
parent | 7708e2ea067a4cdf5f1aa786e80e2dda506fe5a8 (diff) |
Core/Creature: Despawn skinned creatures.
Fixes issue 4047.
--HG--
branch : trunk
Diffstat (limited to 'src')
-rw-r--r-- | src/server/game/Entities/Creature/Creature.cpp | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/src/server/game/Entities/Creature/Creature.cpp b/src/server/game/Entities/Creature/Creature.cpp index 58d7541b5bc..899782ae2d3 100644 --- a/src/server/game/Entities/Creature/Creature.cpp +++ b/src/server/game/Entities/Creature/Creature.cpp @@ -2261,17 +2261,16 @@ void Creature::AllLootRemovedFromCorpse() float decayRate; CreatureInfo const *cinfo = GetCreatureInfo(); - // corpse was not skinnable -> apply corpse looted timer - if (!cinfo || !cinfo->SkinLootId) - decayRate = sWorld.getRate(RATE_CORPSE_DECAY_LOOTED); - // corpse skinnable, but without skinning flag, and then skinned, corpse will despawn next update - else - decayRate = 0.0f; - + decayRate = sWorld.getRate(RATE_CORPSE_DECAY_LOOTED); uint32 diff = uint32((m_corpseRemoveTime - now) * decayRate); - m_corpseRemoveTime -= diff; m_respawnTime -= diff; + + // corpse skinnable, but without skinning flag, and then skinned, corpse will despawn next update + if (cinfo && cinfo->SkinLootId) + m_corpseRemoveTime = time(NULL); + else + m_corpseRemoveTime -= diff; } } |