Core/Spells: remove some workarounds about transform spells in corpse explosion script.
This commit is contained in:
@@ -12704,14 +12704,6 @@ void Unit::setDeathState(DeathState s)
|
|||||||
}
|
}
|
||||||
else if (s == JUST_ALIVED)
|
else if (s == JUST_ALIVED)
|
||||||
RemoveFlag (UNIT_FIELD_FLAGS, UNIT_FLAG_SKINNABLE); // clear skinnable for creature and player (at battleground)
|
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());
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*########################################
|
/*########################################
|
||||||
|
|||||||
@@ -29,8 +29,8 @@ enum DeathKnightSpells
|
|||||||
DK_SPELL_RUNIC_POWER_ENERGIZE = 49088,
|
DK_SPELL_RUNIC_POWER_ENERGIZE = 49088,
|
||||||
DK_SPELL_ANTI_MAGIC_SHELL_TALENT = 51052,
|
DK_SPELL_ANTI_MAGIC_SHELL_TALENT = 51052,
|
||||||
DK_SPELL_CORPSE_EXPLOSION_TRIGGERED = 43999,
|
DK_SPELL_CORPSE_EXPLOSION_TRIGGERED = 43999,
|
||||||
|
DK_SPELL_CORPSE_EXPLOSION_VISUAL = 51270,
|
||||||
DK_SPELL_GHOUL_EXPLODE = 47496,
|
DK_SPELL_GHOUL_EXPLODE = 47496,
|
||||||
DISPLAY_GHOUL_CORPSE = 25537,
|
|
||||||
DK_SPELL_SCOURGE_STRIKE_TRIGGERED = 70890,
|
DK_SPELL_SCOURGE_STRIKE_TRIGGERED = 70890,
|
||||||
DK_SPELL_BLOOD_BOIL_TRIGGERED = 65658,
|
DK_SPELL_BLOOD_BOIL_TRIGGERED = 65658,
|
||||||
DK_SPELL_WILL_OF_THE_NECROPOLIS_TALENT_R1 = 49189,
|
DK_SPELL_WILL_OF_THE_NECROPOLIS_TALENT_R1 = 49189,
|
||||||
@@ -208,6 +208,8 @@ class spell_dk_corpse_explosion : public SpellScriptLoader
|
|||||||
return false;
|
return false;
|
||||||
if (!sSpellMgr->GetSpellInfo(DK_SPELL_GHOUL_EXPLODE))
|
if (!sSpellMgr->GetSpellInfo(DK_SPELL_GHOUL_EXPLODE))
|
||||||
return false;
|
return false;
|
||||||
|
if (!sSpellMgr->GetSpellInfo(DK_SPELL_CORPSE_EXPLOSION_VISUAL))
|
||||||
|
return false;
|
||||||
return true;
|
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);
|
GetCaster()->CastCustomSpell(unitTarget, GetSpellInfo()->Effects[EFFECT_1].CalcValue(), &bp, NULL, NULL, true);
|
||||||
// Corpse Explosion (Suicide)
|
// Corpse Explosion (Suicide)
|
||||||
unitTarget->CastSpell(unitTarget, DK_SPELL_CORPSE_EXPLOSION_TRIGGERED, true);
|
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)
|
// Corpse Explosion (Suicide)
|
||||||
unitTarget->CastSpell(unitTarget, DK_SPELL_CORPSE_EXPLOSION_TRIGGERED, true);
|
unitTarget->CastSpell(unitTarget, DK_SPELL_CORPSE_EXPLOSION_TRIGGERED, true);
|
||||||
// Set corpse look
|
|
||||||
unitTarget->SetDisplayId(DISPLAY_GHOUL_CORPSE + urand(0, 3));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user