mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-16 10:30:27 +00:00
fix(Scripts/Hyjal): Cannibalize should heal more than 1 (#18766)
* init * include SpellScript.h
This commit is contained in:
@@ -19,6 +19,8 @@
|
||||
#include "Player.h"
|
||||
#include "ScriptedCreature.h"
|
||||
#include "ScriptedGossip.h"
|
||||
#include "SpellScript.h"
|
||||
#include "SpellScriptLoader.h"
|
||||
#include "hyjal.h"
|
||||
|
||||
enum Spells
|
||||
@@ -327,6 +329,26 @@ public:
|
||||
|
||||
};
|
||||
|
||||
// 31538 - Cannibalize (Heal)
|
||||
class spell_cannibalize_heal : public SpellScript
|
||||
{
|
||||
PrepareSpellScript(spell_cannibalize_heal);
|
||||
|
||||
void HandleHeal(SpellEffIndex /*effIndex*/)
|
||||
{
|
||||
if (Unit* caster = GetCaster())
|
||||
{
|
||||
uint32 heal = caster->CountPctFromMaxHealth(7);
|
||||
SetHitHeal(heal);
|
||||
}
|
||||
}
|
||||
|
||||
void Register() override
|
||||
{
|
||||
OnEffectHitTarget += SpellEffectFn(spell_cannibalize_heal::HandleHeal, EFFECT_0, SPELL_EFFECT_HEAL);
|
||||
}
|
||||
};
|
||||
|
||||
struct npc_hyjal_ground_trash : public ScriptedAI
|
||||
{
|
||||
npc_hyjal_ground_trash(Creature* creature) : ScriptedAI(creature)
|
||||
@@ -704,4 +726,5 @@ void AddSC_hyjal()
|
||||
RegisterHyjalAI(npc_hyjal_ground_trash);
|
||||
RegisterHyjalAI(npc_hyjal_gargoyle);
|
||||
RegisterHyjalAI(npc_hyjal_frost_wyrm);
|
||||
RegisterSpellScript(spell_cannibalize_heal);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user