blighted maw
This commit is contained in:
@@ -109,6 +109,7 @@ enum WarlockSpells
|
||||
SPELL_WARLOCK_WITHER_TALENT = 445465,
|
||||
//WowCommunity
|
||||
SPELL_WARLOCK_HAVOC = 80240,
|
||||
SPELL_WARLOCK_BLIGHTED_MAW = 1276956,
|
||||
SPELL_WARLOCK_CALL_DREADSTALKERS_LEFT = 193331,
|
||||
SPELL_WARLOCK_CALL_DREADSTALKERS_RIGHT = 193332,
|
||||
SPELL_WARLOCK_CARNIVOROUS_STALKERS = 386194,
|
||||
@@ -1678,6 +1679,46 @@ class spell_warl_carnivorous_stalkers : public SpellScript
|
||||
}
|
||||
};
|
||||
|
||||
// 205196/271971 - Dreadbite
|
||||
class spell_warl_blighted_maw : public SpellScript
|
||||
{
|
||||
bool Validate(SpellInfo const* /*spellInfo*/) override
|
||||
{
|
||||
return ValidateSpellInfo({ SPELL_WARLOCK_BLIGHTED_MAW });
|
||||
}
|
||||
|
||||
void HandleHit() const
|
||||
{
|
||||
Unit* dreadstalker = GetCaster();
|
||||
Unit* victim = GetHitUnit();
|
||||
if (!dreadstalker || !victim)
|
||||
return;
|
||||
|
||||
int32 hitDamage = GetHitDamage();
|
||||
if (hitDamage <= 0)
|
||||
return;
|
||||
|
||||
Unit* owner = dreadstalker->IsSummon() ? dreadstalker->ToTempSummon()->GetSummonerUnit() : nullptr;
|
||||
if (!owner)
|
||||
return;
|
||||
|
||||
AuraEffect const* maw = owner->GetAuraEffect(SPELL_WARLOCK_BLIGHTED_MAW, EFFECT_0);
|
||||
if (!maw)
|
||||
return;
|
||||
|
||||
int32 plagueDamage = CalculatePct(hitDamage, maw->GetAmount());
|
||||
if (plagueDamage <= 0)
|
||||
return;
|
||||
|
||||
Unit::DealDamage(dreadstalker, victim, plagueDamage, nullptr, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NATURE, GetSpellInfo(), false);
|
||||
}
|
||||
|
||||
void Register() override
|
||||
{
|
||||
OnHit += SpellHitFn(spell_warl_blighted_maw::HandleHit);
|
||||
}
|
||||
};
|
||||
|
||||
// 105174 - Hand of Gul'Dan
|
||||
class spell_warl_hand_of_guldan : public SpellScript
|
||||
{
|
||||
@@ -2325,6 +2366,7 @@ void AddSC_warlock_spell_scripts()
|
||||
RegisterSpellScript(spell_warl_call_dreadstalkers);
|
||||
RegisterSpellScript(spell_warl_dreadstalker_spawn);
|
||||
RegisterSpellScript(spell_warl_carnivorous_stalkers);
|
||||
RegisterSpellScript(spell_warl_blighted_maw);
|
||||
RegisterSpellScript(spell_warl_hand_of_guldan);
|
||||
RegisterSpellScript(spell_warl_hand_of_guldan_damage);
|
||||
RegisterSpellScript(spell_warl_demonic_gateway);
|
||||
|
||||
Reference in New Issue
Block a user