mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-17 10:55:43 +00:00
fix(Scripts/Hyjal): Cannibalize should heal more than 1 (#18766)
* init * include SpellScript.h
This commit is contained in:
@@ -0,0 +1,3 @@
|
||||
--
|
||||
DELETE FROM `spell_script_names` WHERE `spell_id` = 31538;
|
||||
INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES (31538, 'spell_cannibalize_heal');
|
||||
@@ -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