aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xsrc/server/game/Entities/Unit/Unit.cpp8
-rw-r--r--src/server/scripts/Spells/spell_dk.cpp10
2 files changed, 5 insertions, 13 deletions
diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp
index 5b18713740f..3859c8dcafe 100755
--- a/src/server/game/Entities/Unit/Unit.cpp
+++ b/src/server/game/Entities/Unit/Unit.cpp
@@ -12704,14 +12704,6 @@ void Unit::setDeathState(DeathState s)
}
else if (s == JUST_ALIVED)
RemoveFlag (UNIT_FIELD_FLAGS, UNIT_FLAG_SKINNABLE); // clear skinnable for creature and player (at battleground)
-
- if (oldDeathState != ALIVE && s == ALIVE)
- {
- // Reset display id on resurection - needed by corpse explosion to cleanup after display change
- // TODO: fix this
- if (!HasAuraType(SPELL_AURA_TRANSFORM))
- SetDisplayId(GetNativeDisplayId());
- }
}
/*########################################
diff --git a/src/server/scripts/Spells/spell_dk.cpp b/src/server/scripts/Spells/spell_dk.cpp
index f62d62c671a..5c0f6bcce59 100644
--- a/src/server/scripts/Spells/spell_dk.cpp
+++ b/src/server/scripts/Spells/spell_dk.cpp
@@ -29,8 +29,8 @@ enum DeathKnightSpells
DK_SPELL_RUNIC_POWER_ENERGIZE = 49088,
DK_SPELL_ANTI_MAGIC_SHELL_TALENT = 51052,
DK_SPELL_CORPSE_EXPLOSION_TRIGGERED = 43999,
+ DK_SPELL_CORPSE_EXPLOSION_VISUAL = 51270,
DK_SPELL_GHOUL_EXPLODE = 47496,
- DISPLAY_GHOUL_CORPSE = 25537,
DK_SPELL_SCOURGE_STRIKE_TRIGGERED = 70890,
DK_SPELL_BLOOD_BOIL_TRIGGERED = 65658,
DK_SPELL_WILL_OF_THE_NECROPOLIS_TALENT_R1 = 49189,
@@ -208,6 +208,8 @@ class spell_dk_corpse_explosion : public SpellScriptLoader
return false;
if (!sSpellMgr->GetSpellInfo(DK_SPELL_GHOUL_EXPLODE))
return false;
+ if (!sSpellMgr->GetSpellInfo(DK_SPELL_CORPSE_EXPLOSION_VISUAL))
+ return false;
return true;
}
@@ -227,9 +229,9 @@ class spell_dk_corpse_explosion : public SpellScriptLoader
GetCaster()->CastCustomSpell(unitTarget, GetSpellInfo()->Effects[EFFECT_1].CalcValue(), &bp, NULL, NULL, true);
// Corpse Explosion (Suicide)
unitTarget->CastSpell(unitTarget, DK_SPELL_CORPSE_EXPLOSION_TRIGGERED, true);
- // Set corpse look
- unitTarget->SetDisplayId(DISPLAY_GHOUL_CORPSE + urand(0, 3));
}
+ // Set corpse look
+ GetCaster()->CastSpell(unitTarget, DK_SPELL_CORPSE_EXPLOSION_VISUAL, true);
}
}
@@ -261,8 +263,6 @@ class spell_dk_ghoul_explode : public SpellScriptLoader
{
// Corpse Explosion (Suicide)
unitTarget->CastSpell(unitTarget, DK_SPELL_CORPSE_EXPLOSION_TRIGGERED, true);
- // Set corpse look
- unitTarget->SetDisplayId(DISPLAY_GHOUL_CORPSE + urand(0, 3));
}
}