From 103edb16ea7a57d910dda29a5bfaf3f0b47ddd37 Mon Sep 17 00:00:00 2001 From: Trista Date: Mon, 17 Dec 2012 16:32:33 +0200 Subject: DB/Spells: Fix support for Preserved Holly * it needs to trigger reindeer transformation used by Fresh Holly, while has a side core check already handled. This needs to happen in the same time and not after. * traced the auras are same from sniffs and the mechanic * now Fa-la-la-la Ogri'La should be completeble for all (tested all normal cases) Closes: #4333 --- sql/updates/world/2012_12_17_00_world_spell_linked_spell.sql | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 sql/updates/world/2012_12_17_00_world_spell_linked_spell.sql (limited to 'sql') diff --git a/sql/updates/world/2012_12_17_00_world_spell_linked_spell.sql b/sql/updates/world/2012_12_17_00_world_spell_linked_spell.sql new file mode 100644 index 00000000000..a2cfc7073d0 --- /dev/null +++ b/sql/updates/world/2012_12_17_00_world_spell_linked_spell.sql @@ -0,0 +1,4 @@ +-- Fix Preserved Holly item triggered spell to apply reindeer transformation also so Fa-la-la-la Ogri'La can be doable with it also, based on sniffs. +DELETE FROM `spell_linked_spell` WHERE `spell_trigger`=62061; +INSERT INTO `spell_linked_spell` (`spell_trigger`,`spell_effect`,`type`,`comment`) VALUES +(62061,25860,0, 'Festive Holiday Mount'); -- cgit v1.2.3 From e90ec5608e8524f1c2dffac72c348b0cea406bfc Mon Sep 17 00:00:00 2001 From: Vincent_Michael Date: Tue, 18 Dec 2012 00:22:35 +0100 Subject: DB/Scripts: Implemented creature_text for Infinite Corruptor --- sql/updates/world/2012_12_18_00_world_creature_text.sql | 5 +++++ .../CavernsOfTime/CullingOfStratholme/boss_infinite.cpp | 10 ++++++---- 2 files changed, 11 insertions(+), 4 deletions(-) create mode 100644 sql/updates/world/2012_12_18_00_world_creature_text.sql (limited to 'sql') diff --git a/sql/updates/world/2012_12_18_00_world_creature_text.sql b/sql/updates/world/2012_12_18_00_world_creature_text.sql new file mode 100644 index 00000000000..1cf9211343f --- /dev/null +++ b/sql/updates/world/2012_12_18_00_world_creature_text.sql @@ -0,0 +1,5 @@ +DELETE FROM `creature_text` WHERE `entry`=32273; +INSERT INTO `creature_text` (`entry`, `groupid`, `id`, `text`, `type`, `language`, `probability`, `emote`, `duration`, `sound`, `comment`) VALUES +(32273, 0, 0, 'How dare you interfere with our work!', 14, 0, 100, 0, 0, 0, 'Infinite Corruptor - SAY_AGGRO'), +(32273, 1, 0, 'My time... has run out...', 14, 0, 100, 0, 0, 0, 'Infinite Corruptor - SAY_DEATH'), +(32273, 2, 0, 'The process is finally complete! My work here is done.', 14, 0, 100, 0, 0, 0, 'Infinite Corruptor - SAY_FAIL'); diff --git a/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/boss_infinite.cpp b/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/boss_infinite.cpp index 56d07a49dc4..2e70081fe87 100644 --- a/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/boss_infinite.cpp +++ b/src/server/scripts/Kalimdor/CavernsOfTime/CullingOfStratholme/boss_infinite.cpp @@ -27,9 +27,9 @@ enum Spells enum Yells { - SAY_AGGRO = -1595045, - SAY_FAIL = -1595046, - SAY_DEATH = -1595047 + SAY_AGGRO = 0, + SAY_DEATH = 1, + SAY_FAIL = 2 }; class boss_infinite_corruptor : public CreatureScript @@ -59,11 +59,12 @@ public: void EnterCombat(Unit* /*who*/) { + Talk(SAY_AGGRO); if (instance) instance->SetData(DATA_INFINITE_EVENT, IN_PROGRESS); } - void UpdateAI(const uint32 /*diff*/) + void UpdateAI(uint32 const /*diff*/) { //Return since we have no target if (!UpdateVictim()) @@ -74,6 +75,7 @@ public: void JustDied(Unit* /*killer*/) { + Talk(SAY_DEATH); if (instance) instance->SetData(DATA_INFINITE_EVENT, DONE); } -- cgit v1.2.3 From 8c286f2b61ffd5237d9f60fa9c0d8c493e4279bd Mon Sep 17 00:00:00 2001 From: Trista Date: Tue, 18 Dec 2012 02:01:49 +0200 Subject: Server/Quest: Convert quest_end_script and drop of some c++ * drop off c++ script of Clintan Dreamwalker ID: 22834 * convert quest_end_script of 10964 to SAI * rewrite and add bigger event support * add a checker to his summon so the spirit script can trigger event alone (I didn't try to rewrite next quest...) Closes: #8689 --- .../2012_12_18_00_world_waking_the_sleeper.sql | 47 +++++++++++++++++++++ src/server/scripts/Kalimdor/moonglade.cpp | 49 ++++++++++------------ 2 files changed, 70 insertions(+), 26 deletions(-) create mode 100644 sql/updates/world/2012_12_18_00_world_waking_the_sleeper.sql (limited to 'sql') diff --git a/sql/updates/world/2012_12_18_00_world_waking_the_sleeper.sql b/sql/updates/world/2012_12_18_00_world_waking_the_sleeper.sql new file mode 100644 index 00000000000..4f8a203100d --- /dev/null +++ b/sql/updates/world/2012_12_18_00_world_waking_the_sleeper.sql @@ -0,0 +1,47 @@ +-- Convert quest_end_script "10964" to SAI, alongside dropping creature c++ script +-- Indexes: +SET @CLINTAR_DREAMWALKER := 22834; +SET @SCRIPT := @CLINTAR_DREAMWALKER * 100; +SET @SPIRIT := 22916; + +-- Remove template addon emote (all is handled by that SAI, this breaks it) +UPDATE `creature_template_addon` SET `emote`=0 WHERE `entry`=@CLINTAR_DREAMWALKER; + +-- Remove from quest_end_scripts +DELETE FROM `quest_end_scripts` WHERE `id`=10964; + +-- Add SAI support and drop c++ script +UPDATE `creature_template` SET `AIName`='SmartAI',`ScriptName`='' WHERE `entry`=@CLINTAR_DREAMWALKER; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@CLINTAR_DREAMWALKER AND `source_type`=0; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@SCRIPT AND `source_type`=9; +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 +(@CLINTAR_DREAMWALKER,0,0,0,20,0,100,0,10964,0,0,0,80,@SCRIPT,2,0,0,0,0,1,0,0,0,0,0,0,0, 'Clintar Dreamwalker - On quest 10964 rewarded - Start action list'), +(@CLINTAR_DREAMWALKER,0,1,2,19,1,100,0,10965,0,0,0,12,@SPIRIT,2,100000,0,0,0,1,0,0,0,0,0,0,0, 'Clintar Dreamwalker - On quest 10965 accepted - Spawn creature (can happen only after actionlist stuff are complete)'), +(@CLINTAR_DREAMWALKER,0,2,0,61,1,100,0,0,0,0,0,69,3,0,0,0,0,0,8,0,0,0,7459.47,-3122.79,439.485,5.84588, 'Clintar Dreamwalker - Linked - Move to pos'), +(@CLINTAR_DREAMWALKER,0,3,4,34,1,100,0,8,3,0,0,90,3,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Clintar Dreamwalker - On point 3 reached set - Set field byte 1 for sleeping'), +(@CLINTAR_DREAMWALKER,0,4,0,61,1,100,0,0,0,0,0,22,0,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Clintar Dreamwalker - Linked - Set phase 0'), +(@CLINTAR_DREAMWALKER,0,5,6,1,1,100,1,360000,360000,360000,360000,47,0,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Clintar Dreamwalker - OOC (phase 1) - Set unseen'), +(@CLINTAR_DREAMWALKER,0,6,0,61,1,100,1,0,0,0,0,41,100,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Clintar Dreamwalker - Linked - Despawn'), +(@SCRIPT,9,0,0,0,0,100,0,0,0,0,0,83,2,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Clintar Dreamwalker - Action 0 - Remove npc flag for quest giver'), +(@SCRIPT,9,1,0,0,0,100,0,3000,3000,0,0,91,3,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Clintar Dreamwalker - Action 1 - Remove bytes for sleeping'), +(@SCRIPT,9,2,0,0,0,100,0,0,0,0,0,90,8,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Clintar Dreamwalker - Action 2 - Set bytes 1 kneel'), +(@SCRIPT,9,3,0,0,0,100,0,3000,3000,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Clintar Dreamwalker - Action 3 - Say line 0'), +(@SCRIPT,9,4,0,0,0,100,0,6000,6000,0,0,1,1,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Clintar Dreamwalker - Action 4 - Say line 1 (with exclamation emote)'), +(@SCRIPT,9,5,0,0,0,100,0,7000,7000,0,0,1,2,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Clintar Dreamwalker - Action 5 - Say line 2'), +(@SCRIPT,9,6,0,0,0,100,0,0,0,0,0,91,8,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Clintar Dreamwalker - Action 6 - Remove bytes 1 for kneel'), +(@SCRIPT,9,7,0,0,0,100,0,5000,5000,0,0,1,3,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Clintar Dreamwalker - Action 7 - Say line 3'), +(@SCRIPT,9,8,0,0,0,100,0,5000,5000,0,0,69,0,0,0,0,0,0,8,0,0,0,7453.25,-3116.29,439.604,5.534, 'Clintar Dreamwalker - Action 8 - Move to pos'), +(@SCRIPT,9,9,0,0,0,100,0,5000,5000,0,0,69,0,0,0,0,0,0,8,0,0,0,7453.79,-3116.83,439.604,5.534, 'Clintar Dreamwalker - Action 9 - Move to pos'), +(@SCRIPT,9,10,0,0,0,100,0,8000,8000,0,0,1,4,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Clintar Dreamwalker - Action 10 - Say line 4'), +(@SCRIPT,9,11,0,0,0,100,0,1500,1500,0,0,82,2,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Clintar Dreamwalker - Action 11 - Add npc flag for quest giver'), +(@SCRIPT,9,12,0,0,0,100,0,0,0,0,0,22,1,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Clintar Dreamwalker - Action 12 - Set phase 1'); + +-- Convert from db_script_string to creature_text +DELETE FROM `db_script_string` WHERE `entry` IN (2000000067,2000000068,2000000069); +DELETE FROM `creature_text` WHERE `entry`=@CLINTAR_DREAMWALKER; +INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`) VALUES +(@CLINTAR_DREAMWALKER,0,0, 'Clintar Dreamwalker snaps up to a kneeling position, but seems as though he''s somewhere else.',16,0,100,0,0,0, 'Clintar Dreamwalker (line 0)'), +(@CLINTAR_DREAMWALKER,1,0, 'What are you doing in Ysera''s realm, interloper? Leave us, I say! Your kind are not welcome here!',12,0,100,5,0,0, 'Clintar Dreamwalker (line 1)'), +(@CLINTAR_DREAMWALKER,2,0, 'Clintar Dreamwalker gets to his feet, beginning to recognize his surroundings.',16,0,100,0,0,0, 'Clintar Dreamwalker (line 2)'), +(@CLINTAR_DREAMWALKER,3,0, 'You - you''re not one of them! Let''s get out of sight before they find us! Hurry! ',12,0,100,1,0,0, 'Clintar Dreamwalker (line 3)'), +(@CLINTAR_DREAMWALKER,4,0, 'They''re following me, $R! Quickly, tell me why you''re here before we''re discovered! If they catch up to me, it will mean my death and yours!',12,0,100,1,0,0, 'Clintar Dreamwalker (line 4)'); diff --git a/src/server/scripts/Kalimdor/moonglade.cpp b/src/server/scripts/Kalimdor/moonglade.cpp index 9485048da8c..1296163178e 100644 --- a/src/server/scripts/Kalimdor/moonglade.cpp +++ b/src/server/scripts/Kalimdor/moonglade.cpp @@ -319,6 +319,28 @@ public: } } + void IsSummonedBy(Unit* /*summoner*/) + { + std::list playerOnQuestList; + Trinity::AnyPlayerInObjectRangeCheck checker(me, 5.0f); + Trinity::PlayerListSearcher searcher(me, playerOnQuestList, checker); + me->VisitNearbyWorldObject(5.0f, searcher); + for (std::list::const_iterator itr = playerOnQuestList.begin(); itr != playerOnQuestList.end(); ++itr) + { + // Check if found player target has active quest + if (Player* player = (*itr)) + { + if (player->GetQuestStatus(10965) == QUEST_STATUS_INCOMPLETE) + { + StartEvent(player); + break; + } + } + else + break; + } + } + void JustDied(Unit* /*killer*/) { if (!PlayerGUID) @@ -358,7 +380,7 @@ public: return; } - void UpdateAI(const uint32 diff) + void UpdateAI(uint32 const diff) { npc_escortAI::UpdateAI(diff); @@ -532,30 +554,6 @@ public: }; -/*#### -# npc_clintar_dreamwalker -####*/ - -enum Clintar -{ - CLINTAR_SPIRIT = 22916 -}; - -class npc_clintar_dreamwalker : public CreatureScript -{ -public: - npc_clintar_dreamwalker() : CreatureScript("npc_clintar_dreamwalker") { } - - bool OnQuestAccept(Player* player, Creature* creature, Quest const* quest) - { - if (quest->GetQuestId() == 10965) - if (Creature* clintar_spirit = creature->SummonCreature(CLINTAR_SPIRIT, ClintarSpiritSummon, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 100000)) - CAST_AI(npc_clintar_spirit::npc_clintar_spiritAI, clintar_spirit->AI())->StartEvent(player); - return true; - } - -}; - /*#### # npc_omen ####*/ @@ -707,7 +705,6 @@ void AddSC_moonglade() new npc_bunthen_plainswind(); new npc_great_bear_spirit(); new npc_silva_filnaveth(); - new npc_clintar_dreamwalker(); new npc_clintar_spirit(); new npc_omen(); new npc_giant_spotlight(); -- cgit v1.2.3 From bb93eb0f7e2dccafb2dd0510d1326828f94ce5ef Mon Sep 17 00:00:00 2001 From: Vincent_Michael Date: Tue, 18 Dec 2012 14:13:09 +0100 Subject: Core/Character: Fix logic fail with world state in b2928e59fa8334e91dfa1a5951fade5b574b5842 --- sql/updates/characters/2012_12_18_00_character_worldstates.sql | 4 ++++ src/server/game/Tools/CharacterDatabaseCleaner.cpp | 4 ++-- src/server/game/World/World.h | 3 ++- 3 files changed, 8 insertions(+), 3 deletions(-) create mode 100644 sql/updates/characters/2012_12_18_00_character_worldstates.sql (limited to 'sql') diff --git a/sql/updates/characters/2012_12_18_00_character_worldstates.sql b/sql/updates/characters/2012_12_18_00_character_worldstates.sql new file mode 100644 index 00000000000..98fabde6776 --- /dev/null +++ b/sql/updates/characters/2012_12_18_00_character_worldstates.sql @@ -0,0 +1,4 @@ +DELETE FROM `worldstates` WHERE `entry` IN (20004,20007); +INSERT INTO `worldstates` (`entry`, `value`, `comment`) VALUES +(20004,0,'CleaningFlags'), +(20007,0,'NextMonthlyQuestResetTime'); diff --git a/src/server/game/Tools/CharacterDatabaseCleaner.cpp b/src/server/game/Tools/CharacterDatabaseCleaner.cpp index a342388f583..eaa5f814867 100644 --- a/src/server/game/Tools/CharacterDatabaseCleaner.cpp +++ b/src/server/game/Tools/CharacterDatabaseCleaner.cpp @@ -35,7 +35,7 @@ void CharacterDatabaseCleaner::CleanDatabase() uint32 oldMSTime = getMSTime(); // check flags which clean ups are necessary - QueryResult result = CharacterDatabase.Query("SELECT value FROM worldstates WHERE entry = 20004"); + QueryResult result = CharacterDatabase.PQuery("SELECT value FROM worldstates WHERE entry = %u", WS_CLEANING_FLAGS); if (!result) return; @@ -60,7 +60,7 @@ void CharacterDatabaseCleaner::CleanDatabase() // NOTE: In order to have persistentFlags be set in worldstates for the next cleanup, // you need to define them at least once in worldstates. flags &= sWorld->getIntConfig(CONFIG_PERSISTENT_CHARACTER_CLEAN_FLAGS); - CharacterDatabase.DirectPExecute("UPDATE worldstates SET value = %u WHERE entry = 20004", flags); + CharacterDatabase.DirectPExecute("UPDATE worldstates SET value = %u WHERE entry = %u", flags, WS_CLEANING_FLAGS); sWorld->SetCleaningFlags(flags); diff --git a/src/server/game/World/World.h b/src/server/game/World/World.h index 1ac9b153dfd..c541945a1e4 100644 --- a/src/server/game/World/World.h +++ b/src/server/game/World/World.h @@ -471,8 +471,9 @@ enum WorldStates { WS_WEEKLY_QUEST_RESET_TIME = 20002, // Next weekly reset time WS_BG_DAILY_RESET_TIME = 20003, // Next daily BG reset time - WS_MONTHLY_QUEST_RESET_TIME = 20004, // Next monthly reset time + WS_CLEANING_FLAGS = 20004, // Cleaning Flags WS_GUILD_DAILY_RESET_TIME = 20006, // Next guild cap reset time + WS_MONTHLY_QUEST_RESET_TIME = 20007, // Next monthly reset time }; /// Storage class for commands issued for delayed execution -- cgit v1.2.3 From 40292d9a1997918c6fc7417daae8c3e57b93a0e9 Mon Sep 17 00:00:00 2001 From: Gacko Date: Tue, 18 Dec 2012 15:18:31 +0100 Subject: Core/DB: Assign texts to correct creatures Also convert some never used script texts to creature text for future use. Some scripts or Talk() calls need to be implemented first. Solves #8659 --- .../world/2012_12_18_01_world_creature_text.sql | 75 ++++++++++++++++++++++ .../EasternKingdoms/Karazhan/boss_midnight.cpp | 9 +-- .../scripts/Kalimdor/RuinsOfAhnQiraj/boss_buru.cpp | 2 +- .../scripts/Kalimdor/RuinsOfAhnQiraj/boss_moam.cpp | 4 +- .../Kalimdor/RuinsOfAhnQiraj/boss_rajaxx.cpp | 32 ++++----- .../HellfireRamparts/boss_vazruden_the_herald.cpp | 14 ++-- 6 files changed, 107 insertions(+), 29 deletions(-) create mode 100644 sql/updates/world/2012_12_18_01_world_creature_text.sql (limited to 'sql') diff --git a/sql/updates/world/2012_12_18_01_world_creature_text.sql b/sql/updates/world/2012_12_18_01_world_creature_text.sql new file mode 100644 index 00000000000..24779f67fc7 --- /dev/null +++ b/sql/updates/world/2012_12_18_01_world_creature_text.sql @@ -0,0 +1,75 @@ +-- Vazruden the herald +DELETE FROM `creature_text` WHERE `entry`=17307; +INSERT INTO `creature_text`(`entry`,`groupid`,`id`,`type`,`probability`,`sound`,`comment`,`text`) VALUES +(17307,0,0,14,100,10292,"vazruden the herald SAY_INTRO","You have faced many challenges, pity they were all in vain. Soon your people will kneel to my lord!"); + +-- Nazan +DELETE FROM `creature_text` WHERE `entry`=17536; +INSERT INTO `creature_text`(`entry`,`groupid`,`id`,`type`,`probability`,`comment`,`text`) VALUE +(17536,0,0,41,100,"nazan EMOTE","%s descends from the sky"); + +-- Vazruden +DELETE FROM `creature_text` WHERE `entry`=17537; +INSERT INTO `creature_text`(`entry`,`groupid`,`id`,`type`,`probability`,`sound`,`comment`,`text`) VALUES +(17537,0,0,14,100,10293,"vazruden SAY_WIPE","Is there no one left to test me?"), +(17537,1,0,14,100,10294,"vazruden SAY_AGGRO_1","Your time is running out!"), +(17537,1,1,14,100,10295,"vazruden SAY_AGGRO_2","You are nothing, I answer a higher call!"), +(17537,1,2,14,100,10296,"vazruden SAY_AGGRO_3","The Dark Lord laughs at you!"), +(17537,2,0,14,100,10297,"vazruden SAY_KILL_1","It is over. Finished!"), +(17537,2,1,14,100,10298,"vazruden SAY_KILL_2","Your days are done!"), +(17537,3,0,14,100,10299,"vazruden SAY_DIE","My lord will be the end you all..."); + +-- Talbot aka Prince Valanar (There's an UpdateEntry() call in the script which I did not see) +UPDATE `creature_text` SET `entry`=28189 WHERE `entry`=25301; + +-- Darion Mograine +UPDATE `creature_text` SET `entry`=29228 WHERE `entry`=29173 AND `groupid`=74; + +-- Core rager +UPDATE `creature_text` SET `entry`=11672 WHERE `entry`=11988; + +DELETE FROM `creature_text` WHERE `entry` IN (15550,16151); +INSERT INTO `creature_text`(`entry`,`groupid`,`id`,`type`,`probability`,`sound`,`comment`,`text`) VALUES +-- Attumen +(15550,0,0,14,100,9169,"attumen SAY_KILL1","It was... inevitable."), +(15550,0,1,14,100,9300,"attumen SAY_KILL2","Another trophy to add to my collection!"), +(15550,1,0,14,100,9166,"attumen SAY_DISARMED","Weapons are merely a convenience for a warrior of my skill!"), +(15550,2,0,14,100,9165,"attumen SAY_DEATH","I always knew... someday I would become... the hunted."), +(15550,3,0,14,100,9170,"attumen SAY_RANDOM1","Such easy sport."), +(15550,3,1,14,100,9304,"attumen SAY_RANDOM2","Amateurs! Do not think you can best me! I kill for a living."), +-- Midnight +(16151,0,0,14,100,9173,"attumen SAY_MIDNIGHT_KILL","Well done Midnight!"), +(16151,1,0,14,100,9167,"attumen SAY_APPEAR1","Cowards! Wretches!"), +(16151,1,1,14,100,9298,"attumen SAY_APPEAR2","Who dares attack the steed of the Huntsman?"), +(16151,1,2,14,100,9299,"attumen SAY_APPEAR3","Perhaps you would rather test yourselves against a more formidable opponent?!"), +(16151,2,0,14,100,9168,"attumen SAY_MOUNT","Come, Midnight, let\'s disperse this petty rabble!"); + +-- Creature text preparation for rajaxx +DELETE FROM `creature_text` WHERE `entry` IN (15471,15341); +INSERT INTO `creature_text`(`entry`,`groupid`,`sound`,`type`,`probability`,`comment`,`text`) VALUES +(15471,0,0,14,100,"andorov SAY_ANDOROV_INTRO","They come now. Try not to get yourself killed, young blood."), +(15471,1,0,14,100,"andorov SAY_ANDOROV_ATTACK","Remember, Rajaxx, when I said I\'d kill you last? I lied..."), +(15341,0,8612,14,100,"rajaxx SAY_WAVE3","The time of our retribution is at hand! Let darkness reign in the hearts of our enemies!"), +(15341,1,8610,14,100,"rajaxx SAY_WAVE4","No longer will we wait behind barred doors and walls of stone! No longer will our vengeance be denied! The dragons themselves will tremble before our wrath!"), +(15341,2,8608,14,100,"rajaxx SAY_WAVE5","Fear is for the enemy! Fear and death!"), +(15341,3,8611,14,100,"rajaxx SAY_WAVE6","Staghelm will whimper and beg for his life, just as his whelp of a son did! One thousand years of injustice will end this day!"), +(15341,4,8607,14,100,"rajaxx SAY_WAVE7","Fandral! Your time has come! Go and hide in the Emerald Dream and pray we never find you!"), +(15341,5,8609,14,100,"rajaxx SAY_INTRO","Impudent fool! I will kill you myself!"), +(15341,6,8603,14,100,"rajaxx SAY_UNK1","Attack and make them pay dearly!"), +(15341,7,8605,14,100,"rajaxx SAY_UNK2","Crush them! Drive them out!"), +(15341,8,8606,14,100,"rajaxx SAY_UNK3","Do not hesitate! Destroy them!"), +(15341,9,8613,14,100,"rajaxx SAY_UNK4","Warriors! Captains! Continue the fight!"), +(15341,10,8614,14,100,"rajaxx SAY_DEAGGRO","You are not worth my time $N!"), +(15341,11,8604,14,100,"rajaxx SAY_KILLS_ANDOROV","Breath your last!"), +(15341,12,0,14,100,"rajaxx SAY_COMPLETE_QUEST","Soon you will know the price of your meddling, mortals... The master is nearly whole... And when he rises, your world will be cease!"); + +-- moam +DELETE FROM `creature_text` WHERE `entry`=15340; +INSERT INTO `creature_text`(`entry`,`groupid`,`type`,`probability`,`comment`,`text`) VALUES +(15340,0,16,100,"moam EMOTE_AGGRO","%s senses your fear."), +(15340,1,16,100,"moan EMOTE_MANA_FULL","%s bristles with energy!"); + +-- buru +DELETE FROM `creature_text` WHERE `entry`=15370; +INSERT INTO `creature_text`(`entry`,`groupid`,`type`,`probability`,`comment`,`text`) VALUES +(15370,0,16,100,"buru EMOTE_TARGET","%s sets eyes on $N!"); diff --git a/src/server/scripts/EasternKingdoms/Karazhan/boss_midnight.cpp b/src/server/scripts/EasternKingdoms/Karazhan/boss_midnight.cpp index 73fefe210df..4a08801c972 100644 --- a/src/server/scripts/EasternKingdoms/Karazhan/boss_midnight.cpp +++ b/src/server/scripts/EasternKingdoms/Karazhan/boss_midnight.cpp @@ -32,10 +32,11 @@ enum Midnight SAY_MIDNIGHT_KILL = 0, SAY_APPEAR = 1, SAY_MOUNT = 2, - SAY_KILL = 3, - SAY_DISARMED = 4, - SAY_DEATH = 5, - SAY_RANDOM = 6, + + SAY_KILL = 0, + SAY_DISARMED = 1, + SAY_DEATH = 2, + SAY_RANDOM = 3, SPELL_SHADOWCLEAVE = 29832, SPELL_INTANGIBLE_PRESENCE = 29833, diff --git a/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/boss_buru.cpp b/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/boss_buru.cpp index 40d4d5d54b4..7dd395770db 100644 --- a/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/boss_buru.cpp +++ b/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/boss_buru.cpp @@ -29,7 +29,7 @@ EndScriptData */ enum Yells { - EMOTE_TARGET = -1509002 + EMOTE_TARGET = 0 }; class boss_buru : public CreatureScript diff --git a/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/boss_moam.cpp b/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/boss_moam.cpp index 4abbf99d4ef..5f5b958fb9b 100644 --- a/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/boss_moam.cpp +++ b/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/boss_moam.cpp @@ -21,8 +21,8 @@ enum Texts { - EMOTE_AGGRO = -1509000, - EMOTE_MANA_FULL = -1509001 + EMOTE_AGGRO = 0, + EMOTE_MANA_FULL = 1 }; enum Spells diff --git a/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/boss_rajaxx.cpp b/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/boss_rajaxx.cpp index da67f93f968..1ffd74eddf3 100644 --- a/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/boss_rajaxx.cpp +++ b/src/server/scripts/Kalimdor/RuinsOfAhnQiraj/boss_rajaxx.cpp @@ -23,22 +23,22 @@ enum Yells { // The time of our retribution is at hand! Let darkness reign in the hearts of our enemies! Sound: 8645 Emote: 35 - SAY_ANDOROV_INTRO = -1509003, // Before for the first wave - SAY_ANDOROV_ATTACK = -1509004, // Beginning the event - SAY_ANDOROV_WAVE_1 = -1509001, // When the first wave comes text: Kill first, ask questions later... Incoming! emote: 45 sound: 8653 - SAY_WAVE3 = -1509005, - SAY_WAVE4 = -1509006, - SAY_WAVE5 = -1509007, - SAY_WAVE6 = -1509008, - SAY_WAVE7 = -1509009, - SAY_INTRO = -1509010, - SAY_UNK1 = -1509011, - SAY_UNK2 = -1509012, - SAY_UNK3 = -1509013, - SAY_DEATH = -1509014, - SAY_CHANGEAGGRO = -1509015, - SAY_KILLS_ANDOROV = -1509016, - SAY_COMPLETE_QUEST = -1509017 // Yell when realm complete quest 8743 for world event + SAY_ANDOROV_INTRO = 0, // Before for the first wave + SAY_ANDOROV_ATTACK = 1, // Beginning the event + + SAY_WAVE3 = 0, + SAY_WAVE4 = 1, + SAY_WAVE5 = 2, + SAY_WAVE6 = 3, + SAY_WAVE7 = 4, + SAY_INTRO = 5, + SAY_UNK1 = 6, + SAY_UNK2 = 7, + SAY_UNK3 = 8, + SAY_DEATH = 9, + SAY_CHANGEAGGRO = 10, + SAY_KILLS_ANDOROV = 11, + SAY_COMPLETE_QUEST = 12 // Yell when realm complete quest 8743 for world event // Warriors, Captains, continue the fight! Sound: 8640 }; diff --git a/src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/boss_vazruden_the_herald.cpp b/src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/boss_vazruden_the_herald.cpp index 7fa476100d5..5617c69aea9 100644 --- a/src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/boss_vazruden_the_herald.cpp +++ b/src/server/scripts/Outland/HellfireCitadel/HellfireRamparts/boss_vazruden_the_herald.cpp @@ -53,14 +53,16 @@ enum eUnits ENTRY_REINFORCED_FEL_IRON_CHEST_H = 185169 }; -enum eSays +enum Says { SAY_INTRO = 0, - SAY_WIPE = 1, - SAY_AGGRO = 2, - SAY_KILL = 3, - SAY_DIE = 4, - EMOTE = 5 + + SAY_WIPE = 0, + SAY_AGGRO = 1, + SAY_KILL = 2, + SAY_DIE = 3, + + EMOTE = 0 }; const float VazrudenMiddle[3] = {-1406.5f, 1746.5f, 81.2f}; -- cgit v1.2.3 From 8c22587bc921d7d68e65ac861eb8ba35f5748481 Mon Sep 17 00:00:00 2001 From: Pitcrawler Date: Tue, 18 Dec 2012 19:25:44 +0100 Subject: DB/SAI: Fix quest: The Key of Warlord Zol'Maz, closes #8564 --- sql/updates/world/2012_12_18_02_world_sai.sql | 47 +++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 sql/updates/world/2012_12_18_02_world_sai.sql (limited to 'sql') diff --git a/sql/updates/world/2012_12_18_02_world_sai.sql b/sql/updates/world/2012_12_18_02_world_sai.sql new file mode 100644 index 00000000000..5c0e6a7b0c3 --- /dev/null +++ b/sql/updates/world/2012_12_18_02_world_sai.sql @@ -0,0 +1,47 @@ +SET @NPC_WARLORD_ZOLMAZ := 28902; +SET @NPC_ENCHANTED_TIKI := 28927; +SET @GO_ZOLMAZ_GATE := 190784; +SET @GO_GATE_LEVER := 190834; + +DELETE FROM `event_scripts` WHERE `id`=18940; +INSERT INTO `event_scripts` (`id`,`delay`,`command`,`datalong`,`datalong2`,`dataint`,`x`,`y`,`z`,`o`) VALUES +(18940,6,11,57571,180,0,0,0,0,0); + +DELETE FROM `creature_text` WHERE `entry`=@NPC_WARLORD_ZOLMAZ; +INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`) VALUES +(@NPC_WARLORD_ZOLMAZ,0,0,'%s becomes enraged.',16,0,100,0,0,0,'Warlord Zol''Maz'), +(@NPC_WARLORD_ZOLMAZ,1,0,'You have an enchanted tiki? YOU KILLED MY FAMILY!',14,0,100,15,0,6200,'Warlord Zol''Maz'), +(@NPC_WARLORD_ZOLMAZ,2,0,'I WILL KILL YOU, $N!',14,0,100,0,0,0,'Warlord Zol''Maz'); + +UPDATE `creature_template` SET `dmg_multiplier`=2.75, `AIName`='SmartAI' WHERE `entry`=@NPC_WARLORD_ZOLMAZ; +UPDATE `creature_template` SET `minlevel`=77, `maxlevel`=77, `exp`=2, `mindmg`=371, `maxdmg`=522, `attackpower`=478, `dmg_multiplier`=1.75, `unit_flags`=32776, `unit_class`=2, `minrangedmg`=314, `maxrangedmg`=466, `rangedattackpower`=81, `AIName`='SmartAI', `equipment_id`=838 WHERE `entry`=@NPC_ENCHANTED_TIKI; +UPDATE `creature_model_info` SET `bounding_radius`=0.465, `combat_reach`=7.5 WHERE `modelid`=26286; + +DELETE FROM `creature_template_addon` WHERE `entry`=@NPC_ENCHANTED_TIKI; +INSERT INTO `creature_template_addon` (`entry`,`path_id`,`mount`,`bytes1`,`bytes2`,`emote`,`auras`) VALUES +(@NPC_ENCHANTED_TIKI,0,0,0,1,0,'52614 52670'); + +UPDATE `gameobject_template` SET `AIName`='SmartGameObjectAI' WHERE `entry`=@GO_GATE_LEVER; +UPDATE `gameobject_template` SET `flags`=4 WHERE `entry` IN (190836,191766,194126); +UPDATE `gameobject` SET `position_x`=6552.984, `position_y`=-3903.916, `position_z`=490.9412 WHERE `guid`=99744; + +DELETE FROM `smart_scripts` WHERE `entryorguid` IN (@NPC_WARLORD_ZOLMAZ,@NPC_ENCHANTED_TIKI) AND `source_type`=0; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@GO_GATE_LEVER AND `source_type`=1; +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 +(@NPC_WARLORD_ZOLMAZ,0,0,0,9,0,100,0,10,25,0,0,11,32323,0,0,0,0,0,2,0,0,0,0,0,0,0, 'Warlord Zol''Maz - On target range 10-25y - Spellcast Charge'), +(@NPC_WARLORD_ZOLMAZ,0,1,2,2,0,100,1,0,20,0,0,11,8599,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Warlord Zol''Maz - On health below 20% - Spellcast Enrage'), +(@NPC_WARLORD_ZOLMAZ,0,2,0,61,0,100,0,0,0,0,0,1,0,0,0,0,0,0,2,0,0,0,0,0,0,0, 'Warlord Zol''Maz - On health below 20% - Say line'), +(@NPC_WARLORD_ZOLMAZ,0,3,0,0,0,100,0,12000,12000,20000,20000,11,54670,0,0,0,0,0,2,0,0,0,0,0,0,0, 'Warlord Zol''Maz - On update IC - Spellcast Decapitate'), +(@NPC_WARLORD_ZOLMAZ,0,4,0,2,0,100,1,0,35,0,0,11,40546,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Warlord Zol''Maz - On health below 35% - Spellcast Retaliation'), +(@NPC_WARLORD_ZOLMAZ,0,5,0,38,0,100,0,0,1,0,0,1,1,7000,0,0,0,0,12,1,0,0,0,0,0,0, 'Warlord Zol''Maz - On data set 0 1 - Say line'), +(@NPC_WARLORD_ZOLMAZ,0,6,7,52,0,100,0,1,@NPC_WARLORD_ZOLMAZ,0,0,1,2,0,0,0,0,0,12,1,0,0,0,0,0,0, 'Warlord Zol''Maz - On text over - Say line'), +(@NPC_WARLORD_ZOLMAZ,0,7,8,61,0,100,0,0,0,0,0,19,256,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Warlord Zol''Maz - On text over - Remove unit_flags IMMUNE_TO_PC'), +(@NPC_WARLORD_ZOLMAZ,0,8,0,61,0,100,0,0,0,0,0,49,0,0,0,0,0,0,12,1,0,0,0,0,0,0, 'Warlord Zol''Maz - On text over - Start attack'), +(@NPC_WARLORD_ZOLMAZ,0,9,10,6,0,100,0,0,0,0,0,32,0,0,0,0,0,0,14,57571,@GO_ZOLMAZ_GATE,0,0,0,0,0, 'Warlord Zol''Maz - On death - Reset gate'), +(@NPC_WARLORD_ZOLMAZ,0,10,0,61,0,100,0,0,0,0,0,18,256,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Warlord Zol''Maz - On death - Set unit_flags IMMUNE_TO_PC'), +(@NPC_WARLORD_ZOLMAZ,0,11,10,21,0,100,0,0,0,0,0,32,0,0,0,0,0,0,14,57571,@GO_ZOLMAZ_GATE,0,0,0,0,0, 'Warlord Zol''Maz - On homeposition reached - Reset gate'), +(@NPC_ENCHANTED_TIKI,0,0,1,54,0,100,0,0,0,0,0,45,0,1,0,0,0,0,19,@NPC_WARLORD_ZOLMAZ,50,0,0,0,0,0, 'Enchanted Tiki - Just summoned - Set data 0 1'), +(@NPC_ENCHANTED_TIKI,0,1,2,61,0,100,0,0,0,0,0,64,1,0,0,0,0,0,7,0,0,0,0,0,0,0, 'Enchanted Tiki - Just summoned - Store targetlist'), +(@NPC_ENCHANTED_TIKI,0,2,3,61,0,100,0,0,0,0,0,100,1,0,0,0,0,0,19,@NPC_WARLORD_ZOLMAZ,50,0,0,0,0,0, 'Enchanted Tiki - Just summoned - Send target list'), +(@NPC_ENCHANTED_TIKI,0,3,0,61,0,100,0,0,0,0,0,3,0,25749,0,0,0,0,1,0,0,0,0,0,0,0, 'Enchanted Tiki - Just summoned - Set modelid'), +(@GO_GATE_LEVER,1,0,0,70,0,100,0,2,0,0,0,9,0,0,0,0,0,0,14,57571,@GO_ZOLMAZ_GATE,0,0,0,0,0, 'Gate lever - On activate - Activate gate'); -- cgit v1.2.3 From 7dd019e7bbfc10d125ceaf232c3ead8c1ac99f6f Mon Sep 17 00:00:00 2001 From: Vincent_Michael Date: Tue, 18 Dec 2012 22:27:48 +0100 Subject: Misc/Script: Convert winter veil mistletoe event in sai --- sql/updates/world/2012_12_18_02_world_misc.sql | 14 ++++++ src/server/scripts/Spells/spell_holiday.cpp | 65 ++++++++++++++++++++++++++ src/server/scripts/World/npcs_special.cpp | 44 ----------------- 3 files changed, 79 insertions(+), 44 deletions(-) create mode 100644 sql/updates/world/2012_12_18_02_world_misc.sql (limited to 'sql') diff --git a/sql/updates/world/2012_12_18_02_world_misc.sql b/sql/updates/world/2012_12_18_02_world_misc.sql new file mode 100644 index 00000000000..5df6ef8eb95 --- /dev/null +++ b/sql/updates/world/2012_12_18_02_world_misc.sql @@ -0,0 +1,14 @@ +UPDATE `creature_template` SET `AIName`='SmartAI',`ScriptName`='' WHERE `entry`=15760; + +DELETE FROM `smart_scripts` WHERE `entryorguid`=15760 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 +(15760, 0, 0, 0, 22, 0, 100, 0, 58, 0, 0, 0, 11, 26218, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 'Winter Reveler - Cast Mistletoe on /kiss'); + +DELETE FROM `spell_script_names` WHERE `spell_id`=26218; +INSERT INTO `spell_script_names` (`spell_id`,`ScriptName`) VALUES +(26218,'spell_winter_veil_mistletoe'); + +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=22 AND `SourceEntry`=15760; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES +(22, 1, 15760, 0, 0, 1, 0, 26218, 1, 0, 1, 0, 0, '', 'execute sai only if player has not Mistletoe Debuff'), +(22, 1, 15760, 0, 0, 12, 0, 2, 0, 0, 0, 0, 0, '', 'execute sai only if Winter Veil'); diff --git a/src/server/scripts/Spells/spell_holiday.cpp b/src/server/scripts/Spells/spell_holiday.cpp index 4f48c311612..40cef99048f 100644 --- a/src/server/scripts/Spells/spell_holiday.cpp +++ b/src/server/scripts/Spells/spell_holiday.cpp @@ -274,6 +274,69 @@ class spell_hallow_end_tricky_treat : public SpellScriptLoader } }; +enum Mistletoe +{ + SPELL_CREATE_MISTLETOE = 26206, + SPELL_CREATE_HOLLY = 26207, + SPELL_CREATE_SNOWFLAKES = 45036 +}; + +class spell_winter_veil_mistletoe : public SpellScriptLoader +{ + public: + spell_winter_veil_mistletoe() : SpellScriptLoader("spell_winter_veil_mistletoe") { } + + class spell_winter_veil_mistletoe_SpellScript : public SpellScript + { + PrepareSpellScript(spell_winter_veil_mistletoe_SpellScript); + + bool Validate(SpellInfo const* /*spell*/) + { + if (!sSpellMgr->GetSpellInfo(SPELL_CREATE_MISTLETOE) || + !sSpellMgr->GetSpellInfo(SPELL_CREATE_HOLLY) || + !sSpellMgr->GetSpellInfo(SPELL_CREATE_SNOWFLAKES)) + return false; + return true; + } + + void HandleScript(SpellEffIndex /*effIndex*/) + { + Unit* caster = GetCaster(); + + if (Player* target = GetHitPlayer()) + { + uint32 spellId = 0; + switch (urand(0, 2)) + { + case 0: + spellId = SPELL_CREATE_MISTLETOE; + break; + case 1: + spellId = SPELL_CREATE_HOLLY; + break; + case 2: + spellId = SPELL_CREATE_SNOWFLAKES; + break; + default: + return; + } + + caster->CastSpell(target, spellId, true); + } + } + + void Register() + { + OnEffectHitTarget += SpellEffectFn(spell_winter_veil_mistletoe_SpellScript::HandleScript, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT); + } + }; + + SpellScript* GetSpellScript() const + { + return new spell_winter_veil_mistletoe_SpellScript(); + } +}; + void AddSC_holiday_spell_scripts() { // Love is in the Air @@ -282,4 +345,6 @@ void AddSC_holiday_spell_scripts() new spell_hallow_end_trick(); new spell_hallow_end_trick_or_treat(); new spell_hallow_end_tricky_treat(); + // Winter Veil + new spell_winter_veil_mistletoe(); } diff --git a/src/server/scripts/World/npcs_special.cpp b/src/server/scripts/World/npcs_special.cpp index 59ab9cd61e7..36657dc76c3 100644 --- a/src/server/scripts/World/npcs_special.cpp +++ b/src/server/scripts/World/npcs_special.cpp @@ -1586,49 +1586,6 @@ public: } }; -/*#### -## npc_winter_reveler -####*/ - -enum WinterReveler -{ - SPELL_MISTLETOE_DEBUFF = 26218, - SPELL_CREATE_MISTLETOE = 26206, - SPELL_CREATE_HOLLY = 26207, - SPELL_CREATE_SNOWFLAKES = 45036, -}; - -class npc_winter_reveler : public CreatureScript -{ - public: - npc_winter_reveler() : CreatureScript("npc_winter_reveler") { } - - struct npc_winter_revelerAI : public ScriptedAI - { - npc_winter_revelerAI(Creature* creature) : ScriptedAI(creature) {} - - void ReceiveEmote(Player* player, uint32 emote) - { - if (player->HasAura(SPELL_MISTLETOE_DEBUFF)) - return; - - if (!IsHolidayActive(HOLIDAY_FEAST_OF_WINTER_VEIL)) - return; - - if (emote == TEXT_EMOTE_KISS) - { - uint32 spellId = RAND(SPELL_CREATE_MISTLETOE, SPELL_CREATE_HOLLY, SPELL_CREATE_SNOWFLAKES); - me->CastSpell(player, spellId, false); - me->CastSpell(player, SPELL_MISTLETOE_DEBUFF, false); - } - } - }; - - CreatureAI* GetAI(Creature* creature) const - { - return new npc_winter_revelerAI(creature); - } -}; /*#### ## npc_snake_trap_serpents @@ -3039,7 +2996,6 @@ void AddSC_npcs_special() new npc_sayge(); new npc_steam_tonk(); new npc_tonk_mine(); - new npc_winter_reveler(); new npc_brewfest_reveler(); new npc_snake_trap(); new npc_mirror_image(); -- cgit v1.2.3 From 90857739dcb8cf1f4d5cd74464453e4be702c948 Mon Sep 17 00:00:00 2001 From: Trista Date: Wed, 19 Dec 2012 01:04:29 +0200 Subject: DB/SAI: Convert more quest_end_scripts * 12657, 12597 ,10988, 10850, 10447 and 9565 --- sql/updates/world/2012_12_19_00_world_sai.sql | 106 ++++++++++++++++++++++++++ 1 file changed, 106 insertions(+) create mode 100644 sql/updates/world/2012_12_19_00_world_sai.sql (limited to 'sql') diff --git a/sql/updates/world/2012_12_19_00_world_sai.sql b/sql/updates/world/2012_12_19_00_world_sai.sql new file mode 100644 index 00000000000..6d6eb819078 --- /dev/null +++ b/sql/updates/world/2012_12_19_00_world_sai.sql @@ -0,0 +1,106 @@ +-- Remove from quest_end_scripts +DELETE FROM `quest_end_scripts` WHERE `id` IN (12657,12597,10988,10850,10447,9565); + +-- Convert quest_end_script "12657" to SAI +-- Indexes: +SET @DARION_MORGRAINE := 28444; +SET @SCRIPT := @DARION_MORGRAINE * 100; + +-- Add SAI support +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@DARION_MORGRAINE; +DELETE FROM `creature_ai_scripts` WHERE `creature_id`=@DARION_MORGRAINE; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@DARION_MORGRAINE AND `source_type`=0; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@SCRIPT AND `source_type`=9; +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 +(@DARION_MORGRAINE,0,0,0,20,0,100,0,12657,0,0,0,80,@SCRIPT,2,0,0,0,0,1,0,0,0,0,0,0,0, 'Highlord Darion Morgraine - On quest 12657 rewarded - Start action list'), +(@DARION_MORGRAINE,0,1,0,1,0,100,0,60000,90000,60000,90000,4,12893,1,0,0,0,0,0,0,0,0,0,0,0,0, 'Highlord Darion Morgraine - OOC - Play sound'), +(@SCRIPT,9,0,0,0,0,100,0,16000,16000,0,0,5,22,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Highlord Darion Morgraine - Action 0 - Play emote 22'), +(@SCRIPT,9,1,0,0,0,100,0,0,0,0,0,12,28487,3,46000,0,0,0,8,0,0,0,2465.47,-5567.3,372.16,1.64, 'Highlord Darion Morgraine - Action 1 - Summon'), +(@SCRIPT,9,2,0,0,0,100,0,0,0,0,0,12,28487,3,46000,0,0,0,8,0,0,0,2434.52,-5588.56,372.16,3.26, 'Highlord Darion Morgraine - Action 2 - Summon'), +(@SCRIPT,9,3,0,0,0,100,0,0,0,0,0,12,28487,3,46000,0,0,0,8,0,0,0,2455.59,-5618.32,372.16,4.59, 'Highlord Darion Morgraine - Action 3 - Summon'), +(@SCRIPT,9,4,0,0,0,100,0,0,0,0,0,12,28487,3,46000,0,0,0,8,0,0,0,2439.31,-5608.69,372.16,3.77, 'Highlord Darion Morgraine - Action 4 - Summon'), +(@SCRIPT,9,5,0,0,0,100,0,0,0,0,0,12,28487,3,46000,0,0,0,8,0,0,0,2486.72,-5598.66,372.16,6.02, 'Highlord Darion Morgraine - Action 5 - Summon'), +(@SCRIPT,9,6,0,0,0,100,0,0,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Highlord Darion Morgraine - Action 6 - Say line 0'), +(@SCRIPT,9,7,0,0,0,100,0,16000,16000,0,0,1,1,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Highlord Darion Morgraine - Action 7 - Say line 1'); + +-- Convert from db_script_string to creature_text +DELETE FROM `db_script_string` WHERE `entry` IN (2000005409,2000005410); +DELETE FROM `creature_text` WHERE `entry`=@DARION_MORGRAINE; +INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`) VALUES +(@DARION_MORGRAINE,0,0, '%s calls upon the mighty armies of the Scourge!',42,0,100,1,0,0, 'Highlord Darion Morgraine'), +(@DARION_MORGRAINE,1,0, 'Armies of the Scourge, hear my call! The scarlet apocalypse has begun! Tear this land asunder and leave only death in your wake!',12,0,100,1,0,0, 'Highlord Darion Morgraine'); + +-- Convert quest_end_script "10988" to SAI +-- Indexes: +SET @Arthorn_Windsong := 22924; +SET @SCRIPT := @Arthorn_Windsong * 100; + +-- Add SAI support +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@Arthorn_Windsong; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@Arthorn_Windsong AND `source_type`=0; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@SCRIPT AND `source_type`=9; +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 +(@Arthorn_Windsong,0,0,0,20,0,100,0,10988,0,0,0,80,@SCRIPT,2,0,0,0,0,1,0,0,0,0,0,0,0, 'Captain Brandon - On quest 10988 rewarded - Start script'), +(@SCRIPT,9,0,0,0,0,100,0,30000,30000,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Arthorn Windsong - Action 0 - Say line 0'), +(@SCRIPT,9,1,0,0,0,100,0,43000,43000,0,0,1,1,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Arthorn Windsong - Action 1 - Say line 1'), +(@SCRIPT,9,2,0,0,0,100,0,43000,43000,0,0,5,1,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Arthorn Windsong - Action 2 - Play emote 1'), +(@SCRIPT,9,3,0,0,0,100,0,56000,56000,0,0,69,1,0,0,0,0,0,8,0,0,0,3024.32,5511.29,146.051,2.31064, 'Arthorn Windsong - Action 3 - Move to'), +(@SCRIPT,9,4,0,0,0,100,0,17000,17000,0,0,5,1,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Arthorn Windsong - Action 4 - Play emote 1'), +(@SCRIPT,9,5,0,0,0,100,0,17000,17000,0,0,1,2,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Arthorn Windsong - Action 5 - Say line 2'), +(@SCRIPT,9,6,0,0,0,100,0,11000,11000,0,0,5,1,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Arthorn Windsong - Action 6 - Play emote'), +(@SCRIPT,9,7,0,0,0,100,0,11000,11000,0,0,1,3,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Arthorn Windsong - Action 7- Say line 3'), +(@SCRIPT,9,8,0,0,0,100,0,1000,1000,0,0,1,4,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Arthorn Windsong - Action 8 - Say line 4'), +(@SCRIPT,9,9,0,0,0,100,0,11000,11000,0,0,11,39679,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Arthorn Windsong - Action 9 - Cast spell'), +(@SCRIPT,9,10,0,0,0,100,0,10000,10000,0,0,69,0,0,0,0,0,0,8,0,0,0,3044.22,5510.91,146.033,4.654, 'Windsong - Action 10 - Move to pos'), +(@SCRIPT,9,11,0,0,0,100,0,56000,56000,0,0,1,5,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Arthorn Windsong - Action 11 - Say line 5'); + +-- Convert from db_script_string to creature_text +DELETE FROM `db_script_string` WHERE `entry` IN (2000000073,2000000074,2000000072,2000000071,2000000070,2000000075); +DELETE FROM `creature_text` WHERE `entry`=@Arthorn_Windsong; +INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`) VALUES +(@Arthorn_Windsong,0,0, 'There''s something else here, too. After a discription of a bloody battle and the downfall of the raven, there''s a prophecy. Anzu will haunt the dreams of his enemies, twisting them to affect a return to this world...',12,0,100,1,0,0, 'Arthorn Windsong'), +(@Arthorn_Windsong,1,0, 'The tablet has the confirmation we need, just as I thought. Now, we have to use this information to draw out and defeat this Anzu before he can do any more damage to the Emerald Dream!',12,0,100,1,0,0, 'Arthorn Windsong'), +(@Arthorn_Windsong,2,0, 'It''s all here... how the raven''s followers captured and subdued the sprints of rivals, trapping them forever within stone statues! The tablet even mentions the raven god''s name -- Anzu. I''d thought it was lost to history!',12,0,100,1,0,0, 'Arthorn Windsong'), +(@Arthorn_Windsong,3,0, 'This is it! This is really it -- the Book of the Raven!',12,0,100,1,0,0, 'Arthorn Windsong'), +(@Arthorn_Windsong,4,0, 'It would''ve taken years to find the Book of the Raven without you, young sparrowhawk. Return to your home in Nagrand with our gratitude.',12,0,100,1,0,0, 'Arthorn Windsong'), +(@Arthorn_Windsong,5,0, 'Since the sparrowhawks have proven such a success in hunting down the raven stones, Watcher Elaira has trained another one to relay my voice at a great distance. He can help us communicate as you investigate the bird spirits revealed in the tablet!',12,0,100,1,0,0, 'Arthorn Windsong'); + +-- Convert quest_end_script "10850" to SAI +-- Indexes: +SET @Inactive_Fel_Reaver := 22293; + +-- Add SAI support +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@Inactive_Fel_Reaver; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@Inactive_Fel_Reaver 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 +(@Inactive_Fel_Reaver,0,0,0,20,0,100,0,10850,0,0,0,15,10855,0,0,0,0,0,7,0,0,0,0,0,0,0, 'Inactive Fel Reaver - On quest 10850 rewarded - Call Quest Explored for invoker'); + +-- Convert quest_end_script "10447" to SAI +-- Indexes: +SET @Toki := 18447; + +-- Add SAI support +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@Toki; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@Toki 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 +(@Toki,0,0,0,20,0,100,0,10447,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0, 'Toki - On quest 10447 rewarded - Say line 0'); + +-- Convert from db_script_string to creature_text +DELETE FROM `db_script_string` WHERE `entry`=2000000062; +DELETE FROM `creature_text` WHERE `entry`=@Toki; +INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`) VALUES +(@Toki,0,0, 'The threat be over! $N be savin'' us all!',12,0,100,1,0,0, 'Toki'); + +-- Convert quest_end_script "9565" to SAI +-- Indexes: +SET @Blood_Crystal := 181748; +SET @SCRIPT := @Blood_Crystal * 100; + +-- Add SAI support +UPDATE `gameobject_template` SET `AIName`='SmartGameObjectAI' WHERE `entry`=@Blood_Crystal; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@Blood_Crystal AND `source_type`=1; +DELETE FROM `smart_scripts` WHERE `entryorguid`=@SCRIPT AND `source_type`=9; +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 +(@Blood_Crystal,1,0,0,20,0,100,0,9565,0,0,0,80,@SCRIPT,2,0,0,0,0,1,0,0,0,0,0,0,0, 'Blood Crystal - On quest 9565 rewarded - Start actionlist'), +(@SCRIPT,9,0,0,0,0,100,0,2000,2000,0,0,12,17189,3,180000,0,0,0,8,0,0,0,-3105.36,-12549.2,-1.28,4.6, 'Blood Crystal - Action 0 - Summon'), +(@SCRIPT,9,1,0,0,0,100,0,2000,2000,0,0,12,17189,3,180000,0,0,0,8,0,0,0,-3128.49,-12540.2,-2.54,1.5, 'Blood Crystal - Action 1 - Summon'); -- cgit v1.2.3 From a2832805afb9a8a3434172479c814ca2a729ece1 Mon Sep 17 00:00:00 2001 From: Vincent_Michael Date: Wed, 19 Dec 2012 07:02:54 +0100 Subject: SQL: Fix sql import problems --- sql/updates/world/2012_12_18_02_world_sai.sql | 4 ++-- sql/updates/world/2012_12_19_00_world_sai.sql | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'sql') diff --git a/sql/updates/world/2012_12_18_02_world_sai.sql b/sql/updates/world/2012_12_18_02_world_sai.sql index 5c0e6a7b0c3..0843285550f 100644 --- a/sql/updates/world/2012_12_18_02_world_sai.sql +++ b/sql/updates/world/2012_12_18_02_world_sai.sql @@ -1,4 +1,4 @@ -SET @NPC_WARLORD_ZOLMAZ := 28902; +SET @NPC_WARLORD_ZOLMAZ := 28902; SET @NPC_ENCHANTED_TIKI := 28927; SET @GO_ZOLMAZ_GATE := 190784; SET @GO_GATE_LEVER := 190834; @@ -24,7 +24,7 @@ INSERT INTO `creature_template_addon` (`entry`,`path_id`,`mount`,`bytes1`,`bytes UPDATE `gameobject_template` SET `AIName`='SmartGameObjectAI' WHERE `entry`=@GO_GATE_LEVER; UPDATE `gameobject_template` SET `flags`=4 WHERE `entry` IN (190836,191766,194126); UPDATE `gameobject` SET `position_x`=6552.984, `position_y`=-3903.916, `position_z`=490.9412 WHERE `guid`=99744; - + DELETE FROM `smart_scripts` WHERE `entryorguid` IN (@NPC_WARLORD_ZOLMAZ,@NPC_ENCHANTED_TIKI) AND `source_type`=0; DELETE FROM `smart_scripts` WHERE `entryorguid`=@GO_GATE_LEVER AND `source_type`=1; 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 diff --git a/sql/updates/world/2012_12_19_00_world_sai.sql b/sql/updates/world/2012_12_19_00_world_sai.sql index 6d6eb819078..170028e8a68 100644 --- a/sql/updates/world/2012_12_19_00_world_sai.sql +++ b/sql/updates/world/2012_12_19_00_world_sai.sql @@ -29,7 +29,7 @@ DELETE FROM `creature_text` WHERE `entry`=@DARION_MORGRAINE; INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`) VALUES (@DARION_MORGRAINE,0,0, '%s calls upon the mighty armies of the Scourge!',42,0,100,1,0,0, 'Highlord Darion Morgraine'), (@DARION_MORGRAINE,1,0, 'Armies of the Scourge, hear my call! The scarlet apocalypse has begun! Tear this land asunder and leave only death in your wake!',12,0,100,1,0,0, 'Highlord Darion Morgraine'); - + -- Convert quest_end_script "10988" to SAI -- Indexes: SET @Arthorn_Windsong := 22924; -- cgit v1.2.3