diff options
27 files changed, 773 insertions, 72 deletions
diff --git a/sql/updates/world/2013_08_04_00_world_quests.sql b/sql/updates/world/2013_08_04_00_world_quests.sql new file mode 100644 index 00000000000..00f71824236 --- /dev/null +++ b/sql/updates/world/2013_08_04_00_world_quests.sql @@ -0,0 +1,390 @@ +-- The Nightmare Manifests/Hope Within the Emerald Nightmare/The Boon of Remulos/Walking Legend +SET @TYRANDE := 15633; +SET @ERANIKUS := 15491; +SET @REMULOS := 11832; +SET @MALFURION := 17949; +SET @PHANTASM := 15629; +SET @E_REDEEM := 15628; + +DELETE FROM `creature_ai_scripts` WHERE creature_id=@ERANIKUS; +-- Tyrande +UPDATE `creature_template` SET `AIName`='SmartAI', `ScriptName`='', `flags_extra`=0, `type_flags`=0, `unit_flags`=32768, `faction_H`=1254, `faction_A`=1254 WHERE `entry`=@TYRANDE; +-- Eranikus, Tyrant of the Dream +UPDATE `creature_template` SET `AIName`='SmartAI', `ScriptName`='', `InhabitType`=7, `faction_A`=35, `faction_H`=35, `unit_flags`=0, `flags_extra`=2097152, `type_flags`=8, `dynamicflags`=128, `speed_walk`=2 WHERE `entry`=@ERANIKUS; +-- Keeper Remulos +UPDATE `creature_template` SET `AIName`='SmartAI', `ScriptName`='', `speed_walk`=2.5, `speed_run`=3.75, `type_flags`=0, `unit_flags`=32768, `faction_H`=1254, `faction_A`=1254 WHERE `entry`=@REMULOS; +-- Malfurion +UPDATE `creature_template` SET `InhabitType`=4,`AIName`='SmartAI',`ScriptName`='' WHERE `entry`=@MALFURION; +-- Not sure if these are set on stock DB, but I'll still add them just in case. +UPDATE `creature_template` SET `IconName`='Interact', `npcflag`=16777216 WHERE `entry` IN (32788,32790); +-- Wrong gameobject, no idea who spawned it there. +DELETE FROM `gameobject` WHERE `guid`=99849; + +-- NPC texts +DELETE FROM `creature_text` WHERE entry IN (@REMULOS,@ERANIKUS,@PHANTASM,@TYRANDE,@E_REDEEM,@MALFURION); +INSERT INTO `creature_text` (`entry`, `groupid`, `id`, `text`, `type`, `language`, `probability`, `emote`, `duration`, `sound`, `comment`) VALUES +(@REMULOS,0,0,'We will locate the origin of the Nightmare through the fragments you collected, $n. From there, we will pull Eranikus through a rift in the Dream. Steel yourself, $c. We are inviting the embodiment of the Nightmare into our world.',12,0,100,0,0,0,'Keeper Remulos Say 0'), +(@REMULOS,1,1,'The rift will be opened there, above the Lake Elun''ara. Prepare yourself, $n. Eranikus''s entry into our world will be wrought with chaos and strife.',12,0,100,0,0,0,'Keeper Remulos Say 1'), +(@REMULOS,2,2,'He will stop at nothing to get to Malfurion''s physical manifistation. That must not happen... We must keep the beast occupied long enough for Tyrande to arrive.',12,0,100,0,0,0,'Keeper Remulos Say 2'), +(@REMULOS,3,3,'Defend Nighthaven, hero...',12,0,100,0,0,0,'Keeper Remulos Say 3'), +(@REMULOS,4,4,'Fiend! Face the might of Cenarius!',14,0,100,0,0,0,'Keeper Remulos Say 4'), +(@REMULOS,5,5,'Who is the predictable one, beast? Surely you did not think that we would summon you on top of Malfurion? Your redemption comes, Eranikus. You will be cleansed of this madness - this corruption.',14,0,100,0,0,0,'Keeper Remulos Say 4'), +(@REMULOS,6,6,'Hurry, $N! We must find protective cover!',12,0,100,0,0,0,'Keeper Remulos Say 6'), +(@REMULOS,7,7,'Please, champion, protect our people.',12,0,100,0,0,0,'Keeper Remulos Say 7'), +(@REMULOS,8,8,'It will be done, Eranikus. Be well, ancient one.',12,0,100,0,0,0,'Keeper Remulos Say 8'), +(@REMULOS,9,9,'Let us leave Nighthaven, hero Seek me out at the grove.',12,0,100,0,0,0,'Keeper Remulos Say 9'), +-- +(@REMULOS,10,10,'Come, $N. The lake is around the bend.',12,0,100,1,0,0,'Keeper Remulos - say Text 0'), +(@REMULOS,11,11,'Stand near me, $N. I will protect you should anything go wrong.',12,0,100,1,0,0,'Keeper Remulos - say Text 1'), +(@REMULOS,12,12,'Malfurion!',12,0,100,5,0,0,'Keeper Remulos - say Text 2'), +(@REMULOS,13,13,'It was shrouded in nightmares, Malfurion. What is happening in the Dream? What could cause such atrocities?',12,0,100,6,0,0,'Keeper Remulos - say Text 3'), +(@REMULOS,14,14,'I sensed as much, Malfurion. Dark days loom ahead.',12,0,100,1,0,0,'Keeper Remulos - say Text 4'), +(@REMULOS,15,15,'You have been gone too long, Malfurion. Peace between the Children of Azeroth has become tenuous at best. What of my father? Of your brother? Have you any news?',12,0,100,6,0,0,'Keeper Remulos - say Text 5'), +(@REMULOS,16,16,'Farewell, old friend... Farewell...',12,0,100,1,0,0,'Keeper Remulos - say Text 6'), +(@REMULOS,17,17,'Let us return to the grove, mortal.',12,0,100,1,0,0,'Keeper Remulos - say Text 7'), +-- +(@ERANIKUS,0,0,'Pitful predictable mortals... You know not what you have done! The master''s will fulfilled. The Moonglade shall be destroyed and Malfurion along with it!',14,0,100,0,0,0,'Eranikus Say 0'), +(@ERANIKUS,1,1,'Eranikus, Tyrant of the Dream lets loose a sinister laugh.',16,0,100,0,0,0,'Eranikus Say 1'), +(@ERANIKUS,2,2,'You are certanly not your father, insect. Should it interest me, I would crush you with but a swipe of my claws. Turn Shan''do Stormrage over to me and your pitiful life will be spared along with the lives of your people.',14,0,100,0,0,0,'Eranikus Say 2'), +(@ERANIKUS,3,3,'My redemption? You are bold, little one. My redemption comes by the will of my god.',14,0,100,0,0,0,'Eranikus Say 3'), +(@ERANIKUS,4,4,'Eranikus, Tyrant of the Dream roars furiously',16,0,100,0,0,0,'Eranikus Say 4'), +(@ERANIKUS,5,5,'Rise, servants of the Nightmare! Rise and destroy this world! Let there be no survivors...',14,0,100,0,0,0,'Eranikus Say 5'), +(@ERANIKUS,6,6,'Where is your savior? How long can you hold out against my attacks?',14,0,100,0,0,0,'Eranikus Say 6'), +(@ERANIKUS,7,7,'Remulos, look how easy they fall before me? You can stop this, fool. Turn the druid over to me and it will all be over...',14,0,100,0,0,0,'Eranikus Say 7'), +(@ERANIKUS,8,8,'Defeated my minions? Then face me, mortals!',14,0,100,0,0,0,'Eranikus Say 8'), +(@ERANIKUS,9,9,'IT BURNS! THE PAIN.. SEARING...',14,0,100,0,0,0,'Eranikus Say 9'), +(@ERANIKUS,10,10,'WHY? Why did this happen to... to me? Where were you Tyrande? Where were you when I fell from the grace of Elune?',14,0,100,0,0,0,'Eranikus Say 10'), +(@ERANIKUS,11,11,'I... I feel... I feel the touch of Elune upon my being once more... She smiles upon me... Yes... I...',14,0,100,0,0,0,'Eranikus Say 11'), +(@ERANIKUS,12,12,'Tyrande falls to one knee.',16,0,100,0,0,0,'Eranikus Say 12'), +-- +(@TYRANDE,0,0,'Seek absolution, Eranikus. All will be forgiven..',14,0,100,0,0,0,'Tyrande Say 0'), +(@TYRANDE,1,1,'You will be forgiven, Eranikus. Elune will always love you. Break free of the bonds that command you!',14,0,100,0,0,0,'Tyrande Say 0'), +(@TYRANDE,2,2,'The grasp of the Old Gods is unmoving. He is consumed by their dark thoughts... I... I... I cannot... cannot channel much longer... Elune aide me.',12,0,100,0,0,0,'Tyrande Say 0'), +-- +(@E_REDEEM,0,0,'For so long, I was lost... The Nightmare''s corruption had consumed me... And now, you... all of you.. you have saved me. Released me from its grasp.',12,0,100,0,0,0,'Eranikus the Redeemed Say 0'), +(@E_REDEEM,1,1,'But... Malfurion, Cenarius, Ysera... They still fight. They need me. I must return to the Dream at once.',12,0,100,0,0,0,'Eranikus the Redeemed Say 0'), +(@E_REDEEM,2,2,'My lady, I am unworthy of your prayer. Truly, you are an angel of light. Please, assist me in returning to the barrow den so that I may return to the Dream. I like Malfurion, also have a love awaiting me... I must return to her... to protect her...',12,0,100,0,0,0,'Eranikus the Redeemed Say 0'), +(@E_REDEEM,3,3,'And heroes... I hold that which you seek. May it once more see the evil dissolved. Remulos, see to it that our champion receives the shard of the Green Flight.',12,0,100,0,0,0,'Eranikus the Redeemed Say 0'), +-- +(@PHANTASM,0,0,'Nightmare Phantasm drinks in the suffering of the fallen.',16,0,100,0,0,0,'Nightmare Phantasm Say 0'), +-- +(@MALFURION,0,0,'Remulos, old friend. It is good to see you once more. I knew the message would find its way to you; one way or another.',12,0,100,1,0,0,'Malfurion Stormrage - say Text 0'), +(@MALFURION,1,0,'I fear for the worst, old friend. Within the Dream we fight a new foe, born of an ancient evil. Ysera''s noble brood has fallen victim to the old whisperings. It seems as if the Nightmare has broken through the realm to find a new host on Azeroth.',12,0,100,1,0,0,'Malfurion Stormrage - say Text 1'), +(@MALFURION,2,0,'Aye Remulos, prepare the mortal races.',12,0,100,1,0,0,'Malfurion Stormrage - say Text 2'), +(@MALFURION,3,0,'Cenarius fights at my side. Illidan sits atop his throne in Outland; brooding. I''m afraid that the loss to Arthas proved to be his breaking point. Madness has embraced him, Remulos. He replays the events in his mind a thousand times per day, but in his mind, he is the victor and Arthas is utterly defeated. He is too far gone, old friend. I fear that the time may soon come that our bond is tested and it will not be as it was at the Well in Zin-Azshari.',12,0,100,1,0,0,'Malfurion Stormrage - say Text 3'), +(@MALFURION,4,0,'Remulos, I am being drawn back... Tyrande... send her my love... Tell her I am safe... Tell her... Tell her I will return... Farewell...',12,0,100,1,0,0,'Malfurion Stormrage - say Text 4'); + + +-- Remulos SAI +DELETE FROM `smart_scripts` WHERE `source_type`IN (0,9) AND `entryorguid` IN (@REMULOS,@REMULOS*100,@REMULOS*100+1,@REMULOS*100+2); +DELETE FROM `smart_scripts` WHERE `source_type`=0 AND `entryorguid` = @MALFURION; +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 +-- Quests: Hope Within the Emerald Nightmare & The Boon of Remulos +(@REMULOS,0,0,0,62,0,100,0,10215,0,0,0,11,57413,1,0,0,0,0,7,0,0,0,0,0,0,0,'Keeper Remulos - On gossip option select - cast spell'), +(@REMULOS,0,1,2,62,0,100,0,10215,1,0,0,11,57670,1,0,0,0,0,7,0,0,0,0,0,0,0,'Keeper Remulos - On gossip option select - cast spell'), +(@REMULOS,0,2,0,61,0,100,0,0,0,0,0,72,0,0,0,0,0,0,7,0,0,0,0,0,0,0,'Keeper Remulos - On gossip option select - Close gossip'), +(@REMULOS,0,3,0,19,0,100,0,13074,0,0,0,11,57413,0,0,0,0,0,7,0,0,0,0,0,0,0, 'Keeper Remulos - On Quest Accept - Cast Fitful Dream'), +-- The Nightmare Manifests +(@REMULOS,0,4,0,19,0,100,1,8736,0,0,0,1,0,15000,0,0,0,0,1,0,0,0,0,0,0,0,'Keeper Remulos - On Quest Accept - Say 0'), +(@REMULOS,0,5,0,52,0,100,0,0,@REMULOS,0,0,53,0,@REMULOS,0,8736,0,0,1,0,0,0,0,0,0,0,'Keeper Remulos - On Say 0 - Start WayPoint'), +(@REMULOS,0,6,0,52,0,100,0,0,@REMULOS,0,0,83,3,0,0,0,0,0,1,0,0,0,0,0,0,0,'Keeper Remulos - On Quest Accept - Remove Npcflag'), +(@REMULOS,0,7,0,40,0,100,0,13,@REMULOS,0,0,54,95000,0,0,0,0,0,1,0,0,0,0,0,0,0,'Keeper Remulos - On WayPoint 13 - Pause WP'), +(@REMULOS,0,8,0,40,0,100,0,13,@REMULOS,0,0,1,1,10000,0,0,0,0,1,0,0,0,0,0,0,0,'Keeper Remulos - On WayPoint 13 - Say 1'), +(@REMULOS,0,9,0,52,0,100,0,1,@REMULOS,0,0,1,2,10000,0,0,0,0,1,0,0,0,0,0,0,0,'Keeper Remulos - On Say 1 - Say 2'), +(@REMULOS,0,10,0,52,0,100,0,2,@REMULOS,0,0,11,25813,0,0,0,0,0,1,0,0,0,0,0,0,0,'Keeper Remulos - On Say 3 - Cast Conjure Dream Rift'), +(@REMULOS,0,11,0,52,0,100,0,2,@REMULOS,0,0,12,@ERANIKUS,3,3600000,0,0,0,8,0,0,0,7872.5888, -2664.55888, 497.139282,0.63583,'Keeper Remulos - On Say 3 - Summon Eranikus'), +(@REMULOS,0,12,0,52,0,100,0,2,@REMULOS,0,0,1,3,23000,0,0,0,0,1,0,0,0,0,0,0,0,'Keeper Remulos - On Say 2 - Say 3'), +(@REMULOS,0,13,0,52,0,100,0,3,@REMULOS,0,0,1,4,31000,0,0,0,0,1,0,0,0,0,0,0,0,'Keeper Remulos - On Say 3 - Say 4'), +(@REMULOS,0,14,0,52,0,100,0,4,@REMULOS,0,0,1,5,22000,0,0,0,0,1,0,0,0,0,0,0,0,'Keeper Remulos - On Say 4 - Say 5'), +(@REMULOS,0,15,0,52,0,100,0,5,@REMULOS,0,0,1,6,10000,0,0,0,0,1,0,0,0,0,0,0,0,'Keeper Remulos - On Say 5 - Say 6'), +(@REMULOS,0,16,0,40,0,100,0,20,@REMULOS,0,0,54,60000,0,0,0,0,0,1,0,0,0,0,0,0,0,'Keeper Remulos - On WayPoint 20 - Pause WP'), +(@REMULOS,0,17,0,40,0,100,0,20,@REMULOS,0,0,1,7,20000,0,0,0,0,1,0,0,0,0,0,0,0,'Keeper Remulos - On WayPoint 20 - Say 7'), +(@REMULOS,0,18,0,52,0,100,0,7,@REMULOS,0,0,12,@PHANTASM,3,3600000,0,0,0,8,0,0,0,7829.066,-2562.347,489.299,5.234,'Keeper Remulos - On Say 7 - Summon Nightmare Phantasm'), +(@REMULOS,0,19,0,52,0,100,0,7,@REMULOS,0,0,12,@PHANTASM,3,3600000,0,0,0,8,0,0,0,7828.889,-2580.694,489.299,0.753,'Keeper Remulos - On Say 7 -Summon Nightmare Phantasm'), +(@REMULOS,0,20,0,52,0,100,0,7,@REMULOS,0,0,8,2,0,0,0,0,0,1,0,0,0,0,0,0,0,'Keeper Remulos - On Say 7 - Set react state aggresive'), +(@REMULOS,0,21,0,52,0,100,0,7,@REMULOS,0,0,49,0,0,0,0,0,0,19,@PHANTASM,0,0,0,0,0,0,'Keeper Remulos - On Say 7 - Attack'), +(@REMULOS,0,22,0,0,0,100,0,7000,14000,6000,12000,11,20665,0,0,0,0,0,18,20,0,0,0,0,0,0,'Keeper Remulos - In Combat - Cast Regrowth'), +(@REMULOS,0,23,0,0,0,100,0,26000,52000,34000,46000,11,20664,0,0,0,0,0,18,20,0,0,0,0,0,0,'Keeper Remulos - In Combat - Cast Regrowth'), +(@REMULOS,0,24,0,0,0,100,0,25000,25000,25000,50000,11,23381,0,0,0,0,0,18,20,0,0,0,0,0,0,'Keeper Remulos - In Combat - Cast Healing Touch'), +(@REMULOS,0,25,0,0,0,100,0,10000,40000,40000,40000,11,25817,0,0,0,0,0,1,0,0,0,0,0,0,0,'Keeper Remulos - In Combat - Cast Tranquility'), +(@REMULOS,0,26,0,0,0,100,0,16000,21000,19000,25000,11,21668,0,0,0,0,0,2,0,0,0,0,0,0,0,'Keeper Remulos - In Combat - Cast Starfall'), +(@REMULOS,0,27,0,38,0,100,0,1,1,0,0,1,8,10000,0,0,0,0,1,0,0,0,0,0,0,0,'Keeper Remulos - On Data Set - Say 8'), +(@REMULOS,0,28,0,52,0,100,0,8,@REMULOS,0,0,1,9,10000,0,0,0,0,1,0,0,0,0,0,0,0,'Keeper Remulos - Said 8 8 - Say 9'), +(@REMULOS,0,29,0,40,0,100,1,21,@REMULOS,0,0,49,0,0,0,0,0,0,11,@ERANIKUS,30,0,0,0,0,0,'Keeper Remulos - On Waypoint Reached - Attack Eranikus'), +(@REMULOS,0,30,0,6,0,100,0,0,0,0,0,6,8736,0,0,0,0,0,18,40,0,0,0,0,0,0,'Keeper Remulos - On Death - Fail Quest'), +(@REMULOS,0,31,0,40,0,100,1,23,@REMULOS,0,0,54,1000,0,0,0,0,0,1,0,0,0,0,0,0,0,'Keeper Remulos - On WayPoint 23 - Pause WP'), +(@REMULOS,0,32,0,40,0,100,1,23,@REMULOS,0,0,66,2.835,0,0,0,0,0,1,0,0,0,0,0,0,0,'Keeper Remulos - On WayPoint 23 - Set Orientation'), +(@REMULOS,0,33,0,52,0,100,0,9,@REMULOS,0,0,53,1,@REMULOS*100+1,0,8736,0,0,1,0,0,0,0,0,0,0,'Keeper Remulos - On Said 9 - Go Home'), +(@REMULOS,0,34,0,40,0,100,0,12,@REMULOS*100+1,0,0,82,3,0,0,0,0,0,1,0,0,0,0,0,0,0,'Keeper Remulos - On WayPoint 12 - Set Npcflags'), +(@REMULOS,0,35,0,40,0,100,0,12,@REMULOS*100+1,0,0,66,3,0,0,0,0,0,1,0,0,0,0,0,0,0,'Keeper Remulos - On WayPoint 12 - Set Orientation'), +(@REMULOS,0,36,0,40,0,100,0,24,@REMULOS,0,0,80,@REMULOS*100+1,0,1,0,0,0,1,0,0,0,0,0,0,0,'Keeper Remulos - On WayPoint 24 - Run Script only when OOC'), +-- Quest: Waking Legends +(@REMULOS,0,37,38,19,0,100,0,8447,0,0,0,81,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'Keeper Remulos - on Quest Accept - Turn off Quest Giver & Gossip Flag'), +(@REMULOS,0,38,39,61,0,100,0,0,0,0,0,53,0,@REMULOS*100,0,8447,0,0,1,0,0,0,0,0,0,0,'Keeper Remulos - on Quest Accept - start WP'), +(@REMULOS,0,39,0,61,0,100,0,0,0,0,0,1,10,0,0,0,0,0,1,0,0,0,0,0,0,0,'Keeper Remulos - on Quest Accept - say Text 10'), +(@REMULOS,0,40,41,40,0,100,0,5,@REMULOS*100,0,0,54,83000,0,0,0,0,0,1,0,0,0,0,0,0,0,'Keeper Remulos - reached WP 5 - pause WP'), +(@REMULOS,0,41,42,61,0,100,0,0,0,0,0,66,0,0,0,0,0,0,8,0,0,0,0,0,0,3.12180,'Keeper Remulos - reached WP5 - set orientation'), +(@REMULOS,0,42,0,61,0,100,0,0,0,0,0,80,@REMULOS*100+2,0,0,0,0,0,1,0,0,0,0,0,0,0,'Keeper Remulos - reached WP 5 - run Script'), +(@REMULOS,0,43,0,40,0,100,0,10,@REMULOS*100,0,0,81,3,0,0,0,0,0,1,0,0,0,0,0,0,0,'Keeper Remulos - reached WP 10 - Turn on Quest Giver & Gossip Flag'), +(@REMULOS,0,44,0,40,0,100,0,10,@REMULOS*100,0,0,66,3,0,0,0,0,0,1,0,0,0,0,0,0,0,'Keeper Remulos - reached WP 10 - set orientation'), +-- Script +(@REMULOS*100+2,9,0,0,0,0,100,0,2000,2000,0,0,1,11,0,0,0,0,0,1,0,0,0,0,0,0,0,'Keeper Remulos - Say Text 1'), +(@REMULOS*100+2,9,1,0,0,0,100,0,3000,3000,0,0,11,25004,1,0,0,0,0,1,0,0,0,0,0,0,0,'Keeper Remulos - Cast Spell: Throw Nightmare Object to Position'), +(@REMULOS*100+2,9,2,0,0,0,100,0,5000,5000,0,0,12,@MALFURION,8,0,0,0,0,8,0,0,0,7730.5288,-2318.8596,453.8706,6.14985,'Keeper Remulos - Summon Malfurion Stormrage'), +(@REMULOS*100+2,9,3,0,0,0,100,0,2000,2000,0,0,1,12,0,0,0,0,0,1,0,0,0,0,0,0,0,'Keeper Remulos - Say Text 12'), +(@REMULOS*100+2,9,4,0,0,0,100,0,3000,3000,0,0,1,0,0,0,0,0,0,9,@MALFURION,0,30,0,0,0,0,'Malfurion Stormrage - Say Text 0'), +(@REMULOS*100+2,9,5,0,0,0,100,0,6000,6000,0,0,1,13,0,0,0,0,0,1,0,0,0,0,0,0,0,'Keeper Remulos - Say Text 13'), +(@REMULOS*100+2,9,6,0,0,0,100,0,7000,7000,0,0,1,1,0,0,0,0,0,9,@MALFURION,0,30,0,0,0,0,'Malfurion Stormrage - Say Text 1'), +(@REMULOS*100+2,9,7,0,0,0,100,0,11000,11000,0,0,1,14,0,0,0,0,0,1,0,0,0,0,0,0,0,'Keeper Remulos - Say Text 14'), +(@REMULOS*100+2,9,8,0,0,0,100,0,3500,3500,0,0,1,2,0,0,0,0,0,9,@MALFURION,0,30,0,0,0,0,'Malfurion Stormrage - Say Text 2'), +(@REMULOS*100+2,9,9,0,0,0,100,0,4000,4000,0,0,1,15,0,0,0,0,0,1,0,0,0,0,0,0,0,'Keeper Remulos - Say Text 15'), +(@REMULOS*100+2,9,10,0,0,0,100,0,9000,9000,0,0,1,3,0,0,0,0,0,9,@MALFURION,0,30,0,0,0,0,'Malfurion Stormrage - Say Text 3'), +(@REMULOS*100+2,9,11,0,0,0,100,0,19000,19000,0,0,1,4,0,0,0,0,0,9,@MALFURION,0,30,0,0,0,0,'Malfurion Stormrage - Say Text 4'), +(@REMULOS*100+2,9,12,0,0,0,100,0,6000,6000,0,0,1,16,0,0,0,0,0,1,0,0,0,0,0,0,0,'Keeper Remulos - Say Text 16'), +(@REMULOS*100+2,9,13,0,0,0,100,0,2000,2000,0,0,1,17,0,0,0,0,0,1,0,0,0,0,0,0,0,'Keeper Remulos - Say Text 17'), +(@REMULOS*100+2,9,14,0,0,0,100,0,0,0,0,0,15,8447,0,0,0,0,0,7,0,0,0,0,0,0,0,'Keeper Remulos - Give Quest Credit'), +(@REMULOS*100+2,9,15,0,0,0,100,0,1000,1000,0,0,45,0,1,0,0,0,0,9,@MALFURION,0,30,0,0,0,0,'Keeper Remulos - Set data 0 1 to Malfurion Stormrage'), + -- +(@MALFURION,0,0,0,54,0,100,0,0,0,0,0,11,52096,2,0,0,0,0,1,0,0,0,0,0,0,0,'Malfurion Stormrage - On summon - Cast Cosmetic Teleport Effect on self'), +(@MALFURION,0,1,0,38,0,100,0,0,1,0,0,41,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'Malfurion Stormrage - On data set 0 1 - Despawn'), + -- +(@REMULOS*100+1,9,0,0,1,0,100,1,60000,60000,0,0,53,0,@REMULOS*100+1,0,8736,0,0,1,0,0,0,0,0,0,0,'On Script - OOC 1 Mintues - Go Home'); + +-- Eranikus, Tyrant of the Dream SAI +DELETE FROM `smart_scripts` WHERE entryorguid IN(@ERANIKUS,@ERANIKUS*100,@ERANIKUS*100+1); +INSERT INTO `smart_scripts` VALUES +(@ERANIKUS,0,0,0,1,0,100,1,13000,13000,13000,13000,1,0,15000,0,0,0,0,1,0,0,0,0,0,0,0,'Eranikus - OOC 13 Sec - Say 0'), +(@ERANIKUS,0,1,0,52,0,100,0,0,@ERANIKUS,0,0,1,1,6000,0,0,0,0,1,0,0,0,0,0,0,0,'Eranikus - On Say 0 - Say 1'), +(@ERANIKUS,0,2,0,52,0,100,0,1,@ERANIKUS,0,0,1,2,34000,0,0,0,0,1,0,0,0,0,0,0,0,'Eranikus - On Say 1 - Say 2'), +(@ERANIKUS,0,3,0,52,0,100,0,2,@ERANIKUS,0,0,1,3,3000,0,0,0,0,1,0,0,0,0,0,0,0,'Eranikus - On Say 2 - Say 3'), +(@ERANIKUS,0,4,0,52,0,100,0,3,@ERANIKUS,0,0,1,4,3000,0,0,0,0,1,0,0,0,0,0,0,0,'Eranikus - On Say 3 - Say 4'), +(@ERANIKUS,0,5,0,52,0,100,0,4,@ERANIKUS,0,0,53,0,@ERANIKUS,0,8736,0,0,1,0,0,0,0,0,0,0,'Eranikus - On Say 4 - Start WayPoint'), +(@ERANIKUS,0,6,0,40,0,100,0,3,@ERANIKUS,0,0,54,130000,0,0,0,0,0,1,0,0,0,0,0,0,0,'Eranikus - On WayPoint 3 - Pause'), +(@ERANIKUS,0,7,0,40,0,100,0,3,@ERANIKUS,0,0,1,5,10000,0,0,0,0,1,0,0,0,0,0,0,0,'Eranikus - On WayPoint 3 - Say 5'), +(@ERANIKUS,0,8,0,52,0,100,0,5,@ERANIKUS,0,0,80,@ERANIKUS*100,0,2,0,0,0,1,0,0,0,0,0,0,0,'Eranikus - On Say 5 - Start Script'), +(@ERANIKUS*100,9,0,0,0,0,100,0,1000,1000,0,0,12,@PHANTASM,3,600000,0,0,0,8,0,0,0,7865.966,-2554.104,486.967,5.492,'Eranikus - On Script - Summon Nightmare Phantasm'), +(@ERANIKUS*100,9,1,0,0,0,100,0,1000,1000,0,0,12,@PHANTASM,3,600000,0,0,0,8,0,0,0,7873.412,-2587.454,486.946,0.924,'Eranikus - On Script - Summon Nightmare Phantasm'), +(@ERANIKUS*100,9,2,0,0,0,100,0,1000,1000,0,0,12,@PHANTASM,3,600000,0,0,0,8,0,0,0,7901.544,-2581.989,487.178,2.059,'Eranikus - On Script - Summon Nightmare Phantasm'), +(@ERANIKUS*100,9,3,0,0,0,100,0,1000,1000,0,0,12,@PHANTASM,3,600000,0,0,0,8,0,0,0,7918.844,-2553.987,486.911,3.772,'Eranikus - On Script - Summon Nightmare Phantasm'), +(@ERANIKUS*100,9,4,0,0,0,100,0,5000,5000,0,0,12,@PHANTASM,3,600000,0,0,0,8,0,0,0,7865.966,-2554.104,486.967,5.492,'Eranikus - On Script - Summon Nightmare Phantasm'), +(@ERANIKUS*100,9,5,0,0,0,100,0,1000,1000,0,0,12,@PHANTASM,3,600000,0,0,0,8,0,0,0,7873.412,-2587.454,486.946,0.924,'Eranikus - On Script - Summon Nightmare Phantasm'), +(@ERANIKUS*100,9,6,0,0,0,100,0,1000,1000,0,0,12,@PHANTASM,3,600000,0,0,0,8,0,0,0,7901.544,-2581.989,487.178,2.059,'Eranikus - On Script - Summon Nightmare Phantasm'), +(@ERANIKUS*100,9,7,0,0,0,100,0,1000,1000,0,0,12,@PHANTASM,3,600000,0,0,0,8,0,0,0,7918.844,-2553.987,486.911,3.772,'Eranikus - On Script - Summon Nightmare Phantasm'), +(@ERANIKUS*100,9,8,0,0,0,100,0,5000,5000,0,0,12,@PHANTASM,3,600000,0,0,0,8,0,0,0,7865.966,-2554.104,486.967,5.492,'Eranikus - On Script - Summon Nightmare Phantasm'), +(@ERANIKUS*100,9,9,0,0,0,100,0,1000,1000,0,0,12,@PHANTASM,3,600000,0,0,0,8,0,0,0,7873.412,-2587.454,486.946,0.924,'Eranikus - On Script - Summon Nightmare Phantasm'), +(@ERANIKUS*100,9,10,0,0,0,100,0,1000,1000,0,0,12,@PHANTASM,3,600000,0,0,0,8,0,0,0,7901.544,-2581.989,487.178,2.059,'Eranikus - On Script - Summon Nightmare Phantasm'), +(@ERANIKUS*100,9,11,0,0,0,100,0,1000,1000,0,0,12,@PHANTASM,3,600000,0,0,0,8,0,0,0,7918.844,-2553.987,486.911,3.772,'Eranikus - On Script - Summon Nightmare Phantasm'), +(@ERANIKUS*100,9,12,0,0,0,100,0,5000,5000,0,0,12,@PHANTASM,3,600000,0,0,0,8,0,0,0,7865.966,-2554.104,486.967,5.492,'Eranikus - On Script - Summon Nightmare Phantasm'), +(@ERANIKUS*100,9,13,0,0,0,100,0,1000,1000,0,0,12,@PHANTASM,3,600000,0,0,0,8,0,0,0,7873.412,-2587.454,486.946,0.924,'Eranikus - On Script - Summon Nightmare Phantasm'), +(@ERANIKUS*100,9,14,0,0,0,100,0,1000,1000,0,0,12,@PHANTASM,3,600000,0,0,0,8,0,0,0,7901.544,-2581.989,487.178,2.059,'Eranikus - On Script - Summon Nightmare Phantasm'), +(@ERANIKUS*100,9,15,0,0,0,100,0,1000,1000,0,0,12,@PHANTASM,3,600000,0,0,0,8,0,0,0,7918.844,-2553.987,486.911,3.772,'Eranikus - On Script - Summon Nightmare Phantasm'), +(@ERANIKUS*100,9,16,0,0,0,100,0,1000,1000,0,0,1,6,35000,0,0,0,0,1,0,0,0,0,0,0,0,'Eranikus - On Script - Say 6'), +(@ERANIKUS,0,9,0,52,0,100,0,6,@ERANIKUS,0,0,80,@ERANIKUS*100+1,0,2,0,0,0,1,0,0,0,0,0,0,0,'Eranikus - On Say 6 - Start Script'), +(@ERANIKUS*100+1,9,0,0,0,0,100,0,1000,1000,0,0,12,@PHANTASM,3,600000,0,0,0,8,0,0,0,7865.966,-2554.104,486.967,5.492,'Eranikus - On Script - Summon Nightmare Phantasm'), +(@ERANIKUS*100+1,9,1,0,0,0,100,0,1000,1000,0,0,12,@PHANTASM,3,600000,0,0,0,8,0,0,0,7873.412,-2587.454,486.946,0.924,'Eranikus - On Script - Summon Nightmare Phantasm'), +(@ERANIKUS*100+1,9,2,0,0,0,100,0,1000,1000,0,0,12,@PHANTASM,3,600000,0,0,0,8,0,0,0,7901.544,-2581.989,487.178,2.059,'Eranikus - On Script - Summon Nightmare Phantasm'), +(@ERANIKUS*100+1,9,3,0,0,0,100,0,1000,1000,0,0,12,@PHANTASM,3,600000,0,0,0,8,0,0,0,7918.844,-2553.987,486.911,3.772,'Eranikus - On Script - Summon Nightmare Phantasm'), +(@ERANIKUS*100+1,9,4,0,0,0,100,0,5000,5000,0,0,12,@PHANTASM,3,600000,0,0,0,8,0,0,0,7865.966,-2554.104,486.967,5.492,'Eranikus - On Script - Summon Nightmare Phantasm'), +(@ERANIKUS*100+1,9,5,0,0,0,100,0,1000,1000,0,0,12,@PHANTASM,3,600000,0,0,0,8,0,0,0,7873.412,-2587.454,486.946,0.924,'Eranikus - On Script - Summon Nightmare Phantasm'), +(@ERANIKUS*100+1,9,6,0,0,0,100,0,1000,1000,0,0,12,@PHANTASM,3,600000,0,0,0,8,0,0,0,7901.544,-2581.989,487.178,2.059,'Eranikus - On Script - Summon Nightmare Phantasm'), +(@ERANIKUS*100+1,9,7,0,0,0,100,0,1000,1000,0,0,12,@PHANTASM,3,600000,0,0,0,8,0,0,0,7918.844,-2553.987,486.911,3.772,'Eranikus - On Script - Summon Nightmare Phantasm'), +(@ERANIKUS*100+1,9,8,0,0,0,100,0,5000,5000,0,0,12,@PHANTASM,3,600000,0,0,0,8,0,0,0,7865.966,-2554.104,486.967,5.492,'Eranikus - On Script - Summon Nightmare Phantasm'), +(@ERANIKUS*100+1,9,9,0,0,0,100,0,1000,1000,0,0,12,@PHANTASM,3,600000,0,0,0,8,0,0,0,7873.412,-2587.454,486.946,0.924,'Eranikus - On Script - Summon Nightmare Phantasm'), +(@ERANIKUS*100+1,9,10,0,0,0,100,0,1000,1000,0,0,12,@PHANTASM,3,600000,0,0,0,8,0,0,0,7901.544,-2581.989,487.178,2.059,'Eranikus - On Script - Summon Nightmare Phantasm'), +(@ERANIKUS*100+1,9,11,0,0,0,100,0,1000,1000,0,0,12,@PHANTASM,3,600000,0,0,0,8,0,0,0,7918.844,-2553.987,486.911,3.772,'Eranikus - On Script - Summon Nightmare Phantasm'), +(@ERANIKUS*100+1,9,12,0,0,0,100,0,5000,5000,0,0,12,@PHANTASM,3,600000,0,0,0,8,0,0,0,7865.966,-2554.104,486.967,5.492,'Eranikus - On Script - Summon Nightmare Phantasm'), +(@ERANIKUS*100+1,9,13,0,0,0,100,0,1000,1000,0,0,12,@PHANTASM,3,600000,0,0,0,8,0,0,0,7873.412,-2587.454,486.946,0.924,'Eranikus - On Script - Summon Nightmare Phantasm'), +(@ERANIKUS*100+1,9,14,0,0,0,100,0,1000,1000,0,0,12,@PHANTASM,3,600000,0,0,0,8,0,0,0,7901.544,-2581.989,487.178,2.059,'Eranikus - On Script - Summon Nightmare Phantasm'), +(@ERANIKUS*100+1,9,15,0,0,0,100,0,1000,1000,0,0,12,@PHANTASM,3,600000,0,0,0,8,0,0,0,7918.844,-2553.987,486.911,3.772,'Eranikus - On Script - Summon Nightmare Phantasm'), +(@ERANIKUS*100+1,9,16,0,0,0,100,0,1000,1000,0,0,1,7,33000,0,0,0,0,1,0,0,0,0,0,0,0,'Eranikus - On Script - Say 7'), +(@ERANIKUS,0,10,0,40,0,100,0,4,@ERANIKUS,0,0,2,14,0,0,0,0,0,1,0,0,0,0,0,0,0,'Eranikus - Waypont 4 reached - Set faction enemy'), +(@ERANIKUS,0,38,0,40,0,100,0,4,@ERANIKUS,0,0,8,2,0,0,0,0,0,1,0,0,0,0,0,0,0,'Eranikus - Waypont 4 - Set react state aggresive'), +(@ERANIKUS,0,11,0,2,0,100,0,30,65,12000,35000,12,@PHANTASM,3,600000,0,0,0,1,0,0,0,0,0,0,0,'Eranikus - In Combat - Summon Nightmare Phantasm'), +(@ERANIKUS,0,12,0,4,1,100,0,0,0,0,0,1,8,0,0,0,0,0,1,0,0,0,0,0,0,0,'Eranikus - On aggro - Say 8'), +(@ERANIKUS,0,13,0,4,0,100,0,0,0,0,0,8,2,0,0,0,0,0,1,0,0,0,0,0,0,0,'Eranikus - On aggro - Set react state aggresive'), +(@ERANIKUS,0,14,0,4,0,100,0,0,0,0,0,49,0,0,0,0,0,0,7,0,0,0,0,0,0,0,'Eranikus - On aggro - Start Attack'), +(@ERANIKUS,0,15,0,0,0,100,0,2000,4000,55000,60000,11,24818,0,0,0,0,0,2,0,0,0,0,0,0,0,'Eranikus - In Combat - Cast Noxious Breath'), +(@ERANIKUS,0,16,0,0,0,100,0,9000,14000,50000,55000,11,24839,0,0,0,0,0,2,0,0,0,0,0,0,0,'Eranikus - In Combat - Cast Acid Spit'), +(@ERANIKUS,0,17,0,0,0,100,0,10000,20000,15000,25000,11,22878,0,0,0,0,0,2,0,0,0,0,0,0,0,'Eranikus - In Combat - Cast Shadow Bolt Volley'), +(@ERANIKUS,0,18,0,2,0,100,1,0,70,0,0,12,@TYRANDE,3,3600000,0,0,0,8,0,0,0,7900.216,-2572.621,488.176,2.330,'Eranikus - At 70% - Summon Tyrande'), +(@ERANIKUS,0,34,0,2,0,100,1,0,69,0,0,1,0,0,0,0,0,0,11,@TYRANDE,30,0,0,0,0,0,'Eranikus - At 69% - Tyrande Say 0'), +(@ERANIKUS,0,35,0,2,0,100,1,0,30,0,0,1,1,0,0,0,0,0,11,@TYRANDE,30,0,0,0,0,0,'Eranikus - At 30% - Tyrande Say 1'), +(@ERANIKUS,0,19,0,2,0,100,1,0,25,0,0,1,9,0,0,0,0,0,1,0,0,0,0,0,0,0,'Eranikus - At 25% - Say 9'), +(@ERANIKUS,0,20,0,2,0,100,1,0,22,0,0,1,10,0,0,0,0,0,1,0,0,0,0,0,0,0,'Eranikus - At 22% - Say 10'), +(@ERANIKUS,0,21,0,2,0,100,1,0,20,0,0,1,11,0,0,0,0,0,1,0,0,0,0,0,0,0,'Eranikus - At 20% - Say 11'), +(@ERANIKUS,0,22,0,52,0,100,0,11,@ERANIKUS,0,0,2,35,0,0,0,0,0,1,0,0,0,0,0,0,0,'Eranikus - On Say 2 - Set faction friendly'), +(@ERANIKUS,0,23,0,52,0,100,0,11,@ERANIKUS,0,0,8,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'Eranikus - On Say 2 - Set react state passive'), +(@ERANIKUS,0,24,0,52,0,100,0,11,@ERANIKUS,0,0,18,33555200,0,0,0,0,0,1,0,0,0,0,0,0,0,'Eranikus - On Say 2 - Set unit flags'), +(@ERANIKUS,0,25,0,52,0,100,0,11,@ERANIKUS,0,0,20,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'Eranikus - On Say 2 - Stop AutoAttack'), +(@ERANIKUS,0,26,0,52,0,100,0,11,@ERANIKUS,0,0,1,12,3000,0,0,0,0,1,0,0,0,0,0,0,0,'Eranikus - Say 11 - Say 12'), +(@ERANIKUS,0,27,0,52,0,100,0,12,@ERANIKUS,0,0,12,@E_REDEEM,3,60000,0,0,0,8,0,0,0,7904.248,-2564.867,488.156,5.116,'Eranikus - On Say 12 - Summon Eranikus the Redeemed'), +(@ERANIKUS,0,28,0,52,0,100,0,12,@ERANIKUS,0,0,37,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'Eranikus - Say 12 - Kill'), +(@ERANIKUS,0,31,0,7,0,100,0,0,0,0,0,6,8736,0,0,0,0,0,18,40,0,0,0,0,0,0,'Eranikus - On Evade - Quest Fail'), +(@ERANIKUS,0,32,0,6,0,100,0,0,0,0,0,47,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'Eranikus - On Death - Set invisibility'), +(@ERANIKUS,0,33,0,40,0,100,0,5,@ERANIKUS,0,0,47,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'Eranikus - On WayPoint 5 - Set invisibility'), +(@ERANIKUS,0,36,0,40,0,100,0,5,@ERANIKUS,0,0,37,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'Eranikus - On WayPoint 5 - Die'), +(@ERANIKUS,0,37,0,40,0,100,0,5,@ERANIKUS,0,0,6,8736,0,0,0,0,0,18,40,0,0,0,0,0,0,'Eranikus - On WayPoint 5 - Quest Fail'); + +-- Tyrande SAI +DELETE FROM `smart_scripts` WHERE entryorguid IN (@TYRANDE); +INSERT INTO `smart_scripts` VALUES +(@TYRANDE,0,0,0,54,0,100,1,0,0,0,0,8,2,0,0,0,0,0,1,0,0,0,0,0,0,0,'Tyrande - On Summon - Set react state aggresive'), +(@TYRANDE,0,1,0,1,0,100,1,95000,95000,95000,95000,47,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'Tyrande - OOC 60 Sec - Set invisibility'), +(@TYRANDE,0,2,0,1,0,100,1,96000,96000,96000,96000,37,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'Tyrande - OOC 61 Sec - Kill'), +(@TYRANDE,0,3,0,0,0,100,0,1000,2000,2300,2500,11,21668,0,0,0,0,0,11,@ERANIKUS,20,0,0,0,0,0,'Tyrande - In Combat - Cast Starfall'); + +-- Eranikus the Redeemed SAI +UPDATE `creature_template` SET AIName='SmartAI', modelid1=6984 WHERE entry=@E_REDEEM; +DELETE FROM `smart_scripts` WHERE entryorguid IN(@E_REDEEM); +INSERT INTO `smart_scripts` VALUES +(@E_REDEEM,0,0,0,1,0,100,1,7000,7000,7000,7000,1,0,10000,0,0,0,0,1,0,0,0,0,0,0,0,'Eranikus the Redeemed - OOC 7 Secs - Say 0'), +(@E_REDEEM,0,1,0,52,0,100,0,0,@E_REDEEM,0,0,1,1,10000,0,0,0,0,1,0,0,0,0,0,0,0,'Eranikus the Redeemed - On Say 0 - Say 1'), +(@E_REDEEM,0,2,0,52,0,100,0,1,@E_REDEEM,0,0,1,2,10000,0,0,0,0,1,0,0,0,0,0,0,0,'Eranikus the Redeemed - On Say 1 - Say 2'), +(@E_REDEEM,0,3,0,52,0,100,0,2,@E_REDEEM,0,0,1,3,10000,0,0,0,0,1,0,0,0,0,0,0,0,'Eranikus the Redeemed - On Say 2 - Say 3'), +(@E_REDEEM,0,5,0,52,0,100,0,3,@E_REDEEM,0,0,15,8736,0,0,0,0,0,18,30,0,0,0,0,0,0,'Eranikus the Redeemed - On Say 3 - Credit'), +(@E_REDEEM,0,6,0,52,0,100,0,3,@E_REDEEM,0,0,45,1,1,0,0,0,0,11,@REMULOS,40,0,0,0,0,0,'Eranikus the Redeemed - On Say 3 - Set Data'); + +UPDATE `creature_template` SET AIName='SmartAI', Faction_A=14, Faction_H=14 WHERE entry=@PHANTASM; +DELETE FROM `smart_scripts` WHERE entryorguid IN(@PHANTASM); +INSERT INTO `smart_scripts` VALUES +(@PHANTASM,0,0,0,54,0,100,0,0,0,0,0,53,1,@PHANTASM,0,8736,0,0,1,0,0,0,0,0,0,0,'Nightmare Phantasm - Summon - Start WayPoint'), +(@PHANTASM,0,1,0,54,0,100,0,0,0,0,0,8,2,0,0,0,0,0,1,0,0,0,0,0,0,0,'Nightmare Phantasm - Summon - Aggresive'), +(@PHANTASM,0,2,0,54,0,100,0,0,0,0,0,49,0,0,0,0,0,0,18,50,0,0,0,0,0,0,'Nightmare Phantasm - Summon - Attack Player'), +(@PHANTASM,0,3,0,6,0,75,0,0,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'Nightmare Phantasm - Death - Say 0'), +(@PHANTASM,0,4,0,40,0,100,0,4,@PHANTASM,0,0,53,1,@PHANTASM,0,8736,0,0,1,0,0,0,0,0,0,0,'Nightmare Phantasm - WayPoint 20 - Start Again'), +(@PHANTASM,0,5,0,1,0,100,1,60000,60000,60000,60000,47,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'Nightmare Phantasm - OOC 60 Secs - Unseen'), +(@PHANTASM,0,6,0,1,0,100,1,63000,63000,63000,63000,41,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'Nightmare Phantasm - OOC 63 Secs - Despawn'), +(@PHANTASM,0,7,0,1,0,100,1,5000,5000,5000,5000,53,1,@PHANTASM,0,8736,0,0,1,0,0,0,0,0,0,0,'Nightmare Phantasm - OOC 5 Secs - Start WayPoint'); + +DELETE FROM `creature_template_addon` WHERE `entry`=@MALFURION; +INSERT INTO `creature_template_addon` (`entry`,`path_id`,`mount`,`bytes1`,`bytes2`,`emote`,`auras`) VALUES +(@MALFURION,0,0,33554432,0,0,'24999'); -- Malfurion's Shade Aura & Hover Mode + +DELETE FROM `creature_template_addon` WHERE `entry`=@ERANIKUS; +INSERT INTO `creature_template_addon` (`entry`,`path_id`,`mount`,`bytes1`,`bytes2`,`emote`,`auras`) VALUES +(@ERANIKUS,0,0,33554432,0,0,''); + +DELETE FROM `spell_target_position` WHERE `id`=25004; +INSERT INTO `spell_target_position` (`id`,`target_map`,`target_position_x`,`target_position_y`,`target_position_z`,`target_orientation`) VALUES +(25004,1,7730.5288,-2318.8596,451.34,0); + +-- Waypoints +DELETE FROM `waypoints` WHERE entry=@REMULOS; +INSERT INTO `waypoints` (`entry`,`pointid`,`position_x`,`position_y`,`position_z`,`point_comment`) VALUES +(@REMULOS,1,7829.66,-2244.87,463.87,'Keeper Remulos'), +(@REMULOS,2,7817.25,-2306.20,456.00,'Keeper Remulos'), +(@REMULOS,3,7866.54,-2312.20,463.32,'Keeper Remulos'), +(@REMULOS,4,7908.488,-2309.086,467.677,'Keeper Remulos'), +(@REMULOS,5,7933.290,-2314.777,473.674,'Keeper Remulos'), +(@REMULOS,6,7942.543457,-2320.170654,476.770355,'Keeper Remulos'), +(@REMULOS,7,7953.036133,-2357.953613,486.379303,'Keeper Remulos'), +(@REMULOS,8,7962.706055,-2411.155518,488.955231,'Keeper Remulos'), +(@REMULOS,9,7976.860352,-2552.697998,490.081390,'Keeper Remulos'), +(@REMULOS,10,7949.307617,-2569.120361,489.716248,'Keeper Remulos'), +(@REMULOS,11,7950.945801,-2597.000000,489.765564,'Keeper Remulos'), +(@REMULOS,12,7948.758301,-2610.823486,492.368988,'Keeper Remulos'), +(@REMULOS,13,7928.785156,-2629.920654,492.524933,'Keeper Remulos'), ## stop +(@REMULOS,14,7948.697754,-2610.551758,492.363983,'Keeper Remulos'), +(@REMULOS,15,7952.019531,-2591.974609,490.081238,'Keeper Remulos'), +(@REMULOS,16,7940.567871,-2577.845703,488.946808,'Keeper Remulos'), +(@REMULOS,17,7908.662109,-2566.450439,488.634644,'Keeper Remulos'), +(@REMULOS,18,7873.132324,-2567.422363,486.946442,'Keeper Remulos'), +(@REMULOS,19,7839.844238,-2570.598877,489.286224,'Keeper Remulos'), +(@REMULOS,20,7830.678597,-2572.878974,489.286224,'Keeper Remulos'), +(@REMULOS,21,7890.504,-2567.259,487.306,'Keeper Remulos'), +(@REMULOS,22,7906.447,-2566.105,488.435,'Keeper Remulos'), +(@REMULOS,23,7925.861,-2573.601,489.642,'Keeper Remulos'), +(@REMULOS,24,7912.283,-2568.500,488.891,'Keeper Remulos'); + +DELETE FROM `waypoints` WHERE `entry`=@REMULOS*100; +INSERT INTO `waypoints` (`entry`,`pointid`,`position_x`,`position_y`,`position_z`,`point_comment`) VALUES +(@REMULOS*100,1,7828.5752,-2246.8354,463.5159,'Keeper Remulos - WP1'), +(@REMULOS*100,2,7824.6440,-2279.0273,459.3173,'Keeper Remulos - WP2'), +(@REMULOS*100,3,7814.1699,-2302.2565,456.2227,'Keeper Remulos - WP3'), +(@REMULOS*100,4,7787.4604,-2320.9807,454.5470,'Keeper Remulos - WP4'), +(@REMULOS*100,5,7753.7495,-2319.0832,454.7066,'Keeper Remulos - WP5'), +(@REMULOS*100,6,7787.4604,-2320.9807,454.5470,'Keeper Remulos - WP6'), +(@REMULOS*100,7,7814.1699,-2302.2565,456.2227,'Keeper Remulos - WP7'), +(@REMULOS*100,8,7824.6440,-2279.0273,459.3173,'Keeper Remulos - WP8'), +(@REMULOS*100,9,7828.5752,-2246.8354,463.5159,'Keeper Remulos - WP9'), +(@REMULOS*100,10,7848.3,-2216.35,470.888,'Keeper Remulos - WP10 (Home)'); + + +-- Waypoints +DELETE FROM `waypoints` WHERE entry IN(@ERANIKUS); +INSERT INTO `waypoints` (`entry`,`pointid`,`position_x`,`position_y`,`position_z`,`point_comment`) VALUES +(@ERANIKUS,1,7949.812,-2605.4748,513.591,'Eranikus'), +(@ERANIKUS,2,7931.3330,-2575.2097,489.6286,'Eranikus'), +(@ERANIKUS,3,7925.129,-2573.747,493.901,'Eranikus'), +(@ERANIKUS,4,7910.554,-2565.5534,488.616,'Eranikus'), +(@ERANIKUS,5,7867.442,-2567.334,486.946,'Eranikus'); + + +-- Waypoints +DELETE FROM `waypoints` WHERE entry IN(@PHANTASM); +INSERT INTO `waypoints` (`entry`,`pointid`,`position_x`,`position_y`,`position_z`,`point_comment`) VALUES +(@PHANTASM,1,7891.990,-2566.737,487.385,'Phantasm'), +(@PHANTASM,2,7865.966,-2554.104,486.967,'Phantasm'), +(@PHANTASM,3,7901.544,-2581.989,487.178,'Phantasm'), +(@PHANTASM,4,7918.844,-2553.987,486.911,'Phantasm'), +(@PHANTASM,5,7873.412,-2587.454,486.946,'Phantasm'); + +-- Waypoints +DELETE FROM `waypoints` WHERE entry=@REMULOS*100+1; +INSERT INTO `waypoints` (`entry`,`pointid`,`position_x`,`position_y`,`position_z`,`point_comment`) VALUES +(@REMULOS*100+1,12,7847.066,-2217.571,470.403,'Keeper Remulos'), +(@REMULOS*100+1,11,7829.66,-2244.87,463.87,'Keeper Remulos'), +(@REMULOS*100+1,10,7817.25,-2306.20,456.00,'Keeper Remulos'), +(@REMULOS*100+1,9,7866.54,-2312.20,463.32,'Keeper Remulos'), +(@REMULOS*100+1,8,7908.488,-2309.086,467.677,'Keeper Remulos'), +(@REMULOS*100+1,7,7933.290,-2314.777,473.674,'Keeper Remulos'), +(@REMULOS*100+1,6,7942.543457,-2320.170654,476.770355,'Keeper Remulos'), +(@REMULOS*100+1,5,7953.036133,-2357.953613,486.379303,'Keeper Remulos'), +(@REMULOS*100+1,4,7962.706055,-2411.155518,488.955231,'Keeper Remulos'), +(@REMULOS*100+1,3,7976.860352,-2552.697998,490.081390,'Keeper Remulos'), +(@REMULOS*100+1,2,7949.307617,-2569.120361,489.716248,'Keeper Remulos'), +(@REMULOS*100+1,1,7940.567871,-2577.845703,488.946808,'Keeper Remulos'); + +-- Arch Druid Lilliandra +DELETE FROM `smart_scripts` WHERE entryorguid = 30630 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 +(30630, 0, 0, 1, 62, 0, 100, 0, 9991, 0, 0, 0, 85, 57536, 0, 0, 0, 0, 0, 19, 30630, 0, 0, 0, 0, 0, 0, 'Arch Druid Lilliandra - On gossip option select - Player Cast Forcecast Portal: Moonglade on Arch Druid Lilliandra'); + +-- Icecrown's Moonglade portal +DELETE FROM `npc_spellclick_spells` WHERE `npc_entry`=32790; +INSERT INTO `npc_spellclick_spells` (`npc_entry`, `spell_id`, `cast_flags`, `user_type`) VALUES +(32790,57654,1,0); + +DELETE FROM `smart_scripts` WHERE entryorguid IN (32790) AND `source_type` IN (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 +(32790, 0, 0, 1, 11, 0, 100, 0, 0, 0, 0, 0, 3, 0, 11686, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Moonglade Portal - On Respawn - Morph Into 0'), +(32790, 0, 1, 2, 61, 0, 100, 0, 0, 0, 0, 0, 11, 61722, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Moonglade Portal - On Respawn - Cast Nature Portal State'); + +-- Moonglade's return portal +DELETE FROM `npc_spellclick_spells` WHERE `npc_entry`=32788; +INSERT INTO `npc_spellclick_spells` (`npc_entry`, `spell_id`, `cast_flags`, `user_type`) VALUES +(32788,57539,1,0); + +DELETE FROM `smart_scripts` WHERE entryorguid IN (32788) AND `source_type` IN (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 +(32788, 0, 0, 1, 11, 0, 100, 0, 0, 0, 0, 0, 3, 0, 11686, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Moonglade Return Portal - On Respawn - Morph Into 0'), +(32788, 0, 1, 0, 61, 0, 100, 0, 0, 0, 0, 0, 11, 61722, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Moonglade Return Portal - On Respawn - Cast Nature Portal State'); + +-- Conditions for portals +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=18 AND `SourceEntry` IN (57654,57539); +INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES +(18, 32790, 57654, 0, 0, 28, 0, 13073, 0, 0, 0, 0, 0, '', 'Required quest active for spellclick'), +(18, 32788, 57539, 0, 0, 28, 0, 13075, 0, 0, 0, 0, 0, '', 'Required quest active for spellclick'); + +DELETE FROM `gossip_menu_option` WHERE `menu_id` IN (9991,10215); +INSERT INTO `gossip_menu_option` (`menu_id`, `id`, `option_icon`, `option_text`, `option_id`, `npc_option_npcflag`, `action_menu_id`, `action_poi_id`, `box_coded`, `box_money`, `box_text`) VALUES +(9991, 0, 0, 'It''s a pleasure to meet you as well, Arch Druid. I am on a task from Tirion and time is short, might I trouble you for a portal to Moonglade?', 1, 1, 9992, 0, 0, 0, ''), +(10215, 0, 0, 'Please send me into the Emerald Dream to recover the acorns. I know of the danger and I do not fear it.', 1, 1, 0, 0, 0, 0, ''), +(10215, 1, 0, 'I wish to return to Arch Druid Lilliandra. Can you send me back to her?', 1, 1, 0, 0, 0, 0, ''); + +-- Conditions for gossip +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=15 AND `SourceGroup` IN (9991,10215); +INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorType`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES +(15, 9991, 0, 0, 0, 28, 0, 13073, 0, 0, 0, 0, 0, '', 'Show gossip menu option only if player has quest 13073 complete'), +(15, 10215, 1, 0, 0, 28, 0, 13075, 0, 0, 0, 0, 0, '', 'Show gossip menu option only if player has quest 13075 complete'), +(15, 10215, 0, 0, 0, 9, 0, 13074, 0, 0, 0, 0, 0, '', 'Show gossip menu option only if player has quest 13074 taken'); diff --git a/sql/updates/world/2013_08_04_01_world_sai.sql b/sql/updates/world/2013_08_04_01_world_sai.sql new file mode 100644 index 00000000000..b327d567024 --- /dev/null +++ b/sql/updates/world/2013_08_04_01_world_sai.sql @@ -0,0 +1,21 @@ +SET @NPC := 7271; +DELETE FROM `creature_ai_scripts` WHERE creature_id=@NPC; +UPDATE `creature_template` SET `AIName`='SmartAI', `unit_flags`=32768 WHERE `entry`=@NPC; +DELETE FROM `smart_scripts` WHERE (`entryorguid`=@NPC 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 +(@NPC, 0, 0, 1, 10, 0, 100, 1, 0, 10, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Witch Doctor Zum''rah - On OOC Los - Say Line 0'), +(@NPC, 0, 1, 0, 61, 0, 100, 0, 0, 0, 0, 0, 2, 14, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Witch Doctor Zum''rah - On Link - Remove PC immunity'), +(@NPC, 0, 3, 0, 0, 0, 100, 0, 1000, 3000, 6000, 10000, 11, 12739, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 'Witch Doctor Zum''rah - IC - Cast Shadowbolt '), +(@NPC, 0, 4, 0, 2, 0, 100, 0, 30, 100, 30, 100, 23, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Witch Doctor Zum''rah - On mana pct above 30% - Decrement Phase'), +(@NPC, 0, 5, 0, 0, 0, 100, 0, 15, 0, 15, 0, 23, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Witch Doctor Zum''rah - On mana pct 15 - Decrement Phase'), +(@NPC, 0, 6, 0, 0, 0, 100, 0, 7000, 13000, 22000, 36000, 11, 15245, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 'Witch Doctor Zum''rah - IC - Cast Shadowbolt Volley'), +(@NPC, 0, 7, 0, 0, 0, 100, 0, 8000, 15000, 26000, 39000, 11, 11086, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Witch Doctor Zum''rah - IC - Cast Ward of Zum''rah '), +(@NPC, 0, 8, 0, 0, 0, 100, 0, 4000, 19000, 23000, 30000, 11, 12491, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Witch Doctor Zum''rah - IC - Cast Healing Wave'), +(@NPC, 0, 9, 10, 6, 0, 100, 1, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Witch Doctor Zum''rah - On Death - Yell'), +(@NPC, 0, 10, 0, 61, 0, 100, 0, 0, 0, 0, 0, 22, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Witch Doctor Zum''rah - On Death - Set Phase 0'), +(@NPC, 0, 11, 0, 7, 0, 100, 0, 0, 0, 0, 0, 2, 35, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Witch Doctor Zum''rah - On Evade - Set Friendly'); + +DELETE FROM `creature_text` WHERE `entry` =@NPC; +INSERT INTO `creature_text` (`entry`, `groupid`, `id`, `text`, `type`, `language`, `probability`, `emote`, `duration`, `sound`, `comment`) VALUES +(@NPC, 0, 0, 'How dare you enter my sanctum!', 12, 0, 100, 0, 0, 0, 'Witch Doctor Zum''rah'), +(@NPC, 1, 0, 'T''eif godehsi wha!', 14, 14, 100, 0, 0, 0, 'Witch Doctor Zum''rah'); diff --git a/sql/updates/world/2013_08_04_02_world_sai.sql b/sql/updates/world/2013_08_04_02_world_sai.sql new file mode 100644 index 00000000000..3cf828456c0 --- /dev/null +++ b/sql/updates/world/2013_08_04_02_world_sai.sql @@ -0,0 +1,45 @@ +-- Added missing gossip and text for Meridith the Mermaiden.Her gossip should now cast spell=25678 Siren's Song if player has Quest:Love_Song_for_Narain done, which will make players with quest Draconic for Dummies swim faster and not suffer from fatigue loss in waters. + +-- Meridith the Mermaiden NPC id (15526) +-- http://www.youtube.com/watch?v=8lz_LbsEsBQ Video of her giving spell on gossip select + +SET @MERIDITH := 15526; +SET @SPELL := 25678; -- http://www.wowhead.com/spell=25678 +SET @GOSSIP := 6658; +SET @NPCTEXT := 7916; +SET @NPCTEXT1 := 7917; +SET @QUEST := 8599; + +UPDATE `creature_template` SET `gossip_menu_id`=@GOSSIP WHERE `entry`=@MERIDITH; + +DELETE FROM `gossip_menu` WHERE `entry`=@GOSSIP AND `text_id` IN (@NPCTEXT,@NPCTEXT1); +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES +(@GOSSIP,@NPCTEXT), +(@GOSSIP,@NPCTEXT1); + +DELETE FROM `gossip_menu_option` WHERE `menu_id`=@GOSSIP; +INSERT INTO `gossip_menu_option` (`menu_id`,`id`,`option_icon`,`option_text`,`option_id`,`npc_option_npcflag`,`action_menu_id`,`action_poi_id`,`box_coded`,`box_money`,`box_text`) VALUES +(@GOSSIP,0,0,"That would be wonderful! Thank you, Meridith.",1,1,0,0,0,0,''); + +-- SAI for Meridith the Mermaiden +UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry`=@MERIDITH; + +DELETE FROM `smart_scripts` WHERE (`entryorguid`=15526 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 +(@MERIDITH,0,0,1,62,0,100,0,@GOSSIP,0,0,0,11,@SPELL,0,0,0,0,0,7,0,0,0,0,0,0,0,'Meridith the Mermaiden - On gossip select - Spellcast'), +(@MERIDITH,0,1,2,61,0,100,0,0,0,0,0,72,0,0,0,0,0,0,7,0,0,0,0,0,0,0,'Meridith the Mermaiden - On gossip select - Close Gossip'), +(@MERIDITH,0,2,0,61,0,100,0,0,0,0,0,1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'Meridith the Mermaiden - On Gossip select - Say'); + +-- Conditions for Spellcast +DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId` IN (14,15) AND `SourceGroup`=@GOSSIP; +INSERT INTO `conditions` (`SourceTypeOrReferenceId`, `SourceGroup`, `SourceEntry`, `SourceId`, `ElseGroup`, `ConditionTypeOrReference`, `ConditionTarget`, `ConditionValue1`, `ConditionValue2`, `ConditionValue3`, `NegativeCondition`, `ErrorTextId`, `ScriptName`, `Comment`) VALUES +(14,@GOSSIP,@NPCTEXT,0,0,8,0,@QUEST,0,0,1,0,'','Show text if player doesn''t have quest rewarded' ), +(14,@GOSSIP,@NPCTEXT1,0,0,8,0,@QUEST,0,0,0,0,'','Show text if player has quest rewarded'), +(15,@GOSSIP,0,0,0,8,0,@QUEST,0,0,0,0,'','Show gossip only if player has quest done'); + + +-- Creature text +DELETE FROM `npc_text` WHERE `ID` IN (@NPCTEXT,@NPCTEXT1); +INSERT INTO `npc_text` (`ID`, `text0_0`, `text0_1`, `lang0`, `prob0`, `em0_0`, `em0_1`, `em0_2`, `em0_3`, `em0_4`, `em0_5`, `text1_0`, `text1_1`, `lang1`, `prob1`, `em1_0`, `em1_1`, `em1_2`, `em1_3`, `em1_4`, `em1_5`, `text2_0`, `text2_1`, `lang2`, `prob2`, `em2_0`, `em2_1`, `em2_2`, `em2_3`, `em2_4`, `em2_5`, `text3_0`, `text3_1`, `lang3`, `prob3`, `em3_0`, `em3_1`, `em3_2`, `em3_3`, `em3_4`, `em3_5`, `text4_0`, `text4_1`, `lang4`, `prob4`, `em4_0`, `em4_1`, `em4_2`, `em4_3`, `em4_4`, `em4_5`, `text5_0`, `text5_1`, `lang5`, `prob5`, `em5_0`, `em5_1`, `em5_2`, `em5_3`, `em5_4`, `em5_5`, `text6_0`, `text6_1`, `lang6`, `prob6`, `em6_0`, `em6_1`, `em6_2`, `em6_3`, `em6_4`, `em6_5`, `text7_0`, `text7_1`, `lang7`, `prob7`, `em7_0`, `em7_1`, `em7_2`, `em7_3`, `em7_4`, `em7_5`, `WDBVerified`) VALUES +(@NPCTEXT, '', 'It''s so lovely to see you again, $N! I really can''t thank you enough for delivering that message to my dear little gnome.$B$BWould you like to hear a song? It will make traveling in the rough seas much easier!', 0, 1, 0, 0, 0, 0, 0, 0, '', '', 0, 0, 0, 0, 0, 0, 0, 0, '', '', 0, 0, 0, 0, 0, 0, 0, 0, '', '', 0, 0, 0, 0, 0, 0, 0, 0, '', '', 0, 0, 0, 0, 0, 0, 0, 0, '', '', 0, 0, 0, 0, 0, 0, 0, 0, '', '', 0, 0, 0, 0, 0, 0, 0, 0, '', '', 0, 0, 0, 0, 0, 0, 0, 0, 11723), +(@NPCTEXT1, '', 'I find the ocean floor to be very peaceful.', 0, 1, 0, 0, 0, 0, 0, 0, '', '', 0, 0, 0, 0, 0, 0, 0, 0, '', '', 0, 0, 0, 0, 0, 0, 0, 0, '', '', 0, 0, 0, 0, 0, 0, 0, 0, '', '', 0, 0, 0, 0, 0, 0, 0, 0, '', '', 0, 0, 0, 0, 0, 0, 0, 0, '', '', 0, 0, 0, 0, 0, 0, 0, 0, '', '', 0, 0, 0, 0, 0, 0, 0, 0, 11723); diff --git a/sql/updates/world/2013_08_04_03_world_sai.sql b/sql/updates/world/2013_08_04_03_world_sai.sql new file mode 100644 index 00000000000..bd82b937ed7 --- /dev/null +++ b/sql/updates/world/2013_08_04_03_world_sai.sql @@ -0,0 +1,20 @@ +-- Random comment + +UPDATE `creature_template` SET AIName='SmartAI' WHERE entry IN (26417*100,26417); +DELETE FROM `smart_scripts` WHERE source_type=0 AND entryorguid = 26417; +DELETE FROM `smart_scripts` WHERE (`entryorguid`= 26417*100 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 +(26417, 0, 0, 0, 8, 0, 25, 0, 47604, 0, 10000, 10000, 80, 2641700, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Runed Giant - Start Script for Free At Last'), +(2641700, 9, 0, 0, 0, 0, 100, 0, 0, 0, 0, 0, 2, 35, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Runed Giant - Change Faction'), +(2641700, 9, 1, 0, 0, 0, 100, 0, 0, 0, 0, 0, 20, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Runed Giant - Stop Attack'), +(2641700, 9, 2, 0, 0, 0, 100, 0, 1000, 1000, 0, 0, 33, 26783, 0, 0, 0, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 'Runed Giant - Quest Credit'), +(2641700, 9, 3, 0, 0, 0, 100, 0, 1000, 1000, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Runed Giant - Say Lines'), +(2641700, 9, 4, 0, 0, 0, 100, 0, 5000, 5000, 0, 0, 41, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Runed Giant - Despawn'), +(2641700, 9, 5, 0, 0, 0, 100, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 'Runed Giant - Reset Faction'); + +DELETE FROM `creature_text` WHERE `entry` =26417; +INSERT INTO `creature_text` (`entry`, `groupid`, `id`, `text`, `type`, `language`, `probability`, `emote`, `duration`, `sound`, `comment`) VALUES +(26417, 0, 0, 'I thought I was doomed. Thank you for freeing me.', 12, 0, 100, 0, 0, 0, ''), +(26417, 0, 1, 'You have my gratitude.', 12, 0, 100, 0, 0, 0, ''), +(26417, 0, 2, 'I never thought I''d be free from that terrible spell!', 12, 0, 100, 0, 0, 0, ''), +(26417, 0, 3, 'Thank you, small one.', 12, 0, 100, 0, 0, 0, ''); diff --git a/sql/updates/world/2013_08_04_04_world_trinity_string.sql b/sql/updates/world/2013_08_04_04_world_trinity_string.sql new file mode 100644 index 00000000000..cab49ba73f3 --- /dev/null +++ b/sql/updates/world/2013_08_04_04_world_trinity_string.sql @@ -0,0 +1,3 @@ +DELETE FROM `trinity_string` WHERE `entry`=5037; +INSERT INTO `trinity_string` (`entry`, `content_default`, `content_loc1`, `content_loc2`, `content_loc3`, `content_loc4`, `content_loc5`, `content_loc6`, `content_loc7`, `content_loc8`) VALUES +(5037, 'MechanicImmuneMask: %u', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL); diff --git a/sql/updates/world/2013_08_05_00_world_sai.sql b/sql/updates/world/2013_08_05_00_world_sai.sql new file mode 100644 index 00000000000..05a675394c2 --- /dev/null +++ b/sql/updates/world/2013_08_05_00_world_sai.sql @@ -0,0 +1,3 @@ +-- Fix Redridge Mystic +DELETE FROM `smart_scripts` WHERE `entryorguid`=430 AND `id`=12; +UPDATE `smart_scripts` SET `link`=0 WHERE `entryorguid`=430 AND `id`=11; diff --git a/sql/updates/world/2013_08_05_01_world_misc.sql b/sql/updates/world/2013_08_05_01_world_misc.sql new file mode 100644 index 00000000000..a1e9aee50e7 --- /dev/null +++ b/sql/updates/world/2013_08_05_01_world_misc.sql @@ -0,0 +1,2 @@ +UPDATE `smart_scripts` SET `event_type`=2 WHERE `entryorguid`=7271 AND `source_type`=0 AND `id`=5 AND `link`=0; +UPDATE `creature_template` SET `AIName`='SmartAI', `ScriptName`='', `InhabitType`=7, `faction_A`=35, `faction_H`=35, `unit_flags`=0, `type_flags`=8, `dynamicflags`=128, `flags_extra`=0, `speed_walk`=2 WHERE `entry`= 15491; diff --git a/sql/updates/world/2013_08_05_01_world_trinity_string.sql b/sql/updates/world/2013_08_05_01_world_trinity_string.sql new file mode 100644 index 00000000000..7e9a465d49a --- /dev/null +++ b/sql/updates/world/2013_08_05_01_world_trinity_string.sql @@ -0,0 +1,8 @@ +DELETE FROM `trinity_string` WHERE `entry`=5038; +INSERT INTO `trinity_string` (`entry`, `content_default`, `content_loc1`, `content_loc2`, `content_loc3`, `content_loc4`, `content_loc5`, `content_loc6`, `content_loc7`, `content_loc8`) VALUES +(5038, 'Unit Flags: %u', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL); + +UPDATE `trinity_string` SET `content_default`= +'Unit Flags 2: %u. +Dynamic Flags: %u. +Faction Template: %u.' WHERE `entry`=542; diff --git a/sql/updates/world/2013_08_05_02_world_quest_relation_tables.sql b/sql/updates/world/2013_08_05_02_world_quest_relation_tables.sql new file mode 100644 index 00000000000..a7d2af1725a --- /dev/null +++ b/sql/updates/world/2013_08_05_02_world_quest_relation_tables.sql @@ -0,0 +1,28 @@ +ALTER TABLE `creature_questrelation` RENAME `creature_queststarter`; +ALTER TABLE `creature_involvedrelation` RENAME `creature_questender`; +ALTER TABLE `gameobject_questrelation` RENAME `gameobject_queststarter`; +ALTER TABLE `gameobject_involvedrelation` RENAME `gameobject_questender`; + +UPDATE `command` SET + `name` = 'reload gameobject_queststarter', + `help` = 'Syntax: .reload gameobject_queststarter\nReload gameobject_queststarter table.' +WHERE + `name` = 'reload gameobject_questrelation'; + +UPDATE `command` SET + `name` = 'reload gameobject_questender', + `help` = 'Syntax: .reload gameobject_questender\nReload gameobject_questender table.' +WHERE + `name` = 'reload gameobject_questrelation'; + +UPDATE `command` SET + `name` = 'reload creature_queststarter', + `help` = 'Syntax: .reload creature_queststarter\nReload creature_queststarter table.' +WHERE + `name` = 'reload creature_questrelation'; + +UPDATE `command` SET + `name` = 'reload creature_questender', + `help` = 'Syntax: .reload creature_questender\nReload creature_questender table.' +WHERE + `name` = 'reload creature_involvedrelation'; diff --git a/sql/updates/world/2013_08_06_00_world_item_template.sql b/sql/updates/world/2013_08_06_00_world_item_template.sql new file mode 100644 index 00000000000..15cc7ddfa5a --- /dev/null +++ b/sql/updates/world/2013_08_06_00_world_item_template.sql @@ -0,0 +1 @@ +UPDATE `item_template` SET `spellcharges_1`=-1 WHERE `entry`=45008; -- confirmed in 4.x itemsparse diff --git a/src/server/game/Battlegrounds/Battleground.h b/src/server/game/Battlegrounds/Battleground.h index 52f86b98b79..dcca0804977 100644 --- a/src/server/game/Battlegrounds/Battleground.h +++ b/src/server/game/Battlegrounds/Battleground.h @@ -29,6 +29,17 @@ class Group; class Player; class WorldPacket; class BattlegroundMap; +class BattlegroundAV; +class BattlegroundWS; +class BattlegroundAB; +class BattlegroundNA; +class BattlegroundBE; +class BattlegroundEY; +class BattlegroundRL; +class BattlegroundSA; +class BattlegroundDS; +class BattlegroundRV; +class BattlegroundIC; struct PvPDifficultyEntry; struct WorldSafeLocsEntry; @@ -534,6 +545,39 @@ class Battleground virtual uint32 GetPrematureWinner(); + BattlegroundAV* ToBattlegroundAV() { if (GetTypeID() == BATTLEGROUND_AV) return reinterpret_cast<BattlegroundAV*>(this); else return NULL; } + BattlegroundAV const* ToBattlegroundAV() const { if (GetTypeID() == BATTLEGROUND_AV) return reinterpret_cast<const BattlegroundAV*>(this); else return NULL; } + + BattlegroundWS* ToBattlegroundWS() { if (GetTypeID() == BATTLEGROUND_WS) return reinterpret_cast<BattlegroundWS*>(this); else return NULL; } + BattlegroundWS const* ToBattlegroundWS() const { if (GetTypeID() == BATTLEGROUND_WS) return reinterpret_cast<const BattlegroundWS*>(this); else return NULL; } + + BattlegroundAB* ToBattlegroundAB() { if (GetTypeID() == BATTLEGROUND_AB) return reinterpret_cast<BattlegroundAB*>(this); else return NULL; } + BattlegroundAB const* ToBattlegroundAB() const { if (GetTypeID() == BATTLEGROUND_AB) return reinterpret_cast<const BattlegroundAB*>(this); else return NULL; } + + BattlegroundNA* ToBattlegroundNA() { if (GetTypeID() == BATTLEGROUND_NA) return reinterpret_cast<BattlegroundNA*>(this); else return NULL; } + BattlegroundNA const* ToBattlegroundNA() const { if (GetTypeID() == BATTLEGROUND_NA) return reinterpret_cast<const BattlegroundNA*>(this); else return NULL; } + + BattlegroundBE* ToBattlegroundBE() { if (GetTypeID() == BATTLEGROUND_BE) return reinterpret_cast<BattlegroundBE*>(this); else return NULL; } + BattlegroundBE const* ToBattlegroundBE() const { if (GetTypeID() == BATTLEGROUND_BE) return reinterpret_cast<const BattlegroundBE*>(this); else return NULL; } + + BattlegroundEY* ToBattlegroundEY() { if (GetTypeID() == BATTLEGROUND_EY) return reinterpret_cast<BattlegroundEY*>(this); else return NULL; } + BattlegroundEY const* ToBattlegroundEY() const { if (GetTypeID() == BATTLEGROUND_EY) return reinterpret_cast<const BattlegroundEY*>(this); else return NULL; } + + BattlegroundRL* ToBattlegroundRL() { if (GetTypeID() == BATTLEGROUND_RL) return reinterpret_cast<BattlegroundRL*>(this); else return NULL; } + BattlegroundRL const* ToBattlegroundRL() const { if (GetTypeID() == BATTLEGROUND_RL) return reinterpret_cast<const BattlegroundRL*>(this); else return NULL; } + + BattlegroundSA* ToBattlegroundSA() { if (GetTypeID() == BATTLEGROUND_SA) return reinterpret_cast<BattlegroundSA*>(this); else return NULL; } + BattlegroundSA const* ToBattlegroundSA() const { if (GetTypeID() == BATTLEGROUND_SA) return reinterpret_cast<const BattlegroundSA*>(this); else return NULL; } + + BattlegroundDS* ToBattlegroundDS() { if (GetTypeID() == BATTLEGROUND_DS) return reinterpret_cast<BattlegroundDS*>(this); else return NULL; } + BattlegroundDS const* ToBattlegroundDS() const { if (GetTypeID() == BATTLEGROUND_DS) return reinterpret_cast<const BattlegroundDS*>(this); else return NULL; } + + BattlegroundRV* ToBattlegroundRV() { if (GetTypeID() == BATTLEGROUND_RV) return reinterpret_cast<BattlegroundRV*>(this); else return NULL; } + BattlegroundRV const* ToBattlegroundRV() const { if (GetTypeID() == BATTLEGROUND_RV) return reinterpret_cast<const BattlegroundRV*>(this); else return NULL; } + + BattlegroundIC* ToBattlegroundIC() { if (GetTypeID() == BATTLEGROUND_IC) return reinterpret_cast<BattlegroundIC*>(this); else return NULL; } + BattlegroundIC const* ToBattlegroundIC() const { if (GetTypeID() == BATTLEGROUND_IC) return reinterpret_cast<const BattlegroundIC*>(this); else return NULL; } + protected: // this method is called, when BG cannot spawn its own spirit guide, or something is wrong, It correctly ends Battleground void EndNow(); diff --git a/src/server/game/Entities/GameObject/GameObject.cpp b/src/server/game/Entities/GameObject/GameObject.cpp index 0915d19cdfa..31e625ae3e1 100644 --- a/src/server/game/Entities/GameObject/GameObject.cpp +++ b/src/server/game/Entities/GameObject/GameObject.cpp @@ -952,7 +952,7 @@ bool GameObject::ActivateToQuest(Player* target) const //look for battlegroundAV for some objects which are only activated after mine gots captured by own team if (GetEntry() == BG_AV_OBJECTID_MINE_N || GetEntry() == BG_AV_OBJECTID_MINE_S) if (Battleground* bg = target->GetBattleground()) - if (bg->GetTypeID(true) == BATTLEGROUND_AV && !(((BattlegroundAV*)bg)->PlayerCanDoMineQuest(GetEntry(), target->GetTeam()))) + if (bg->GetTypeID(true) == BATTLEGROUND_AV && !bg->ToBattlegroundAV()->PlayerCanDoMineQuest(GetEntry(), target->GetTeam())) return false; return true; } diff --git a/src/server/game/Entities/Item/Item.cpp b/src/server/game/Entities/Item/Item.cpp index d87e1e8fbbc..ed4341dea8a 100644 --- a/src/server/game/Entities/Item/Item.cpp +++ b/src/server/game/Entities/Item/Item.cpp @@ -1278,7 +1278,7 @@ void Item::ItemContainerSaveLootToDB() stmt_items->setBool(6, _li->is_counted); stmt_items->setBool(7, _li->is_underthreshold); stmt_items->setBool(8, _li->needs_quest); - stmt_items->setUInt32(9, _li->randomPropertyId); + stmt_items->setInt32(9, _li->randomPropertyId); stmt_items->setUInt32(10, _li->randomSuffix); trans->Append(stmt_items); } @@ -1339,7 +1339,7 @@ bool Item::ItemContainerLoadLootFromDB() loot_item.canSave = true; loot_item.is_underthreshold = fields[6].GetBool(); loot_item.needs_quest = fields[7].GetBool(); - loot_item.randomPropertyId = fields[8].GetUInt32(); + loot_item.randomPropertyId = fields[8].GetInt32(); loot_item.randomSuffix = fields[9].GetUInt32(); // Copy the extra loot conditions from the item in the loot template diff --git a/src/server/game/Entities/Player/Player.cpp b/src/server/game/Entities/Player/Player.cpp index 37f9b0c4b21..ac8b7d92f21 100644 --- a/src/server/game/Entities/Player/Player.cpp +++ b/src/server/game/Entities/Player/Player.cpp @@ -8773,13 +8773,19 @@ void Player::SendLoot(uint64 guid, LootType loot_type) /// @todo fix this big hack if ((go->GetEntry() == BG_AV_OBJECTID_MINE_N || go->GetEntry() == BG_AV_OBJECTID_MINE_S)) + { if (Battleground* bg = GetBattleground()) + { if (bg->GetTypeID(true) == BATTLEGROUND_AV) - if (!(((BattlegroundAV*)bg)->PlayerCanDoMineQuest(go->GetEntry(), GetTeam()))) + { + if (!bg->ToBattlegroundAV()->PlayerCanDoMineQuest(go->GetEntry(), GetTeam())) { SendLootRelease(guid); return; } + } + } + } if (lootid) { @@ -26266,6 +26272,31 @@ float Player::GetCollisionHeight(bool mounted) const } } +std::string Player::GetMapAreaAndZoneString() +{ + uint32 areaId = GetAreaId(); + std::string areaName = "Unknown"; + std::string zoneName = "Unknown"; + if (AreaTableEntry const* area = GetAreaEntryByAreaID(areaId)) + { + int locale = GetSession()->GetSessionDbcLocale(); + areaName = area->area_name[locale]; + if (AreaTableEntry const* zone = GetAreaEntryByAreaID(area->zone)) + zoneName = zone->area_name[locale]; + } + + std::ostringstream str; + str << "Map: " << GetMapId() << " (" << (FindMap() ? FindMap()->GetMapName() : "Unknown") << ") Area: " << areaId << " (" << areaName.c_str() << ") Zone: " << zoneName.c_str(); + return str.str(); +} + +std::string Player::GetCoordsMapAreaAndZoneString() +{ + std::ostringstream str; + str << Position::ToString() << " " << GetMapAreaAndZoneString(); + return str.str(); +} + Guild* Player::GetGuild() { uint32 guildId = GetGuildId(); diff --git a/src/server/game/Entities/Player/Player.h b/src/server/game/Entities/Player/Player.h index 7500755a101..550a48bfe8a 100644 --- a/src/server/game/Entities/Player/Player.h +++ b/src/server/game/Entities/Player/Player.h @@ -2291,6 +2291,9 @@ class Player : public Unit, public GridObject<Player> //! Return collision height sent to client float GetCollisionHeight(bool mounted) const; + std::string GetMapAreaAndZoneString(); + std::string GetCoordsMapAreaAndZoneString(); + protected: // Gamemaster whisper whitelist WhisperListContainer WhisperList; diff --git a/src/server/game/Entities/Unit/Unit.h b/src/server/game/Entities/Unit/Unit.h index 8a1eb78250b..56f4e7142a2 100644 --- a/src/server/game/Entities/Unit/Unit.h +++ b/src/server/game/Entities/Unit/Unit.h @@ -628,7 +628,8 @@ enum UnitFlags UNIT_FLAG_UNK_28 = 0x10000000, UNIT_FLAG_UNK_29 = 0x20000000, // used in Feing Death spell UNIT_FLAG_SHEATHE = 0x40000000, - UNIT_FLAG_UNK_31 = 0x80000000 + UNIT_FLAG_UNK_31 = 0x80000000, + MAX_UNIT_FLAGS = 33 }; // Value masks for UNIT_FIELD_FLAGS_2 diff --git a/src/server/game/Globals/ObjectMgr.cpp b/src/server/game/Globals/ObjectMgr.cpp index 33003de4e6d..88a8664e8a4 100644 --- a/src/server/game/Globals/ObjectMgr.cpp +++ b/src/server/game/Globals/ObjectMgr.cpp @@ -7212,59 +7212,59 @@ void ObjectMgr::LoadQuestRelationsHelper(QuestRelations& map, std::string const& TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, ">> Loaded %u quest relations from %s in %u ms", count, table.c_str(), GetMSTimeDiffToNow(oldMSTime)); } -void ObjectMgr::LoadGameobjectQuestRelations() +void ObjectMgr::LoadGameobjectQuestStarters() { - LoadQuestRelationsHelper(_goQuestRelations, "gameobject_questrelation", true, true); + LoadQuestRelationsHelper(_goQuestRelations, "gameobject_queststarter", true, true); for (QuestRelations::iterator itr = _goQuestRelations.begin(); itr != _goQuestRelations.end(); ++itr) { GameObjectTemplate const* goInfo = GetGameObjectTemplate(itr->first); if (!goInfo) - TC_LOG_ERROR(LOG_FILTER_SQL, "Table `gameobject_questrelation` have data for not existed gameobject entry (%u) and existed quest %u", itr->first, itr->second); + TC_LOG_ERROR(LOG_FILTER_SQL, "Table `gameobject_queststarter` have data for not existed gameobject entry (%u) and existed quest %u", itr->first, itr->second); else if (goInfo->type != GAMEOBJECT_TYPE_QUESTGIVER) - TC_LOG_ERROR(LOG_FILTER_SQL, "Table `gameobject_questrelation` have data gameobject entry (%u) for quest %u, but GO is not GAMEOBJECT_TYPE_QUESTGIVER", itr->first, itr->second); + TC_LOG_ERROR(LOG_FILTER_SQL, "Table `gameobject_queststarter` have data gameobject entry (%u) for quest %u, but GO is not GAMEOBJECT_TYPE_QUESTGIVER", itr->first, itr->second); } } -void ObjectMgr::LoadGameobjectInvolvedRelations() +void ObjectMgr::LoadGameobjectQuestEnders() { - LoadQuestRelationsHelper(_goQuestInvolvedRelations, "gameobject_involvedrelation", false, true); + LoadQuestRelationsHelper(_goQuestInvolvedRelations, "gameobject_questender", false, true); for (QuestRelations::iterator itr = _goQuestInvolvedRelations.begin(); itr != _goQuestInvolvedRelations.end(); ++itr) { GameObjectTemplate const* goInfo = GetGameObjectTemplate(itr->first); if (!goInfo) - TC_LOG_ERROR(LOG_FILTER_SQL, "Table `gameobject_involvedrelation` have data for not existed gameobject entry (%u) and existed quest %u", itr->first, itr->second); + TC_LOG_ERROR(LOG_FILTER_SQL, "Table `gameobject_questender` have data for not existed gameobject entry (%u) and existed quest %u", itr->first, itr->second); else if (goInfo->type != GAMEOBJECT_TYPE_QUESTGIVER) - TC_LOG_ERROR(LOG_FILTER_SQL, "Table `gameobject_involvedrelation` have data gameobject entry (%u) for quest %u, but GO is not GAMEOBJECT_TYPE_QUESTGIVER", itr->first, itr->second); + TC_LOG_ERROR(LOG_FILTER_SQL, "Table `gameobject_questender` have data gameobject entry (%u) for quest %u, but GO is not GAMEOBJECT_TYPE_QUESTGIVER", itr->first, itr->second); } } -void ObjectMgr::LoadCreatureQuestRelations() +void ObjectMgr::LoadCreatureQuestStarters() { - LoadQuestRelationsHelper(_creatureQuestRelations, "creature_questrelation", true, false); + LoadQuestRelationsHelper(_creatureQuestRelations, "creature_queststarter", true, false); for (QuestRelations::iterator itr = _creatureQuestRelations.begin(); itr != _creatureQuestRelations.end(); ++itr) { CreatureTemplate const* cInfo = GetCreatureTemplate(itr->first); if (!cInfo) - TC_LOG_ERROR(LOG_FILTER_SQL, "Table `creature_questrelation` have data for not existed creature entry (%u) and existed quest %u", itr->first, itr->second); + TC_LOG_ERROR(LOG_FILTER_SQL, "Table `creature_queststarter` have data for not existed creature entry (%u) and existed quest %u", itr->first, itr->second); else if (!(cInfo->npcflag & UNIT_NPC_FLAG_QUESTGIVER)) - TC_LOG_ERROR(LOG_FILTER_SQL, "Table `creature_questrelation` has creature entry (%u) for quest %u, but npcflag does not include UNIT_NPC_FLAG_QUESTGIVER", itr->first, itr->second); + TC_LOG_ERROR(LOG_FILTER_SQL, "Table `creature_queststarter` has creature entry (%u) for quest %u, but npcflag does not include UNIT_NPC_FLAG_QUESTGIVER", itr->first, itr->second); } } -void ObjectMgr::LoadCreatureInvolvedRelations() +void ObjectMgr::LoadCreatureQuestEnders() { - LoadQuestRelationsHelper(_creatureQuestInvolvedRelations, "creature_involvedrelation", false, false); + LoadQuestRelationsHelper(_creatureQuestInvolvedRelations, "creature_questender", false, false); for (QuestRelations::iterator itr = _creatureQuestInvolvedRelations.begin(); itr != _creatureQuestInvolvedRelations.end(); ++itr) { CreatureTemplate const* cInfo = GetCreatureTemplate(itr->first); if (!cInfo) - TC_LOG_ERROR(LOG_FILTER_SQL, "Table `creature_involvedrelation` have data for not existed creature entry (%u) and existed quest %u", itr->first, itr->second); + TC_LOG_ERROR(LOG_FILTER_SQL, "Table `creature_questender` have data for not existed creature entry (%u) and existed quest %u", itr->first, itr->second); else if (!(cInfo->npcflag & UNIT_NPC_FLAG_QUESTGIVER)) - TC_LOG_ERROR(LOG_FILTER_SQL, "Table `creature_involvedrelation` has creature entry (%u) for quest %u, but npcflag does not include UNIT_NPC_FLAG_QUESTGIVER", itr->first, itr->second); + TC_LOG_ERROR(LOG_FILTER_SQL, "Table `creature_questender` has creature entry (%u) for quest %u, but npcflag does not include UNIT_NPC_FLAG_QUESTGIVER", itr->first, itr->second); } } diff --git a/src/server/game/Globals/ObjectMgr.h b/src/server/game/Globals/ObjectMgr.h index ddabc56fbb6..aad699fe9c1 100644 --- a/src/server/game/Globals/ObjectMgr.h +++ b/src/server/game/Globals/ObjectMgr.h @@ -851,21 +851,21 @@ class ObjectMgr } void LoadQuests(); - void LoadQuestRelations() + void LoadQuestStartersAndEnders() { TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, "Loading GO Start Quest Data..."); - LoadGameobjectQuestRelations(); + LoadGameobjectQuestStarters(); TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, "Loading GO End Quest Data..."); - LoadGameobjectInvolvedRelations(); + LoadGameobjectQuestEnders(); TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, "Loading Creature Start Quest Data..."); - LoadCreatureQuestRelations(); + LoadCreatureQuestStarters(); TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, "Loading Creature End Quest Data..."); - LoadCreatureInvolvedRelations(); + LoadCreatureQuestEnders(); } - void LoadGameobjectQuestRelations(); - void LoadGameobjectInvolvedRelations(); - void LoadCreatureQuestRelations(); - void LoadCreatureInvolvedRelations(); + void LoadGameobjectQuestStarters(); + void LoadGameobjectQuestEnders(); + void LoadCreatureQuestStarters(); + void LoadCreatureQuestEnders(); QuestRelations* GetGOQuestRelationMap() { diff --git a/src/server/game/Handlers/QuestHandler.cpp b/src/server/game/Handlers/QuestHandler.cpp index 6cd999bc496..cee5b3d1164 100644 --- a/src/server/game/Handlers/QuestHandler.cpp +++ b/src/server/game/Handlers/QuestHandler.cpp @@ -530,7 +530,7 @@ void WorldSession::HandleQuestgiverCompleteQuest(WorldPacket& recvData) if (_player->InBattleground()) if (Battleground* bg = _player->GetBattleground()) if (bg->GetTypeID() == BATTLEGROUND_AV) - ((BattlegroundAV*)bg)->HandleQuestComplete(questId, _player); + bg->ToBattlegroundAV()->HandleQuestComplete(questId, _player); if (_player->GetQuestStatus(questId) != QUEST_STATUS_COMPLETE) { diff --git a/src/server/game/Miscellaneous/Language.h b/src/server/game/Miscellaneous/Language.h index 0da63a61b43..772d5bcfb75 100644 --- a/src/server/game/Miscellaneous/Language.h +++ b/src/server/game/Miscellaneous/Language.h @@ -1083,7 +1083,9 @@ enum TrinityStrings LANG_COMMAND_NO_OUTDOOR_PVP_FORUND = 5034, LANG_CALL_FOR_HELP = 5035, LANG_NPCINFO_EQUIPMENT = 5036, - // Room for more Trinity strings 5037-9999 + LANG_NPCINFO_MECHANIC_IMMUNE = 5037, + LANG_NPCINFO_UNIT_FIELD_FLAGS = 5038, + // Room for more Trinity strings 5039-9999 // Level requirement notifications LANG_SAY_REQ = 6604, diff --git a/src/server/game/Miscellaneous/SharedDefines.h b/src/server/game/Miscellaneous/SharedDefines.h index 4d5245cffb1..e561d37ed36 100644 --- a/src/server/game/Miscellaneous/SharedDefines.h +++ b/src/server/game/Miscellaneous/SharedDefines.h @@ -1233,7 +1233,8 @@ enum Mechanics MECHANIC_DISCOVERY = 28, MECHANIC_IMMUNE_SHIELD = 29, // Divine (Blessing) Shield/Protection and Ice Block MECHANIC_SAPPED = 30, - MECHANIC_ENRAGED = 31 + MECHANIC_ENRAGED = 31, + MAX_MECHANIC = 32 }; // Used for spell 42292 Immune Movement Impairment and Loss of Control (0x49967ca6) diff --git a/src/server/game/Spells/SpellMgr.cpp b/src/server/game/Spells/SpellMgr.cpp index 42d408ebbad..db0102f4307 100644 --- a/src/server/game/Spells/SpellMgr.cpp +++ b/src/server/game/Spells/SpellMgr.cpp @@ -1136,7 +1136,7 @@ bool SpellArea::IsFitToRequirements(Player const* player, uint32 newZone, uint32 uint8 nodeType = spellId == 68719 ? NODE_TYPE_REFINERY : NODE_TYPE_QUARRY; uint8 nodeState = player->GetTeamId() == TEAM_ALLIANCE ? NODE_STATE_CONTROLLED_A : NODE_STATE_CONTROLLED_H; - BattlegroundIC* pIC = static_cast<BattlegroundIC*>(player->GetBattleground()); + BattlegroundIC* pIC = player->GetBattleground()->ToBattlegroundIC(); if (pIC->GetNodeState(nodeType) == nodeState) return true; diff --git a/src/server/game/World/World.cpp b/src/server/game/World/World.cpp index 159d315e808..410fbee9931 100644 --- a/src/server/game/World/World.cpp +++ b/src/server/game/World/World.cpp @@ -1460,8 +1460,8 @@ void World::SetInitialWorldSettings() TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, "Loading Quest POI"); sObjectMgr->LoadQuestPOI(); - TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, "Loading Quests Relations..."); - sObjectMgr->LoadQuestRelations(); // must be after quest load + TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, "Loading Quests Starters and Enders..."); + sObjectMgr->LoadQuestStartersAndEnders(); // must be after quest load TC_LOG_INFO(LOG_FILTER_SERVER_LOADING, "Loading Objects Pooling Data..."); sPoolMgr->LoadFromDB(); diff --git a/src/server/scripts/Commands/cs_npc.cpp b/src/server/scripts/Commands/cs_npc.cpp index 939075690c9..f708acc3dee 100644 --- a/src/server/scripts/Commands/cs_npc.cpp +++ b/src/server/scripts/Commands/cs_npc.cpp @@ -41,7 +41,7 @@ struct NpcFlagText #define NPCFLAG_COUNT 24 -const NpcFlagText npcFlagTexts[NPCFLAG_COUNT] = +NpcFlagText const npcFlagTexts[NPCFLAG_COUNT] = { { UNIT_NPC_FLAG_AUCTIONEER, LANG_NPCINFO_AUCTIONEER }, { UNIT_NPC_FLAG_BANKER, LANG_NPCINFO_BANKER }, @@ -69,6 +69,91 @@ const NpcFlagText npcFlagTexts[NPCFLAG_COUNT] = { UNIT_NPC_FLAG_VENDOR_REAGENT, LANG_NPCINFO_VENDOR_REAGENT } }; +struct MechanicImmune +{ + uint32 flag; + char const* text; +}; + +MechanicImmune const mechanicImmunes[MAX_MECHANIC] = +{ + { MECHANIC_NONE , "MECHANIC_NONE" }, + { MECHANIC_CHARM , "MECHANIC_CHARM" }, + { MECHANIC_DISORIENTED , "MECHANIC_DISORIENTED" }, + { MECHANIC_DISARM , "MECHANIC_DISARM" }, + { MECHANIC_DISTRACT , "MECHANIC_DISTRACT" }, + { MECHANIC_FEAR , "MECHANIC_FEAR" }, + { MECHANIC_GRIP , "MECHANIC_GRIP" }, + { MECHANIC_ROOT , "MECHANIC_ROOT" }, + { MECHANIC_SLOW_ATTACK , "MECHANIC_SLOW_ATTACK" }, + { MECHANIC_SILENCE , "MECHANIC_SILENCE" }, + { MECHANIC_SLEEP , "MECHANIC_SLEEP" }, + { MECHANIC_SNARE , "MECHANIC_SNARE" }, + { MECHANIC_STUN , "MECHANIC_STUN" }, + { MECHANIC_FREEZE , "MECHANIC_FREEZE" }, + { MECHANIC_KNOCKOUT , "MECHANIC_KNOCKOUT" }, + { MECHANIC_BLEED , "MECHANIC_BLEED" }, + { MECHANIC_BANDAGE , "MECHANIC_BANDAGE" }, + { MECHANIC_POLYMORPH , "MECHANIC_POLYMORPH" }, + { MECHANIC_BANISH , "MECHANIC_BANISH" }, + { MECHANIC_SHIELD , "MECHANIC_SHIELD" }, + { MECHANIC_SHACKLE , "MECHANIC_SHACKLE" }, + { MECHANIC_MOUNT , "MECHANIC_MOUNT" }, + { MECHANIC_INFECTED , "MECHANIC_INFECTED" }, + { MECHANIC_TURN , "MECHANIC_TURN" }, + { MECHANIC_HORROR , "MECHANIC_HORROR" }, + { MECHANIC_INVULNERABILITY , "MECHANIC_INVULNERABILITY" }, + { MECHANIC_INTERRUPT , "MECHANIC_INTERRUPT" }, + { MECHANIC_DAZE , "MECHANIC_DAZE" }, + { MECHANIC_DISCOVERY , "MECHANIC_DISCOVERY" }, + { MECHANIC_IMMUNE_SHIELD , "MECHANIC_IMMUNE_SHIELD" }, + { MECHANIC_SAPPED , "MECHANIC_SAPPED" }, + { MECHANIC_ENRAGED , "MECHANIC_ENRAGED" } +}; + + +struct UnitFlag +{ + uint32 flag; + char const* text; +}; + +UnitFlag const unitFlags[MAX_UNIT_FLAGS] = +{ + { UNIT_FLAG_SERVER_CONTROLLED , "UNIT_FLAG_SERVER_CONTROLLED" }, + { UNIT_FLAG_NON_ATTACKABLE , "UNIT_FLAG_NON_ATTACKABLE" }, + { UNIT_FLAG_DISABLE_MOVE , "UNIT_FLAG_DISABLE_MOVE" }, + { UNIT_FLAG_PVP_ATTACKABLE , "UNIT_FLAG_PVP_ATTACKABLE" }, + { UNIT_FLAG_RENAME , "UNIT_FLAG_RENAME" }, + { UNIT_FLAG_PREPARATION , "UNIT_FLAG_PREPARATION" }, + { UNIT_FLAG_UNK_6 , "UNIT_FLAG_UNK_6" }, + { UNIT_FLAG_NOT_ATTACKABLE_1 , "UNIT_FLAG_NOT_ATTACKABLE_1" }, + { UNIT_FLAG_IMMUNE_TO_PC , "UNIT_FLAG_IMMUNE_TO_PC" }, + { UNIT_FLAG_IMMUNE_TO_NPC , "UNIT_FLAG_IMMUNE_TO_NPC" }, + { UNIT_FLAG_LOOTING , "UNIT_FLAG_LOOTING" }, + { UNIT_FLAG_PET_IN_COMBAT , "UNIT_FLAG_PET_IN_COMBAT" }, + { UNIT_FLAG_PVP , "UNIT_FLAG_PVP" }, + { UNIT_FLAG_SILENCED , "UNIT_FLAG_SILENCED" }, + { UNIT_FLAG_UNK_14 , "UNIT_FLAG_UNK_14" }, + { UNIT_FLAG_UNK_15 , "UNIT_FLAG_UNK_15" }, + { UNIT_FLAG_UNK_16 , "UNIT_FLAG_UNK_16" }, + { UNIT_FLAG_PACIFIED , "UNIT_FLAG_PACIFIED" }, + { UNIT_FLAG_STUNNED , "UNIT_FLAG_STUNNED" }, + { UNIT_FLAG_IN_COMBAT , "UNIT_FLAG_IN_COMBAT" }, + { UNIT_FLAG_TAXI_FLIGHT , "UNIT_FLAG_TAXI_FLIGHT" }, + { UNIT_FLAG_DISARMED , "UNIT_FLAG_DISARMED" }, + { UNIT_FLAG_CONFUSED , "UNIT_FLAG_CONFUSED" }, + { UNIT_FLAG_FLEEING , "UNIT_FLAG_FLEEING" }, + { UNIT_FLAG_PLAYER_CONTROLLED , "UNIT_FLAG_PLAYER_CONTROLLED" }, + { UNIT_FLAG_NOT_SELECTABLE , "UNIT_FLAG_NOT_SELECTABLE" }, + { UNIT_FLAG_SKINNABLE , "UNIT_FLAG_SKINNABLE" }, + { UNIT_FLAG_MOUNT , "UNIT_FLAG_MOUNT" }, + { UNIT_FLAG_UNK_28 , "UNIT_FLAG_UNK_28" }, + { UNIT_FLAG_UNK_29 , "UNIT_FLAG_UNK_29" }, + { UNIT_FLAG_SHEATHE , "UNIT_FLAG_SHEATHE" }, + { UNIT_FLAG_UNK_31 , "UNIT_FLAG_UNK_31" } +}; + class npc_commandscript : public CommandScript { public: @@ -630,12 +715,14 @@ public: return false; } + CreatureTemplate const* cInfo = target->GetCreatureTemplate(); + uint32 faction = target->getFaction(); uint32 npcflags = target->GetUInt32Value(UNIT_NPC_FLAGS); + uint32 mechanicImmuneMask = cInfo->MechanicImmuneMask; uint32 displayid = target->GetDisplayId(); uint32 nativeid = target->GetNativeDisplayId(); uint32 Entry = target->GetEntry(); - CreatureTemplate const* cInfo = target->GetCreatureTemplate(); int64 curRespawnDelay = target->GetRespawnTimeEx()-time(NULL); if (curRespawnDelay < 0) @@ -647,7 +734,13 @@ public: handler->PSendSysMessage(LANG_NPCINFO_LEVEL, target->getLevel()); handler->PSendSysMessage(LANG_NPCINFO_EQUIPMENT, target->GetCurrentEquipmentId(), target->GetOriginalEquipmentId()); handler->PSendSysMessage(LANG_NPCINFO_HEALTH, target->GetCreateHealth(), target->GetMaxHealth(), target->GetHealth()); - handler->PSendSysMessage(LANG_NPCINFO_FLAGS, target->GetUInt32Value(UNIT_FIELD_FLAGS), target->GetUInt32Value(UNIT_FIELD_FLAGS_2), target->GetUInt32Value(UNIT_DYNAMIC_FLAGS), target->getFaction()); + + handler->PSendSysMessage(LANG_NPCINFO_UNIT_FIELD_FLAGS, target->GetUInt32Value(UNIT_FIELD_FLAGS)); + for (uint8 i = 0; i < MAX_UNIT_FLAGS; ++i) + if (target->GetUInt32Value(UNIT_FIELD_FLAGS) & unitFlags[i].flag) + handler->PSendSysMessage(unitFlags[i].text, unitFlags[i].flag); + + handler->PSendSysMessage(LANG_NPCINFO_FLAGS, target->GetUInt32Value(UNIT_FIELD_FLAGS_2), target->GetUInt32Value(UNIT_DYNAMIC_FLAGS), target->getFaction()); handler->PSendSysMessage(LANG_COMMAND_RAWPAWNTIMES, defRespawnDelayStr.c_str(), curRespawnDelayStr.c_str()); handler->PSendSysMessage(LANG_NPCINFO_LOOT, cInfo->lootid, cInfo->pickpocketLootId, cInfo->SkinLootId); handler->PSendSysMessage(LANG_NPCINFO_DUNGEON_ID, target->GetInstanceId()); @@ -660,6 +753,11 @@ public: if (npcflags & npcFlagTexts[i].flag) handler->PSendSysMessage(npcFlagTexts[i].text, npcFlagTexts[i].flag); + handler->PSendSysMessage(LANG_NPCINFO_MECHANIC_IMMUNE, mechanicImmuneMask); + for (uint8 i = 0; i < MAX_MECHANIC; ++i) + if ((mechanicImmuneMask << 1) & mechanicImmunes[i].flag) + handler->PSendSysMessage(mechanicImmunes[i].text, mechanicImmunes[i].flag); + return true; } diff --git a/src/server/scripts/Commands/cs_reload.cpp b/src/server/scripts/Commands/cs_reload.cpp index 5351f3edda0..829152b7fa7 100644 --- a/src/server/scripts/Commands/cs_reload.cpp +++ b/src/server/scripts/Commands/cs_reload.cpp @@ -82,11 +82,11 @@ public: { "creature_text", SEC_ADMINISTRATOR, true, &HandleReloadCreatureText, "", NULL }, { "creature_ai_scripts", SEC_ADMINISTRATOR, true, &HandleReloadEventAIScriptsCommand, "", NULL }, { "creature_ai_texts", SEC_ADMINISTRATOR, true, &HandleReloadEventAITextsCommand, "", NULL }, - { "creature_involvedrelation", SEC_ADMINISTRATOR, true, &HandleReloadCreatureQuestInvRelationsCommand, "", NULL }, + { "creature_questender", SEC_ADMINISTRATOR, true, &HandleReloadCreatureQuestEnderCommand, "", NULL }, { "creature_linked_respawn", SEC_GAMEMASTER, true, &HandleReloadLinkedRespawnCommand, "", NULL }, { "creature_loot_template", SEC_ADMINISTRATOR, true, &HandleReloadLootTemplatesCreatureCommand, "", NULL }, { "creature_onkill_reputation", SEC_ADMINISTRATOR, true, &HandleReloadOnKillReputationCommand, "", NULL }, - { "creature_questrelation", SEC_ADMINISTRATOR, true, &HandleReloadCreatureQuestRelationsCommand, "", NULL }, + { "creature_queststarter", SEC_ADMINISTRATOR, true, &HandleReloadCreatureQuestStarterCommand, "", NULL }, { "creature_summon_groups", SEC_ADMINISTRATOR, true, &HandleReloadCreatureSummonGroupsCommand, "", NULL }, { "creature_template", SEC_ADMINISTRATOR, true, &HandleReloadCreatureTemplateCommand, "", NULL }, //{ "db_script_string", SEC_ADMINISTRATOR, true, &HandleReloadDbScriptStringCommand, "", NULL }, @@ -96,9 +96,9 @@ public: { "fishing_loot_template", SEC_ADMINISTRATOR, true, &HandleReloadLootTemplatesFishingCommand, "", NULL }, { "game_graveyard_zone", SEC_ADMINISTRATOR, true, &HandleReloadGameGraveyardZoneCommand, "", NULL }, { "game_tele", SEC_ADMINISTRATOR, true, &HandleReloadGameTeleCommand, "", NULL }, - { "gameobject_involvedrelation", SEC_ADMINISTRATOR, true, &HandleReloadGOQuestInvRelationsCommand, "", NULL }, + { "gameobject_questender", SEC_ADMINISTRATOR, true, &HandleReloadGOQuestEnderCommand, "", NULL }, { "gameobject_loot_template", SEC_ADMINISTRATOR, true, &HandleReloadLootTemplatesGameobjectCommand, "", NULL }, - { "gameobject_questrelation", SEC_ADMINISTRATOR, true, &HandleReloadGOQuestRelationsCommand, "", NULL }, + { "gameobject_queststarter", SEC_ADMINISTRATOR, true, &HandleReloadGOQuestStarterCommand, "", NULL }, { "gm_tickets", SEC_ADMINISTRATOR, true, &HandleReloadGMTicketsCommand, "", NULL }, { "gossip_menu", SEC_ADMINISTRATOR, true, &HandleReloadGossipMenuCommand, "", NULL }, { "gossip_menu_option", SEC_ADMINISTRATOR, true, &HandleReloadGossipMenuOptionCommand, "", NULL }, @@ -249,8 +249,8 @@ public: HandleReloadQuestTemplateCommand(handler, "a"); TC_LOG_INFO(LOG_FILTER_GENERAL, "Re-Loading Quests Relations..."); - sObjectMgr->LoadQuestRelations(); - handler->SendGlobalGMSysMessage("DB tables `*_questrelation` and `*_involvedrelation` reloaded."); + sObjectMgr->LoadQuestStartersAndEnders(); + handler->SendGlobalGMSysMessage("DB tables `*_queststarter` and `*_questender` reloaded."); return true; } @@ -532,11 +532,11 @@ public: return true; } - static bool HandleReloadCreatureQuestRelationsCommand(ChatHandler* handler, const char* /*args*/) + static bool HandleReloadCreatureQuestStarterCommand(ChatHandler* handler, const char* /*args*/) { - TC_LOG_INFO(LOG_FILTER_GENERAL, "Loading Quests Relations... (`creature_questrelation`)"); - sObjectMgr->LoadCreatureQuestRelations(); - handler->SendGlobalGMSysMessage("DB table `creature_questrelation` (creature quest givers) reloaded."); + TC_LOG_INFO(LOG_FILTER_GENERAL, "Loading Quests Relations... (`creature_queststarter`)"); + sObjectMgr->LoadCreatureQuestStarters(); + handler->SendGlobalGMSysMessage("DB table `creature_queststarter` reloaded."); return true; } @@ -548,11 +548,11 @@ public: return true; } - static bool HandleReloadCreatureQuestInvRelationsCommand(ChatHandler* handler, const char* /*args*/) + static bool HandleReloadCreatureQuestEnderCommand(ChatHandler* handler, const char* /*args*/) { - TC_LOG_INFO(LOG_FILTER_GENERAL, "Loading Quests Relations... (`creature_involvedrelation`)"); - sObjectMgr->LoadCreatureInvolvedRelations(); - handler->SendGlobalGMSysMessage("DB table `creature_involvedrelation` (creature quest takers) reloaded."); + TC_LOG_INFO(LOG_FILTER_GENERAL, "Loading Quests Relations... (`creature_questender`)"); + sObjectMgr->LoadCreatureQuestEnders(); + handler->SendGlobalGMSysMessage("DB table `creature_questender` reloaded."); return true; } @@ -574,19 +574,19 @@ public: return true; } - static bool HandleReloadGOQuestRelationsCommand(ChatHandler* handler, const char* /*args*/) + static bool HandleReloadGOQuestStarterCommand(ChatHandler* handler, const char* /*args*/) { - TC_LOG_INFO(LOG_FILTER_GENERAL, "Loading Quests Relations... (`gameobject_questrelation`)"); - sObjectMgr->LoadGameobjectQuestRelations(); - handler->SendGlobalGMSysMessage("DB table `gameobject_questrelation` (gameobject quest givers) reloaded."); + TC_LOG_INFO(LOG_FILTER_GENERAL, "Loading Quests Relations... (`gameobject_queststarter`)"); + sObjectMgr->LoadGameobjectQuestStarters(); + handler->SendGlobalGMSysMessage("DB table `gameobject_queststarter` reloaded."); return true; } - static bool HandleReloadGOQuestInvRelationsCommand(ChatHandler* handler, const char* /*args*/) + static bool HandleReloadGOQuestEnderCommand(ChatHandler* handler, const char* /*args*/) { - TC_LOG_INFO(LOG_FILTER_GENERAL, "Loading Quests Relations... (`gameobject_involvedrelation`)"); - sObjectMgr->LoadGameobjectInvolvedRelations(); - handler->SendGlobalGMSysMessage("DB table `gameobject_involvedrelation` (gameobject quest takers) reloaded."); + TC_LOG_INFO(LOG_FILTER_GENERAL, "Loading Quests Relations... (`gameobject_questender`)"); + sObjectMgr->LoadGameobjectQuestEnders(); + handler->SendGlobalGMSysMessage("DB table `gameobject_questender` reloaded."); return true; } diff --git a/src/server/scripts/Northrend/Nexus/Oculus/oculus.cpp b/src/server/scripts/Northrend/Nexus/Oculus/oculus.cpp index e6969d1f519..fd15cd19b37 100644 --- a/src/server/scripts/Northrend/Nexus/Oculus/oculus.cpp +++ b/src/server/scripts/Northrend/Nexus/Oculus/oculus.cpp @@ -535,13 +535,13 @@ class spell_oculus_touch_the_nightmare : public SpellScriptLoader SetHitDamage(int32(GetCaster()->CountPctFromMaxHealth(30))); } - void Register() + void Register() OVERRIDE { OnEffectHitTarget += SpellEffectFn(spell_oculus_touch_the_nightmare_SpellScript::HandleDamageCalc, EFFECT_2, SPELL_EFFECT_SCHOOL_DAMAGE); } }; - SpellScript* GetSpellScript() const + SpellScript* GetSpellScript() const OVERRIDE { return new spell_oculus_touch_the_nightmare_SpellScript(); } @@ -564,14 +564,14 @@ class spell_oculus_dream_funnel: public SpellScriptLoader canBeRecalculated = false; } - void Register() + void Register() OVERRIDE { DoEffectCalcAmount += AuraEffectCalcAmountFn(spell_oculus_dream_funnel_AuraScript::HandleEffectCalcAmount, EFFECT_0, SPELL_AURA_PERIODIC_HEAL); DoEffectCalcAmount += AuraEffectCalcAmountFn(spell_oculus_dream_funnel_AuraScript::HandleEffectCalcAmount, EFFECT_2, SPELL_AURA_PERIODIC_DAMAGE); } }; - AuraScript* GetAuraScript() const + AuraScript* GetAuraScript() const OVERRIDE { return new spell_oculus_dream_funnel_AuraScript(); } diff --git a/src/server/scripts/World/achievement_scripts.cpp b/src/server/scripts/World/achievement_scripts.cpp index 774c4e63071..0243b08e80e 100644 --- a/src/server/scripts/World/achievement_scripts.cpp +++ b/src/server/scripts/World/achievement_scripts.cpp @@ -40,7 +40,7 @@ class achievement_resilient_victory : public AchievementCriteriaScript if (bg->GetTypeID(true) != BATTLEGROUND_AB) return false; - if (!static_cast<BattlegroundAB*>(bg)->IsTeamScores500Disadvantage(source->GetTeam())) + if (!bg->ToBattlegroundAB()->IsTeamScores500Disadvantage(source->GetTeam())) return false; return true; @@ -84,7 +84,7 @@ class achievement_save_the_day : public AchievementCriteriaScript if (bg->GetTypeID(true) != BATTLEGROUND_WS) return false; - if (static_cast<BattlegroundWS*>(bg)->GetFlagState(player->GetTeam()) == BG_WS_FLAG_STATE_ON_BASE) + if (bg->ToBattlegroundWS()->GetFlagState(player->GetTeam()) == BG_WS_FLAG_STATE_ON_BASE) return true; } return false; @@ -209,7 +209,7 @@ class achievement_everything_counts : public AchievementCriteriaScript if (bg->GetTypeID(true) != BATTLEGROUND_AV) return false; - if (static_cast<BattlegroundAV*>(bg)->IsBothMinesControlledByTeam(source->GetTeam())) + if (bg->ToBattlegroundAV()->IsBothMinesControlledByTeam(source->GetTeam())) return true; return false; @@ -230,7 +230,7 @@ class achievement_bg_av_perfection : public AchievementCriteriaScript if (bg->GetTypeID(true) != BATTLEGROUND_AV) return false; - if (static_cast<BattlegroundAV*>(bg)->IsAllTowersControlledAndCaptainAlive(source->GetTeam())) + if (bg->ToBattlegroundAV()->IsAllTowersControlledAndCaptainAlive(source->GetTeam())) return true; return false; @@ -253,10 +253,10 @@ class achievement_bg_sa_defense_of_ancients : public AchievementCriteriaScript if (!battleground) return false; - if (player->GetTeamId() == static_cast<BattlegroundSA*>(battleground)->Attackers) + if (player->GetTeamId() == battleground->ToBattlegroundSA()->Attackers) return false; - if (!static_cast<BattlegroundSA*>(battleground)->gateDestroyed) + if (!battleground->ToBattlegroundSA()->gateDestroyed) return true; return false; @@ -308,7 +308,7 @@ class achievement_not_even_a_scratch : public AchievementCriteriaScript if (!battleground) return false; - if (static_cast<BattlegroundSA*>(battleground)->notEvenAScratch(source->GetTeam())) + if (battleground->ToBattlegroundSA()->notEvenAScratch(source->GetTeam())) return true; return false; |