Core/Spells: Move Pilgrims Bounty BuffFood in AuraScript

This commit is contained in:
Vincent_Michael
2014-01-24 19:48:15 +01:00
parent a5ade26fa0
commit bdc150ebbd
3 changed files with 74 additions and 15 deletions

View File

@@ -0,0 +1,13 @@
DELETE FROM `spell_script_names` WHERE `ScriptName` IN (
'spell_gen_slow_roasted_turkey',
'spell_gen_cranberry_chutney',
'spell_gen_spice_bread_stuffing',
'spell_gen_pumpkin_pie',
'spell_gen_candied_sweet_potato'
);
INSERT INTO `spell_script_names` (`spell_id` ,`ScriptName`) VALUES
(65422, 'spell_gen_slow_roasted_turkey'), -- Slow-Roasted Turkey
(65420, 'spell_gen_cranberry_chutney'), -- Cranberry Chutney
(65419, 'spell_gen_spice_bread_stuffing'), -- Spice Bread Stuffing
(65421, 'spell_gen_pumpkin_pie'), -- Pumpkin Pie
(65418, 'spell_gen_candied_sweet_potato'); -- Candied Sweet Potato

View File

@@ -5535,21 +5535,6 @@ void AuraEffect::HandlePeriodicTriggerSpellAuraTick(Unit* target, Unit* caster)
case 46736:
triggerSpellId = 46737;
break;
case 65418: //Well Fed - Candied Sweet Potatoes
triggerSpellId = 65410;
break;
case 65419: //Well Fed - Spice Bread Stuffing
triggerSpellId = 65416;
break;
case 65420: //Well Fed - Cranberry Chutney
triggerSpellId = 65412;
break;
case 65421: //Well Fed - Pumpkin Pie
triggerSpellId = 65415;
break;
case 65422: //Well Fed - Slow-Roasted Turkey
triggerSpellId = 65414;
break;
}
break;
}

View File

@@ -277,6 +277,61 @@ class spell_hallow_end_tricky_treat : public SpellScriptLoader
}
};
enum PilgrimsBountyBuffFood
{
// Pilgrims Bounty Buff Food
SPELL_WELL_FED_AP_TRIGGER = 65414,
SPELL_WELL_FED_ZM_TRIGGER = 65412,
SPELL_WELL_FED_HIT_TRIGGER = 65416,
SPELL_WELL_FED_HASTE_TRIGGER = 65410,
SPELL_WELL_FED_SPIRIT_TRIGGER = 65415
};
class spell_pilgrims_bounty_buff_food : public SpellScriptLoader
{
private:
uint32 _triggeredSpellId;
public:
spell_pilgrims_bounty_buff_food(const char* name, uint32 triggeredSpellId) : SpellScriptLoader(name), _triggeredSpellId(triggeredSpellId) { }
class spell_pilgrims_bounty_buff_food_AuraScript : public AuraScript
{
PrepareAuraScript(spell_pilgrims_bounty_buff_food_AuraScript)
private:
uint32 _triggeredSpellId;
public:
spell_pilgrims_bounty_buff_food_AuraScript(uint32 triggeredSpellId) : AuraScript(), _triggeredSpellId(triggeredSpellId) { }
bool Load()
{
_handled = false;
return true;
}
void HandleTriggerSpell(AuraEffect const* /*aurEff*/)
{
if (_handled)
return;
_handled = true;
GetTarget()->CastSpell(GetTarget(), _triggeredSpellId, true);
}
void Register()
{
OnEffectPeriodic += AuraEffectPeriodicFn(spell_pilgrims_bounty_buff_food_AuraScript::HandleTriggerSpell, EFFECT_2, SPELL_AURA_PERIODIC_TRIGGER_SPELL);
}
bool _handled;
};
AuraScript* GetAuraScript() const
{
return new spell_pilgrims_bounty_buff_food_AuraScript(_triggeredSpellId);
}
};
enum Mistletoe
{
SPELL_CREATE_MISTLETOE = 26206,
@@ -396,6 +451,12 @@ void AddSC_holiday_spell_scripts()
new spell_hallow_end_trick();
new spell_hallow_end_trick_or_treat();
new spell_hallow_end_tricky_treat();
// Pilgrims Bounty
new spell_pilgrims_bounty_buff_food("spell_gen_slow_roasted_turkey", SPELL_WELL_FED_AP_TRIGGER);
new spell_pilgrims_bounty_buff_food("spell_gen_cranberry_chutney", SPELL_WELL_FED_ZM_TRIGGER);
new spell_pilgrims_bounty_buff_food("spell_gen_spice_bread_stuffing", SPELL_WELL_FED_HIT_TRIGGER);
new spell_pilgrims_bounty_buff_food("spell_gen_pumpkin_pie", SPELL_WELL_FED_SPIRIT_TRIGGER);
new spell_pilgrims_bounty_buff_food("spell_gen_candied_sweet_potato", SPELL_WELL_FED_HASTE_TRIGGER);
// Winter Veil
new spell_winter_veil_mistletoe();
new spell_winter_veil_px_238_winter_wondervolt();