fix(Core/Scripts): ScriptEffect Frog Kiss (#17482)
This commit is contained in:
parent
b281988dbc
commit
228f6635c0
2 changed files with 33 additions and 1 deletions
|
|
@ -0,0 +1,6 @@
|
|||
-- Duplicated gossip option
|
||||
DELETE FROM `gossip_menu_option` WHERE (`MenuID` = 10316) AND (`OptionID` = 1);
|
||||
|
||||
DELETE FROM `spell_script_names` WHERE `spell_id`=62536 AND `ScriptName`='spell_frog_kiss';
|
||||
INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES
|
||||
(62536, 'spell_frog_kiss');
|
||||
|
|
@ -918,7 +918,8 @@ public:
|
|||
player->AddAura(SPELL_WARTS, player);
|
||||
else
|
||||
{
|
||||
DoCast(player, SPELL_FROG_KISS); // Removes SPELL_WARTSBGONE_LIP_BALM
|
||||
// Removes SPELL_WARTSBGONE_LIP_BALM
|
||||
player->CastSpell(player, SPELL_FROG_KISS, true);
|
||||
|
||||
if (me->GetEntry() == NPC_LAKE_FROG)
|
||||
{
|
||||
|
|
@ -1298,6 +1299,30 @@ public:
|
|||
}
|
||||
};
|
||||
|
||||
// 62536 - Frog Kiss
|
||||
class spell_frog_kiss : public SpellScript
|
||||
{
|
||||
PrepareSpellScript(spell_frog_kiss);
|
||||
|
||||
bool Validate(SpellInfo const* /*spellInfo*/) override
|
||||
{
|
||||
return ValidateSpellInfo({ SPELL_WARTSBGONE_LIP_BALM });
|
||||
}
|
||||
|
||||
void HandleScript(SpellEffIndex /*effIndex*/)
|
||||
{
|
||||
if (Player* target = GetHitPlayer())
|
||||
{
|
||||
target->RemoveAurasDueToSpell(SPELL_WARTSBGONE_LIP_BALM);
|
||||
}
|
||||
}
|
||||
|
||||
void Register() override
|
||||
{
|
||||
OnEffectHitTarget += SpellEffectFn(spell_frog_kiss::HandleScript, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT);
|
||||
}
|
||||
};
|
||||
|
||||
void AddSC_grizzly_hills()
|
||||
{
|
||||
// Theirs
|
||||
|
|
@ -1319,4 +1344,5 @@ void AddSC_grizzly_hills()
|
|||
new spell_warhead_fuse();
|
||||
RegisterSpellScript(spell_q12227_outhouse_groans);
|
||||
RegisterSpellScript(spell_q12227_camera_shake);
|
||||
RegisterSpellScript(spell_frog_kiss);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue