diff options
author | Gooyeth <migmadmu@hotmail.com> | 2015-01-26 20:25:37 +0000 |
---|---|---|
committer | Nayd <dnpd.dd@gmail.com> | 2015-01-26 20:25:37 +0000 |
commit | 520953114422c8d3090f43cde6c674725992ed28 (patch) | |
tree | 83d5d623548580317197743765c82cc72a800101 /src | |
parent | 08f790d6f98c10e481825ce5c64cd81e22f0c193 (diff) |
Core/Spells: Update Stuck effect 6.0.3
The stuck effect in Cataclysm and MoP the player dies, in WoD the player is teleported to home.
Closes #13938
Diffstat (limited to 'src')
-rw-r--r-- | src/server/game/Spells/SpellEffects.cpp | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/src/server/game/Spells/SpellEffects.cpp b/src/server/game/Spells/SpellEffects.cpp index 28756dc697d..3eeb50a2d39 100644 --- a/src/server/game/Spells/SpellEffects.cpp +++ b/src/server/game/Spells/SpellEffects.cpp @@ -3933,9 +3933,17 @@ void Spell::EffectStuck(SpellEffIndex /*effIndex*/) if (player->IsInFlight()) return; - player->TeleportTo(player->GetStartPosition(), TELE_TO_SPELL); - // homebind location is loaded always - // target->TeleportTo(target->m_homebindMapId, target->m_homebindX, target->m_homebindY, target->m_homebindZ, target->GetOrientation(), (m_caster == m_caster ? TELE_TO_SPELL : 0)); + // if player is dead without death timer is teleported to graveyard, otherwise not apply the effect + if (player->isDead()) + { + if (!player->GetDeathTimer()) + player->RepopAtGraveyard(); + + return; + } + + // the player is teleported to home + player->TeleportTo(player->m_homebindMapId, player->m_homebindX, player->m_homebindY, player->m_homebindZ, player->GetOrientation(), TELE_TO_SPELL); // Stuck spell trigger Hearthstone cooldown SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(8690); |