mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-15 01:59:09 +00:00
fix(Scripts/ZulAman): Halazzi Phases (#20650)
This commit is contained in:
@@ -5298,6 +5298,28 @@ class spell_gen_steal_weapon : public AuraScript
|
||||
}
|
||||
};
|
||||
|
||||
// 43536 - Serverside - SetHealth (75%)
|
||||
// 43537 - Serverside - SetHealth (50%)
|
||||
// 43538 - Serverside - SetHealth (25%)
|
||||
class spell_gen_set_health : public SpellScript
|
||||
{
|
||||
PrepareSpellScript(spell_gen_set_health);
|
||||
|
||||
void HandleScript(SpellEffIndex /*effIndex*/)
|
||||
{
|
||||
if (Unit* target = GetHitUnit())
|
||||
{
|
||||
uint32 value = GetSpellInfo()->Effects[EFFECT_0].CalcValue();
|
||||
target->SetHealth(target->CountPctFromMaxHealth(value));
|
||||
}
|
||||
}
|
||||
|
||||
void Register() override
|
||||
{
|
||||
OnEffectHitTarget += SpellEffectFn(spell_gen_set_health::HandleScript, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT);
|
||||
}
|
||||
};
|
||||
|
||||
void AddSC_generic_spell_scripts()
|
||||
{
|
||||
RegisterSpellScript(spell_silithyst);
|
||||
@@ -5455,4 +5477,5 @@ void AddSC_generic_spell_scripts()
|
||||
RegisterSpellScript(spell_gen_consumption);
|
||||
RegisterSpellScript(spell_gen_sober_up);
|
||||
RegisterSpellScript(spell_gen_steal_weapon);
|
||||
RegisterSpellScript(spell_gen_set_health);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user