mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-16 07:30:42 +01:00
Scripts/Grizzlyhills: Spell: Infected Worgen Bite - Apply Spellscript and Transformation
closes #12165
This commit is contained in:
9
sql/updates/world/2015_02_06_14_world.sql
Normal file
9
sql/updates/world/2015_02_06_14_world.sql
Normal file
@@ -0,0 +1,9 @@
|
||||
-- assign spellscript for Spell: 'Infected Worgen Bite'
|
||||
|
||||
DELETE FROM `spell_linked_spell` WHERE `spell_trigger`=53095;
|
||||
INSERT INTO `spell_linked_spell` (`spell_trigger`, `spell_effect`, `type`, `comment`) VALUES
|
||||
(53095,-53094,2,'Infected Worgen Bite - Worgen\'s Call Immunity');
|
||||
|
||||
DELETE FROM `spell_script_names` WHERE `spell_id`=53094;
|
||||
INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES
|
||||
(53094,'spell_infected_worgen_bite');
|
||||
@@ -816,6 +816,44 @@ class spell_shredder_delivery : public SpellScriptLoader
|
||||
}
|
||||
};
|
||||
|
||||
enum InfectedWorgenBite
|
||||
{
|
||||
SPELL_INFECTED_WORGEN_BITE = 53094,
|
||||
SPELL_WORGENS_CALL = 53095
|
||||
};
|
||||
|
||||
class spell_infected_worgen_bite : public SpellScriptLoader
|
||||
{
|
||||
public:
|
||||
spell_infected_worgen_bite() : SpellScriptLoader("spell_infected_worgen_bite") { }
|
||||
|
||||
class spell_infected_worgen_bite_AuraScript : public AuraScript
|
||||
{
|
||||
PrepareAuraScript(spell_infected_worgen_bite_AuraScript);
|
||||
|
||||
void HandleAfterEffectApply(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
|
||||
{
|
||||
Unit* target = GetTarget();
|
||||
if (target->GetTypeId() == TYPEID_PLAYER)
|
||||
if (GetStackAmount() == GetSpellInfo()->StackAmount)
|
||||
{
|
||||
Remove();
|
||||
target->CastSpell(target, SPELL_WORGENS_CALL, true);
|
||||
}
|
||||
}
|
||||
|
||||
void Register() override
|
||||
{
|
||||
AfterEffectApply += AuraEffectApplyFn(spell_infected_worgen_bite_AuraScript::HandleAfterEffectApply, EFFECT_1, SPELL_AURA_PERIODIC_DAMAGE, AURA_EFFECT_HANDLE_REAPPLY);
|
||||
}
|
||||
};
|
||||
|
||||
AuraScript* GetAuraScript() const override
|
||||
{
|
||||
return new spell_infected_worgen_bite_AuraScript();
|
||||
}
|
||||
};
|
||||
|
||||
void AddSC_grizzly_hills()
|
||||
{
|
||||
new npc_emily();
|
||||
@@ -827,4 +865,5 @@ void AddSC_grizzly_hills()
|
||||
new npc_venture_co_straggler();
|
||||
new npc_lake_frog();
|
||||
new spell_shredder_delivery();
|
||||
new spell_infected_worgen_bite();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user