diff options
author | QAston <qaston@gmail.com> | 2011-07-12 00:19:50 +0200 |
---|---|---|
committer | QAston <qaston@gmail.com> | 2011-07-12 00:19:50 +0200 |
commit | 53cc218983584b8bf4dd99a14dcfb5dd665a3a52 (patch) | |
tree | ee06d5ae61e7296f79d7833cc8c03d64dd0f3970 /src | |
parent | 58c63f4cc5715c28ba992cd7bde344b7de647c0a (diff) |
Core/Spells: Allow periodic trigger auras to work on dead creatures. Patch by Josh (major stuff) and me (minor changes).
Diffstat (limited to 'src')
-rwxr-xr-x | src/server/game/Entities/Creature/Creature.cpp | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/src/server/game/Entities/Creature/Creature.cpp b/src/server/game/Entities/Creature/Creature.cpp index 318528b0406..73f09dcf43e 100755 --- a/src/server/game/Entities/Creature/Creature.cpp +++ b/src/server/game/Entities/Creature/Creature.cpp @@ -233,6 +233,7 @@ void Creature::RemoveCorpse(bool setSpawnTime) m_corpseRemoveTime = time(NULL); setDeathState(DEAD); + RemoveAllAuras(); UpdateObjectVisibility(); loot.clear(); uint32 respawnDelay = m_respawnDelay; @@ -470,11 +471,15 @@ void Creature::Update(uint32 diff) } case CORPSE: { + m_Events.Update(diff); + _UpdateSpells(diff); + + // deathstate changed on spells update, prevent problems + if (m_deathState != CORPSE) + break; + if (m_groupLootTimer && lootingGroupLowGUID) { - // for delayed spells - m_Events.Update(diff); - if (m_groupLootTimer <= diff) { Group* group = sGroupMgr->GetGroupByGUID(lootingGroupLowGUID); @@ -490,12 +495,6 @@ void Creature::Update(uint32 diff) RemoveCorpse(false); sLog->outStaticDebug("Removing corpse... %u ", GetUInt32Value(OBJECT_FIELD_ENTRY)); } - else - { - // for delayed spells - m_Events.Update(diff); - } - break; } case ALIVE: |