diff options
-rw-r--r-- | sql/scripts/world_scripts_full.sql | 1 | ||||
-rw-r--r-- | sql/updates/world/2011_03_01_3_world_sai.sql | 31 | ||||
-rw-r--r-- | sql/updates/world/2011_03_01_3_world_scriptname.sql | 1 | ||||
-rw-r--r-- | src/server/scripts/Kalimdor/azuremyst_isle.cpp | 77 |
4 files changed, 33 insertions, 77 deletions
diff --git a/sql/scripts/world_scripts_full.sql b/sql/scripts/world_scripts_full.sql index 3e787da3b0a..e962a3453ec 100644 --- a/sql/scripts/world_scripts_full.sql +++ b/sql/scripts/world_scripts_full.sql @@ -276,7 +276,6 @@ UPDATE `creature_template` SET `ScriptName`='npc_engineer_spark_overgrind' WHERE UPDATE `creature_template` SET `ScriptName`='npc_injured_draenei' WHERE `entry`=16971; UPDATE `creature_template` SET `ScriptName`='npc_magwin' WHERE `entry`=17312; UPDATE `creature_template` SET `ScriptName`='npc_geezle' WHERE `entry`=17318; -UPDATE `creature_template` SET `ScriptName`='npc_nestlewood_owlkin' WHERE `entry`=16518; UPDATE `creature_template` SET `ScriptName`='npc_draenei_survivor' WHERE `entry`=16483; UPDATE `creature_template` SET `ScriptName`='npc_death_ravager' WHERE `entry`=17556; UPDATE `creature_template` SET `ScriptName`='npc_stillpine_capitive' where `entry`=17375; diff --git a/sql/updates/world/2011_03_01_3_world_sai.sql b/sql/updates/world/2011_03_01_3_world_sai.sql new file mode 100644 index 00000000000..37a4afdf06c --- /dev/null +++ b/sql/updates/world/2011_03_01_3_world_sai.sql @@ -0,0 +1,31 @@ +-- Quest 9303 "Inoculation" +SET @OWL := 16518; -- Nestlewood Owlkin +SET @IOWL := 16534; -- Inoculated Nestlewood Owlkin +UPDATE `creature_template` SET `AIName`= 'SmartAI' WHERE `entry`=@OWL; +DELETE FROM `creature_ai_scripts` WHERE `creature_id`=@OWL; +DELETE FROM `smart_scripts` WHERE `source_type`=0 AND`entryorguid`=@OWL; +DELETE FROM `smart_scripts` WHERE `source_type`=9 AND`entryorguid`=@OWL*100; +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 +(@OWL,0,0,0,8,0,100,0,29528,0,3000,3000,80,@OWL*100,0,0,0,0,0,1,0,0,0,0,0,0,0, 'on spellhit run script'), +(@OWL*100,9,0,0,0,0,100,0,3000,3000,0,0,66,0,0,0,0,0,0,7,0,0,0,0,0,0,0,'face player'), +(@OWL*100,9,1,0,0,0,100,0,0,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'say random text from groupid 0'), +(@OWL*100,9,2,0,0,0,100,0,0,0,0,0,36,@IOWL,0,0,0,0,0,1,0,0,0,0,0,0,0,'morph to entry'), +(@OWL*100,9,3,0,0,0,100,0,0,0,0,0,18,33024,0,0,0,0,0,1,0,0,0,0,0,0,0,'change unitflags'), +(@OWL*100,9,4,0,0,0,100,0,300,300,0,0,33,@IOWL,0,0,0,0,0,7,0,0,0,0,0,0,0,'give quest credit'), +(@OWL*100,9,5,0,0,0,100,0,500,500,0,0,89,15,0,0,0,0,0,1,0,0,0,0,0,0,0,'random movement'), +(@OWL*100,9,6,0,0,0,100,0,9000,9000,0,0,36,@OWL,0,0,0,0,0,1,0,0,0,0,0,0,0,'change entry back'), +(@OWL*100,9,7,0,0,0,100,0,0,0,0,0,19,256,0,0,0,0,0,1,0,0,0,0,0,0,0,'change unitflags back'), +(@OWL*100,9,8,0,0,0,100,0,0,0,0,0,41,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'despawn'); + +-- NPC talk text insert from sniff +DELETE FROM `creature_text` WHERE `entry`=16518; +INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`) VALUES +(16518,0,0, 'The %s seems overjoyed.',2,0,100,0,0,0, 'Inoculated Nestlewood Owlkin'), +(16518,0,1, 'The %s seems disoriented.',2,0,100,0,0,0, 'Inoculated Nestlewood Owlkin'), +(16518,0,2, 'The %s doesn''t look like it minds the crystal''s effects.',2,0,100,0,0,0, 'Inoculated Nestlewood Owlkin'), +(16518,0,3, 'The %s didn''t like what just happened.',2,0,100,0,0,0, 'Inoculated Nestlewood Owlkin'), +(16518,0,4, 'The %s looks confused.',2,0,100,0,0,0, 'Inoculated Nestlewood Owlkin'), +(16518,0,5, 'The %s nods appreciatively.',2,0,100,0,0,0, 'Inoculated Nestlewood Owlkin'); + +-- spell does not target the innoculated owlkin and it is not spawned, so take spell requirement out of equation +UPDATE `quest_template` SET `ReqSpellCast1`=0 WHERE `entry`=9303; diff --git a/sql/updates/world/2011_03_01_3_world_scriptname.sql b/sql/updates/world/2011_03_01_3_world_scriptname.sql new file mode 100644 index 00000000000..3bd54857744 --- /dev/null +++ b/sql/updates/world/2011_03_01_3_world_scriptname.sql @@ -0,0 +1 @@ +UPDATE `creature_template` SET `ScriptName`='' WHERE `entry`=16518; diff --git a/src/server/scripts/Kalimdor/azuremyst_isle.cpp b/src/server/scripts/Kalimdor/azuremyst_isle.cpp index 45be69b22ec..0f7fe9beef5 100644 --- a/src/server/scripts/Kalimdor/azuremyst_isle.cpp +++ b/src/server/scripts/Kalimdor/azuremyst_isle.cpp @@ -19,7 +19,7 @@ /* ScriptData SDName: Azuremyst_Isle SD%Complete: 75 -SDComment: Quest support: 9283, 9537, 9582, 9554, 9531, 9303(special flight path, proper model for mount missing). Injured Draenei cosmetic only, 9582. +SDComment: Quest support: 9283, 9537, 9582, 9554, 9531, ? (special flight path, proper model for mount missing). Injured Draenei cosmetic only, 9582. SDCategory: Azuremyst Isle EndScriptData */ @@ -29,7 +29,6 @@ npc_engineer_spark_overgrind npc_injured_draenei npc_magwin npc_geezle -mob_nestlewood_owlkin go_ravager_cage npc_death_ravager EndContentData */ @@ -576,79 +575,6 @@ public: }; -/*###### -## mob_nestlewood_owlkin -######*/ - -enum eOwlkin -{ - SPELL_INOCULATE_OWLKIN = 29528, - ENTRY_OWLKIN = 16518, - ENTRY_OWLKIN_INOC = 16534 -}; - -class npc_nestlewood_owlkin : public CreatureScript -{ -public: - npc_nestlewood_owlkin() : CreatureScript("npc_nestlewood_owlkin") { } - - struct npc_nestlewood_owlkinAI : public ScriptedAI - { - npc_nestlewood_owlkinAI(Creature *c) : ScriptedAI(c) {} - - uint32 DespawnTimer; - - void Reset() - { - DespawnTimer = 0; - } - - void UpdateAI(const uint32 diff) - { - //timer gets adjusted by the triggered aura effect - if (DespawnTimer) - { - if (DespawnTimer <= diff) - { - //once we are able to, despawn us - me->DespawnOrUnsummon(); - return; - } else DespawnTimer -= diff; - } - - if (!UpdateVictim()) - return; - - DoMeleeAttackIfReady(); - } - }; - - bool EffectDummyCreature(Unit * /*pCaster*/, uint32 spellId, uint32 effIndex, Creature *pCreatureTarget) - { - //always check spellid and effectindex - if (spellId == SPELL_INOCULATE_OWLKIN && effIndex == 0) - { - if (pCreatureTarget->GetEntry() != ENTRY_OWLKIN) - return true; - - pCreatureTarget->UpdateEntry(ENTRY_OWLKIN_INOC); - - //set despawn timer, since we want to remove Creature after a short time - CAST_AI(npc_nestlewood_owlkin::npc_nestlewood_owlkinAI, pCreatureTarget->AI())->DespawnTimer = 15000; - - //always return true when we are handling this spell and effect - return true; - } - return false; - } - - CreatureAI* GetAI(Creature* pCreature) const - { - return new npc_nestlewood_owlkinAI (pCreature); - } - -}; - enum eRavegerCage { @@ -812,7 +738,6 @@ void AddSC_azuremyst_isle() new npc_injured_draenei(); new npc_magwin(); new npc_geezle(); - new npc_nestlewood_owlkin(); new npc_death_ravager(); new go_ravager_cage(); new npc_stillpine_capitive(); |