diff options
author | Andrew <47818697+Nyeriah@users.noreply.github.com> | 2025-09-10 19:46:55 -0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-09-11 00:46:55 +0200 |
commit | b2283b737a730d0336d982c1dc37edfabd646c6c (patch) | |
tree | 7fcbac653b2bdbf6b855bca87f90cb320f086441 | |
parent | d03024089135fb83cd7d4d49c5306a5f6b5a99f1 (diff) |
fix(Scripts/Stormpeaks): Fix Feed Stormcrest Eagle spell target condi… (#22848)
-rw-r--r-- | data/sql/updates/pending_db_world/rev_1757394793226041500.sql | 13 | ||||
-rw-r--r-- | src/server/scripts/Northrend/zone_storm_peaks.cpp | 26 |
2 files changed, 39 insertions, 0 deletions
diff --git a/data/sql/updates/pending_db_world/rev_1757394793226041500.sql b/data/sql/updates/pending_db_world/rev_1757394793226041500.sql new file mode 100644 index 0000000000..4ea3e3c124 --- /dev/null +++ b/data/sql/updates/pending_db_world/rev_1757394793226041500.sql @@ -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'); diff --git a/src/server/scripts/Northrend/zone_storm_peaks.cpp b/src/server/scripts/Northrend/zone_storm_peaks.cpp index ec2da77ea8..35fd65e310 100644 --- a/src/server/scripts/Northrend/zone_storm_peaks.cpp +++ b/src/server/scripts/Northrend/zone_storm_peaks.cpp @@ -1167,6 +1167,31 @@ public: 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() { new npc_frosthound(); @@ -1183,4 +1208,5 @@ void AddSC_storm_peaks() RegisterSpellScript(spell_close_rift_aura); new npc_vehicle_d16_propelled_delivery(); RegisterSpellScript(spell_q12823_remove_collapsing_cave_aura); + RegisterSpellScript(spell_feed_stormcrest_eagle); } |