fix(Scripts/Stormpeaks): Fix Feed Stormcrest Eagle spell target condi… (#22848)
This commit is contained in:
@@ -0,0 +1,13 @@
|
|||||||
|
--
|
||||||
|
DELETE FROM `creature_template_addon` WHERE `entry`=29854;
|
||||||
|
INSERT INTO `creature_template_addon` (`entry`,`path_id`,`bytes1`,`mount`,`auras`) VALUES
|
||||||
|
(29854,0,1,0, '');
|
||||||
|
|
||||||
|
DELETE FROM `conditions` WHERE (`SourceTypeOrReferenceId` = 13) AND (`SourceGroup` = 1) AND (`SourceEntry` = 56393);
|
||||||
|
INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES
|
||||||
|
(13, 1, 56393, 0, 0, 31, 0, 3, 29854, 0, 0, 0, 0, '', 'Feed Stormcrest Eagle target Stormcrest Eagle'),
|
||||||
|
(13, 1, 56393, 0, 0, 1, 0, 56393, 0, 0, 1, 0, 0, '', 'Feed Stormcrest Eagle target must not have Feed Stormcrest Eagle aura');
|
||||||
|
|
||||||
|
DELETE FROM `spell_script_names` WHERE `spell_id` = 56393;
|
||||||
|
INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES
|
||||||
|
(56393, 'spell_feed_stormcrest_eagle');
|
||||||
@@ -1167,6 +1167,31 @@ public:
|
|||||||
return new npc_vehicle_d16_propelled_deliveryAI(creature);
|
return new npc_vehicle_d16_propelled_deliveryAI(creature);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
enum StormcrestEagle
|
||||||
|
{
|
||||||
|
NPC_STORMCREST_EAGLE = 29854
|
||||||
|
};
|
||||||
|
|
||||||
|
// 56393 - Feed Stormcrest Eagle
|
||||||
|
class spell_feed_stormcrest_eagle : public SpellScript
|
||||||
|
{
|
||||||
|
PrepareSpellScript(spell_feed_stormcrest_eagle);
|
||||||
|
|
||||||
|
SpellCastResult CheckCast()
|
||||||
|
{
|
||||||
|
if (GetCaster()->FindNearestCreature(NPC_STORMCREST_EAGLE, 15.0f, true))
|
||||||
|
return SPELL_CAST_OK;
|
||||||
|
|
||||||
|
return SPELL_FAILED_BAD_TARGETS;
|
||||||
|
}
|
||||||
|
|
||||||
|
void Register() override
|
||||||
|
{
|
||||||
|
OnCheckCast += SpellCheckCastFn(spell_feed_stormcrest_eagle::CheckCast);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
void AddSC_storm_peaks()
|
void AddSC_storm_peaks()
|
||||||
{
|
{
|
||||||
new npc_frosthound();
|
new npc_frosthound();
|
||||||
@@ -1183,4 +1208,5 @@ void AddSC_storm_peaks()
|
|||||||
RegisterSpellScript(spell_close_rift_aura);
|
RegisterSpellScript(spell_close_rift_aura);
|
||||||
new npc_vehicle_d16_propelled_delivery();
|
new npc_vehicle_d16_propelled_delivery();
|
||||||
RegisterSpellScript(spell_q12823_remove_collapsing_cave_aura);
|
RegisterSpellScript(spell_q12823_remove_collapsing_cave_aura);
|
||||||
|
RegisterSpellScript(spell_feed_stormcrest_eagle);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user