mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-22 21:26:23 +00:00
fix(Scripts/Spells): warlock seed of corruption (#19322)
* remove seed of corruption handling in unit.cpp * add generic and warlock aurascript add warlock aurascript add enum add generic aurascript add OnRemove2ff855054f (diff-ea612aafadff90005e88b243eb000369be9e5cb6f8dc85a008d31e42b156e0ec)detonation threshold scaling added in:df5afca278Co-authored-by: ariel- <ariel-@users.noreply.github.com> * add LoS check to generic damage * refactor 2 scripts to 1 with args refactor const_cast to GetAura()->GetEffect( refactor reduce a line * fix detonation threshold scaling changed SPELL_DIRECT_DAMAGE to DOT * remove not needed IsExpired() check removal upon expiration is notified by AURA_REMOVE_BY_EXPIRE * update comment * refactor script with args to single spellscript, fix detonate by evade * refactor detonation to Detonate() rename amount to remainingDamage remove no tneeded HealthBelowPctDamaged * refactor to 2 spell scripts again * rename detonation spell from seed_of_corruption to seed_of_corruption_damage avoids confusion with seed of corruption (with dot effect) --------- Co-authored-by: ariel- <ariel-@users.noreply.github.com>
This commit is contained in:
@@ -79,37 +79,8 @@ struct boss_zereketh_the_unbound : public BossAI
|
||||
}
|
||||
};
|
||||
|
||||
// 36123, 39367 -- Seed of Corruption
|
||||
class spell_zereketh_seed_of_corruption: public AuraScript
|
||||
{
|
||||
PrepareAuraScript(spell_zereketh_seed_of_corruption);
|
||||
|
||||
bool Validate(SpellInfo const* /*spellInfo*/) override
|
||||
{
|
||||
return ValidateSpellInfo({ SPELL_CORRUPTION_PROC });
|
||||
}
|
||||
|
||||
void HandleProc(AuraEffect const* /*aurEff*/, ProcEventInfo& /*eventInfo*/)
|
||||
{
|
||||
PreventDefaultAction();
|
||||
uint32 val = GetSpellInfo()->GetEffect(EFFECT_1).BasePoints;
|
||||
GetTarget()->RemoveAurasDueToSpell(GetSpellInfo()->Id);
|
||||
|
||||
if (GetCaster())
|
||||
{
|
||||
GetCaster()->CastCustomSpell(SPELL_CORRUPTION_PROC, SPELLVALUE_BASE_POINT0, val, GetTarget(), true);
|
||||
}
|
||||
}
|
||||
|
||||
void Register() override
|
||||
{
|
||||
OnEffectProc += AuraEffectProcFn(spell_zereketh_seed_of_corruption::HandleProc, EFFECT_1, SPELL_AURA_DUMMY);
|
||||
}
|
||||
};
|
||||
|
||||
void AddSC_boss_zereketh_the_unbound()
|
||||
{
|
||||
RegisterArcatrazCreatureAI(boss_zereketh_the_unbound);
|
||||
RegisterSpellScript(spell_zereketh_seed_of_corruption);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user