aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/server/game/Spells/SpellEffects.cpp14
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);