diff options
-rw-r--r-- | sql/updates/world/2013_11_03_32_world_misc.sql | 8 | ||||
-rw-r--r-- | src/server/scripts/Northrend/zone_grizzly_hills.cpp | 82 |
2 files changed, 8 insertions, 82 deletions
diff --git a/sql/updates/world/2013_11_03_32_world_misc.sql b/sql/updates/world/2013_11_03_32_world_misc.sql new file mode 100644 index 00000000000..538979bedf3 --- /dev/null +++ b/sql/updates/world/2013_11_03_32_world_misc.sql @@ -0,0 +1,8 @@ +DELETE FROM `creature_ai_scripts` WHERE `creature_id`=26407; +UPDATE `creature_template` SET `ainame`='SmartAI',`scriptname`='' WHERE `entry` IN (26407,27017); +DELETE FROM `smart_scripts` WHERE `entryorguid` IN (26407,27017) AND `source_type`=0; + +INSERT INTO `smart_scripts` (`entryorguid`, `source_type`, `id`, `link`, `event_type`, `event_phase_mask`, `event_chance`, `event_flags`, `event_param1`, `event_param2`, `event_param3`, `event_param4`, `action_type`, `action_param1`, `action_param2`, `action_param3`, `action_param4`, `action_param5`, `action_param6`, `target_type`, `target_param1`, `target_param2`, `target_param3`, `target_x`, `target_y`, `target_z`, `target_o`, `comment`) VALUES +(26407,0,0,0,0,0,100,0,10000,12000,10000,12000,11,52703,0,0,0,0,0,1,0,0,0,0,0,0,0,'Lightning Sentry - IC - Cast Charged Sentry Totem'), +(26407,0,1,0,6,0,100,0,0,0,0,0,45,0,1,0,0,0,0,19,27017,25,0,0,0,0,0,'Lightning Sentry - On Death - Set Data'), +(27017,0,0,0,38,0,100,0,0,1,0,0,11,47797,0,0,0,0,0,23,0,0,0,0,0,0,0,'Depleted War Golem - On Data Set - Give Quest Credit'); diff --git a/src/server/scripts/Northrend/zone_grizzly_hills.cpp b/src/server/scripts/Northrend/zone_grizzly_hills.cpp index 6bf791417ab..9ea3023de01 100644 --- a/src/server/scripts/Northrend/zone_grizzly_hills.cpp +++ b/src/server/scripts/Northrend/zone_grizzly_hills.cpp @@ -508,87 +508,6 @@ public: } }; -/*Lightning Sentry - if you kill it when you have your Minion with you, you will get a quest credit*/ -enum Sentry -{ - //Creature - NPC_LIGHTNING_SENTRY = 26407, - NPC_WAR_GOLEM = 27017, - // Quest - QUEST_OR_MAYBE_WE_DONT_A = 12138, - QUEST_OR_MAYBE_WE_DONT_H = 12198, - // Spell - SPELL_CHARGED_SENTRY_TOTEM = 52703, - SPELL_WAR_GOLEM_CHARGE_CREDIT = 47797, -}; - -enum SentryEvents -{ - EVENT_SENTRY = 1 -}; - -class npc_lightning_sentry : public CreatureScript -{ -public: - npc_lightning_sentry() : CreatureScript("npc_lightning_sentry") { } - - struct npc_lightning_sentryAI : public ScriptedAI - { - npc_lightning_sentryAI(Creature* creature) : ScriptedAI(creature) { } - - void Reset() OVERRIDE - { - _events.ScheduleEvent(EVENT_SENTRY, urand(10000, 12000)); - } - - void UpdateAI(uint32 diff) OVERRIDE - { - if (!UpdateVictim()) - return; - - _events.Update(diff); - - while (uint32 eventId = _events.ExecuteEvent()) - { - switch (eventId) - { - case EVENT_SENTRY: - DoCast(SPELL_CHARGED_SENTRY_TOTEM); - _events.ScheduleEvent(EVENT_SENTRY, urand(10000, 12000)); - break; - default: - break; - } - } - - if (!UpdateVictim()) - return; - - DoMeleeAttackIfReady(); - } - - void JustDied(Unit* killer) OVERRIDE - { - if (killer->ToPlayer() && killer->ToPlayer()->GetTypeId() == TYPEID_PLAYER) - { - if (me->FindNearestCreature(NPC_WAR_GOLEM, 10.0f, true)) - { - if (killer->ToPlayer()->GetQuestStatus(QUEST_OR_MAYBE_WE_DONT_A) == QUEST_STATUS_INCOMPLETE || - killer->ToPlayer()->GetQuestStatus(QUEST_OR_MAYBE_WE_DONT_H) == QUEST_STATUS_INCOMPLETE) - DoCast(killer, SPELL_WAR_GOLEM_CHARGE_CREDIT); - } - } - } - private: - EventMap _events; - }; - - CreatureAI* GetAI(Creature* creature) const OVERRIDE - { - return new npc_lightning_sentryAI(creature); - } -}; - /*Venture co. Straggler - when you cast Smoke Bomb, he will yell and run away*/ enum SmokeEmOut { @@ -838,7 +757,6 @@ void AddSC_grizzly_hills() new npc_tallhorn_stag(); new npc_amberpine_woodsman(); new npc_wounded_skirmisher(); - new npc_lightning_sentry(); new npc_venture_co_straggler(); new npc_lake_frog(); } |