Core/Spells: Fix Permanent Feign Death spells to be used in creature_addon auras
--HG-- branch : trunk
This commit is contained in:
@@ -26717,6 +26717,12 @@ INSERT INTO `spell_script_names` (`spell_id`,`ScriptName`) VALUES
|
||||
-- generic
|
||||
( 58601, 'spell_gen_remove_flight_auras'),
|
||||
( 6962, 'spell_gen_pet_summoned'),
|
||||
( 29266, 'spell_creature_permanent_feign_death'),
|
||||
( 57685, 'spell_creature_permanent_feign_death'),
|
||||
( 58951, 'spell_creature_permanent_feign_death'),
|
||||
( 70592, 'spell_creature_permanent_feign_death'),
|
||||
( 70628, 'spell_creature_permanent_feign_death'),
|
||||
( 74490, 'spell_creature_permanent_feign_death'),
|
||||
-- instances
|
||||
( 69057, 'spell_marrowgar_bone_spike_graveyard'),
|
||||
( 69140, 'spell_marrowgar_coldflame'),
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
DELETE FROM `spell_script_names` WHERE `spell_id` IN(29266,57685,58951,70592,70628,74490) AND `ScriptName`='spell_creature_permanent_feign_death';
|
||||
INSERT INTO `spell_script_names` (`spell_id`,`ScriptName`) VALUES
|
||||
(29266, 'spell_creature_permanent_feign_death'),
|
||||
(57685, 'spell_creature_permanent_feign_death'),
|
||||
(58951, 'spell_creature_permanent_feign_death'),
|
||||
(70592, 'spell_creature_permanent_feign_death'),
|
||||
(70628, 'spell_creature_permanent_feign_death'),
|
||||
(74490, 'spell_creature_permanent_feign_death');
|
||||
@@ -115,8 +115,38 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
class spell_creature_permanent_feign_death : public SpellScriptLoader
|
||||
{
|
||||
public:
|
||||
spell_creature_permanent_feign_death() : SpellScriptLoader("spell_creature_permanent_feign_death") { }
|
||||
|
||||
class spell_creature_permanent_feign_deathAuraScript : public AuraScript
|
||||
{
|
||||
void HandleEffectApply(AuraEffect const * /*aurEff*/, AuraApplication const * aurApp, AuraEffectHandleModes /*mode*/)
|
||||
{
|
||||
Unit* pTarget = aurApp->GetTarget();
|
||||
if (!pTarget)
|
||||
return;
|
||||
|
||||
pTarget->SetFlag(UNIT_DYNAMIC_FLAGS, UNIT_DYNFLAG_DEAD);
|
||||
pTarget->SetFlag(UNIT_FIELD_FLAGS_2, UNIT_FLAG2_FEIGN_DEATH);
|
||||
}
|
||||
|
||||
void Register()
|
||||
{
|
||||
OnEffectApply += AuraEffectApplyFn(spell_creature_permanent_feign_deathAuraScript::HandleEffectApply, EFFECT_0, SPELL_AURA_DUMMY, AURA_EFFECT_HANDLE_REAL);
|
||||
}
|
||||
};
|
||||
|
||||
AuraScript *GetAuraScript() const
|
||||
{
|
||||
return new spell_creature_permanent_feign_deathAuraScript();
|
||||
}
|
||||
};
|
||||
|
||||
void AddSC_generic_spell_scripts()
|
||||
{
|
||||
new spell_gen_pet_summoned();
|
||||
new spell_gen_remove_flight_auras();
|
||||
new spell_creature_permanent_feign_death();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user