Merge branch 'master' into 4.3.4

Conflicts:
	src/server/game/Chat/ChatLink.cpp
	src/server/game/Entities/Player/Player.cpp
	src/server/game/Handlers/ChannelHandler.cpp
	src/server/scripts/EasternKingdoms/hinterlands.cpp
This commit is contained in:
Spp
2012-11-22 15:04:59 +01:00
56 changed files with 2367 additions and 1625 deletions
@@ -0,0 +1,427 @@
-- Undercity
DELETE FROM `script_texts` WHERE `entry` BETWEEN -1000197 AND -1000196;
DELETE FROM `creature_text` WHERE `entry`=10181;
INSERT INTO `creature_text`(`entry`,`groupid`,`text`,`type`,`probability`,`comment`) VALUES
(10181,0,'%s kneels down and pick up the amulet.',16,100,'npc_lady_sylvanas_windrunner EMOTE_LAMENT_END'),
(10181,1,'Belore...',14,100,'npc_lady_sylvanas_windrunner SAY_LAMENT_END');
-- Ironaya
DELETE FROM `script_texts` WHERE `entry`=-1070000;
DELETE FROM `creature_text` WHERE `entry`=7228;
INSERT INTO `creature_text`(`entry`,`groupid`,`text`,`type`,`sound`,`probability`,`comment`) VALUES
(7228,0,'None may steal the secrets of the makers!',14,5851,100,'ironaya SAY_AGGRO');
-- Opera
DELETE FROM `script_texts` WHERE `entry` BETWEEN -1532028 AND -1532025;
DELETE FROM `creature_text` WHERE `entry`=17535;
INSERT INTO `creature_text`(`entry`,`groupid`,`text`,`type`,`sound`,`probability`,`comment`) VALUES
(17535,0,'Oh at last, at last. I can go home.',14,9190,100,'dorothee SAY_DOROTHEE_DEATH'),
(17535,1,"Don't let them hurt us, Tito! Oh, you won't, will you?",14,9191,100,'dorothee SAY_DOROTHEE_SUMMON'),
(17535,2,'Tito, oh Tito, no!',14,9192,100,'dorothee SAY_DOROTHEE_TITO_DEATH'),
(17535,3,'Oh dear, we simply must find a way home! The old wizard could be our only hope! Strawman, Roar, Tinhead, will you... wait! Oh golly, look! We have visitors!',14,9195,100,'dorothee SAY_DOROTHEE_AGGRO');
DELETE FROM `script_texts` WHERE `entry` BETWEEN -1532031 AND -1532029;
DELETE FROM `creature_text` WHERE `entry`=17546;
INSERT INTO `creature_text`(`entry`,`groupid`,`text`,`type`,`sound`,`probability`,`comment`) VALUES
(17546,0,"Wanna fight? Huh? Do ya? C'mon, I'll fight you with both claws behind my back!",14,9227,100,'roar SAY_ROAR_AGGRO'),
(17546,1,"You didn't have to go and do that.",14,9229,100,'roar SAY_ROAR_DEATH'),
(17546,2,"I think I'm going to go take fourty winks.",14,9230,100,'roar SAY_ROAR_SLAY');
DELETE FROM `script_texts` WHERE `entry` BETWEEN -1532034 AND -1532032;
DELETE FROM `creature_text` WHERE `entry`=17543;
INSERT INTO `creature_text`(`entry`,`groupid`,`text`,`type`,`sound`,`probability`,`comment`) VALUES
(17543,0,"Now what should I do with you? I simply can't make up my mind.",14,9254,100,'strawman SAY_STRAWMAN_AGGRO'),
(17543,1,"Don't let them make a mattress... out of me.",14,9256,100,'strawman SAY_STRAWMAN_DEATH'),
(17543,2,"I guess I'm not a failure after all.",14,9257,100,'strawman SAY_STRAWMAN_SLAY');
DELETE FROM `script_texts` WHERE `entry` BETWEEN -1532038 AND -1532035;
DELETE FROM `creature_text` WHERE `entry`=17547;
INSERT INTO `creature_text`(`entry`,`groupid`,`text`,`type`,`sound`,`probability`,`comment`) VALUES
(17547,0,"I could really use a heart. Say, can I have yours?",14,9268,100,'tinhead SAY_TINHEAD_AGGRO'),
(17547,1,"Back to being an old rustbucket.",14,9270,100,'tinhead SAY_TINHEAD_DEATH'),
(17547,2,"Guess I'm not so rusty, after all.",14,9271,100,'tinhead SAY_TINHEAD_SLAY'),
(17547,3,"%s begins to rust.",16,0,100,'tinhead EMOTE_RUST');
DELETE FROM `script_texts` WHERE `entry` BETWEEN -1532042 AND -1532039;
DELETE FROM `creature_text` WHERE `entry`=18168;
INSERT INTO `creature_text`(`entry`,`groupid`,`id`,`text`,`type`,`sound`,`probability`,`comment`) VALUES
(18168,0,0,"Woe to each and every one of you my pretties! <cackles>",14,9179,100,'crone SAY_CRONE_AGGRO'),
(18168,0,1,"It will all be over soon! <cackles>",14,9307,100,'crone SAY_CRONE_AGGRO2'),
(18168,1,0,"How could you? What a cruel, cruel world!",14,9178,100,'crone SAY_CRONE_DEATH'),
(18168,2,0,"Fixed you, didn't I? <cackles>",14,9180,100,'crone SAY_CRONE_SLAY');
DELETE FROM `script_texts` WHERE `entry` BETWEEN -1532045 AND -1532043;
DELETE FROM `creature_text` WHERE `entry`=17521;
INSERT INTO `creature_text`(`entry`,`groupid`,`text`,`type`,`sound`,`probability`,`comment`) VALUES
(17521,0,"All the better to own you with!",14,9276,100,'wolf SAY_WOLF_AGGRO'),
(17521,1,"Mmmm... delicious.",14,9277,100,'SAY_WOLF_SLAY'),
(17521,2,"Run away little girl, run away!",14,9278,100,'SAY_WOLF_HOOD');
DELETE FROM `script_texts` WHERE `entry` BETWEEN -1532051 AND -1532046;
DELETE FROM `creature_text` WHERE `entry`=17534;
INSERT INTO `creature_text`(`entry`,`groupid`,`text`,`type`,`sound`,`probability`,`comment`) VALUES
(17534,0,"What devil art thou, that dost torment me thus?",14,9196,100,'julianne SAY_JULIANNE_AGGRO'),
(17534,1,"Where is my lord? Where is my Romulo?",14,9199,100,'julianne SAY_JULIANNE_ENTER'),
(17534,2,"Romulo, I come! Oh... this do I drink to thee!",14,9199,100,'julianne SAY_JULIANNE_DEATH01'),
(17534,3,"Where is my Lord? Where is my Romulo? Ohh, happy dagger! This is thy sheath! There rust, and let me die!",14,9310,100,'julianne SAY_JULIANNE_DEATH02'),
(17534,4,"Come, gentle night; and give me back my Romulo!",14,9200,100,'julianne SAY_JULIANNE_RESURRECT'),
(17534,5,"Parting is such sweet sorrow.",14,9201,100,'julianne SAY_JULIANNE_SLAY');
DELETE FROM `script_texts` WHERE `entry` BETWEEN -1532056 AND -1532052;
DELETE FROM `creature_text` WHERE `entry`=17533;
INSERT INTO `creature_text`(`entry`,`groupid`,`text`,`type`,`sound`,`probability`,`comment`) VALUES
(17533,0,"Wilt thou provoke me? Then have at thee, boy!",14,9233,100,'romulo SAY_ROMULO_AGGRO'),
(17533,1,"Thou smilest... upon the stroke that... murders me.",14,9235,100,'romulo SAY_ROMULO_DEATH'),
(17533,2,"This day's black fate on more days doth depend. This but begins the woe. Others must end.",14,9236,100,'romulo SAY_ROMULO_ENTER'),
(17533,3,"Thou detestable maw, thou womb of death; I enforce thy rotten jaws to open!",14,9237,100,'romulo SAY_ROMULO_RESURRECT'),
(17533,4,"How well my comfort is revived by this!",14,9238,100,'romulo SAY_ROMULO_SLAY');
DELETE FROM `script_texts` WHERE `entry` BETWEEN -1532114 AND -1532103;
DELETE FROM `creature_text` WHERE `entry`=16812;
INSERT INTO `creature_text`(`entry`,`groupid`,`text`,`type`,`sound`,`probability`,`comment`) VALUES
(16812,0,"Welcome Ladies and Gentlemen, to this evening's presentation!",14,9174,100,'barnes OZ1'),
(16812,1,"Tonight we plumb the depths of the human soul as we join a lost, lonely girl trying desperately -- with the help of her loyal companions -- to find her way home!",14,9338,100,'barnes OZ2'),
(16812,2,"But she is pursued... by a wicked malevolent crone!",14,9339,100,'barnes OZ3'),
(16812,3,"Will she survive? Will she prevail? Only time will tell. And now ... on with the show!",14,9340,100,'barnes OZ4'),
(16812,4,"Good evening, Ladies and Gentlemen! Welcome to this evening's presentation!",14,9175,100,'barnes HOOD1'),
(16812,5,"Tonight, things are not what they seem. For tonight, your eyes may not be trusted",14,9335,100,'barnes HOOD2'),
(16812,6,"Take for instance, this quiet, elderly woman, waiting for a visit from her granddaughter. Surely there is nothing to fear from this sweet, grey-haired, old lady.",14,9336,100,'barnes HOOD3'),
(16812,7,"But don't let me pull the wool over your eyes. See for yourself what lies beneath those covers! And now... on with the show!",14,9337,100,'barnes HOOD4'),
(16812,8,"Welcome, Ladies and Gentlemen, to this evening's presentation!",14,9176,100,'barnes RAJ1'),
(16812,9,"Tonight, we explore a tale of forbidden love!",14,9341,100,'barnes RAJ2'),
(16812,10,"But beware, for not all love stories end happily, as you may find out. Sometimes, love pricks like a thorn.",14,9342,100,'barnes RAJ3'),
(16812,11,"But don't take it from me, see for yourself what tragedy lies ahead when the paths of star-crossed lovers meet. And now...on with the show!",14,9343,100,'barnes RAJ4');
DELETE FROM `script_texts` WHERE `entry` BETWEEN -1532102 AND -1532091;
DELETE FROM `creature_text` WHERE `entry`=15690;
INSERT INTO `creature_text`(`entry`,`groupid`,`id`,`text`,`type`,`sound`,`probability`,`comment`) VALUES
(15690,0,0,"Madness has brought you here to me. I shall be your undoing!",14,9218,100,'malchezaar SAY_AGGRO'),
(15690,1,0,"Simple fools! Time is the fire in which you'll burn!",14,9220,100,'malchezaar SAY_AXE_TOSS1'),
(15690,2,0,"I see the subtlety of conception is beyond primitives such as you.",14,9317,100,'malchezaar SAY_AXE_TOSS2'),
(15690,3,0,"Who knows what secrets hide in the dark.",14,9223,100,'malchezaar SAY_SPECIAL1'),
(15690,4,0,"The cerestial forces are mine to manipulate.",14,9320,100,'malchezaar SAY_SPECIAL2'),
(15690,5,0,"How can you hope to withstand against such overwhelming power?",14,9321,100,'malchezaar SAY_SPECIAL3'),
(15690,6,0,"Surely you did not think you could win.",14,9222,100,'malchezaar SAY_SLAY1'),
(15690,6,1,"Your greed, your foolishness has brought you to this end.",14,9318,100,'malchezaar SAY_SLAY2'),
(15690,6,2,"You are, but a plaything, unfit even to amuse.",14,9319,100,'malchezaar SAY_SLAY3'),
(15690,7,0,"All realities, all dimensions are open to me!",14,9224,100,'malchezaar SAY_SUMMON1'),
(15690,7,1,"You face not Malchezaar alone, but the legions I command!",14,9322,100,'malchezaar SAY_SUMMON2'),
(15690,8,0,"I refuse to concede defeat. I am a prince of the Eredar! I am...",14,9221,100,'malchezaar SAY_DEATH');
DELETE FROM `script_texts` WHERE `entry` BETWEEN -1532088 AND -1532073;
DELETE FROM `creature_text` WHERE `entry`=16524;
INSERT INTO `creature_text`(`entry`,`groupid`,`id`,`text`,`type`,`sound`,`probability`,`comment`) VALUES
(16524,0,0,"Please, no more. My son... he's gone mad!",14,9241,100,'aran SAY_AGGRO1'),
(16524,0,1,"I'll not be tortured again!",14,9323,100,'aran SAY_AGGRO2'),
(16524,0,2,"Who are you? What do you want? Stay away from me!",14,9324,100,'aran SAY_AGGRO3'),
(16524,1,0,"I'll show you this beaten dog still has some teeth!",14,9245,100,'aran SAY_FLAMEWREATH1'),
(16524,1,1,"Burn you hellish fiends!",14,9326,100,'aran SAY_FLAMEWREATH2'),
(16524,2,0,"I'll freeze you all!",14,9246,100,'aran SAY_BLIZZARD1'),
(16524,2,1,"Back to the cold dark with you!",14,9327,100,'aran SAY_BLIZZARD2'),
(16524,3,0,"Yes, yes, my son is quite powerful... but I have powers of my own!",14,9242,100,'aran SAY_EXPLOSION1'),
(16524,3,1,"I am not some simple jester! I am Nielas Aran!",14,9325,100,'aran SAY_EXPLOSION2'),
(16524,4,0,"Surely you would not deny an old man a replenishing drink? No, no I thought not.",14,9248,100,'aran SAY_DRINK'),
(16524,5,0,"I'm not finished yet! No, I have a few more tricks up me sleeve.",14,9251,100,'aran SAY_ELEMENTALS'),
(16524,6,0,"I want this nightmare to be over!",14,9250,100,'aran SAY_KILL1'),
(16524,6,1,"Torment me no more!",14,9328,100,'aran SAY_KILL2'),
(16524,7,0,"You've wasted enough of my time. Let these games be finished!",14,9247,100,'aran SAY_TIMEOVER'),
(16524,8,0,"At last... The nightmare is.. over...",14,9244,100,'aran SAY_DEATH'),
(16524,9,0,"Where did you get that?! Did HE send you?!",14,9249,100,'aran SAY_ATIESH');
DELETE FROM `script_texts` WHERE `entry` BETWEEN -1532072 AND -1532065;
DELETE FROM `creature_text` WHERE `entry`=15688;
INSERT INTO `creature_text`(`entry`,`groupid`,`id`,`text`,`type`,`sound`,`probability`,`comment`) VALUES
(15688,0,0,"Your blood will anoint my circle.",14,9264,100,'terestian SAY_SLAY1'),
(15688,0,1,"The great one will be pleased.",14,9329,100,'terestian SAY_SLAY2'),
(15688,1,0,"My life, is yours. Oh great one.",14,9262,100,'terestian SAY_DEATH'),
(15688,2,0,"Ah, you're just in time. The rituals are about to begin.",14,9260,100,'terestian SAY_AGGRO'),
(15688,3,0,"Please, accept this humble offering, oh great one.",14,9263,100,'terestian SAY_SACRIFICE1'),
(15688,3,1,"Let the sacrifice serve his testament to my fealty.",14,9330,100,'terestian SAY_SACRIFICE2'),
(15688,4,0,"Come, you dwellers in the dark. Rally to my call!",14,9265,100,'terestian SAY_SUMMON1'),
(15688,4,1,"Gather, my pets. There is plenty for all.",14,9331,100,'terestian SAY_SUMMON2');
DELETE FROM `script_texts` WHERE `entry` BETWEEN -1532017 AND -1532011;
DELETE FROM `creature_text` WHERE `entry`=15687;
INSERT INTO `creature_text`(`entry`,`groupid`,`id`,`text`,`type`,`sound`,`probability`,`comment`) VALUES
(15687,0,0,"Hmm, unannounced visitors? Preparations must be made.",14,9211,100,'moroes SAY_AGGRO'),
(15687,1,0,"Now, where was I? Oh yes...",14,9215,100,'moroes SAY_SPECIAL_1'),
(15687,1,1,"You rang?",14,9316,100,'moroes SAY_SPECIAL_2'),
(15687,2,0,"One more for dinner this evening.",14,9214,100,'moroes SAY_KILL_1'),
(15687,2,1,"Time... Never enough time.",14,9314,100,'moroes SAY_KILL_2'),
(15687,2,2,"I've gone and made a mess.",14,9315,100,'moroes SAY_KILL_3'),
(15687,3,0,"How terribly clumsy of me...",14,9213,100,'moroes SAY_DEATH');
DELETE FROM `script_texts` WHERE `entry` BETWEEN -1532064 AND -1532057;
DELETE FROM `creature_text` WHERE `entry`=15691;
INSERT INTO `creature_text`(`entry`,`groupid`,`id`,`text`,`type`,`sound`,`probability`,`comment`) VALUES
(15691,0,0,"The Menagerie is for guests only.",14,9183,100,'curator SAY_AGGRO'),
(15691,1,0,"Gallery rules will be strictly enforced.",14,9188,100,'curator SAY_SUMMON1'),
(15691,1,1,"This curator is equipped for gallery protection.",14,9309,100,'curator SAY_SUMMON2'),
(15691,2,0,"Your request cannot be processed.",14,9186,100,'curator SAY_EVOCATE'),
(15691,3,0,"Failure to comply will result in offensive action.",14,9185,100,'curator SAY_ENRAGE'),
(15691,4,0,"Do not touch the displays.",14,9187,100,'curator SAY_KILL1'),
(15691,4,1,"You are not a guest.",14,9308,100,'curator SAY_KILL2'),
(15691,5,0,"This Curator is no longer op... er... ation... al.",14,9184,100,'curator SAY_DEATH');
DELETE FROM `script_texts` WHERE `entry` BETWEEN -1532010 AND -1532000;
DELETE FROM `creature_text` WHERE `entry`=16151;
INSERT INTO `creature_text`(`entry`,`groupid`,`id`,`text`,`type`,`sound`,`probability`,`comment`) VALUES
(16151,0,0,"Well done Midnight!",14,9173,100,'attumen SAY_MIDNIGHT_KILL'),
(16151,1,0,"Cowards! Wretches!",14,9167,100,'attumen SAY_APPEAR1'),
(16151,1,1,"Who dares attack the steed of the Huntsman?",14,9298,100,'attumen SAY_APPEAR2'),
(16151,1,2,"Perhaps you would rather test yourselves against a more formidable opponent?!",14,9299,100,'attumen SAY_APPEAR3'),
(16151,2,0,"Come, Midnight, let's disperse this petty rabble!",14,9168,100,'attumen SAY_MOUNT'),
(16151,3,0,"It was... inevitable.",14,9169,100,'attumen SAY_KILL1'),
(16151,3,1,"Another trophy to add to my collection!",14,9300,100,'attumen SAY_KILL2'),
(16151,4,0,"Weapons are merely a convenience for a warrior of my skill!",14,9166,100,'attumen SAY_DISARMED'),
(16151,5,0,"I always knew... someday I would become... the hunted.",14,9165,100,'attumen SAY_DEATH'),
(16151,6,0,"Such easy sport.",14,9170,100,'attumen SAY_RANDOM1'),
(16151,6,1,"Amateurs! Do not think you can best me! I kill for a living.",14,9304,100,'attumen SAY_RANDOM2');
DELETE FROM `script_texts` WHERE `entry` BETWEEN -1532024 AND -1532018;
DELETE FROM `creature_text` WHERE `entry`=16457;
INSERT INTO `creature_text`(`entry`,`groupid`,`id`,`text`,`type`,`sound`,`probability`,`comment`) VALUES
(16457,0,0,"Your behavior will not be tolerated!",14,9204,100,'maiden SAY_AGGRO'),
(16457,1,0,"Ah ah ah...",14,9207,100,'maiden SAY_SLAY1'),
(16457,1,1,"This is for the best.",14,9312,100,'maiden SAY_SLAY2'),
(16457,1,2,"Impure thoughts lead to profane actions.",14,9311,100,'maiden SAY_SLAY3'),
(16457,2,0,"Cast out your corrupt thoughts.",14,9313,100,'maiden SAY_REPENTANCE1'),
(16457,2,1,"Your impurity must be cleansed.",14,9208,100,'maiden SAY_REPENTANCE2'),
(16457,3,0,"Death comes. Will your conscience be clear?",14,9206,100,'maiden SAY_DEATH');
DELETE FROM `script_texts` WHERE `entry`=-1189021;
DELETE FROM `creature_text` WHERE `entry`=3974;
INSERT INTO `creature_text`(`entry`,`groupid`,`id`,`text`,`type`,`sound`,`probability`,`comment`) VALUES
(3974,0,0,"Release the hounds!",14,5841,100,'loksey SAY_AGGRO');
DELETE FROM `script_texts` WHERE `entry` BETWEEN -1189007 AND -1189001;
DELETE FROM `creature_text` WHERE `entry` IN (23682,23775);
INSERT INTO `creature_text`(`entry`,`groupid`,`id`,`text`,`type`,`sound`,`probability`,`comment`) VALUES
(23775,0,0,"Hah, is that all?",14,5831,100,'headless horseman SAY_LOST_HEAD'),
(23775,1,0,"Unworthy!",14,5836,100,'headless horseman SAY_PLAYER_DEATH'),
(23682,0,0,"Blades of Light!",14,5832,100,'headless horseman SAY_ENTRANCE'),
(23682,1,0,"Light, give me strength!",14,5833,100,'headless horseman SAY_REJOINED'),
(23682,2,0,"%s becomes enraged!",16,0,100,'headless horseman SAY_CONFLAGRATION'),
(23682,3,0,"Infidels! They must be purified!",14,5835,100,'headless horseman SAY_SPROUTING_PUMPKINS'),
(23682,4,0,"At your side, milady!",14,5837,100,'headless horseman SAY_DEATH');
DELETE FROM `script_texts` WHERE `entry` BETWEEN -1189004 AND -1189000;
DELETE FROM `creature_text` WHERE `entry`=3975;
INSERT INTO `creature_text`(`entry`,`groupid`,`id`,`text`,`type`,`sound`,`probability`,`comment`) VALUES
(3975,0,0,"Ah, I have been waiting for a real challenge!",14,5830,100,'herod SAY_AGGRO'),
(3975,1,0,"Blades of Light!",14,5832,100,'herod SAY_WHIRLWIND'),
(3975,2,0,"Light, give me strength!",14,5833,100,'herod SAY_ENRAGE'),
(3975,3,0,"Hah, is that all?",14,5831,100,'herod SAY_KILL'),
(3975,4,0,"%s becomes enraged!",16,0,100,'herod EMOTE_ENRAGE');
DELETE FROM `script_texts` WHERE `entry` BETWEEN -1189020 AND -1189019;
DELETE FROM `creature_text` WHERE `entry`=6487;
INSERT INTO `creature_text`(`entry`,`groupid`,`id`,`text`,`type`,`sound`,`probability`,`comment`) VALUES
(6487,0,0,"You will not defile these mysteries!",14,5842,100,'doan SAY_AGGRO'),
(6487,1,0,"Burn in righteous fire!",14,5843,100,'doan SAY_SPECIALAE');
DELETE FROM `script_texts` WHERE `entry` BETWEEN -1189007 AND -1189005;
DELETE FROM `creature_text` WHERE `entry`=3976;
INSERT INTO `creature_text`(`entry`,`groupid`,`id`,`text`,`type`,`sound`,`probability`,`comment`) VALUES
(3976,0,0,"Infidels! They must be purified!",14,5835,100,'mograine SAY_MO_AGGRO'),
(3976,1,0,"Unworthy!",14,5836,100,'mograine SAY_MO_KILL'),
(3976,2,0,"At your side, milady!",14,5837,100,'mograine SAY_MO_RESSURECTED');
DELETE FROM `script_texts` WHERE `entry` BETWEEN -1189010 AND -1189008;
DELETE FROM `creature_text` WHERE `entry`=3977;
INSERT INTO `creature_text`(`entry`,`groupid`,`id`,`text`,`type`,`sound`,`probability`,`comment`) VALUES
(3977,0,0,"What, Mograine has fallen? You shall pay for this treachery!",14,5838,100,'whitemane SAY_WH_INTRO'),
(3977,1,0,"The Light has spoken!",14,5839,100,'whitemane SAY_WH_KILL'),
(3977,2,0,"Arise, my champion!",14,5840,100,'whitemane SAY_WH_RESSURECT');
DELETE FROM `script_texts` WHERE `entry` BETWEEN -1189018 AND -1189016;
DELETE FROM `creature_text` WHERE `entry`=4543;
INSERT INTO `creature_text`(`entry`,`groupid`,`id`,`text`,`type`,`sound`,`probability`,`comment`) VALUES
(4543,0,0,"We hunger for vengeance.",14,5844,100,'thalnos SAY_AGGRO'),
(4543,1,0,"No rest, for the angry dead.",14,5846,100,'thalnos SAY_HEALTH'),
(4543,2,0,"More... More souls.",14,5845,100,'thalnos SAY_KILL');
DELETE FROM `script_texts` WHERE `entry` BETWEEN -1189015 AND -1189011;
DELETE FROM `creature_text` WHERE `entry` IN (3983,3981);
INSERT INTO `creature_text`(`entry`,`groupid`,`id`,`text`,`type`,`sound`,`probability`,`comment`) VALUES
(3983,0,0,"Tell me... tell me everything!",14,5847,100,'vishas SAY_AGGRO'),
(3983,1,0,"Naughty secrets!",14,5849,100,'vishas SAY_HEALTH1'),
(3983,2,0,"I'll rip the secrets from your flesh!",14,5850,100,'vishas SAY_HEALTH2'),
(3983,3,0,"Purged by pain!",14,5848,100,'vishas SAY_KILL'),
(3981,0,0,"The monster got what he deserved.",12,0,100,'vishas SAY_TRIGGER_VORREL');
DELETE FROM `script_texts` WHERE `entry` BETWEEN -1033009 AND -1033007;
DELETE FROM `creature_text` WHERE `entry` IN (3849,3850,4275);
INSERT INTO `creature_text`(`entry`,`groupid`,`id`,`text`,`type`,`sound`,`probability`,`language`,`emote`,`comment`) VALUES
(3849,0,0,"About time someone killed the wretch.",12,0,100,1,1,'prisoner adamant SAY_BOSS_DIE_AD'),
(3850,0,0,"For once I agree with you... scum.",12,0,100,7,1,'prisoner ashcrombe SAY_BOSS_DIE_AS'),
(4275,0,0,"Who dares interfere with the Sons of Arugal?",14,0,100,0,0,'');
DELETE FROM `script_texts` WHERE `entry` BETWEEN -1033006 AND -1033000;
DELETE FROM `creature_text` WHERE `entry` IN (3849,3850);
INSERT INTO `creature_text`(`entry`,`groupid`,`id`,`text`,`type`,`sound`,`probability`,`language`,`emote`,`comment`) VALUES
(3850,0,0,"Follow me and I'll open the courtyard door for you.",14,0,100,7,1,'prisoner ashcrombe SAY_FREE_AS'),
(3850,1,0,"I have just the spell to get this door open. Too bad the cell doors weren't locked so haphazardly.",14,0,100,7,1,'prisoner ashcrombe SAY_OPEN_DOOR_AS'),
(3850,2,0,"There it is! Wide open. Good luck to you conquering what lies beyond. I must report back to the Kirin Tor at once!",14,0,100,7,1,'prisoner ashcrombe SAY_POST_DOOR_AS'),
(3849,0,0,"Free from this wretched cell at last! Let me show you to the courtyard....",14,0,100,1,1,'prisoner adamant SAY_FREE_AD'),
(3849,1,0,"You are indeed courageous for wanting to brave the horrors that lie beyond this door.",14,0,100,1,1,'prisoner adamant SAY_OPEN_DOOR_AD'),
(3849,2,0,"There we go!",14,0,100,1,1,'prisoner adamant SAY_POST1_DOOR_AD'),
(3849,3,0,"Good luck with Arugal. I must hurry back to Hadrec now.",14,0,100,1,1,'prisoner adamant SAY_POST2_DOOR_AD');
DELETE FROM `script_texts` WHERE `entry` BETWEEN -1580016 AND -1580000;
DELETE FROM `creature_text` WHERE `entry` IN (24892,24850,24891);
INSERT INTO `creature_text`(`entry`,`groupid`,`id`,`text`,`type`,`sound`,`probability`,`comment`) VALUES
(24892,0,0,"There will be no reprieve. My work here is nearly finished.",14,12451,100,'sathrovarr SAY_SATH_AGGRO'),
(24892,1,0,"Pitious mortal!",14,12455,100,'sathrovarr SAY_SATH_SLAY1'),
(24892,1,1,"Haven't you heard? I always win!",14,12456,100,'sathrovarr SAY_SATH_SLAY2'),
(24892,2,0,"I'm... never on... the losing... side...",14,12452,100,'sathrovarr SAY_SATH_DEATH'),
(24892,3,0,"Your misery is my delight!",14,12453,100,'sathrovarr SAY_SATH_SPELL1'),
(24892,4,0,"I will watch you bleed!",14,12454,100,'sathrovarr SAY_SATH_SPELL2'),
(24850,0,0,"Aggh! No longer will I be a slave to Malygos! Challenge me and you will be destroyed!",14,12422,100,'kalecgos SAY_EVIL_AGGRO'),
(24850,1,0,"In the name of Kil'jaeden!",14,12425,100,'kalecgos SAY_EVIL_SLAY1'),
(24850,1,1,"You were warned!",14,12426,100,'kalecgos SAY_EVIL_SLAY2'),
(24850,2,0,"I am forever in your debt. Once we have triumphed over Kil'jaeden, this entire world will be in your debt as well.",14,12431,100,'kalecgos SAY_GOOD_PLRWIN'),
(24850,3,0,"My awakening is complete! You shall all perish!",14,12427,100,'kalecgos SAY_EVIL_ENRAGE'),
(24891,0,0,"I need... your help... Cannot... resist him... much longer...",14,12428,100,'kalecgos SAY_GOOD_AGGRO'),
(24891,1,0,"Aaahhh! Help me, before I lose my mind!",14,12429,100,'kalecgos SAY_GOOD_NEAR_DEATH'),
(24891,2,0,"Hurry! There is not much of me left!",14,12430,100,'kalecgos SAY_GOOD_NEAR_DEATH2');
DELETE FROM `script_texts` WHERE `entry` BETWEEN -1580065 AND -1580044;
DELETE FROM `creature_text` WHERE `entry` IN (24882,24895);
INSERT INTO `creature_text`(`entry`,`groupid`,`id`,`text`,`type`,`sound`,`probability`,`comment`) VALUES
(24882,0,0,"Puny lizard! Death is the only answer you'll find here!",14,12458,100,'brutallus YELL_INTRO'),
(24882,1,0,"Grah! Your magic is weak!",14,12459,100,'brutallus YELL_INTRO_BREAK_ICE'),
(24882,2,0,"I will crush you!",14,12460,100,'brutallus YELL_INTRO_CHARGE'),
(24882,3,0,"That was fun.",14,12461,100,'brutallus YELL_INTRO_KILL_MADRIGOSA'),
(24882,4,0,"Come, try your luck!",14,12462,100,'brutallus YELL_INTRO_TAUNT'),
(24882,5,0,"Ahh! More lambs to the slaughter!",14,12463,100,'brutallus YELL_AGGRO'),
(24882,6,0,"Perish, insect!",14,12464,100,'brutallus YELL_KILL1'),
(24882,6,1,"You are meat!",14,12465,100,'brutallus YELL_KILL2'),
(24882,6,2,"Too easy!",14,12466,100,'brutallus YELL_KILL3'),
(24882,7,0,"Bring the fight to me!",14,12467,100,'brutallus YELL_LOVE1'),
(24882,7,1,"Another day, another glorious battle!",14,12468,100,'brutallus YELL_LOVE2'),
(24882,7,2,"I live for this!",14,12469,100,'brutallus YELL_LOVE3'),
(24882,8,0,"So much for a real challenge... Die!",14,12470,100,'brutallus YELL_BERSERK'),
(24882,9,0,"Gah! Well done... Now... this gets... interesting...",14,12471,100,'brutallus YELL_DEATH'),
(24895,0,0,"Hold, friends! There is information to be had before this devil meets his fate!",14,12472,100,'madrigosa YELL_MADR_ICE_BARRIER'),
(24895,1,0,"Where is Anveena, demon? What has become of Kalec?",14,12473,100,'madrigosa YELL_MADR_INTRO'),
(24895,2,0,"You will tell me where they are!",14,12474,100,'madrigosa YELL_MADR_ICE_BLOCK'),
(24895,3,0,"Speak, I grow weary of asking!",14,12475,100,'madrigosa YELL_MADR_TRAP'),
(24895,4,0,"Malygos, my lord! I did my best!",14,12476,100,'madrigosa YELL_MADR_DEATH');
DELETE FROM `script_texts` WHERE `entry` BETWEEN -1580065 AND -1580044;
DELETE FROM `creature_text` WHERE `entry` IN (25166,25165);
INSERT INTO `creature_text`(`entry`,`groupid`,`id`,`type`,`sound`,`probability`,`comment`,`text`) VALUES
(25165,0,0,14,12484,100,"eredar - YELL_INTRO_SAC_1","Misery..."),
(25165,1,0,14,0,100,"eredar - YELL_INTRO_SAC_3","Confusion..."),
(25165,2,0,14,0,100,"eredar - YELL_INTRO_SAC_5","Mistrust..."),
(25165,3,0,14,0,100,"eredar - YELL_INTRO_SAC_7","These are the hallmarks..."),
(25165,4,0,14,0,100,"eredar - YELL_SAC_DEAD","I... fade."),
(25165,5,0,41,0,100,"eredar - EMOTE_SHADOW_NOVA","%s directs Shadow Nova at $N"),
(25165,6,0,14,0,100,"eredar - YELL_ENRAGE","Time is a luxury you no longer possess!"),
(25165,7,0,14,12488,100,"eredar - YELL_SISTER_ALYTHESS_DEAD","Alythess! Your fire burns within me!"),
(25165,8,0,14,12486,100,"eredar - YELL_SAC_KILL_1","Shadow engulf."),
(25165,8,1,14,12487,100,"eredar - YELL_SAC_KILL_2","Ee-nok Kryul!"),
(25165,9,0,14,12485,100,"eredar - YELL_SHADOW_NOVA","Shadow to the aid of fire!"),
(25166,0,0,14,0,100,"eredar - YELL_INTRO_ALY_2","Depravity..."),
(25166,1,0,14,0,100,"eredar - YELL_INTRO_ALY_4","Hatred..."),
(25166,2,0,14,0,100,"eredar - YELL_INTRO_ALY_6","Chaos..."),
(25166,3,0,14,0,100,"eredar - YELL_INTRO_ALY_8","These are the pillars..."),
(25166,4,0,41,0,100,"eredar - EMOTE_CONFLAGRATION","%s directs Conflagration at $N"),
(25166,5,0,14,12490,100,"eredar - YELL_ALY_KILL_1","Fire consume."),
(25166,5,1,14,12491,100,"eredar - YELL_ALY_KILL_2","Ed-ir Halach!"),
(25166,6,0,14,12494,100,"eredar - YELL_ALY_DEAD","De-ek Anur!"),
(25166,7,0,14,12492,100,"eredar - YELL_SISTER_SACROLASH_DEAD","Sacrolash!"),
(25166,8,0,14,12489,100,"eredar - YELL_CANFLAGRATION","Fire to the aid of shadow!"),
(25166,9,0,14,12493,100,"eredar - YELL_BERSERK","Your luck has run its curse!");
DELETE FROM `script_texts` WHERE `entry` BETWEEN -1580098 AND -1580066;
DELETE FROM `creature_text` WHERE `entry` IN (25608,25319,25315,26046);
INSERT INTO `creature_text`(`entry`,`groupid`,`id`,`type`,`sound`,`probability`,`comment`,`text`) VALUES
(25608,0,0,14,12495,100,"KJ - SAY_KJ_OFFCOMBAT1","All my plans have led to this!"),
(25608,0,1,14,12496,100,"KJ - SAY_KJ_OFFCOMBAT2","Stay on task! Do not waste time!"),
(25608,0,2,14,12497,100,"KJ - SAY_KJ_OFFCOMBAT3","I have waited long enough!"),
(25608,0,3,14,12498,100,"KJ - SAY_KJ_OFFCOMBAT4","Fail me and suffer for eternity!"),
(25608,0,4,14,12499,100,"KJ - SAY_KJ_OFFCOMBAT5","Drain the girl! Drain her power until there is nothing but a vacant shell!"),
(25319,0,0,14,12449,100,"KJ - SAY_KALECGOS_ENCOURAGE","Strike now, heroes, while he is weakened! Vanquish the Deceiver!"),
(25319,1,0,14,12440,100,"KJ - SAY_KALECGOS_READY1","I will channel my power into the orbs, be ready!"),
(25319,2,0,14,12441,100,"KJ - SAY_KALECGOS_READY2","I have empowered another orb! Use it quickly!"),
(25319,3,0,14,12442,100,"KJ - SAY_KALECGOS_READY3","Another orb is ready! Make haste!"),
(25319,4,0,14,12443,100,"KJ - SAY_KALECGOS_READY4","I have channeled all I can! The power is in your hands!"),
(25319,5,0,14,12445,100,"KJ - SAY_KALECGOS_AWAKEN","Anveena, you must awaken, this world needs you!"),
(25319,6,0,14,12446,100,"KJ - SAY_KALECGOS_LETGO","You must let go! You must become what you were always meant to be! The time is now, Anveena!"),
(25319,7,0,14,12447,100,"KJ - SAY_KALECGOS_FOCUS","Anveena, I love you! Focus on my voice, come back for me now! Only you can cleanse the Sunwell!"),
(25319,8,0,14,12448,100,"KJ - SAY_KALECGOS_FATE","Yes, Anveena! Let fate embrace you now!"),
(25319,9,0,14,12450,100,"KJ - SAY_KALECGOS_GOODBYE","Goodbye, Anveena, my love. Few will remember your name, yet this day you change the course of destiny. What was once corrupt is now pure. Heroes, do not let her sacrifice be in vain."),
(25319,10,0,14,12438,100,"KJ - SAY_KALECGOS_JOIN","You are not alone. The Blue Dragonflight shall help you vanquish the Deceiver."),
(25315,0,0,14,12527,100,"KJ - SAY_KJ_DEATH","Nooooooooooooo!"),
(25315,1,0,14,12501,100,"KJ - SAY_KJ_SLAY1","Another step towards destruction!"),
(25315,1,1,14,12502,100,"KJ - SAY_KJ_SLAY2","Anak-ky'ri!"),
(25315,2,0,14,12503,100,"KJ - SAY_KJ_REFLECTION1","Who can you trust?"),
(25315,2,1,14,12504,100,"KJ - SAY_KJ_REFLECTION2","The enemy is among you."),
(25315,3,0,14,12500,100,"KJ - SAY_KJ_EMERGE","The expendible have perished... So be it! Now I shall succeed where Sargeras could not! I will bleed this wretched world and secure my place as the true master of the Burning Legion. The end has come! Let the unraveling of this world commence!"),
(25315,4,0,14,12505,100,"KJ - SAY_KJ_DARKNESS1","Chaos!"),
(25315,4,1,14,12506,100,"KJ - SAY_KJ_DARKNESS2","Destruction!"),
(25315,4,2,14,12507,100,"KJ - SAY_KJ_DARKNESS3","Oblivion!"),
(25315,5,0,14,12508,100,"KJ - SAY_KJ_PHASE3","I will not be denied! This world shall fall!"),
(25315,6,0,14,12509,100,"KJ - SAY_KJ_PHASE4","Do not harbor false hope. You cannot win!"),
(25315,7,0,14,12510,100,"KJ - SAY_KJ_PHASE5","Aggghh! The powers of the Sunwell... turned... against me! What have you done? WHAT HAVE YOU DONE?"),
(25315,8,0,41,0,100,"KJ - EMOTE_KJ_DARKNESS","%s begins to channel dark energy"),
(26046,0,0,14,12511,100,"KJ - SAY_ANVEENA_IMPRISONED","I serve only the Master now."),
(26046,1,0,14,12512,100,"KJ - SAY_ANVEENA_LOST","But I'm... lost... I cannot find my way back!"),
(26046,2,0,14,12513,100,"KJ - SAY_ANVEENA_KALEC","Kalec... Kalec?"),
(26046,3,0,14,12514,100,"KJ - SAY_ANVEENA_GOODBYE","The nightmare is over, the spell is broken! Goodbye, Kalec, my love!");
DELETE FROM `script_texts` WHERE `entry` BETWEEN -1580043 AND -1580036;
DELETE FROM `creature_text` WHERE `entry`=25038;
INSERT INTO `creature_text`(`entry`,`groupid`,`id`,`type`,`sound`,`probability`,`comment`,`text`) VALUES
(25038,0,0,14,12477,100,"felmyst - YELL_BIRTH","Glory to Kil'jaeden! Death to all who oppose!"),
(25038,1,0,14,12480,100,"felmyst - YELL_KILL1","I kill for the master!"),
(25038,1,1,14,12481,100,"felmyst - YELL_KILL2","The end has come!"),
(25038,2,0,14,12478,100,"felmyst - YELL_BREATH","Choke on your final breath!"),
(25038,3,0,14,12479,100,"felmyst - YELL_TAKEOFF","I am stronger than ever before!"),
(25038,4,0,14,12482,100,"felmyst - YELL_BERSERK","No more hesitation! Your fates are written!"),
(25038,5,0,14,12483,100,"felmyst - YELL_DEATH","Kil'jaeden... will... prevail..."),
(25038,6,0,14,12439,100,"felmyst - YELL_KALECGOS","Madrigosa deserved a far better fate. You did what had to be done, but this battle is far from over.");
DELETE FROM `script_texts` WHERE `entry` BETWEEN -1000292 AND -1000287;
DELETE FROM `creature_text` WHERE `entry`=7806;
INSERT INTO `creature_text`(`entry`,`groupid`,`id`,`type`,`sound`,`probability`,`comment`,`text`) VALUES
(7806,0,0,12,0,100,"oox SAY_OOX_START","Emergency power activated! Initializing ambulanory motor! CLUCK!"),
(7806,1,0,12,0,100,"oox SAY_OOX_AGGRO1","Physical threat detected! Evasive action! CLUCK!"),
(7806,1,1,12,0,100,"oox SAY_OOX_AGGRO2","Thread analyzed! Activating combat plan beta! CLUCK!"),
(7806,2,0,12,0,100,"oox SAY_OOX_AMBUSH","CLUCK! Sensors detect spatial anomaly - danger imminent! CLUCK!"),
(7806,3,0,12,0,100,"oox SAY_OOX_AMBUSH_REPLY","No one challanges the Wastewander nomads - not even robotic chickens! ATTACK!"),
(7806,4,0,12,0,100,"oox SAY_OOX_END","Cloaking systems online! CLUCK! Engaging cloak for transport to Booty Bay!");
DELETE FROM `script_texts` WHERE `entry` BETWEEN -1000409 AND -1000403;
DELETE FROM `creature_text` WHERE `entry` IN (2691,7780);
INSERT INTO `creature_text`(`entry`,`groupid`,`id`,`type`,`sound`,`probability`,`comment`,`text`) VALUES
(2691,0,0,12,0,100,"SAY_RIN_BY_OUTRUNNER","Attack my sisters! The troll must not escape!"),
(7780,0,0,12,0,100,"SAY_RIN_FREE","Rin'ji is free!"),
(7780,1,0,12,0,100,"SAY_RIN_HELP_1","Rin'ji needs help!"),
(7780,1,1,12,0,100,"SAY_RIN_HELP_2","Rin'ji is being attacked!"),
(7780,2,0,12,0,100,"SAY_RIN_COMPLETE","Rin'ji can see road now, $n. Rin'ji knows the way home."),
(7780,3,0,12,0,100,"SAY_RIN_PROGRESS_1","Rin'ji will tell you secret now... $n, should go to the Overlook Cliffs. Rin'ji hid something on island there"),
(7780,4,0,12,0,100,"SAY_RIN_PROGRESS_2","You find it, you keep it! Don't tell no one that Rin'ji talked to you!");
DELETE FROM `script_texts` WHERE `entry` BETWEEN -1568009 AND -1568000;
DELETE FROM `creature_text` WHERE `entry`=23578;
INSERT INTO `creature_text`(`entry`,`groupid`,`id`,`type`,`sound`,`probability`,`comment`,`text`) VALUES
(23578,0,0,14,12031,100,"janalai SAY_AGGRO","Spirits of da wind be your doom!"),
(23578,1,0,14,12032,100,"janalai SAY_FIRE_BOMBS","I burn ya now!"),
(23578,2,0,14,12033,100,"janalai SAY_SUMMON_HATCHER","Where ma hatcha? Get to work on dem eggs!"),
(23578,3,0,14,12034,100,"janalai SAY_ALL_EGGS","I show you strength... in numbers."),
(23578,4,0,14,12035,100,"janalai SAY_BERSERK","You done run outta time!"),
(23578,5,0,14,12036,100,"janalai SAY_SLAY_1","It all be over now, mon!"),
(23578,5,1,14,12037,100,"janalai SAY_SLAY_2","Tazaga-choo!"),
(23578,6,0,14,12038,100,"janalai SAY_DEATH","Zul'jin... got a surprise for you..."),
(23578,7,0,14,12039,100,"janalai SAY_EVENT_STRANGERS","Come, strangers. The spirit of the dragonhawk hot be hungry for worthy souls."),
(23578,8,0,14,12040,100,"janalai SAY_EVENT_FRIENDS","Come, friends. Your bodies gonna feed ma hatchlings, and your souls are going to feed me with power!");
DELETE FROM `script_texts` WHERE `entry` BETWEEN -1469006 AND -1469004;
DELETE FROM `creature_text` WHERE `entry`=10162;
INSERT INTO `creature_text`(`entry`,`groupid`,`id`,`type`,`sound`,`probability`,`comment`,`text`) VALUES
(10162,0,0,12,0,100,"victor_nefarius SAY_GAMESBEGIN_1","In this world where time is your enemy, it is my greatest ally. This grand game of life that you think you play in fact plays you. To that I say..."),
(10162,1,0,14,8280,100,"victor_nefarius SAY_GAMESBEGIN_2","Let the games begin!"),
(10162,2,0,14,8279,100,"victor_nefarius SAY_VAEL_INTRO","Ah, the heroes. You are persistent, aren't you. Your allied attempted to match his power against mine, and had to pay the price. Now he shall serve me, by slaughtering you. Get up little red wyrm and destroy them!");
@@ -0,0 +1,169 @@
SET @GOGUID := 380; -- need 1 set by TDB
UPDATE `creature_loot_template` SET `ChanceOrQuestChance`=66 WHERE `item`=38303 AND `entry`=26620;
UPDATE `creature_loot_template` SET `ChanceOrQuestChance`=67 WHERE `item`=38303 AND `entry`=26639;
UPDATE `creature_loot_template` SET `ChanceOrQuestChance`=15 WHERE `item`=38303 AND `entry`=27431;
DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=13 AND `SourceEntry`=47110;
DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=15 AND `SourceGroup`=9615 AND `SourceEntry`=1;
INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`SourceId`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionTarget`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`NegativeCondition`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
(13,1,47110,0,0,31,0,3,26498,0,0,0,'','Spell Summon Drakuru''s Image targets Drakuru''s Bunny 01'),
(13,1,47110,0,1,31,0,3,26559,0,0,0,'','Spell Summon Drakuru''s Image targets Drakuru''s Bunny 02'),
(13,1,47110,0,2,31,0,3,26700,0,0,0,'','Spell Summon Drakuru''s Image targets Drakuru''s Bunny 03'),
(13,1,47110,0,3,31,0,3,26789,0,0,0,'','Spell Summon Drakuru''s Image targets Drakuru''s Bunny 04'),
(13,1,47110,0,4,31,0,3,28015,0,0,0,'','Spell Summon Drakuru''s Image targets Drakuru''s Bunny 05'),
(15,9615,1,0,0,8,0,11990,0,0,0,0,'','Drakuru - Show gossip option if player has rewarded quest 11990'),
(15,9615,1,0,0,8,0,12238,0,0,1,0,'','Drakuru - Show gossip option if player has not rewarded quest 12238'),
(15,9615,1,0,0,2,0,35797,1,1,1,0,'','Drakuru - Show gossip option if player has not item Drakuru''s Elixir');
DELETE FROM `smart_scripts` WHERE `entryorguid`=26423 AND `source_type`=0 AND `id` IN (2,3);
DELETE FROM `smart_scripts` WHERE `entryorguid` IN (26498,26559,26700,26789) 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
(26423,0,2,3,62,0,100,0,9615,1,0,0,85,50021,0,0,0,0,0,7,0,0,0,0,0,0,0,'Drakuru - On gossip option select - Invoker spellcast Replace Drakuru''s Elixir'),
(26423,0,3,0,61,0,100,0,0,0,0,0,72,0,0,0,0,0,0,7,0,0,0,0,0,0,0,'Drakuru - On gossip option select - Close gossip'),
(26498,0,0,0,8,0,100,0,47110,0,0,0,11,47117,0,0,0,0,0,7,0,0,0,0,0,0,0,'Drakuru''s Bunny 01 - On spellhit - Spellcast Script Cast Summon Image of Drakuru'),
(26559,0,0,0,8,0,100,0,47110,0,0,0,11,47149,0,0,0,0,0,7,0,0,0,0,0,0,0,'Drakuru''s Bunny 02 - On spellhit - Spellcast Script Cast Summon Image of Drakuru 02'),
(26700,0,0,0,8,0,100,0,47110,0,0,0,11,47316,0,0,0,0,0,7,0,0,0,0,0,0,0,'Drakuru''s Bunny 03 - On spellhit - Spellcast Script Cast Summon Image of Drakuru 03'),
(26789,0,0,0,8,0,100,0,47110,0,0,0,11,47405,0,0,0,0,0,7,0,0,0,0,0,0,0,'Drakuru''s Bunny 04 - On spellhit - Spellcast Script Cast Summon Image of Drakuru 04');
DELETE FROM `creature` WHERE `guid` IN (43494,43496,43498,43501); -- double spawned
DELETE FROM `gameobject` WHERE `guid`=364; -- double spawned
-- Creature Template update from sniff
UPDATE `creature_template` SET `faction_A`=14, `faction_H`=14, `speed_walk`=2, `speed_run`=0.992062, `unit_flags`=768, `equipment_id`=2481 WHERE `entry`=28498;
UPDATE `creature_template` SET `gossip_menu_id`=9707, `faction_A`=190, `faction_H`=190, `speed_walk`=2, `npcflag`=`npcflag`|1, `unit_flags`=33024 WHERE `entry`=28016;
UPDATE `creature_template` SET `AIName`='SmartAI' WHERE `entry` IN (28015,28016,28492,28498);
-- Gossip Menu insert from sniff
DELETE FROM `gossip_menu` WHERE `entry`=9707 AND `text_id`=13265;
INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES
(9707,13265);
DELETE FROM `creature_equip_template` WHERE `entry`=2481;
INSERT INTO `creature_equip_template` (`entry`,`itemEntry1`,`itemEntry2`,`itemEntry3`) VALUES
(2481,33475,0,0);
UPDATE `creature_model_info` SET `bounding_radius`=2.5, `combat_reach`=2.5 WHERE `modelid`=28122;
DELETE FROM `conditions` WHERE `SourceTypeOrReferenceId`=13 AND `SourceEntry`=51825;
INSERT INTO `conditions` (`SourceTypeOrReferenceId`,`SourceGroup`,`SourceEntry`,`SourceId`,`ElseGroup`,`ConditionTypeOrReference`,`ConditionTarget`,`ConditionValue1`,`ConditionValue2`,`ConditionValue3`,`NegativeCondition`,`ErrorTextId`,`ScriptName`,`Comment`) VALUES
(13,1,51825,0,0,31,0,3,28016,0,0,0,'','Spell Arthas Scourge Drakuru targets Drakuru');
-- Creature text insert from sniff
DELETE FROM `creature_text` WHERE `entry` IN (28016,28498);
INSERT INTO `creature_text` (`entry`,`groupid`,`id`,`text`,`type`,`language`,`probability`,`emote`,`duration`,`sound`,`comment`) VALUES
(28016,0,0,'Ahh, Back in Drak''Tharon at last!',12,0,100,71,0,14006,'Drakuru'),
(28016,1,0,'Drakuru casts his gaze down on Drak''Tharon Keep.',16,0,100,0,0,0,'Drakuru'),
(28016,2,0,'Ya done well, mon....',12,0,100,0,0,14007,'Drakuru'),
(28016,3,0,'Ya surpassed my greatest hopes.',12,0,100,0,0,14008,'Drakuru'),
(28016,4,0,'For your efforts, you be gettin'' da greatest of rewards....',12,0,100,0,0,14009,'Drakuru'),
(28016,5,0,'Revelation!',12,0,100,5,0,14010,'Drakuru'),
(28016,6,0,'Be still, friend, and behold da truth of things!',12,0,100,0,0,14011,'Drakuru'),
(28016,7,0,'Master, my mission be complete.',12,0,100,0,0,14012,'Drakuru'),
(28016,8,0,'With da help of these mortals, dis region been cleansed of all who oppose us.',12,0,100,0,0,14013,'Drakuru'),
(28016,9,0,'As you wish, master.',12,0,100,396,0,14014,'Drakuru'),
(28016,10,0,'Forgive my deception, mon. It all been for your own good.',12,0,100,396,0,14015,'Drakuru'),
(28016,11,0,'Ya needed ta prove yer worthiness....',12,0,100,396,0,14016,'Drakuru'),
(28016,12,0,'I be needin'' worthy underlings in Zul''Drak, mon. Ones ready to wield real power.',12,0,100,396,0,14017,'Drakuru'),
(28016,13,0,'You see for yourself now. Da Lich King be generous to dem who obey.',12,0,100,396,0,14018,'Drakuru'),
(28016,14,0,'Follow dis path, mon, and soon you be tastin'' immortality!',12,0,100,396,0,14019,'Drakuru'),
(28498,0,0,'You have done well, Drakuru.',12,0,100,396,0,14749,'The Lich King'),
(28498,1,0,'Your betrayal of the Drakkari Empire has borne me a new army.',12,0,100,396,0,14750,'The Lich King'),
(28498,2,0,'Your army....',12,0,100,0,0,14751,'The Lich King'),
(28498,3,0,'Arise, and accept my gift.',12,0,100,396,0,14752,'The Lich King'),
(28498,4,0,'I charge you now with the cleansing of Zul''Drak, Drakuru.',12,0,100,397,0,14753,'The Lich King'),
(28498,5,0,'Fail me and it shall be your undoing...',12,0,100,396,0,14754,'The Lich King'),
(28498,6,0,'Succeed, and even greater power shall be yours!',12,0,100,396,0,14755,'The Lich King');
DELETE FROM `smart_scripts` WHERE `entryorguid` IN (28015,28016,28498,-127497,-127496,-127495,-127493) AND `source_type`=0;
DELETE FROM `smart_scripts` WHERE `entryorguid` IN (28492*100,28016*100,28016*100+1,28498*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
(28015,0,0,0,8,0,100,0,47110,0,0,0,11,50439,0,0,0,0,0,7,0,0,0,0,0,0,0,'Drakuru''s Bunny 05 - On spellhit - Spellcast Script Cast Summon Image of Drakuru 05'),
(28016,0,0,0,54,0,100,0,0,0,0,0,80,28016*100+1,2,0,0,0,0,1,0,0,0,0,0,0,0,'Drakuru - On update - Run script'),
(28016,0,1,2,40,0,100,0,1,0,0,0,54,2000,0,0,0,0,0,1,0,0,0,0,0,0,0,'Drakuru - On WP 1 - Pause movement 2 seconds'),
(28016,0,2,0,61,0,100,0,0,0,0,0,1,0,0,0,0,0,0,23,0,0,0,0,0,0,0,'Drakuru - On WP 1 - Say line'),
(28016,0,3,4,40,0,100,0,5,0,0,0,54,8000,0,0,0,0,0,1,0,0,0,0,0,0,0,'Drakuru - On WP 5 - Pause movement 8 seconds'),
(28016,0,4,5,61,0,100,0,0,0,0,0,1,1,0,0,0,0,0,23,0,0,0,0,0,0,0,'Drakuru - On WP 5 - Say line'),
(28016,0,5,0,61,0,100,0,0,0,0,0,80,28016*100,2,0,0,0,0,1,0,0,0,0,0,0,0,'Drakuru - On WP 5 - Run script'),
(28016,0,6,7,40,0,100,0,8,0,0,0,54,4000,0,0,0,0,0,1,0,0,0,0,0,0,0,'Drakuru - On WP 8 - Pause movement 4 seconds'),
(28016,0,7,8,61,0,100,0,0,0,0,0,1,3,0,0,0,0,0,23,0,0,0,0,0,0,0,'Drakuru - On WP 8 - Say line'),
(28016,0,8,0,61,0,100,0,0,0,0,0,90,8,0,0,0,0,0,1,0,0,0,0,0,0,0,'Drakuru - On WP 8 - Set unit_field_bytes1'),
(28016,0,9,10,40,0,100,0,9,0,0,0,54,4000,0,0,0,0,0,1,0,0,0,0,0,0,0,'Drakuru - On WP 9 - Pause movement 4 seconds'),
(28016,0,10,0,61,0,100,0,0,0,0,0,90,8,0,0,0,0,0,1,0,0,0,0,0,0,0,'Drakuru - On WP 9 - Set unit_field_bytes1'),
(28016,0,11,12,40,0,100,0,10,0,0,0,54,3000,0,0,0,0,0,1,0,0,0,0,0,0,0,'Drakuru - On WP 10 - Pause movement 3 seconds'),
(28016,0,12,13,61,0,100,0,0,0,0,0,1,4,0,0,0,0,0,23,0,0,0,0,0,0,0,'Drakuru - On WP 10 - Say line'),
(28016,0,13,0,61,0,100,0,0,0,0,0,90,8,0,0,0,0,0,1,0,0,0,0,0,0,0,'Drakuru - On WP 10 - Set unit_field_bytes1'),
(28016,0,14,15,40,0,100,0,12,0,0,0,55,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'Drakuru - On WP 12 - Stop movement'),
(28016,0,15,16,61,0,100,0,0,0,0,0,66,0,0,0,0,0,0,8,0,0,0,0,0,0,4.694936,'Drakuru - On WP 12 - Set orientation'),
(28016,0,16,0,61,0,100,0,0,0,0,0,1,5,0,0,0,0,0,23,0,0,0,0,0,0,0,'Drakuru - On WP 12 - Say line'),
(28016,0,18,0,8,0,100,0,51825,0,0,0,11,51834,0,0,0,0,0,1,0,0,0,0,0,0,0,'Drakuru - On spellhit Arthas Scourge Drakuru - Spellcast Drakuru Transform'),
(28498,0,0,0,54,0,100,0,0,0,0,0,53,0,28498,0,0,0,0,1,0,0,0,0,0,0,0,'The Lich King - Just summoned - Start WP movement'),
(28498,0,1,2,40,0,100,0,2,0,0,0,54,83000,0,0,0,0,0,1,0,0,0,0,0,0,0,'The Lich King - On WP 2 - Pause movement 83 seconds'),
(28498,0,2,0,61,0,100,0,0,0,0,0,80,28498*100,2,0,0,0,0,1,0,0,0,0,0,0,0,'The Lich King - On WP 2 - Run script'),
(28498,0,3,4,40,0,100,0,3,0,0,0,45,0,2,0,0,0,0,10,127495,0,0,0,0,0,0,'The Lich King - On WP 3 - Despawn'),
(28498,0,4,0,61,0,100,0,0,0,0,0,41,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'The Lich King - On WP 3 - Despawn'),
(-127497,0,0,1,38,0,100,0,0,1,0,0,11,51802,0,0,0,0,0,1,0,0,0,0,0,0,0,'Drak''Tharon - Drakuru Event Invisman 00 - On data 0 1 - Spellcast Red Lightning Bolt'),
(-127497,0,1,0,61,0,100,0,0,0,0,0,45,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'Drak''Tharon - Drakuru Event Invisman 00 - On data 0 1 - Set data 0 0'),
(-127496,0,0,1,38,0,100,0,0,1,0,0,11,51802,0,0,0,0,0,1,0,0,0,0,0,0,0,'Drak''Tharon - Drakuru Event Invisman 00 - On data 0 1 - Spellcast Red Lightning Bolt'),
(-127496,0,1,0,61,0,100,0,0,0,0,0,45,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'Drak''Tharon - Drakuru Event Invisman 00 - On data 0 1 - Set data 0 0'),
(-127493,0,0,1,38,0,100,0,0,1,0,0,11,51802,0,0,0,0,0,1,0,0,0,0,0,0,0,'Drak''Tharon - Drakuru Event Invisman 00 - On data 0 1 - Spellcast Red Lightning Bolt'),
(-127493,0,1,0,61,0,100,0,0,0,0,0,45,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'Drak''Tharon - Drakuru Event Invisman 00 - On data 0 1 - Set data 0 0'),
(-127495,0,0,0,38,0,100,0,0,1,0,0,11,51807,0,0,0,0,0,1,0,0,0,0,0,0,0,'Drak''Tharon - Drakuru Event Invisman 00 - On data 0 1 - Spellcast Arthas Portal'),
(-127495,0,1,2,38,0,100,0,0,2,0,0,80,28492*100,2,0,0,0,0,1,0,0,0,0,0,0,0,'Drak''Tharon - Drakuru Event Invisman 00 - On data 0 2 set - Start script'),
(-127495,0,2,0,61,0,100,0,0,0,0,0,45,0,0,0,0,0,0,1,0,0,0,0,0,0,0,'Drak''Tharon - Drakuru Event Invisman 00 - On data 0 2 set - Set data 0 0'),
(28016*100,9,0,0,0,0,100,0,6000,6000,0,0,5,21,0,0,0,0,0,1,0,0,0,0,0,0,0,'Drakuru script - Play emote applaud'),
(28016*100,9,1,0,0,0,100,0,2000,2000,0,0,1,2,0,0,0,0,0,23,0,0,0,0,0,0,0,'Drakuru script - Say line'),
(28016*100,9,2,0,0,0,100,0,6500,6500,0,0,50,190597,22.5,0,0,0,0,8,0,0,0,-241.5434,-675.4514,132.2164,-1.029743,'Drakuru script - Summon gameobject'),
(28016*100,9,3,0,0,0,100,0,6000,6000,0,0,50,190596,15.5,0,0,0,0,8,0,0,0,-235.8484,-680.4561,131.885,-2.792518,'Drakuru script - Summon gameobject'),
(28016*100,9,4,0,0,0,100,0,5000,5000,0,0,50,190595,11,0,0,0,0,8,0,0,0,-233.977,-673.1368,132.0999,0.7853968,'Drakuru script - Summon gameobject'),
(28016*100,9,5,0,0,0,100,0,6000,6000,0,0,11,51795,0,0,0,0,0,1,0,0,0,0,0,0,0,'Drakuru script - Spellcast Shadow Channelling (10 sec)'),
(28016*100,9,6,0,0,0,100,0,5000,5000,0,0,45,0,1,0,0,0,0,10,127497,0,0,0,0,0,0,'Drakuru script - Set data 0 1'),
(28016*100,9,7,0,0,0,100,0,0,0,0,0,45,0,1,0,0,0,0,10,127496,0,0,0,0,0,0,'Drakuru script - Set data 0 1'),
(28016*100,9,8,0,0,0,100,0,0,0,0,0,45,0,1,0,0,0,0,10,127493,0,0,0,0,0,0,'Drakuru script - Set data 0 1'),
(28016*100,9,9,0,0,0,100,0,4000,4000,0,0,45,0,1,0,0,0,0,10,127495,0,0,0,0,0,0,'Drakuru script - Set data 0 1'),
(28016*100,9,10,0,0,0,100,0,1000,1000,0,0,1,6,0,0,0,0,0,23,0,0,0,0,0,0,0,'Drakuru script - Say line'),
(28016*100,9,11,0,0,0,100,0,5000,5000,0,0,12,28498,8,0,0,0,0,8,0,0,0,-237.1671,-702.1379,128.8857,1.570796,'Drakuru script - Summon Lich King'),
(28016*100,9,12,0,0,0,100,0,4000,4000,0,0,90,8,0,0,0,0,0,1,0,0,0,0,0,0,0,'Drakuru script - Set unit_field_bytes1'),
(28016*100,9,13,0,0,0,100,0,2000,2000,0,0,1,7,0,0,0,0,0,23,0,0,0,0,0,0,0,'Drakuru script - Say line'),
(28016*100,9,14,0,0,0,100,0,6000,6000,0,0,1,8,0,0,0,0,0,23,0,0,0,0,0,0,0,'Drakuru script - Say line'),
(28016*100,9,15,0,0,0,100,0,33000,33000,0,0,91,8,0,0,0,0,0,1,0,0,0,0,0,0,0,'Drakuru script - Remove unit_field_bytes1'),
(28016*100,9,16,0,0,0,100,0,6000,6000,0,0,5,15,0,0,0,0,0,1,0,0,0,0,0,0,0,'Drakuru script - Play emote roar'),
(28016*100,9,17,0,0,0,100,0,0,0,0,0,4,3326,0,0,0,0,0,1,0,0,0,0,0,0,0,'Drakuru script - Play sound roar'),
(28016*100,9,18,0,0,0,100,0,12000,12000,0,0,1,9,0,0,0,0,0,23,0,0,0,0,0,0,0,'Drakuru script - Say line'),
(28016*100,9,19,0,0,0,100,0,27000,27000,0,0,66,0,0,0,0,0,0,8,0,0,0,0,0,0,2.70526,'Drakuru script - Set orientation'),
(28016*100,9,20,0,0,0,100,0,7000,7000,0,0,1,10,0,0,0,0,0,23,0,0,0,0,0,0,0,'Drakuru script - Say line'),
(28016*100,9,21,0,0,0,100,0,8000,8000,0,0,1,11,0,0,0,0,0,23,0,0,0,0,0,0,0,'Drakuru script - Say line'),
(28016*100,9,22,0,0,0,100,0,8000,8000,0,0,1,12,0,0,0,0,0,23,0,0,0,0,0,0,0,'Drakuru script - Say line'),
(28016*100,9,23,0,0,0,100,0,11000,11000,0,0,1,13,0,0,0,0,0,23,0,0,0,0,0,0,0,'Drakuru script - Say line'),
(28016*100,9,24,0,0,0,100,0,7000,7000,0,0,1,14,0,0,0,0,0,23,0,0,0,0,0,0,0,'Drakuru script - Say line'),
(28016*100,9,25,0,0,0,100,0,0,0,0,0,81,3,0,0,0,0,0,1,0,0,0,0,0,0,0,'Drakuru script - Set npcflag'),
(28016*100+1,9,0,0,0,0,100,0,0,0,0,0,83,3,0,0,0,0,0,1,0,0,0,0,0,0,0,'Drakuru script - Remove npcflag'),
(28016*100+1,9,1,0,0,0,100,0,3000,3000,0,0,53,0,28016,0,0,0,0,1,0,0,0,0,0,0,0,'Drakuru script - Start WP movement'),
(28492*100,9,0,0,0,0,100,0,5000,5000,0,0,28,51807,0,0,0,0,0,1,0,0,0,0,0,0,0,'Drak''Tharon - Drakuru Event Invisman 00 script - Remove aura Arthas Portal'),
(28498*100,9,0,0,0,0,100,0,15000,15000,0,0,1,0,0,0,0,0,0,23,0,0,0,0,0,0,0,'The Lich King script - Say line'),
(28498*100,9,1,0,0,0,100,0,6000,6000,0,0,1,1,0,0,0,0,0,23,0,0,0,0,0,0,0,'The Lich King script - Say line'),
(28498*100,9,2,0,0,0,100,0,10000,10000,0,0,1,2,0,0,0,0,0,23,0,0,0,0,0,0,0,'The Lich King script - Say line'),
(28498*100,9,3,0,0,0,100,0,6000,6000,0,0,1,3,0,0,0,0,0,23,0,0,0,0,0,0,0,'The Lich King script - Say line'),
(28498*100,9,4,0,0,0,100,0,5000,5000,0,0,11,51825,0,0,0,0,0,9,28016,0,10,0,0,0,0,'The Lich King script - Spellcast Arthas Scourge Drakuru'),
(28498*100,9,5,0,0,0,100,0,8000,8000,0,0,1,4,0,0,0,0,0,23,0,0,0,0,0,0,0,'The Lich King script - Say line'),
(28498*100,9,6,0,0,0,100,0,16000,16000,0,0,1,5,0,0,0,0,0,23,0,0,0,0,0,0,0,'The Lich King script - Say line'),
(28498*100,9,7,0,0,0,100,0,6000,6000,0,0,1,6,0,0,0,0,0,23,0,0,0,0,0,0,0,'The Lich King script - Say line');
DELETE FROM `creature_template_addon` WHERE `entry` IN (28016,28498);
INSERT INTO `creature_template_addon` (`entry`,`path_id`,`mount`,`bytes1`,`bytes2`,`emote`,`auras`) VALUES
(28016,0,0,0,1,0,''),
(28498,0,0,0,1,0,'');
DELETE FROM `spell_scripts` WHERE `id`=50439;
INSERT INTO `spell_scripts` (`id`,`effIndex`,`delay`,`command`,`datalong`,`datalong2`,`dataint`,`x`,`y`,`z`,`o`) VALUES
(50439,0,0,15,50440,2,0,0,0,0,0); -- Script Cast Summon Image of Drakuru - Spellcast Envision Drakuru
DELETE FROM `spell_linked_spell` WHERE `spell_trigger`=50440;
INSERT INTO `spell_linked_spell` (`spell_trigger`,`spell_effect`,`type`,`comment`) VALUES
(50440,50446,1,'On Envision Drakuru - Spellcast Summon Drakuru');
DELETE FROM `waypoints` WHERE `entry` IN (28016,28498);
INSERT INTO `waypoints` (`entry`,`pointid`,`position_x`,`position_y`,`position_z`,`point_comment`) VALUES
(28016, 1,-240.1569,-630.3474,116.4973,'pause and text'),
(28016, 2,-237.9522,-652.9613,131.131,''),
(28016, 3,-252.4211,-663.5404,131.2025,''),
(28016, 4,-261.2747,-667.5787,131.1916,''),
(28016, 5,-264.9144,-667.5964,131.1769,'pause and text'),
(28016, 6,-258.2646,-669.388,131.1983,''),
(28016, 7,-248.6646,-674.2229,132.1737,''),
(28016, 8,-243.7752,-674.9374,131.8365,'pause'),
(28016, 9,-236.3793,-678.6719,131.8578,'pause'),
(28016,10,-235.4743,-674.3039,131.8569,'pause'),
(28016,11,-234.869,-674.1355,131.8544,''),
(28016,12,-237.0977,-676.1853,131.8683,''),
(28498,1,-237.4704,-689.8357,129.5296,''),
(28498,2,-237.2737,-686.5334,132.1735,'pause'),
(28498,3,-237.0624,-700.3822,130.4357,'');
DELETE FROM `gameobject` WHERE `guid`=@GOGUID;
INSERT INTO `gameobject` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`position_x`,`position_y`,`position_z`,`orientation`,`rotation0`,`rotation1`,`rotation2`,`rotation3`,`spawntimesecs`,`animprogress`,`state`) VALUES
(@GOGUID,300188,600,3,1,-236.766,-614.774,116.487,1.5708,0,0,0,1,180,0,1);
@@ -753,12 +753,16 @@ void SmartScript::ProcessAction(SmartScriptHolder& e, Unit* unit, uint32 var0, u
}
case SMART_ACTION_CALL_GROUPEVENTHAPPENS:
{
if (!unit)
break;
if (IsPlayer(unit) && GetBaseObject())
{
unit->ToPlayer()->GroupEventHappens(e.action.quest.quest, GetBaseObject());
sLog->outDebug(LOG_FILTER_DATABASE_AI, "SmartScript::ProcessAction: SMART_ACTION_CALL_GROUPEVENTHAPPENS: Player %u, group credit for quest %u",
unit->GetGUIDLow(), e.action.quest.quest);
}
// Special handling for vehicles
if (Vehicle* vehicle = unit->GetVehicleKit())
for (SeatMap::iterator it = vehicle->Seats.begin(); it != vehicle->Seats.end(); ++it)
File diff suppressed because it is too large Load Diff
+72 -74
View File
@@ -53,10 +53,10 @@ enum ChatNotify
CHAT_MODERATION_OFF_NOTICE = 0x10, //+ "[%s] Channel moderation disabled by %s.";
CHAT_MUTED_NOTICE = 0x11, //+ "[%s] You do not have permission to speak.";
CHAT_PLAYER_KICKED_NOTICE = 0x12, //? "[%s] Player %s kicked by %s.";
CHAT_BANNED_NOTICE = 0x13, //+ "[%s] You are banned from that channel.";
CHAT_PLAYER_BANNED_NOTICE = 0x14, //? "[%s] Player %s banned by %s.";
CHAT_BANNED_NOTICE = 0x13, //+ "[%s] You are bannedStore from that channel.";
CHAT_PLAYER_BANNED_NOTICE = 0x14, //? "[%s] Player %s bannedStore by %s.";
CHAT_PLAYER_UNBANNED_NOTICE = 0x15, //? "[%s] Player %s unbanned by %s.";
CHAT_PLAYER_NOT_BANNED_NOTICE = 0x16, //+ "[%s] Player %s is not banned.";
CHAT_PLAYER_NOT_BANNED_NOTICE = 0x16, //+ "[%s] Player %s is not bannedStore.";
CHAT_PLAYER_ALREADY_MEMBER_NOTICE = 0x17, //+ "[%s] Player %s is already on the channel.";
CHAT_INVITE_NOTICE = 0x18, //+ "%2$s has invited you to join the channel '%1$s'.";
CHAT_INVITE_WRONG_FACTION_NOTICE = 0x19, //+ "Target is in the wrong alliance for %s.";
@@ -64,7 +64,7 @@ enum ChatNotify
CHAT_INVALID_NAME_NOTICE = 0x1B, //+ "Invalid channel name";
CHAT_NOT_MODERATED_NOTICE = 0x1C, //+ "%s is not moderated";
CHAT_PLAYER_INVITED_NOTICE = 0x1D, //+ "[%s] You invited %s to join the channel";
CHAT_PLAYER_INVITE_BANNED_NOTICE = 0x1E, //+ "[%s] %s has been banned.";
CHAT_PLAYER_INVITE_BANNED_NOTICE = 0x1E, //+ "[%s] %s has been bannedStore.";
CHAT_THROTTLED_NOTICE = 0x1F, //+ "[%s] The number of messages that can be sent to this channel is limited, please wait to send another message.";
CHAT_NOT_IN_AREA_NOTICE = 0x20, //+ "[%s] You are not in the correct area for this channel."; -- The user is trying to send a chat to a zone specific channel, and they're not physically in that zone.
CHAT_NOT_IN_LFG_NOTICE = 0x21, //+ "[%s] You must be queued in looking for group before joining this channel."; -- The user must be in the looking for group system to join LFG chat channels.
@@ -147,18 +147,45 @@ class Channel
}
};
typedef std::map<uint64, PlayerInfo> PlayerList;
PlayerList players;
typedef std::set<uint64> BannedList;
BannedList banned;
bool m_announce;
bool m_ownership;
std::string m_name;
std::string m_password;
uint8 m_flags;
uint32 m_channelId;
uint64 m_ownerGUID;
bool m_IsSaved;
public:
Channel(std::string const& name, uint32 channel_id, uint32 Team = 0);
std::string const& GetName() const { return _name; }
uint32 GetChannelId() const { return _channelId; }
bool IsConstant() const { return _channelId != 0; }
bool IsAnnounce() const { return _announce; }
bool IsLFG() const { return GetFlags() & CHANNEL_FLAG_LFG; }
std::string const& GetPassword() const { return _password; }
void SetPassword(std::string const& npassword) { _password = npassword; }
void SetAnnounce(bool nannounce) { _announce = nannounce; }
uint32 GetNumPlayers() const { return playersStore.size(); }
uint8 GetFlags() const { return _flags; }
bool HasFlag(uint8 flag) const { return _flags & flag; }
void JoinChannel(Player* player, std::string const& pass);
void LeaveChannel(Player* player, bool send = true);
void KickOrBan(Player const* player, std::string const& badname, bool ban);
void Kick(Player const* player, std::string const& badname) { KickOrBan(player, badname, false); }
void Ban(Player const* player, std::string const& badname) { KickOrBan(player, badname, true); }
void UnBan(Player const* player, std::string const& badname);
void Password(Player const* player, std::string const& pass);
void SetMode(Player const* player, std::string const& p2n, bool mod, bool set);
void SetOwner(uint64 guid, bool exclaim = true);
void SetOwner(Player const* player, std::string const& name);
void SendWhoOwner(uint64 guid);
void SetModerator(Player const* player, std::string const& newname) { SetMode(player, newname, true, true); }
void UnsetModerator(Player const* player, std::string const& newname) { SetMode(player, newname, true, false); }
void SetMute(Player const* player, std::string const& newname) { SetMode(player, newname, false, true); }
void UnsetMute(Player const* player, std::string const& newname) { SetMode(player, newname, false, false); }
void List(Player const* player);
void Announce(Player const* player);
void Say(uint64 guid, std::string const& what, uint32 lang);
void Invite(Player const* player, std::string const& newp);
void Voice(uint64 guid1, uint64 guid2);
void DeVoice(uint64 guid1, uint64 guid2);
void JoinNotify(uint64 guid); // invisible notify
void LeaveNotify(uint64 guid); // invisible notify
void SetOwnership(bool ownership) { _ownership = ownership; };
static void CleanOldChannelsInDB();
private:
// initial packet data (notify type and channel name)
@@ -199,91 +226,62 @@ class Channel
void MakeVoiceOn(WorldPacket* data, uint64 guid); //+ 0x22
void MakeVoiceOff(WorldPacket* data, uint64 guid); //+ 0x23
void SendToAll(WorldPacket* data, uint64 p = 0);
void SendToAll(WorldPacket* data, uint64 guid = 0);
void SendToAllButOne(WorldPacket* data, uint64 who);
void SendToOne(WorldPacket* data, uint64 who);
bool IsOn(uint64 who) const { return players.find(who) != players.end(); }
bool IsBanned(uint64 guid) const { return banned.find(guid) != banned.end(); }
bool IsOn(uint64 who) const { return playersStore.find(who) != playersStore.end(); }
bool IsBanned(uint64 guid) const { return bannedStore.find(guid) != bannedStore.end(); }
void UpdateChannelInDB() const;
void UpdateChannelUseageInDB() const;
uint8 GetPlayerFlags(uint64 p) const
uint8 GetPlayerFlags(uint64 guid) const
{
PlayerList::const_iterator p_itr = players.find(p);
if (p_itr == players.end())
return 0;
return p_itr->second.flags;
PlayerContainer::const_iterator itr = playersStore.find(guid);
return itr != playersStore.end() ? itr->second.flags : 0;
}
void SetModerator(uint64 p, bool set)
void SetModerator(uint64 guid, bool set)
{
if (players[p].IsModerator() != set)
if (playersStore[guid].IsModerator() != set)
{
uint8 oldFlag = GetPlayerFlags(p);
players[p].SetModerator(set);
uint8 oldFlag = GetPlayerFlags(guid);
playersStore[guid].SetModerator(set);
WorldPacket data;
MakeModeChange(&data, p, oldFlag);
MakeModeChange(&data, guid, oldFlag);
SendToAll(&data);
}
}
void SetMute(uint64 p, bool set)
void SetMute(uint64 guid, bool set)
{
if (players[p].IsMuted() != set)
if (playersStore[guid].IsMuted() != set)
{
uint8 oldFlag = GetPlayerFlags(p);
players[p].SetMuted(set);
uint8 oldFlag = GetPlayerFlags(guid);
playersStore[guid].SetMuted(set);
WorldPacket data;
MakeModeChange(&data, p, oldFlag);
MakeModeChange(&data, guid, oldFlag);
SendToAll(&data);
}
}
public:
uint32 m_Team;
Channel(std::string const& name, uint32 channel_id, uint32 Team = 0);
std::string const& GetName() const { return m_name; }
uint32 GetChannelId() const { return m_channelId; }
bool IsConstant() const { return m_channelId != 0; }
bool IsAnnounce() const { return m_announce; }
bool IsLFG() const { return GetFlags() & CHANNEL_FLAG_LFG; }
std::string const& GetPassword() const { return m_password; }
void SetPassword(std::string const& npassword) { m_password = npassword; }
void SetAnnounce(bool nannounce) { m_announce = nannounce; }
uint32 GetNumPlayers() const { return players.size(); }
uint8 GetFlags() const { return m_flags; }
bool HasFlag(uint8 flag) const { return m_flags & flag; }
typedef std::map<uint64, PlayerInfo> PlayerContainer;
typedef std::set<uint64> BannedContainer;
void Join(uint64 p, const char *pass);
void Leave(uint64 p, bool send = true);
void KickOrBan(uint64 good, const char *badname, bool ban);
void Kick(uint64 good, const char *badname) { KickOrBan(good, badname, false); }
void Ban(uint64 good, const char *badname) { KickOrBan(good, badname, true); }
void UnBan(uint64 good, const char *badname);
void Password(uint64 p, const char *pass);
void SetMode(uint64 p, const char *p2n, bool mod, bool set);
void SetOwner(uint64 p, bool exclaim = true);
void SetOwner(uint64 p, const char *newname);
void SendWhoOwner(uint64 p);
void SetModerator(uint64 p, const char *newname) { SetMode(p, newname, true, true); }
void UnsetModerator(uint64 p, const char *newname) { SetMode(p, newname, true, false); }
void SetMute(uint64 p, const char *newname) { SetMode(p, newname, false, true); }
void UnsetMute(uint64 p, const char *newname) { SetMode(p, newname, false, false); }
void List(Player* p);
void Announce(uint64 p);
void Say(uint64 p, const char *what, uint32 lang);
void Invite(uint64 p, const char *newp);
void Voice(uint64 guid1, uint64 guid2);
void DeVoice(uint64 guid1, uint64 guid2);
void JoinNotify(uint64 guid); // invisible notify
void LeaveNotify(uint64 guid); // invisible notify
void SetOwnership(bool ownership) { m_ownership = ownership; };
static void CleanOldChannelsInDB();
bool _announce;
bool _ownership;
bool _IsSaved;
uint8 _flags;
uint32 _channelId;
uint32 _Team;
uint64 _ownerGUID;
std::string _name;
std::string _password;
PlayerContainer playersStore;
BannedContainer bannedStore;
};
#endif
+6 -5
View File
@@ -36,6 +36,7 @@ ChannelMgr* ChannelMgr::forTeam(uint32 team)
if (team == ALLIANCE)
return ACE_Singleton<AllianceChannelMgr, ACE_Null_Mutex>::instance();
if (team == HORDE)
return ACE_Singleton<HordeChannelMgr, ACE_Null_Mutex>::instance();
@@ -79,8 +80,8 @@ Channel* ChannelMgr::GetChannel(std::string const& name, Player* player, bool pk
return NULL;
}
else
return i->second;
return i->second;
}
void ChannelMgr::LeftChannel(std::string const& name)
@@ -96,7 +97,7 @@ void ChannelMgr::LeftChannel(std::string const& name)
Channel* channel = i->second;
if (channel->GetNumPlayers() == 0 && !channel->IsConstant())
if (!channel->GetNumPlayers() && !channel->IsConstant())
{
channels.erase(wname);
delete channel;
@@ -105,6 +106,6 @@ void ChannelMgr::LeftChannel(std::string const& name)
void ChannelMgr::MakeNotOnPacket(WorldPacket* data, std::string const& name)
{
data->Initialize(SMSG_CHANNEL_NOTIFY, (1+10)); // we guess size
(*data) << (uint8)0x05 << name;
data->Initialize(SMSG_CHANNEL_NOTIFY, 1 + name.size());
(*data) << uint8(5) << name;
}
+50 -50
View File
@@ -76,7 +76,7 @@ inline bool CheckDelimiter(std::istringstream& iss, char delimiter, const char*
char c = iss.peek();
if (c != delimiter)
{
sLog->outDebug(LOG_FILTER_CHATSYS, "ChatHandler::isValidChatMessage('%s'): invalid %s link structure ('%c' expected, '%c' found)", iss.str().c_str(), context, delimiter, c);
sLog->outTrace(LOG_FILTER_CHATSYS, "ChatHandler::isValidChatMessage('%s'): invalid %s link structure ('%c' expected, '%c' found)", iss.str().c_str(), context, delimiter, c);
return false;
}
iss.ignore(1);
@@ -110,20 +110,20 @@ bool ItemChatLink::Initialize(std::istringstream& iss)
uint32 itemEntry = 0;
if (!ReadUInt32(iss, itemEntry))
{
sLog->outDebug(LOG_FILTER_CHATSYS, "ChatHandler::isValidChatMessage('%s'): sequence finished unexpectedly while reading item entry", iss.str().c_str());
sLog->outTrace(LOG_FILTER_CHATSYS, "ChatHandler::isValidChatMessage('%s'): sequence finished unexpectedly while reading item entry", iss.str().c_str());
return false;
}
// Validate item
_item = sObjectMgr->GetItemTemplate(itemEntry);
if (!_item)
{
sLog->outDebug(LOG_FILTER_CHATSYS, "ChatHandler::isValidChatMessage('%s'): got invalid itemEntry %u in |item command", iss.str().c_str(), itemEntry);
sLog->outTrace(LOG_FILTER_CHATSYS, "ChatHandler::isValidChatMessage('%s'): got invalid itemEntry %u in |item command", iss.str().c_str(), itemEntry);
return false;
}
// Validate item's color
if (_color != ItemQualityColors[_item->Quality])
{
sLog->outDebug(LOG_FILTER_CHATSYS, "ChatHandler::isValidChatMessage('%s'): linked item has color %u, but user claims %u", iss.str().c_str(), ItemQualityColors[_item->Quality], _color);
sLog->outTrace(LOG_FILTER_CHATSYS, "ChatHandler::isValidChatMessage('%s'): linked item has color %u, but user claims %u", iss.str().c_str(), ItemQualityColors[_item->Quality], _color);
return false;
}
// Number of various item properties after item entry
@@ -137,7 +137,7 @@ bool ItemChatLink::Initialize(std::istringstream& iss)
int32 id = 0;
if (!ReadInt32(iss, id))
{
sLog->outDebug(LOG_FILTER_CHATSYS, "ChatHandler::isValidChatMessage('%s'): sequence finished unexpectedly while reading item property (%u)", iss.str().c_str(), index);
sLog->outTrace(LOG_FILTER_CHATSYS, "ChatHandler::isValidChatMessage('%s'): sequence finished unexpectedly while reading item property (%u)", iss.str().c_str(), index);
return false;
}
if (id && (index == randomPropertyPosition))
@@ -148,7 +148,7 @@ bool ItemChatLink::Initialize(std::istringstream& iss)
_property = sItemRandomPropertiesStore.LookupEntry(id);
if (!_property)
{
sLog->outDebug(LOG_FILTER_CHATSYS, "ChatHandler::isValidChatMessage('%s'): got invalid item property id %u in |item command", iss.str().c_str(), id);
sLog->outTrace(LOG_FILTER_CHATSYS, "ChatHandler::isValidChatMessage('%s'): got invalid item property id %u in |item command", iss.str().c_str(), id);
return false;
}
}
@@ -157,7 +157,7 @@ bool ItemChatLink::Initialize(std::istringstream& iss)
_suffix = sItemRandomSuffixStore.LookupEntry(-id);
if (!_suffix)
{
sLog->outDebug(LOG_FILTER_CHATSYS, "ChatHandler::isValidChatMessage('%s'): got invalid item suffix id %u in |item command", iss.str().c_str(), -id);
sLog->outTrace(LOG_FILTER_CHATSYS, "ChatHandler::isValidChatMessage('%s'): got invalid item suffix id %u in |item command", iss.str().c_str(), -id);
return false;
}
}
@@ -199,7 +199,7 @@ bool ItemChatLink::ValidateName(char* buffer, const char* context)
}
}
if (!res)
sLog->outDebug(LOG_FILTER_CHATSYS, "ChatHandler::isValidChatMessage('%s'): linked item (id: %u) name wasn't found in any localization", context, _item->ItemId);
sLog->outTrace(LOG_FILTER_CHATSYS, "ChatHandler::isValidChatMessage('%s'): linked item (id: %u) name wasn't found in any localization", context, _item->ItemId);
return res;
}
@@ -211,14 +211,14 @@ bool QuestChatLink::Initialize(std::istringstream& iss)
uint32 questId = 0;
if (!ReadUInt32(iss, questId))
{
sLog->outDebug(LOG_FILTER_CHATSYS, "ChatHandler::isValidChatMessage('%s'): sequence finished unexpectedly while reading quest entry", iss.str().c_str());
sLog->outTrace(LOG_FILTER_CHATSYS, "ChatHandler::isValidChatMessage('%s'): sequence finished unexpectedly while reading quest entry", iss.str().c_str());
return false;
}
// Validate quest
_quest = sObjectMgr->GetQuestTemplate(questId);
if (!_quest)
{
sLog->outDebug(LOG_FILTER_CHATSYS, "ChatHandler::isValidChatMessage('%s'): quest template %u not found", iss.str().c_str(), questId);
sLog->outTrace(LOG_FILTER_CHATSYS, "ChatHandler::isValidChatMessage('%s'): quest template %u not found", iss.str().c_str(), questId);
return false;
}
// Check delimiter
@@ -227,13 +227,13 @@ bool QuestChatLink::Initialize(std::istringstream& iss)
// Read quest level
if (!ReadInt32(iss, _questLevel))
{
sLog->outDebug(LOG_FILTER_CHATSYS, "ChatHandler::isValidChatMessage('%s'): sequence finished unexpectedly while reading quest level", iss.str().c_str());
sLog->outTrace(LOG_FILTER_CHATSYS, "ChatHandler::isValidChatMessage('%s'): sequence finished unexpectedly while reading quest level", iss.str().c_str());
return false;
}
// Validate quest level
if (_questLevel >= STRONG_MAX_LEVEL)
{
sLog->outDebug(LOG_FILTER_CHATSYS, "ChatHandler::isValidChatMessage('%s'): quest level %d is too big", iss.str().c_str(), _questLevel);
sLog->outTrace(LOG_FILTER_CHATSYS, "ChatHandler::isValidChatMessage('%s'): quest level %d is too big", iss.str().c_str(), _questLevel);
return false;
}
return true;
@@ -253,7 +253,7 @@ bool QuestChatLink::ValidateName(char* buffer, const char* context)
break;
}
if (!res)
sLog->outDebug(LOG_FILTER_CHATSYS, "ChatHandler::isValidChatMessage('%s'): linked quest (id: %u) title wasn't found in any localization", context, _quest->GetQuestId());
sLog->outTrace(LOG_FILTER_CHATSYS, "ChatHandler::isValidChatMessage('%s'): linked quest (id: %u) title wasn't found in any localization", context, _quest->GetQuestId());
return res;
}
@@ -267,14 +267,14 @@ bool SpellChatLink::Initialize(std::istringstream& iss)
uint32 spellId = 0;
if (!ReadUInt32(iss, spellId))
{
sLog->outDebug(LOG_FILTER_CHATSYS, "ChatHandler::isValidChatMessage('%s'): sequence finished unexpectedly while reading spell entry", iss.str().c_str());
sLog->outTrace(LOG_FILTER_CHATSYS, "ChatHandler::isValidChatMessage('%s'): sequence finished unexpectedly while reading spell entry", iss.str().c_str());
return false;
}
// Validate spell
_spell = sSpellMgr->GetSpellInfo(spellId);
if (!_spell)
{
sLog->outDebug(LOG_FILTER_CHATSYS, "ChatHandler::isValidChatMessage('%s'): got invalid spell id %u in |spell command", iss.str().c_str(), spellId);
sLog->outTrace(LOG_FILTER_CHATSYS, "ChatHandler::isValidChatMessage('%s'): got invalid spell id %u in |spell command", iss.str().c_str(), spellId);
return false;
}
return true;
@@ -290,19 +290,19 @@ bool SpellChatLink::ValidateName(char* buffer, const char* context)
SkillLineAbilityMapBounds bounds = sSpellMgr->GetSkillLineAbilityMapBounds(_spell->Id);
if (bounds.first == bounds.second)
{
sLog->outDebug(LOG_FILTER_CHATSYS, "ChatHandler::isValidChatMessage('%s'): skill line not found for spell %u", context, _spell->Id);
sLog->outTrace(LOG_FILTER_CHATSYS, "ChatHandler::isValidChatMessage('%s'): skill line not found for spell %u", context, _spell->Id);
return false;
}
SkillLineAbilityEntry const* skillInfo = bounds.first->second;
if (!skillInfo)
{
sLog->outDebug(LOG_FILTER_CHATSYS, "ChatHandler::isValidChatMessage('%s'): skill line ability not found for spell %u", context, _spell->Id);
sLog->outTrace(LOG_FILTER_CHATSYS, "ChatHandler::isValidChatMessage('%s'): skill line ability not found for spell %u", context, _spell->Id);
return false;
}
SkillLineEntry const* skillLine = sSkillLineStore.LookupEntry(skillInfo->skillId);
if (!skillLine)
{
sLog->outDebug(LOG_FILTER_CHATSYS, "ChatHandler::isValidChatMessage('%s'): skill line not found for skill %u", context, skillInfo->skillId);
sLog->outTrace(LOG_FILTER_CHATSYS, "ChatHandler::isValidChatMessage('%s'): skill line not found for skill %u", context, skillInfo->skillId);
return false;
}
@@ -319,7 +319,7 @@ bool SpellChatLink::ValidateName(char* buffer, const char* context)
if (*_spell->SpellName && strcmp(_spell->SpellName, buffer) == 0)
return true;
sLog->outDebug(LOG_FILTER_CHATSYS, "ChatHandler::isValidChatMessage('%s'): linked spell (id: %u) name wasn't found in any localization", context, _spell->Id);
sLog->outTrace(LOG_FILTER_CHATSYS, "ChatHandler::isValidChatMessage('%s'): linked spell (id: %u) name wasn't found in any localization", context, _spell->Id);
return false;
}
@@ -333,14 +333,14 @@ bool AchievementChatLink::Initialize(std::istringstream& iss)
uint32 achievementId = 0;
if (!ReadUInt32(iss, achievementId))
{
sLog->outDebug(LOG_FILTER_CHATSYS, "ChatHandler::isValidChatMessage('%s'): sequence finished unexpectedly while reading achievement entry", iss.str().c_str());
sLog->outTrace(LOG_FILTER_CHATSYS, "ChatHandler::isValidChatMessage('%s'): sequence finished unexpectedly while reading achievement entry", iss.str().c_str());
return false;
}
// Validate achievement
_achievement = sAchievementMgr->GetAchievement(achievementId);
if (!_achievement)
{
sLog->outDebug(LOG_FILTER_CHATSYS, "ChatHandler::isValidChatMessage('%s'): got invalid achivement id %u in |achievement command", iss.str().c_str(), achievementId);
sLog->outTrace(LOG_FILTER_CHATSYS, "ChatHandler::isValidChatMessage('%s'): got invalid achivement id %u in |achievement command", iss.str().c_str(), achievementId);
return false;
}
// Check delimiter
@@ -349,7 +349,7 @@ bool AchievementChatLink::Initialize(std::istringstream& iss)
// Read HEX
if (!ReadHex(iss, _guid, 0))
{
sLog->outDebug(LOG_FILTER_CHATSYS, "ChatHandler::isValidChatMessage('%s'): invalid hexadecimal number while reading char's guid", iss.str().c_str());
sLog->outTrace(LOG_FILTER_CHATSYS, "ChatHandler::isValidChatMessage('%s'): invalid hexadecimal number while reading char's guid", iss.str().c_str());
return false;
}
// Skip progress
@@ -361,7 +361,7 @@ bool AchievementChatLink::Initialize(std::istringstream& iss)
if (!ReadUInt32(iss, _data[index]))
{
sLog->outDebug(LOG_FILTER_CHATSYS, "ChatHandler::isValidChatMessage('%s'): sequence finished unexpectedly while reading achievement property (%u)", iss.str().c_str(), index);
sLog->outTrace(LOG_FILTER_CHATSYS, "ChatHandler::isValidChatMessage('%s'): sequence finished unexpectedly while reading achievement property (%u)", iss.str().c_str(), index);
return false;
}
}
@@ -375,7 +375,7 @@ bool AchievementChatLink::ValidateName(char* buffer, const char* context)
if (*_achievement->name && strcmp(_achievement->name, buffer) == 0)
return true;
sLog->outDebug(LOG_FILTER_CHATSYS, "ChatHandler::isValidChatMessage('%s'): linked achievement (id: %u) name wasn't found in any localization", context, _achievement->ID);
sLog->outTrace(LOG_FILTER_CHATSYS, "ChatHandler::isValidChatMessage('%s'): linked achievement (id: %u) name wasn't found in any localization", context, _achievement->ID);
return false;
}
@@ -389,14 +389,14 @@ bool TradeChatLink::Initialize(std::istringstream& iss)
uint32 spellId = 0;
if (!ReadUInt32(iss, spellId))
{
sLog->outDebug(LOG_FILTER_CHATSYS, "ChatHandler::isValidChatMessage('%s'): sequence finished unexpectedly while reading achievement entry", iss.str().c_str());
sLog->outTrace(LOG_FILTER_CHATSYS, "ChatHandler::isValidChatMessage('%s'): sequence finished unexpectedly while reading achievement entry", iss.str().c_str());
return false;
}
// Validate spell
_spell = sSpellMgr->GetSpellInfo(spellId);
if (!_spell)
{
sLog->outDebug(LOG_FILTER_CHATSYS, "ChatHandler::isValidChatMessage('%s'): got invalid spell id %u in |trade command", iss.str().c_str(), spellId);
sLog->outTrace(LOG_FILTER_CHATSYS, "ChatHandler::isValidChatMessage('%s'): got invalid spell id %u in |trade command", iss.str().c_str(), spellId);
return false;
}
// Check delimiter
@@ -405,7 +405,7 @@ bool TradeChatLink::Initialize(std::istringstream& iss)
// Minimum talent level
if (!ReadInt32(iss, _minSkillLevel))
{
sLog->outDebug(LOG_FILTER_CHATSYS, "ChatHandler::isValidChatMessage('%s'): sequence finished unexpectedly while reading minimum talent level", iss.str().c_str());
sLog->outTrace(LOG_FILTER_CHATSYS, "ChatHandler::isValidChatMessage('%s'): sequence finished unexpectedly while reading minimum talent level", iss.str().c_str());
return false;
}
// Check delimiter
@@ -414,7 +414,7 @@ bool TradeChatLink::Initialize(std::istringstream& iss)
// Maximum talent level
if (!ReadInt32(iss, _maxSkillLevel))
{
sLog->outDebug(LOG_FILTER_CHATSYS, "ChatHandler::isValidChatMessage('%s'): sequence finished unexpectedly while reading maximum talent level", iss.str().c_str());
sLog->outTrace(LOG_FILTER_CHATSYS, "ChatHandler::isValidChatMessage('%s'): sequence finished unexpectedly while reading maximum talent level", iss.str().c_str());
return false;
}
// Check delimiter
@@ -423,7 +423,7 @@ bool TradeChatLink::Initialize(std::istringstream& iss)
// Something hexadecimal
if (!ReadHex(iss, _guid, 0))
{
sLog->outDebug(LOG_FILTER_CHATSYS, "ChatHandler::isValidChatMessage('%s'): sequence finished unexpectedly while reading achievement's owner guid", iss.str().c_str());
sLog->outTrace(LOG_FILTER_CHATSYS, "ChatHandler::isValidChatMessage('%s'): sequence finished unexpectedly while reading achievement's owner guid", iss.str().c_str());
return false;
}
// Skip base64 encoded stuff
@@ -440,21 +440,21 @@ bool TalentChatLink::Initialize(std::istringstream& iss)
// Read talent entry
if (!ReadUInt32(iss, _talentId))
{
sLog->outDebug(LOG_FILTER_CHATSYS, "ChatHandler::isValidChatMessage('%s'): sequence finished unexpectedly while reading talent entry", iss.str().c_str());
sLog->outTrace(LOG_FILTER_CHATSYS, "ChatHandler::isValidChatMessage('%s'): sequence finished unexpectedly while reading talent entry", iss.str().c_str());
return false;
}
// Validate talent
TalentEntry const* talentInfo = sTalentStore.LookupEntry(_talentId);
if (!talentInfo)
{
sLog->outDebug(LOG_FILTER_CHATSYS, "ChatHandler::isValidChatMessage('%s'): got invalid talent id %u in |talent command", iss.str().c_str(), _talentId);
sLog->outTrace(LOG_FILTER_CHATSYS, "ChatHandler::isValidChatMessage('%s'): got invalid talent id %u in |talent command", iss.str().c_str(), _talentId);
return false;
}
// Validate talent's spell
_spell = sSpellMgr->GetSpellInfo(talentInfo->RankID[0]);
if (!_spell)
{
sLog->outDebug(LOG_FILTER_CHATSYS, "ChatHandler::isValidChatMessage('%s'): got invalid spell id %u in |trade command", iss.str().c_str(), talentInfo->RankID[0]);
sLog->outTrace(LOG_FILTER_CHATSYS, "ChatHandler::isValidChatMessage('%s'): got invalid spell id %u in |trade command", iss.str().c_str(), talentInfo->RankID[0]);
return false;
}
// Delimiter
@@ -463,7 +463,7 @@ bool TalentChatLink::Initialize(std::istringstream& iss)
// Rank
if (!ReadInt32(iss, _rankId))
{
sLog->outDebug(LOG_FILTER_CHATSYS, "ChatHandler::isValidChatMessage('%s'): sequence finished unexpectedly while reading talent rank", iss.str().c_str());
sLog->outTrace(LOG_FILTER_CHATSYS, "ChatHandler::isValidChatMessage('%s'): sequence finished unexpectedly while reading talent rank", iss.str().c_str());
return false;
}
return true;
@@ -479,14 +479,14 @@ bool EnchantmentChatLink::Initialize(std::istringstream& iss)
uint32 spellId = 0;
if (!ReadUInt32(iss, spellId))
{
sLog->outDebug(LOG_FILTER_CHATSYS, "ChatHandler::isValidChatMessage('%s'): sequence finished unexpectedly while reading enchantment spell entry", iss.str().c_str());
sLog->outTrace(LOG_FILTER_CHATSYS, "ChatHandler::isValidChatMessage('%s'): sequence finished unexpectedly while reading enchantment spell entry", iss.str().c_str());
return false;
}
// Validate spell
_spell = sSpellMgr->GetSpellInfo(spellId);
if (!_spell)
{
sLog->outDebug(LOG_FILTER_CHATSYS, "ChatHandler::isValidChatMessage('%s'): got invalid spell id %u in |enchant command", iss.str().c_str(), spellId);
sLog->outTrace(LOG_FILTER_CHATSYS, "ChatHandler::isValidChatMessage('%s'): got invalid spell id %u in |enchant command", iss.str().c_str(), spellId);
return false;
}
return true;
@@ -501,7 +501,7 @@ bool GlyphChatLink::Initialize(std::istringstream& iss)
// Slot
if (!ReadUInt32(iss, _slotId))
{
sLog->outDebug(LOG_FILTER_CHATSYS, "ChatHandler::isValidChatMessage('%s'): sequence finished unexpectedly while reading slot id", iss.str().c_str());
sLog->outTrace(LOG_FILTER_CHATSYS, "ChatHandler::isValidChatMessage('%s'): sequence finished unexpectedly while reading slot id", iss.str().c_str());
return false;
}
// Check delimiter
@@ -511,21 +511,21 @@ bool GlyphChatLink::Initialize(std::istringstream& iss)
uint32 glyphId = 0;
if (!ReadUInt32(iss, glyphId))
{
sLog->outDebug(LOG_FILTER_CHATSYS, "ChatHandler::isValidChatMessage('%s'): sequence finished unexpectedly while reading glyph entry", iss.str().c_str());
sLog->outTrace(LOG_FILTER_CHATSYS, "ChatHandler::isValidChatMessage('%s'): sequence finished unexpectedly while reading glyph entry", iss.str().c_str());
return false;
}
// Validate glyph
_glyph = sGlyphPropertiesStore.LookupEntry(glyphId);
if (!_glyph)
{
sLog->outDebug(LOG_FILTER_CHATSYS, "ChatHandler::isValidChatMessage('%s'): got invalid glyph id %u in |glyph command", iss.str().c_str(), glyphId);
sLog->outTrace(LOG_FILTER_CHATSYS, "ChatHandler::isValidChatMessage('%s'): got invalid glyph id %u in |glyph command", iss.str().c_str(), glyphId);
return false;
}
// Validate glyph's spell
_spell = sSpellMgr->GetSpellInfo(_glyph->SpellId);
if (!_spell)
{
sLog->outDebug(LOG_FILTER_CHATSYS, "ChatHandler::isValidChatMessage('%s'): got invalid spell id %u in |glyph command", iss.str().c_str(), _glyph->SpellId);
sLog->outTrace(LOG_FILTER_CHATSYS, "ChatHandler::isValidChatMessage('%s'): got invalid spell id %u in |glyph command", iss.str().c_str(), _glyph->SpellId);
return false;
}
return true;
@@ -563,14 +563,14 @@ bool LinkExtractor::IsValidMessage()
}
else if (_iss.get() != PIPE_CHAR)
{
sLog->outDebug(LOG_FILTER_CHATSYS, "ChatHandler::isValidChatMessage('%s'): sequence aborted unexpectedly", _iss.str().c_str());
sLog->outTrace(LOG_FILTER_CHATSYS, "ChatHandler::isValidChatMessage('%s'): sequence aborted unexpectedly", _iss.str().c_str());
return false;
}
// pipe has always to be followed by at least one char
if (_iss.peek() == '\0')
{
sLog->outDebug(LOG_FILTER_CHATSYS, "ChatHandler::isValidChatMessage('%s'): pipe followed by '\\0'", _iss.str().c_str());
sLog->outTrace(LOG_FILTER_CHATSYS, "ChatHandler::isValidChatMessage('%s'): pipe followed by '\\0'", _iss.str().c_str());
return false;
}
@@ -593,14 +593,14 @@ bool LinkExtractor::IsValidMessage()
}
else
{
sLog->outDebug(LOG_FILTER_CHATSYS, "ChatHandler::isValidChatMessage('%s'): invalid sequence, expected '%c' but got '%c'", _iss.str().c_str(), *validSequenceIterator, commandChar);
sLog->outTrace(LOG_FILTER_CHATSYS, "ChatHandler::isValidChatMessage('%s'): invalid sequence, expected '%c' but got '%c'", _iss.str().c_str(), *validSequenceIterator, commandChar);
return false;
}
}
else if (validSequence != validSequenceIterator)
{
// no escaped pipes in sequences
sLog->outDebug(LOG_FILTER_CHATSYS, "ChatHandler::isValidChatMessage('%s'): got escaped pipe in sequence", _iss.str().c_str());
sLog->outTrace(LOG_FILTER_CHATSYS, "ChatHandler::isValidChatMessage('%s'): got escaped pipe in sequence", _iss.str().c_str());
return false;
}
@@ -609,7 +609,7 @@ bool LinkExtractor::IsValidMessage()
case 'c':
if (!ReadHex(_iss, color, 8))
{
sLog->outDebug(LOG_FILTER_CHATSYS, "ChatHandler::isValidChatMessage('%s'): invalid hexadecimal number while reading color", _iss.str().c_str());
sLog->outTrace(LOG_FILTER_CHATSYS, "ChatHandler::isValidChatMessage('%s'): invalid hexadecimal number while reading color", _iss.str().c_str());
return false;
}
break;
@@ -618,7 +618,7 @@ bool LinkExtractor::IsValidMessage()
_iss.getline(buffer, 256, DELIMITER);
if (_iss.eof())
{
sLog->outDebug(LOG_FILTER_CHATSYS, "ChatHandler::isValidChatMessage('%s'): sequence finished unexpectedly", _iss.str().c_str());
sLog->outTrace(LOG_FILTER_CHATSYS, "ChatHandler::isValidChatMessage('%s'): sequence finished unexpectedly", _iss.str().c_str());
return false;
}
@@ -640,7 +640,7 @@ bool LinkExtractor::IsValidMessage()
link = new GlyphChatLink();
else
{
sLog->outDebug(LOG_FILTER_CHATSYS, "ChatHandler::isValidChatMessage('%s'): user sent unsupported link type '%s'", _iss.str().c_str(), buffer);
sLog->outTrace(LOG_FILTER_CHATSYS, "ChatHandler::isValidChatMessage('%s'): user sent unsupported link type '%s'", _iss.str().c_str(), buffer);
return false;
}
_links.push_back(link);
@@ -655,13 +655,13 @@ bool LinkExtractor::IsValidMessage()
// links start with '['
if (_iss.get() != '[')
{
sLog->outDebug(LOG_FILTER_CHATSYS, "ChatHandler::isValidChatMessage('%s'): link caption doesn't start with '['", _iss.str().c_str());
sLog->outTrace(LOG_FILTER_CHATSYS, "ChatHandler::isValidChatMessage('%s'): link caption doesn't start with '['", _iss.str().c_str());
return false;
}
_iss.getline(buffer, 256, ']');
if (_iss.eof())
{
sLog->outDebug(LOG_FILTER_CHATSYS, "ChatHandler::isValidChatMessage('%s'): sequence finished unexpectedly", _iss.str().c_str());
sLog->outTrace(LOG_FILTER_CHATSYS, "ChatHandler::isValidChatMessage('%s'): sequence finished unexpectedly", _iss.str().c_str());
return false;
}
@@ -679,7 +679,7 @@ bool LinkExtractor::IsValidMessage()
// no further payload
break;
default:
sLog->outDebug(LOG_FILTER_CHATSYS, "ChatHandler::isValidChatMessage('%s'): got invalid command |%c", _iss.str().c_str(), commandChar);
sLog->outTrace(LOG_FILTER_CHATSYS, "ChatHandler::isValidChatMessage('%s'): got invalid command |%c", _iss.str().c_str(), commandChar);
return false;
}
}
@@ -687,7 +687,7 @@ bool LinkExtractor::IsValidMessage()
// check if every opened sequence was also closed properly
if (validSequence != validSequenceIterator)
{
sLog->outDebug(LOG_FILTER_CHATSYS, "ChatHandler::isValidChatMessage('%s'): EOF in active sequence", _iss.str().c_str());
sLog->outTrace(LOG_FILTER_CHATSYS, "ChatHandler::isValidChatMessage('%s'): EOF in active sequence", _iss.str().c_str());
return false;
}
+1 -1
View File
@@ -41,7 +41,7 @@ enum LfgUpdateType
LFG_UPDATETYPE_DEFAULT = 0, // Internal Use
LFG_UPDATETYPE_LEADER_UNK1 = 1, // FIXME: At group leave
LFG_UPDATETYPE_ROLECHECK_ABORTED = 4,
LFG_UPDATETYPE_JOIN_PROPOSAL = 5,
LFG_UPDATETYPE_JOIN_QUEUE = 5,
LFG_UPDATETYPE_ROLECHECK_FAILED = 6,
LFG_UPDATETYPE_REMOVED_FROM_QUEUE = 7,
LFG_UPDATETYPE_PROPOSAL_FAILED = 8,
@@ -37,7 +37,7 @@ void LfgGroupData::SetState(LfgState state)
case LFG_STATE_FINISHED_DUNGEON:
case LFG_STATE_NONE:
case LFG_STATE_DUNGEON:
m_OldState = state;
m_OldState = m_State;
// No break on purpose
default:
m_State = state;
+11 -9
View File
@@ -553,14 +553,17 @@ void LFGMgr::JoinLfg(Player* player, uint8 roles, LfgDungeonSet& dungeons, const
LfgDungeonSet const& playerDungeons = GetSelectedDungeons(guid);
if (playerDungeons == dungeons) // Joining the same dungeons -- Send OK
{
LfgUpdateData updateData = LfgUpdateData(LFG_UPDATETYPE_ADDED_TO_QUEUE, dungeons, comment);
player->GetSession()->SendLfgJoinResult(joinData); // Default value of joinData.result = LFG_JOIN_OK
if (grp)
{
LfgUpdateData updateData = LfgUpdateData(LFG_UPDATETYPE_ADDED_TO_QUEUE, dungeons, comment);
for (GroupReference* itr = grp->GetFirstMember(); itr != NULL; itr = itr->next())
if (itr->getSource() && itr->getSource()->GetSession())
itr->getSource()->GetSession()->SendLfgUpdateParty(updateData);
}
else
player->GetSession()->SendLfgUpdatePlayer(LfgUpdateData(LFG_UPDATETYPE_JOIN_QUEUE, dungeons, comment));
return;
}
else // Remove from queue and rejoin
@@ -691,7 +694,7 @@ void LFGMgr::JoinLfg(Player* player, uint8 roles, LfgDungeonSet& dungeons, const
SetState(gguid, LFG_STATE_ROLECHECK);
// Send update to player
LfgUpdateData updateData = LfgUpdateData(LFG_UPDATETYPE_JOIN_PROPOSAL, dungeons, comment);
LfgUpdateData updateData = LfgUpdateData(LFG_UPDATETYPE_JOIN_QUEUE, dungeons, comment);
for (GroupReference* itr = grp->GetFirstMember(); itr != NULL; itr = itr->next())
{
if (Player* plrg = itr->getSource())
@@ -728,7 +731,7 @@ void LFGMgr::JoinLfg(Player* player, uint8 roles, LfgDungeonSet& dungeons, const
}
// Send update to player
player->GetSession()->SendLfgJoinResult(joinData);
player->GetSession()->SendLfgUpdatePlayer(LfgUpdateData(LFG_UPDATETYPE_JOIN_PROPOSAL, dungeons, comment));
player->GetSession()->SendLfgUpdatePlayer(LfgUpdateData(LFG_UPDATETYPE_JOIN_QUEUE, dungeons, comment));
SetState(gguid, LFG_STATE_QUEUED);
SetRoles(guid, roles);
debugNames.append(player->GetName());
@@ -751,10 +754,10 @@ void LFGMgr::JoinLfg(Player* player, uint8 roles, LfgDungeonSet& dungeons, const
*/
void LFGMgr::LeaveLfg(uint64 guid)
{
LfgState state = GetState(guid);
uint64 gguid = IS_GROUP(guid) ? guid : GetGroup(guid);
sLog->outDebug(LOG_FILTER_LFG, "LFGMgr::Leave: [" UI64FMTD "]", guid);
uint64 gguid = IS_GROUP(guid) ? guid : GetGroup(guid);
LfgState state = GetState(guid);
switch (state)
{
case LFG_STATE_QUEUED:
@@ -1964,11 +1967,10 @@ void LFGMgr::SetOptions(uint32 options)
m_options = options;
}
LfgState LFGMgr::GetLfgStatus(uint64 guid, LfgUpdateData& data)
LfgUpdateData LFGMgr::GetLfgStatus(uint64 guid)
{
LfgPlayerData& playerData = PlayersStore[guid];
data.dungeons = playerData.GetSelectedDungeons();
return playerData.GetState();
return LfgUpdateData(LFG_UPDATETYPE_UPDATE_STATUS, playerData.GetState(), playerData.GetSelectedDungeons());
}
bool LFGMgr::IsSeasonActive(uint32 dungeonId)
+8 -4
View File
@@ -18,8 +18,9 @@
#ifndef _LFGMGR_H
#define _LFGMGR_H
#include "Common.h"
#include <ace/Singleton.h>
#include "DBCStructure.h"
#include "Field.h"
#include "LFG.h"
#include "LFGQueue.h"
#include "LFGGroupData.h"
@@ -155,11 +156,14 @@ struct LfgJoinResultData
// Data needed by SMSG_LFG_UPDATE_PARTY and SMSG_LFG_UPDATE_PLAYER
struct LfgUpdateData
{
LfgUpdateData(LfgUpdateType _type = LFG_UPDATETYPE_DEFAULT): updateType(_type), comment("") {}
LfgUpdateData(LfgUpdateType _type = LFG_UPDATETYPE_DEFAULT): updateType(_type), state(LFG_STATE_NONE), comment("") { }
LfgUpdateData(LfgUpdateType _type, LfgDungeonSet const& _dungeons, std::string const& _comment):
updateType(_type), dungeons(_dungeons), comment(_comment) {}
updateType(_type), state(LFG_STATE_NONE), dungeons(_dungeons), comment(_comment) { }
LfgUpdateData(LfgUpdateType _type, LfgState _state, LfgDungeonSet const& _dungeons, std::string const& _comment = ""):
updateType(_type), state(_state), dungeons(_dungeons), comment(_comment) { }
LfgUpdateType updateType;
LfgState state;
LfgDungeonSet dungeons;
std::string comment;
};
@@ -361,7 +365,7 @@ class LFGMgr
bool isOptionEnabled(uint32 option);
uint32 GetOptions();
void SetOptions(uint32 options);
LfgState GetLfgStatus(uint64 guid, LfgUpdateData& data);
LfgUpdateData GetLfgStatus(uint64 guid);
bool IsSeasonActive(uint32 dungeonId);
std::string DumpQueueInfo(bool full = false);
@@ -35,7 +35,7 @@ void LfgPlayerData::SetState(LfgState state)
m_SelectedDungeons.clear();
// No break on purpose
case LFG_STATE_DUNGEON:
m_OldState = state;
m_OldState = m_State;
// No break on purpose
default:
m_State = state;
@@ -46,14 +46,11 @@ void LFGPlayerScript::OnLogout(Player* player)
if (!sLFGMgr->isOptionEnabled(LFG_OPTION_ENABLE_DUNGEON_FINDER | LFG_OPTION_ENABLE_RAID_BROWSER))
return;
uint64 guid = player->GetGUID();
sLFGMgr->LeaveLfg(guid);
LfgUpdateData updateData = LfgUpdateData(LFG_UPDATETYPE_REMOVED_FROM_QUEUE);
player->GetSession()->SendLfgUpdateParty(updateData);
player->GetSession()->SendLfgUpdatePlayer(updateData);
player->GetSession()->SendLfgLfrList(false);
// TODO - Do not remove, add timer before deleting
sLFGMgr->RemovePlayerData(guid);
if (!player->GetGroup())
{
player->GetSession()->SendLfgLfrList(false);
sLFGMgr->LeaveLfg(player->GetGUID());
}
}
void LFGPlayerScript::OnLogin(Player* player)
+6 -6
View File
@@ -5621,11 +5621,11 @@ void Player::CleanupChannels()
{
Channel* ch = *m_channels.begin();
m_channels.erase(m_channels.begin()); // remove from player's channel list
ch->Leave(GetGUID(), false); // not send to client, not remove from player's channel list
ch->LeaveChannel(this, false); // not send to client, not remove from player's channel list
if (ChannelMgr* cMgr = ChannelMgr::forTeam(GetTeam()))
cMgr->LeftChannel(ch->GetName()); // deleted channel if empty
}
sLog->outDebug(LOG_FILTER_CHATSYS, "Player: channels cleaned up!");
sLog->outDebug(LOG_FILTER_CHATSYS, "Player %s: channels cleaned up!", GetName().c_str());
}
void Player::UpdateLocalChannels(uint32 newZone)
@@ -5698,11 +5698,11 @@ void Player::UpdateLocalChannels(uint32 newZone)
removeChannel = usedChannel;
if (joinChannel)
joinChannel->Join(GetGUID(), ""); // Changed Channel: ... or Joined Channel: ...
joinChannel->JoinChannel(this, ""); // Changed Channel: ... or Joined Channel: ...
if (removeChannel)
{
removeChannel->Leave(GetGUID(), sendRemove); // Leave old channel
removeChannel->LeaveChannel(this, sendRemove); // Leave old channel
std::string name = removeChannel->GetName(); // Store name, (*i)erase in LeftChannel
LeftChannel(removeChannel); // Remove from player's channel list
cMgr->LeftChannel(name); // Delete if empty
@@ -5717,7 +5717,7 @@ void Player::LeaveLFGChannel()
{
if ((*i)->IsLFG())
{
(*i)->Leave(GetGUID());
(*i)->LeaveChannel(this);
break;
}
}
@@ -22150,7 +22150,7 @@ bool Player::IsAlwaysDetectableFor(WorldObject const* seer) const
return false;
}
bool Player::IsVisibleGloballyFor(Player* u) const
bool Player::IsVisibleGloballyFor(Player const* u) const
{
if (!u)
return false;
+1 -1
View File
@@ -2546,7 +2546,7 @@ class Player : public Unit, public GridObject<Player>
bool IsNeverVisible() const;
bool IsVisibleGloballyFor(Player* player) const;
bool IsVisibleGloballyFor(Player const* player) const;
void SendInitialVisiblePackets(Unit* target);
void UpdateObjectVisibility(bool forced = true);
+2 -2
View File
@@ -16,11 +16,12 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "Unit.h"
#include "Common.h"
#include "Battlefield.h"
#include "BattlefieldMgr.h"
#include "Battleground.h"
#include "CellImpl.h"
#include "Common.h"
#include "ConditionMgr.h"
#include "CreatureAI.h"
#include "CreatureAIImpl.h"
@@ -53,7 +54,6 @@
#include "TemporarySummon.h"
#include "Totem.h"
#include "Transport.h"
#include "Unit.h"
#include "UpdateFieldFlags.h"
#include "Util.h"
#include "Vehicle.h"
+2 -2
View File
@@ -249,7 +249,7 @@ void WorldSession::HandleCalendarAddEvent(WorldPacket& recvData)
if (calendarEvent->IsGuildAnnouncement())
{
// 946684800 is 01/01/2000 00:00:00 - default response time
CalendarInvite* invite = new CalendarInvite(sCalendarMgr->GetFreeInviteId(), calendarEvent->GetEventId(), 0, guid, 946684800, CALENDAR_STATUS_NOT_SIGNED_UP, CALENDAR_RANK_PLAYER, "");
CalendarInvite* invite = new CalendarInvite(0, calendarEvent->GetEventId(), 0, guid, 946684800, CALENDAR_STATUS_NOT_SIGNED_UP, CALENDAR_RANK_PLAYER, "");
sCalendarMgr->AddInvite(calendarEvent, invite);
}
else
@@ -445,7 +445,7 @@ void WorldSession::HandleCalendarEventInvite(WorldPacket& recvData)
{
if (isGuildEvent && inviteeGuildId == _player->GetGuildId())
{
sCalendarMgr->SendCalendarCommandResult(inviteeGuid, CALENDAR_ERROR_NO_GUILD_INVITES);
sCalendarMgr->SendCalendarCommandResult(playerGuid, CALENDAR_ERROR_NO_GUILD_INVITES);
return;
}
+161 -131
View File
@@ -23,19 +23,20 @@
void WorldSession::HandleJoinChannel(WorldPacket& recvPacket)
{
sLog->outDebug(LOG_FILTER_NETWORKIO, "Opcode %u", recvPacket.GetOpcode());
uint32 channelId;
uint32 channelLength, passLength;
std::string channelName, pass;
std::string channelName, password;
recvPacket >> channelId;
recvPacket.ReadBit(); // unknowns
recvPacket.ReadBit();
uint8 unknown1 = recvPacket.ReadBit(); // unknowns
uint8 unknown2 = recvPacket.ReadBit();
channelLength = recvPacket.ReadBits(8);
passLength = recvPacket.ReadBits(8);
channelName = recvPacket.ReadString(channelLength);
pass = recvPacket.ReadString(passLength);
password = recvPacket.ReadString(passLength);
sLog->outDebug(LOG_FILTER_CHATSYS, "CMSG_JOIN_CHANNEL %s Channel: %u, unk1: %u, unk2: %u, channel: %s, password: %s",
GetPlayerInfo().c_str(), channelId, unknown1, unknown2, channelName.c_str(), password.c_str());
if (channelId)
{
@@ -43,254 +44,272 @@ void WorldSession::HandleJoinChannel(WorldPacket& recvPacket)
if (!channel)
return;
AreaTableEntry const* current_zone = GetAreaEntryByAreaID(_player->GetZoneId());
if (!current_zone)
return;
if (!_player->CanJoinConstantChannelInZone(channel, current_zone))
AreaTableEntry const* zone = GetAreaEntryByAreaID(GetPlayer()->GetZoneId());
if (!zone || !GetPlayer()->CanJoinConstantChannelInZone(channel, zone))
return;
}
if (channelName.empty())
return;
if (ChannelMgr* cMgr = ChannelMgr::forTeam(_player->GetTeam()))
if (ChannelMgr* cMgr = ChannelMgr::forTeam(GetPlayer()->GetTeam()))
{
cMgr->setTeam(_player->GetTeam());
if (Channel* chn = cMgr->GetJoinChannel(channelName, channelId))
chn->Join(_player->GetGUID(), pass.c_str());
cMgr->setTeam(GetPlayer()->GetTeam());
if (Channel* channel = cMgr->GetJoinChannel(channelName, channelId))
channel->JoinChannel(GetPlayer(), password);
}
}
void WorldSession::HandleLeaveChannel(WorldPacket& recvPacket)
{
sLog->outDebug(LOG_FILTER_NETWORKIO, "Opcode %u", recvPacket.GetOpcode());
uint32 unk;
std::string channelname;
std::string channelName;
recvPacket >> unk; // channel id?
uint32 length = recvPacket.ReadBits(8);
channelname = recvPacket.ReadString(length);
channelName = recvPacket.ReadString(length);
if (channelname.empty())
sLog->outDebug(LOG_FILTER_CHATSYS, "CMSG_LEAVE_CHANNEL %s Channel: %s, unk1: %u",
GetPlayerInfo().c_str(), channelName.c_str(), unk);
if (channelName.empty())
return;
if (ChannelMgr* cMgr = ChannelMgr::forTeam(_player->GetTeam()))
if (ChannelMgr* cMgr = ChannelMgr::forTeam(GetPlayer()->GetTeam()))
{
if (Channel* chn = cMgr->GetChannel(channelname, _player))
chn->Leave(_player->GetGUID(), true);
cMgr->LeftChannel(channelname);
if (Channel* channel = cMgr->GetChannel(channelName, GetPlayer()))
channel->LeaveChannel(GetPlayer(), true);
cMgr->LeftChannel(channelName);
}
}
void WorldSession::HandleChannelList(WorldPacket& recvPacket)
{
sLog->outDebug(LOG_FILTER_NETWORKIO, "Opcode %u", recvPacket.GetOpcode());
uint32 length = recvPacket.ReadBits(8);
std::string channelname = recvPacket.ReadString(length);
std::string channelName = recvPacket.ReadString(length);
if (ChannelMgr* cMgr = ChannelMgr::forTeam(_player->GetTeam()))
if (Channel* chn = cMgr->GetChannel(channelname, _player))
chn->List(_player);
sLog->outDebug(LOG_FILTER_CHATSYS, "%s %s Channel: %s",
recvPacket.GetOpcode() == CMSG_CHANNEL_DISPLAY_LIST ? "CMSG_CHANNEL_DISPLAY_LIST" : "CMSG_CHANNEL_LIST",
GetPlayerInfo().c_str(), channelName.c_str());
if (ChannelMgr* cMgr = ChannelMgr::forTeam(GetPlayer()->GetTeam()))
if (Channel* channel = cMgr->GetChannel(channelName, GetPlayer()))
channel->List(GetPlayer());
}
void WorldSession::HandleChannelPassword(WorldPacket& recvPacket)
{
sLog->outDebug(LOG_FILTER_NETWORKIO, "Opcode %u", recvPacket.GetOpcode());
uint32 nameLength = recvPacket.ReadBits(8);
uint32 passLength = recvPacket.ReadBits(7);
std::string channelname = recvPacket.ReadString(nameLength);
std::string pass = recvPacket.ReadString(passLength);
std::string channelName = recvPacket.ReadString(nameLength);
std::string password = recvPacket.ReadString(passLength);
if (ChannelMgr* cMgr = ChannelMgr::forTeam(_player->GetTeam()))
if (Channel* chn = cMgr->GetChannel(channelname, _player))
chn->Password(_player->GetGUID(), pass.c_str());
sLog->outDebug(LOG_FILTER_CHATSYS, "CMSG_CHANNEL_PASSWORD %s Channel: %s, Password: %s",
GetPlayerInfo().c_str(), channelName.c_str(), password.c_str());
if (ChannelMgr* cMgr = ChannelMgr::forTeam(GetPlayer()->GetTeam()))
if (Channel* channel = cMgr->GetChannel(channelName, GetPlayer()))
channel->Password(GetPlayer(), password);
}
void WorldSession::HandleChannelSetOwner(WorldPacket& recvPacket)
{
sLog->outDebug(LOG_FILTER_NETWORKIO, "Opcode %u", recvPacket.GetOpcode());
uint32 channelLength = recvPacket.ReadBits(8);
uint32 nameLength = recvPacket.ReadBits(7);
std::string newp = recvPacket.ReadString(nameLength);
std::string channelname = recvPacket.ReadString(channelLength);
std::string targetName = recvPacket.ReadString(nameLength);
std::string channelName = recvPacket.ReadString(channelLength);
if (!normalizePlayerName(newp))
sLog->outDebug(LOG_FILTER_CHATSYS, "CMSG_CHANNEL_SET_OWNER %s Channel: %s, Target: %s",
GetPlayerInfo().c_str(), channelName.c_str(), targetName.c_str());
if (!normalizePlayerName(targetName))
return;
if (ChannelMgr* cMgr = ChannelMgr::forTeam(_player->GetTeam()))
if (Channel* chn = cMgr->GetChannel(channelname, _player))
chn->SetOwner(_player->GetGUID(), newp.c_str());
if (ChannelMgr* cMgr = ChannelMgr::forTeam(GetPlayer()->GetTeam()))
if (Channel* channel = cMgr->GetChannel(channelName, GetPlayer()))
channel->SetOwner(GetPlayer(), targetName);
}
void WorldSession::HandleChannelOwner(WorldPacket& recvPacket)
{
sLog->outDebug(LOG_FILTER_NETWORKIO, "Opcode %u", recvPacket.GetOpcode());
uint32 length = recvPacket.ReadBits(8);
std::string channelname = recvPacket.ReadString(length);
std::string channelName = recvPacket.ReadString(length);
if (ChannelMgr* cMgr = ChannelMgr::forTeam(_player->GetTeam()))
if (Channel* chn = cMgr->GetChannel(channelname, _player))
chn->SendWhoOwner(_player->GetGUID());
sLog->outDebug(LOG_FILTER_CHATSYS, "CMSG_CHANNEL_OWNER %s Channel: %s",
GetPlayerInfo().c_str(), channelName.c_str());
if (ChannelMgr* cMgr = ChannelMgr::forTeam(GetPlayer()->GetTeam()))
if (Channel* channel = cMgr->GetChannel(channelName, GetPlayer()))
channel->SendWhoOwner(GetPlayer()->GetGUID());
}
void WorldSession::HandleChannelModerator(WorldPacket& recvPacket)
{
sLog->outDebug(LOG_FILTER_NETWORKIO, "Opcode %u", recvPacket.GetOpcode());
uint32 channelLength = recvPacket.ReadBits(8);
uint32 nameLength = recvPacket.ReadBits(7);
std::string otp = recvPacket.ReadString(nameLength);
std::string channelname = recvPacket.ReadString(channelLength);
std::string targetName = recvPacket.ReadString(nameLength);
std::string channelName = recvPacket.ReadString(channelLength);
if (!normalizePlayerName(otp))
sLog->outDebug(LOG_FILTER_CHATSYS, "CMSG_CHANNEL_MODERATOR %s Channel: %s, Target: %s",
GetPlayerInfo().c_str(), channelName.c_str(), targetName.c_str());
if (!normalizePlayerName(targetName))
return;
if (ChannelMgr* cMgr = ChannelMgr::forTeam(_player->GetTeam()))
if (Channel* chn = cMgr->GetChannel(channelname, _player))
chn->SetModerator(_player->GetGUID(), otp.c_str());
if (ChannelMgr* cMgr = ChannelMgr::forTeam(GetPlayer()->GetTeam()))
if (Channel* channel = cMgr->GetChannel(channelName, GetPlayer()))
channel->SetModerator(GetPlayer(), targetName);
}
void WorldSession::HandleChannelUnmoderator(WorldPacket& recvPacket)
{
sLog->outDebug(LOG_FILTER_NETWORKIO, "Opcode %u", recvPacket.GetOpcode());
uint32 nameLength = recvPacket.ReadBits(7);
uint32 channelLength = recvPacket.ReadBits(8);
std::string channelname = recvPacket.ReadString(channelLength);
std::string otp = recvPacket.ReadString(nameLength);
std::string channelName = recvPacket.ReadString(channelLength);
std::string targetName = recvPacket.ReadString(nameLength);
if (!normalizePlayerName(otp))
sLog->outDebug(LOG_FILTER_CHATSYS, "CMSG_CHANNEL_UNMODERATOR %s Channel: %s, Target: %s",
GetPlayerInfo().c_str(), channelName.c_str(), targetName.c_str());
if (!normalizePlayerName(targetName))
return;
if (ChannelMgr* cMgr = ChannelMgr::forTeam(_player->GetTeam()))
if (Channel* chn = cMgr->GetChannel(channelname, _player))
chn->UnsetModerator(_player->GetGUID(), otp.c_str());
if (ChannelMgr* cMgr = ChannelMgr::forTeam(GetPlayer()->GetTeam()))
if (Channel* channel = cMgr->GetChannel(channelName, GetPlayer()))
channel->UnsetModerator(GetPlayer(), targetName);
}
void WorldSession::HandleChannelMute(WorldPacket& recvPacket)
{
sLog->outDebug(LOG_FILTER_NETWORKIO, "Opcode %u", recvPacket.GetOpcode());
uint32 channelLength = recvPacket.ReadBits(8);
uint32 nameLength = recvPacket.ReadBits(7);
std::string channelname = recvPacket.ReadString(channelLength);
std::string otp = recvPacket.ReadString(nameLength);
std::string channelName = recvPacket.ReadString(channelLength);
std::string targetName = recvPacket.ReadString(nameLength);
if (!normalizePlayerName(otp))
sLog->outDebug(LOG_FILTER_CHATSYS, "CMSG_CHANNEL_MUTE %s Channel: %s, Target: %s",
GetPlayerInfo().c_str(), channelName.c_str(), targetName.c_str());
if (!normalizePlayerName(targetName))
return;
if (ChannelMgr* cMgr = ChannelMgr::forTeam(_player->GetTeam()))
if (Channel* chn = cMgr->GetChannel(channelname, _player))
chn->SetMute(_player->GetGUID(), otp.c_str());
if (ChannelMgr* cMgr = ChannelMgr::forTeam(GetPlayer()->GetTeam()))
if (Channel* channel = cMgr->GetChannel(channelName, GetPlayer()))
channel->SetMute(GetPlayer(), targetName);
}
void WorldSession::HandleChannelUnmute(WorldPacket& recvPacket)
{
sLog->outDebug(LOG_FILTER_NETWORKIO, "Opcode %u", recvPacket.GetOpcode());
uint32 nameLength = recvPacket.ReadBits(8);
uint32 channelLength = recvPacket.ReadBits(7);
std::string otp = recvPacket.ReadString(nameLength);
std::string channelname = recvPacket.ReadString(channelLength);
std::string targetName = recvPacket.ReadString(nameLength);
std::string channelName = recvPacket.ReadString(channelLength);
if (!normalizePlayerName(otp))
sLog->outDebug(LOG_FILTER_CHATSYS, "CMSG_CHANNEL_UNMUTE %s Channel: %s, Target: %s",
GetPlayerInfo().c_str(), channelName.c_str(), targetName.c_str());
if (!normalizePlayerName(targetName))
return;
if (ChannelMgr* cMgr = ChannelMgr::forTeam(_player->GetTeam()))
if (Channel* chn = cMgr->GetChannel(channelname, _player))
chn->UnsetMute(_player->GetGUID(), otp.c_str());
if (ChannelMgr* cMgr = ChannelMgr::forTeam(GetPlayer()->GetTeam()))
if (Channel* channel = cMgr->GetChannel(channelName, GetPlayer()))
channel->UnsetMute(GetPlayer(), targetName);
}
void WorldSession::HandleChannelInvite(WorldPacket& recvPacket)
{
sLog->outDebug(LOG_FILTER_NETWORKIO, "Opcode %u", recvPacket.GetOpcode());
uint32 nameLength = recvPacket.ReadBits(7);
uint32 channelLength = recvPacket.ReadBits(8);
std::string otp = recvPacket.ReadString(nameLength);
std::string channelname = recvPacket.ReadString(channelLength);
std::string targetName = recvPacket.ReadString(nameLength);
std::string channelName = recvPacket.ReadString(channelLength);
if (!normalizePlayerName(otp))
sLog->outDebug(LOG_FILTER_CHATSYS, "CMSG_CHANNEL_INVITE %s Channel: %s, Target: %s",
GetPlayerInfo().c_str(), channelName.c_str(), targetName.c_str());
if (!normalizePlayerName(targetName))
return;
if (ChannelMgr* cMgr = ChannelMgr::forTeam(_player->GetTeam()))
if (Channel* chn = cMgr->GetChannel(channelname, _player))
chn->Invite(_player->GetGUID(), otp.c_str());
if (ChannelMgr* cMgr = ChannelMgr::forTeam(GetPlayer()->GetTeam()))
if (Channel* channel = cMgr->GetChannel(channelName, GetPlayer()))
channel->Invite(GetPlayer(), targetName);
}
void WorldSession::HandleChannelKick(WorldPacket& recvPacket)
{
sLog->outDebug(LOG_FILTER_NETWORKIO, "Opcode %u", recvPacket.GetOpcode());
uint32 channelLength = recvPacket.ReadBits(8);
uint32 nameLength = recvPacket.ReadBits(7);
std::string channelname = recvPacket.ReadString(channelLength);
std::string otp = recvPacket.ReadString(nameLength);
std::string channelName = recvPacket.ReadString(channelLength);
std::string targetName = recvPacket.ReadString(nameLength);
if (!normalizePlayerName(otp))
sLog->outDebug(LOG_FILTER_CHATSYS, "CMSG_CHANNEL_KICK %s Channel: %s, Target: %s",
GetPlayerInfo().c_str(), channelName.c_str(), targetName.c_str());
if (!normalizePlayerName(targetName))
return;
if (ChannelMgr* cMgr = ChannelMgr::forTeam(_player->GetTeam()))
if (Channel* chn = cMgr->GetChannel(channelname, _player))
chn->Kick(_player->GetGUID(), otp.c_str());
if (ChannelMgr* cMgr = ChannelMgr::forTeam(GetPlayer()->GetTeam()))
if (Channel* channel = cMgr->GetChannel(channelName, GetPlayer()))
channel->Kick(GetPlayer(), targetName);
}
void WorldSession::HandleChannelBan(WorldPacket& recvPacket)
{
sLog->outDebug(LOG_FILTER_NETWORKIO, "Opcode %u", recvPacket.GetOpcode());
uint32 channelLength, nameLength;
std::string channelname, otp;
std::string channelName, targetName;
channelLength = recvPacket.ReadBits(8);
nameLength = recvPacket.ReadBits(7);
otp = recvPacket.ReadString(nameLength);
channelname = recvPacket.ReadString(channelLength);
targetName = recvPacket.ReadString(nameLength);
channelName = recvPacket.ReadString(channelLength);
if (!normalizePlayerName(otp))
sLog->outDebug(LOG_FILTER_CHATSYS, "CMSG_CHANNEL_BAN %s Channel: %s, Target: %s",
GetPlayerInfo().c_str(), channelName.c_str(), targetName.c_str());
if (!normalizePlayerName(targetName))
return;
if (ChannelMgr* cMgr = ChannelMgr::forTeam(_player->GetTeam()))
if (Channel* chn = cMgr->GetChannel(channelname, _player))
chn->Ban(_player->GetGUID(), otp.c_str());
if (ChannelMgr* cMgr = ChannelMgr::forTeam(GetPlayer()->GetTeam()))
if (Channel* channel = cMgr->GetChannel(channelName, GetPlayer()))
channel->Ban(GetPlayer(), targetName);
}
void WorldSession::HandleChannelUnban(WorldPacket& recvPacket)
{
sLog->outDebug(LOG_FILTER_NETWORKIO, "Opcode %u", recvPacket.GetOpcode());
uint32 channelLength = recvPacket.ReadBits(7);
uint32 nameLength = recvPacket.ReadBits(8);
std::string otp = recvPacket.ReadString(nameLength);
std::string channelname = recvPacket.ReadString(channelLength);
std::string targetName = recvPacket.ReadString(nameLength);
std::string channelName = recvPacket.ReadString(channelLength);
if (!normalizePlayerName(otp))
sLog->outDebug(LOG_FILTER_CHATSYS, "CMSG_CHANNEL_UNBAN %s Channel: %s, Target: %s",
GetPlayerInfo().c_str(), channelName.c_str(), targetName.c_str());
if (!normalizePlayerName(targetName))
return;
if (ChannelMgr* cMgr = ChannelMgr::forTeam(_player->GetTeam()))
if (Channel* chn = cMgr->GetChannel(channelname, _player))
chn->UnBan(_player->GetGUID(), otp.c_str());
if (ChannelMgr* cMgr = ChannelMgr::forTeam(GetPlayer()->GetTeam()))
if (Channel* channel = cMgr->GetChannel(channelName, GetPlayer()))
channel->UnBan(GetPlayer(), targetName);
}
void WorldSession::HandleChannelAnnouncements(WorldPacket& recvPacket)
{
sLog->outDebug(LOG_FILTER_NETWORKIO, "Opcode %u", recvPacket.GetOpcode());
uint32 length = recvPacket.ReadBits(8);
std::string channelname = recvPacket.ReadString(length);
std::string channelName = recvPacket.ReadString(length);
if (ChannelMgr* cMgr = ChannelMgr::forTeam(_player->GetTeam()))
if (Channel* chn = cMgr->GetChannel(channelname, _player))
chn->Announce(_player->GetGUID());
sLog->outDebug(LOG_FILTER_CHATSYS, "CMSG_CHANNEL_ANNOUNCEMENTS %s Channel: %s",
GetPlayerInfo().c_str(), channelName.c_str());
if (ChannelMgr* cMgr = ChannelMgr::forTeam(GetPlayer()->GetTeam()))
if (Channel* channel = cMgr->GetChannel(channelName, GetPlayer()))
channel->Announce(GetPlayer());
}
void WorldSession::HandleChannelDisplayListQuery(WorldPacket &recvPacket)
@@ -301,17 +320,23 @@ void WorldSession::HandleChannelDisplayListQuery(WorldPacket &recvPacket)
void WorldSession::HandleGetChannelMemberCount(WorldPacket &recvPacket)
{
sLog->outDebug(LOG_FILTER_NETWORKIO, "Opcode %u", recvPacket.GetOpcode());
std::string channelname;
recvPacket >> channelname;
if (ChannelMgr* cMgr = ChannelMgr::forTeam(_player->GetTeam()))
std::string channelName;
recvPacket >> channelName;
sLog->outDebug(LOG_FILTER_CHATSYS, "CMSG_GET_CHANNEL_MEMBER_COUNT %s Channel: %s",
GetPlayerInfo().c_str(), channelName.c_str());
if (ChannelMgr* cMgr = ChannelMgr::forTeam(GetPlayer()->GetTeam()))
{
if (Channel* chn = cMgr->GetChannel(channelname, _player))
if (Channel* channel = cMgr->GetChannel(channelName, GetPlayer()))
{
WorldPacket data(SMSG_CHANNEL_MEMBER_COUNT, chn->GetName().size()+1+1+4);
data << chn->GetName();
data << uint8(chn->GetFlags());
data << uint32(chn->GetNumPlayers());
sLog->outDebug(LOG_FILTER_CHATSYS, "SMSG_CHANNEL_MEMBER_COUNT %s Channel: %s Count: %u",
GetPlayerInfo().c_str(), channelName.c_str(), channel->GetNumPlayers());
WorldPacket data(SMSG_CHANNEL_MEMBER_COUNT, channel->GetName().size() + 1 + 4);
data << channel->GetName();
data << uint8(channel->GetFlags());
data << uint32(channel->GetNumPlayers());
SendPacket(&data);
}
}
@@ -319,10 +344,15 @@ void WorldSession::HandleGetChannelMemberCount(WorldPacket &recvPacket)
void WorldSession::HandleSetChannelWatch(WorldPacket& recvPacket)
{
sLog->outDebug(LOG_FILTER_NETWORKIO, "Opcode %u", recvPacket.GetOpcode());
std::string channelname;
recvPacket >> channelname;
/*if (ChannelMgr* cMgr = channelMgr(_player->GetTeam()))
if (Channel* chn = cMgr->GetChannel(channelName, _player))
chn->JoinNotify(_player->GetGUID());*/
std::string channelName;
recvPacket >> channelName;
sLog->outDebug(LOG_FILTER_CHATSYS, "CMSG_SET_CHANNEL_WATCH %s Channel: %s",
GetPlayerInfo().c_str(), channelName.c_str());
/*
if (ChannelMgr* cMgr = channelMgr(GetPlayer()->GetTeam()))
if (Channel* channel = cMgr->GetChannel(channelName, GetPlayer()))
channel->JoinNotify(GetPlayer());
*/
}
+120 -125
View File
@@ -15,15 +15,13 @@
* with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "WorldSession.h"
#include "WorldPacket.h"
#include "DBCStores.h"
#include "Player.h"
#include "Group.h"
#include "LFGMgr.h"
#include "ObjectMgr.h"
#include "GroupMgr.h"
#include "Group.h"
#include "Player.h"
#include "Opcodes.h"
#include "WorldPacket.h"
#include "WorldSession.h"
void BuildPlayerLockDungeonBlock(WorldPacket& data, const LfgLockMap& lock)
{
@@ -62,11 +60,11 @@ void WorldSession::HandleLfgJoinOpcode(WorldPacket& recvData)
uint32 roles;
recvData >> roles;
recvData.read_skip<uint16>(); // uint8 (always 0) - uint8 (always 0)
recvData.read_skip<uint16>(); // uint8 (always 0) - uint8 (always 0)
recvData >> numDungeons;
if (!numDungeons)
{
sLog->outDebug(LOG_FILTER_LFG, "CMSG_LFG_JOIN [" UI64FMTD "] no dungeons selected", GetPlayer()->GetGUID());
sLog->outDebug(LOG_FILTER_LFG, "CMSG_LFG_JOIN %s no dungeons selected", GetPlayerInfo().c_str());
recvData.rfinish();
return;
}
@@ -75,14 +73,15 @@ void WorldSession::HandleLfgJoinOpcode(WorldPacket& recvData)
for (int8 i = 0; i < numDungeons; ++i)
{
recvData >> dungeon;
newDungeons.insert((dungeon & 0x00FFFFFF)); // remove the type from the dungeon entry
newDungeons.insert((dungeon & 0x00FFFFFF)); // remove the type from the dungeon entry
}
recvData.read_skip<uint32>(); // for 0..uint8 (always 3) { uint8 (always 0) }
recvData.read_skip<uint32>(); // for 0..uint8 (always 3) { uint8 (always 0) }
std::string comment;
recvData >> comment;
sLog->outDebug(LOG_FILTER_LFG, "CMSG_LFG_JOIN [" UI64FMTD "] roles: %u, Dungeons: %u, Comment: %s", GetPlayer()->GetGUID(), roles, uint8(newDungeons.size()), comment.c_str());
sLog->outDebug(LOG_FILTER_LFG, "CMSG_LFG_JOIN %s roles: %u, Dungeons: %u, Comment: %s",
GetPlayerInfo().c_str(), roles, uint8(newDungeons.size()), comment.c_str());
sLFGMgr->JoinLfg(GetPlayer(), uint8(roles), newDungeons, comment);
}
@@ -92,7 +91,8 @@ void WorldSession::HandleLfgLeaveOpcode(WorldPacket& /*recvData*/)
uint64 guid = GetPlayer()->GetGUID();
uint64 gguid = grp ? grp->GetGUID() : guid;
sLog->outDebug(LOG_FILTER_LFG, "CMSG_LFG_LEAVE [" UI64FMTD "] in group: %u", guid, grp ? 1 : 0);
sLog->outDebug(LOG_FILTER_LFG, "CMSG_LFG_LEAVE %s in group: %u",
GetPlayerInfo().c_str(), grp ? 1 : 0);
// Check cheating - only leader can leave the queue
if (!grp || grp->GetLeaderGUID() == GetPlayer()->GetGUID())
@@ -101,28 +101,31 @@ void WorldSession::HandleLfgLeaveOpcode(WorldPacket& /*recvData*/)
void WorldSession::HandleLfgProposalResultOpcode(WorldPacket& recvData)
{
uint32 lfgGroupID; // Internal lfgGroupID
uint32 lfgGroupID; // Internal lfgGroupID
bool accept; // Accept to join?
recvData >> lfgGroupID;
recvData >> accept;
sLog->outDebug(LOG_FILTER_LFG, "CMSG_LFG_PROPOSAL_RESULT [" UI64FMTD "] proposal: %u accept: %u", GetPlayer()->GetGUID(), lfgGroupID, accept ? 1 : 0);
sLog->outDebug(LOG_FILTER_LFG, "CMSG_LFG_PROPOSAL_RESULT %s proposal: %u accept: %u",
GetPlayerInfo().c_str(), lfgGroupID, accept ? 1 : 0);
sLFGMgr->UpdateProposal(lfgGroupID, GetPlayer()->GetGUID(), accept);
}
void WorldSession::HandleLfgSetRolesOpcode(WorldPacket& recvData)
{
uint8 roles;
recvData >> roles; // Player Group Roles
recvData >> roles; // Player Group Roles
uint64 guid = GetPlayer()->GetGUID();
Group* grp = GetPlayer()->GetGroup();
if (!grp)
{
sLog->outDebug(LOG_FILTER_LFG, "CMSG_LFG_SET_ROLES [" UI64FMTD "] Not in group", guid);
sLog->outDebug(LOG_FILTER_LFG, "CMSG_LFG_SET_ROLES %s Not in group",
GetPlayerInfo().c_str());
return;
}
uint64 gguid = grp->GetGUID();
sLog->outDebug(LOG_FILTER_LFG, "CMSG_LFG_SET_ROLES: Group [" UI64FMTD "], Player [" UI64FMTD "], Roles: %u", gguid, guid, roles);
sLog->outDebug(LOG_FILTER_LFG, "CMSG_LFG_SET_ROLES: Group %u, Player %s, Roles: %u",
GUID_LOPART(gguid), GetPlayerInfo().c_str(), roles);
sLFGMgr->UpdateRoleCheck(gguid, guid, roles);
}
@@ -131,7 +134,8 @@ void WorldSession::HandleLfgSetCommentOpcode(WorldPacket& recvData)
std::string comment;
recvData >> comment;
uint64 guid = GetPlayer()->GetGUID();
sLog->outDebug(LOG_FILTER_LFG, "CMSG_LFG_SET_COMMENT [" UI64FMTD "] comment: %s", guid, comment.c_str());
sLog->outDebug(LOG_FILTER_LFG, "CMSG_LFG_SET_COMMENT %s comment: %s",
GetPlayerInfo().c_str(), comment.c_str());
sLFGMgr->SetComment(guid, comment);
}
@@ -142,7 +146,8 @@ void WorldSession::HandleLfgSetBootVoteOpcode(WorldPacket& recvData)
recvData >> agree;
uint64 guid = GetPlayer()->GetGUID();
sLog->outDebug(LOG_FILTER_LFG, "CMSG_LFG_SET_BOOT_VOTE [" UI64FMTD "] agree: %u", guid, agree ? 1 : 0);
sLog->outDebug(LOG_FILTER_LFG, "CMSG_LFG_SET_BOOT_VOTE %s agree: %u",
GetPlayerInfo().c_str(), agree ? 1 : 0);
sLFGMgr->UpdateBoot(guid, agree);
}
@@ -151,14 +156,16 @@ void WorldSession::HandleLfgTeleportOpcode(WorldPacket& recvData)
bool out;
recvData >> out;
sLog->outDebug(LOG_FILTER_LFG, "CMSG_LFG_TELEPORT [" UI64FMTD "] out: %u", GetPlayer()->GetGUID(), out ? 1 : 0);
sLog->outDebug(LOG_FILTER_LFG, "CMSG_LFG_TELEPORT %s out: %u",
GetPlayerInfo().c_str(), out ? 1 : 0);
sLFGMgr->TeleportPlayer(GetPlayer(), out, true);
}
void WorldSession::HandleLfgPlayerLockInfoRequestOpcode(WorldPacket& /*recvData*/)
{
uint64 guid = GetPlayer()->GetGUID();
sLog->outDebug(LOG_FILTER_LFG, "CMSG_LFG_PLAYER_LOCK_INFO_REQUEST [" UI64FMTD "]", guid);
sLog->outDebug(LOG_FILTER_LFG, "CMSG_LFG_PLAYER_LOCK_INFO_REQUEST %s",
GetPlayerInfo().c_str());
// Get Random dungeons that can be done at a certain level and expansion
LfgDungeonSet randomDungeons;
@@ -179,7 +186,7 @@ void WorldSession::HandleLfgPlayerLockInfoRequestOpcode(WorldPacket& /*recvData*
uint32 rsize = uint32(randomDungeons.size());
uint32 lsize = uint32(lock.size());
sLog->outDebug(LOG_FILTER_LFG, "SMSG_LFG_PLAYER_INFO [" UI64FMTD "]", guid);
sLog->outDebug(LOG_FILTER_LFG, "SMSG_LFG_PLAYER_INFO %s", GetPlayerInfo().c_str());
WorldPacket data(SMSG_LFG_PLAYER_INFO, 1 + rsize * (4 + 1 + 4 + 4 + 4 + 4 + 1 + 4 + 4 + 4) + 4 + lsize * (1 + 4 + 4 + 4 + 4 + 1 + 4 + 4 + 4));
data << uint8(randomDungeons.size()); // Random Dungeon count
@@ -237,7 +244,7 @@ void WorldSession::HandleLfgPlayerLockInfoRequestOpcode(WorldPacket& /*recvData*
void WorldSession::HandleLfgPartyLockInfoRequestOpcode(WorldPacket& /*recvData*/)
{
uint64 guid = GetPlayer()->GetGUID();
sLog->outDebug(LOG_FILTER_LFG, "CMSG_LFG_PARTY_LOCK_INFO_REQUEST [" UI64FMTD "]", guid);
sLog->outDebug(LOG_FILTER_LFG, "CMSG_LFG_PARTY_LOCK_INFO_REQUEST %s", GetPlayerInfo().c_str());
Group* grp = GetPlayer()->GetGroup();
if (!grp)
@@ -262,7 +269,7 @@ void WorldSession::HandleLfgPartyLockInfoRequestOpcode(WorldPacket& /*recvData*
for (LfgLockPartyMap::const_iterator it = lockMap.begin(); it != lockMap.end(); ++it)
size += 8 + 4 + uint32(it->second.size()) * (4 + 4 + 4 + 4);
sLog->outDebug(LOG_FILTER_LFG, "SMSG_LFG_PARTY_INFO [" UI64FMTD "]", guid);
sLog->outDebug(LOG_FILTER_LFG, "SMSG_LFG_PARTY_INFO %s", GetPlayerInfo().c_str());
WorldPacket data(SMSG_LFG_PARTY_INFO, 1 + size);
BuildPartyLockDungeonBlock(data, lockMap);
SendPacket(&data);
@@ -272,7 +279,8 @@ void WorldSession::HandleLfrJoinOpcode(WorldPacket& recvData)
{
uint32 entry; // Raid id to search
recvData >> entry;
sLog->outDebug(LOG_FILTER_LFG, "CMSG_LFG_LFR_JOIN [" UI64FMTD "] dungeon entry: %u", GetPlayer()->GetGUID(), entry);
sLog->outDebug(LOG_FILTER_LFG, "CMSG_LFG_LFR_JOIN %s dungeon entry: %u",
GetPlayerInfo().c_str(), entry);
//SendLfrUpdateListOpcode(entry);
}
@@ -280,48 +288,64 @@ void WorldSession::HandleLfrLeaveOpcode(WorldPacket& recvData)
{
uint32 dungeonId; // Raid id queue to leave
recvData >> dungeonId;
sLog->outDebug(LOG_FILTER_LFG, "CMSG_LFG_LFR_LEAVE [" UI64FMTD "] dungeonId: %u", GetPlayer()->GetGUID(), dungeonId);
sLog->outDebug(LOG_FILTER_LFG, "CMSG_LFG_LFR_LEAVE %s dungeonId: %u",
GetPlayerInfo().c_str(), dungeonId);
//sLFGMgr->LeaveLfr(GetPlayer(), dungeonId);
}
void WorldSession::HandleLfgGetStatus(WorldPacket& /*recvData*/)
{
sLog->outDebug(LOG_FILTER_LFG, "CMSG_LFG_GET_STATUS %s", GetPlayerInfo().c_str());
uint64 guid = GetPlayer()->GetGUID();
LfgUpdateData updateData = sLFGMgr->GetLfgStatus(guid);
if (GetPlayer()->GetGroup())
{
SendLfgUpdateParty(updateData);
updateData.dungeons.clear();
SendLfgUpdatePlayer(updateData);
}
else
{
SendLfgUpdatePlayer(updateData);
updateData.dungeons.clear();
SendLfgUpdateParty(updateData);
}
}
void WorldSession::SendLfgUpdatePlayer(const LfgUpdateData& updateData)
{
bool queued = false;
bool extrainfo = false;
uint64 guid = GetPlayer()->GetGUID();
uint8 size = uint8(updateData.dungeons.size());
switch (updateData.updateType)
{
case LFG_UPDATETYPE_JOIN_PROPOSAL:
case LFG_UPDATETYPE_JOIN_QUEUE:
case LFG_UPDATETYPE_ADDED_TO_QUEUE:
queued = true;
extrainfo = true;
break;
case LFG_UPDATETYPE_UPDATE_STATUS:
extrainfo = size > 0;
break;
case LFG_UPDATETYPE_PROPOSAL_BEGIN:
extrainfo = true;
queued = updateData.state == LFG_STATE_QUEUED;
break;
default:
break;
}
sLog->outDebug(LOG_FILTER_LFG, "SMSG_LFG_UPDATE_PLAYER [" UI64FMTD "] updatetype: %u", guid, updateData.updateType);
WorldPacket data(SMSG_LFG_UPDATE_PLAYER, 1 + 1 + (extrainfo ? 1 : 0) * (1 + 1 + 1 + 1 + size * 4 + updateData.comment.length()));
data << uint8(updateData.updateType); // Lfg Update type
data << uint8(extrainfo); // Extra info
if (extrainfo)
sLog->outDebug(LOG_FILTER_LFG, "SMSG_LFG_UPDATE_PLAYER %s updatetype: %u",
GetPlayerInfo().c_str(), updateData.updateType);
WorldPacket data(SMSG_LFG_UPDATE_PLAYER, 1 + 1 + (size > 0 ? 1 : 0) * (1 + 1 + 1 + 1 + size * 4 + updateData.comment.length()));
data << uint8(updateData.updateType); // Lfg Update type
data << uint8(size > 0); // Extra info
if (size)
{
data << uint8(queued); // Join the queue
data << uint8(0); // unk - Always 0
data << uint8(0); // unk - Always 0
data << uint8(queued); // Join the queue
data << uint8(0); // unk - Always 0
data << uint8(0); // unk - Always 0
data << uint8(size);
if (size)
for (LfgDungeonSet::const_iterator it = updateData.dungeons.begin(); it != updateData.dungeons.end(); ++it)
data << uint32(*it);
for (LfgDungeonSet::const_iterator it = updateData.dungeons.begin(); it != updateData.dungeons.end(); ++it)
data << uint32(*it);
data << updateData.comment;
}
SendPacket(&data);
@@ -330,51 +354,42 @@ void WorldSession::SendLfgUpdatePlayer(const LfgUpdateData& updateData)
void WorldSession::SendLfgUpdateParty(const LfgUpdateData& updateData)
{
bool join = false;
bool extrainfo = false;
bool queued = false;
uint64 guid = GetPlayer()->GetGUID();
uint8 size = uint8(updateData.dungeons.size());
switch (updateData.updateType)
{
case LFG_UPDATETYPE_JOIN_PROPOSAL:
extrainfo = true;
break;
case LFG_UPDATETYPE_ADDED_TO_QUEUE:
extrainfo = true;
join = true;
case LFG_UPDATETYPE_ADDED_TO_QUEUE: // Rolecheck Success
queued = true;
// no break on purpose
case LFG_UPDATETYPE_PROPOSAL_BEGIN:
join = true;
break;
case LFG_UPDATETYPE_UPDATE_STATUS:
extrainfo = size > 0;
join = true;
queued = true;
break;
case LFG_UPDATETYPE_PROPOSAL_BEGIN:
extrainfo = true;
join = true;
join = updateData.state != LFG_STATE_ROLECHECK && updateData.state != LFG_STATE_NONE;
queued = updateData.state == LFG_STATE_QUEUED;
break;
default:
break;
}
sLog->outDebug(LOG_FILTER_LFG, "SMSG_LFG_UPDATE_PARTY [" UI64FMTD "] updatetype: %u", guid, updateData.updateType);
WorldPacket data(SMSG_LFG_UPDATE_PARTY, 1 + 1 + (extrainfo ? 1 : 0) * (1 + 1 + 1 + 1 + 1 + size * 4 + updateData.comment.length()));
data << uint8(updateData.updateType); // Lfg Update type
data << uint8(extrainfo); // Extra info
if (extrainfo)
sLog->outDebug(LOG_FILTER_LFG, "SMSG_LFG_UPDATE_PARTY %s updatetype: %u",
GetPlayerInfo().c_str(), updateData.updateType);
WorldPacket data(SMSG_LFG_UPDATE_PARTY, 1 + 1 + (size > 0 ? 1 : 0) * (1 + 1 + 1 + 1 + 1 + size * 4 + updateData.comment.length()));
data << uint8(updateData.updateType); // Lfg Update type
data << uint8(size > 0); // Extra info
if (size)
{
data << uint8(join); // LFG Join
data << uint8(queued); // Join the queue
data << uint8(0); // unk - Always 0
data << uint8(0); // unk - Always 0
data << uint8(join); // LFG Join
data << uint8(queued); // Join the queue
data << uint8(0); // unk - Always 0
data << uint8(0); // unk - Always 0
for (uint8 i = 0; i < 3; ++i)
data << uint8(0); // unk - Always 0
data << uint8(0); // unk - Always 0
data << uint8(size);
if (size)
for (LfgDungeonSet::const_iterator it = updateData.dungeons.begin(); it != updateData.dungeons.end(); ++it)
data << uint32(*it);
for (LfgDungeonSet::const_iterator it = updateData.dungeons.begin(); it != updateData.dungeons.end(); ++it)
data << uint32(*it);
data << updateData.comment;
}
SendPacket(&data);
@@ -382,7 +397,8 @@ void WorldSession::SendLfgUpdateParty(const LfgUpdateData& updateData)
void WorldSession::SendLfgRoleChosen(uint64 guid, uint8 roles)
{
sLog->outDebug(LOG_FILTER_LFG, "SMSG_LFG_ROLE_CHOSEN [" UI64FMTD "] guid: [" UI64FMTD "] roles: %u", GetPlayer()->GetGUID(), guid, roles);
sLog->outDebug(LOG_FILTER_LFG, "SMSG_LFG_ROLE_CHOSEN %s guid: %u roles: %u",
GetPlayerInfo().c_str(), GUID_LOPART(guid), roles);
WorldPacket data(SMSG_LFG_ROLE_CHOSEN, 8 + 1 + 4);
data << uint64(guid); // Guid
@@ -399,7 +415,7 @@ void WorldSession::SendLfgRoleCheckUpdate(const LfgRoleCheck& roleCheck)
else
dungeons = roleCheck.dungeons;
sLog->outDebug(LOG_FILTER_LFG, "SMSG_LFG_ROLE_CHECK_UPDATE [" UI64FMTD "]", GetPlayer()->GetGUID());
sLog->outDebug(LOG_FILTER_LFG, "SMSG_LFG_ROLE_CHECK_UPDATE %s", GetPlayerInfo().c_str());
WorldPacket data(SMSG_LFG_ROLE_CHECK_UPDATE, 4 + 1 + 1 + dungeons.size() * 4 + 1 + roleCheck.roles.size() * (8 + 1 + 4 + 1));
data << uint32(roleCheck.state); // Check result
@@ -424,7 +440,7 @@ void WorldSession::SendLfgRoleCheckUpdate(const LfgRoleCheck& roleCheck)
data << uint8(roles > 0); // Ready
data << uint32(roles); // Roles
Player* player = ObjectAccessor::FindPlayer(guid);
data << uint8(player ? player->getLevel() : 0); // Level
data << uint8(player ? player->getLevel() : 0); // Level
for (LfgRolesMap::const_iterator it = roleCheck.roles.begin(); it != roleCheck.roles.end(); ++it)
{
@@ -437,7 +453,7 @@ void WorldSession::SendLfgRoleCheckUpdate(const LfgRoleCheck& roleCheck)
data << uint8(roles > 0); // Ready
data << uint32(roles); // Roles
player = ObjectAccessor::FindPlayer(guid);
data << uint8(player ? player->getLevel() : 0); // Level
data << uint8(player ? player->getLevel() : 0);// Level
}
}
SendPacket(&data);
@@ -449,7 +465,8 @@ void WorldSession::SendLfgJoinResult(const LfgJoinResultData& joinData)
for (LfgLockPartyMap::const_iterator it = joinData.lockmap.begin(); it != joinData.lockmap.end(); ++it)
size += 8 + 4 + uint32(it->second.size()) * (4 + 4 + 4 + 4);
sLog->outDebug(LOG_FILTER_LFG, "SMSG_LFG_JOIN_RESULT [" UI64FMTD "] checkResult: %u checkValue: %u", GetPlayer()->GetGUID(), joinData.result, joinData.state);
sLog->outDebug(LOG_FILTER_LFG, "SMSG_LFG_JOIN_RESULT %s checkResult: %u checkValue: %u",
GetPlayerInfo().c_str(), joinData.result, joinData.state);
WorldPacket data(SMSG_LFG_JOIN_RESULT, 4 + 4 + size);
data << uint32(joinData.result); // Check Result
data << uint32(joinData.state); // Check Value
@@ -460,8 +477,8 @@ void WorldSession::SendLfgJoinResult(const LfgJoinResultData& joinData)
void WorldSession::SendLfgQueueStatus(const LfgQueueStatusData& queueData)
{
sLog->outDebug(LOG_FILTER_LFG, "SMSG_LFG_QUEUE_STATUS [" UI64FMTD "] dungeon: %u - waitTime: %d - avgWaitTime: %d - waitTimeTanks: %d - waitTimeHealer: %d - waitTimeDps: %d - queuedTime: %u - tanks: %u - healers: %u - dps: %u",
GetPlayer()->GetGUID(), queueData.dungeonId, queueData.waitTime, queueData.waitTimeAvg, queueData.waitTimeTank, queueData.waitTimeHealer, queueData.waitTimeDps, queueData.queuedTime, queueData.tanks, queueData.healers, queueData.dps);
sLog->outDebug(LOG_FILTER_LFG, "SMSG_LFG_QUEUE_STATUS %s dungeon: %u - waitTime: %d - avgWaitTime: %d - waitTimeTanks: %d - waitTimeHealer: %d - waitTimeDps: %d - queuedTime: %u - tanks: %u - healers: %u - dps: %u",
GetPlayerInfo().c_str(), queueData.dungeonId, queueData.waitTime, queueData.waitTimeAvg, queueData.waitTimeTank, queueData.waitTimeHealer, queueData.waitTimeDps, queueData.queuedTime, queueData.tanks, queueData.healers, queueData.dps);
WorldPacket data(SMSG_LFG_QUEUE_STATUS, 4 + 4 + 4 + 4 + 4 +4 + 1 + 1 + 1 + 4);
data << uint32(queueData.dungeonId); // Dungeon
@@ -484,7 +501,8 @@ void WorldSession::SendLfgPlayerReward(uint32 rdungeonEntry, uint32 sdungeonEntr
uint8 itemNum = uint8(quest ? quest->GetRewItemsCount() : 0);
sLog->outDebug(LOG_FILTER_LFG, "SMSG_LFG_PLAYER_REWARD [" UI64FMTD "] rdungeonEntry: %u - sdungeonEntry: %u - done: %u", GetPlayer()->GetGUID(), rdungeonEntry, sdungeonEntry, done);
sLog->outDebug(LOG_FILTER_LFG, "SMSG_LFG_PLAYER_REWARD %s rdungeonEntry: %u - sdungeonEntry: %u - done: %u",
GetPlayerInfo().c_str(), rdungeonEntry, sdungeonEntry, done);
WorldPacket data(SMSG_LFG_PLAYER_REWARD, 4 + 4 + 1 + 4 + 4 + 4 + 4 + 4 + 1 + itemNum * (4 + 4 + 4));
data << uint32(rdungeonEntry); // Random Dungeon Finished
data << uint32(sdungeonEntry); // Dungeon Finished
@@ -525,8 +543,12 @@ void WorldSession::SendLfgBootProposalUpdate(const LfgPlayerBoot& boot)
++agreeNum;
}
}
sLog->outDebug(LOG_FILTER_LFG, "SMSG_LFG_BOOT_PROPOSAL_UPDATE [" UI64FMTD "] inProgress: %u - didVote: %u - agree: %u - victim: [" UI64FMTD "] votes: %u - agrees: %u - left: %u - needed: %u - reason %s",
guid, uint8(boot.inProgress), uint8(playerVote != LFG_ANSWER_PENDING), uint8(playerVote == LFG_ANSWER_AGREE), boot.victim, votesNum, agreeNum, secsleft, LFG_GROUP_KICK_VOTES_NEEDED, boot.reason.c_str());
sLog->outDebug(LOG_FILTER_LFG, "SMSG_LFG_BOOT_PROPOSAL_UPDATE %s inProgress: %u - "
"didVote: %u - agree: %u - victim: %u votes: %u - agrees: %u - left: %u - "
"needed: %u - reason %s",
GetPlayerInfo().c_str(), uint8(boot.inProgress), uint8(playerVote != LFG_ANSWER_PENDING),
uint8(playerVote == LFG_ANSWER_AGREE), GUID_LOPART(boot.victim), votesNum, agreeNum,
secsleft, LFG_GROUP_KICK_VOTES_NEEDED, boot.reason.c_str());
WorldPacket data(SMSG_LFG_BOOT_PROPOSAL_UPDATE, 1 + 1 + 1 + 8 + 4 + 4 + 4 + 4 + boot.reason.length());
data << uint8(boot.inProgress); // Vote in progress
data << uint8(playerVote != LFG_ANSWER_PENDING); // Did Vote
@@ -548,7 +570,8 @@ void WorldSession::SendLfgUpdateProposal(uint32 proposalId, LfgProposal const& p
bool silent = !proposal.isNew && gguid == proposal.group;
uint32 dungeonEntry = proposal.dungeonId;
sLog->outDebug(LOG_FILTER_LFG, "SMSG_LFG_PROPOSAL_UPDATE [" UI64FMTD "] state: %u", guid, proposal.state);
sLog->outDebug(LOG_FILTER_LFG, "SMSG_LFG_PROPOSAL_UPDATE %s state: %u",
GetPlayerInfo().c_str(), proposal.state);
WorldPacket data(SMSG_LFG_PROPOSAL_UPDATE, 4 + 1 + 4 + 4 + 1 + 1 + proposal.players.size() * (4 + 1 + 1 + 1 + 1 +1));
// show random dungeon if player selected random dungeon and it's not lfg group
@@ -581,18 +604,19 @@ void WorldSession::SendLfgUpdateProposal(uint32 proposalId, LfgProposal const& p
}
else
{
data << uint8(player.group == proposal.group); // In dungeon (silent)
data << uint8(player.group == gguid); // Same Group than player
data << uint8(player.group == proposal.group); // In dungeon (silent)
data << uint8(player.group == gguid); // Same Group than player
}
data << uint8(player.accept != LFG_ANSWER_PENDING); // Answered
data << uint8(player.accept == LFG_ANSWER_AGREE); // Accepted
data << uint8(player.accept != LFG_ANSWER_PENDING);// Answered
data << uint8(player.accept == LFG_ANSWER_AGREE); // Accepted
}
SendPacket(&data);
}
void WorldSession::SendLfgLfrList(bool update)
{
sLog->outDebug(LOG_FILTER_LFG, "SMSG_LFG_LFR_LIST [" UI64FMTD "] update: %u", GetPlayer()->GetGUID(), update ? 1 : 0);
sLog->outDebug(LOG_FILTER_LFG, "SMSG_LFG_LFR_LIST %s update: %u",
GetPlayerInfo().c_str(), update ? 1 : 0);
WorldPacket data(SMSG_LFG_UPDATE_SEARCH, 1);
data << uint8(update); // In Lfg Queue?
SendPacket(&data);
@@ -600,14 +624,15 @@ void WorldSession::SendLfgLfrList(bool update)
void WorldSession::SendLfgDisabled()
{
sLog->outDebug(LOG_FILTER_LFG, "SMSG_LFG_DISABLED [" UI64FMTD "]", GetPlayer()->GetGUID());
sLog->outDebug(LOG_FILTER_LFG, "SMSG_LFG_DISABLED %s", GetPlayerInfo().c_str());
WorldPacket data(SMSG_LFG_DISABLED, 0);
SendPacket(&data);
}
void WorldSession::SendLfgOfferContinue(uint32 dungeonEntry)
{
sLog->outDebug(LOG_FILTER_LFG, "SMSG_LFG_OFFER_CONTINUE [" UI64FMTD "] dungeon entry: %u", GetPlayer()->GetGUID(), dungeonEntry);
sLog->outDebug(LOG_FILTER_LFG, "SMSG_LFG_OFFER_CONTINUE %s dungeon entry: %u",
GetPlayerInfo().c_str(), dungeonEntry);
WorldPacket data(SMSG_LFG_OFFER_CONTINUE, 4);
data << uint32(dungeonEntry);
SendPacket(&data);
@@ -615,48 +640,18 @@ void WorldSession::SendLfgOfferContinue(uint32 dungeonEntry)
void WorldSession::SendLfgTeleportError(uint8 err)
{
sLog->outDebug(LOG_FILTER_LFG, "SMSG_LFG_TELEPORT_DENIED [" UI64FMTD "] reason: %u", GetPlayer()->GetGUID(), err);
sLog->outDebug(LOG_FILTER_LFG, "SMSG_LFG_TELEPORT_DENIED %s reason: %u",
GetPlayerInfo().c_str(), err);
WorldPacket data(SMSG_LFG_TELEPORT_DENIED, 4);
data << uint32(err); // Error
SendPacket(&data);
}
void WorldSession::HandleLfgGetStatus(WorldPacket& /*recvData*/)
{
uint64 guid = GetPlayer()->GetGUID();
sLog->outDebug(LOG_FILTER_LFG, "SMSG_LFG_GET_STATUS [" UI64FMTD "]", guid);
LfgUpdateData updateData = LfgUpdateData(LFG_UPDATETYPE_UPDATE_STATUS);
LfgState state = sLFGMgr->GetLfgStatus(guid, updateData);
if (state == LFG_STATE_NONE || updateData.dungeons.empty())
{
SendLfgUpdatePlayer(updateData);
SendLfgUpdateParty(updateData);
return;
}
if (state != LFG_STATE_QUEUED)
return;
if (GetPlayer()->GetGroup())
{
SendLfgUpdateParty(updateData);
updateData.dungeons.clear();
SendLfgUpdatePlayer(updateData);
}
else
{
SendLfgUpdatePlayer(updateData);
updateData.dungeons.clear();
SendLfgUpdateParty(updateData);
}
}
/*
void WorldSession::SendLfrUpdateListOpcode(uint32 dungeonEntry)
{
sLog->outDebug(LOG_FILTER_PACKETIO, "SMSG_LFG_UPDATE_LIST [" UI64FMTD "] dungeon entry: %u", GetPlayer()->GetGUID(), dungeonEntry);
sLog->outDebug(LOG_FILTER_PACKETIO, "SMSG_LFG_UPDATE_LIST %s dungeon entry: %u",
GetPlayerInfo().c_str(), dungeonEntry);
WorldPacket data(SMSG_LFG_UPDATE_LIST);
SendPacket(&data);
}
@@ -30,9 +30,9 @@ EndScriptData */
enum Says
{
SAY_GAMESBEGIN_1 = -1469004,
SAY_GAMESBEGIN_2 = -1469005,
SAY_VAEL_INTRO = -1469006 //when he corrupts Vaelastrasz
SAY_GAMESBEGIN_1 = 0,
SAY_GAMESBEGIN_2 = 1,
//SAY_VAEL_INTRO = 2, Not used - when he corrupts Vaelastrasz
};
#define GOSSIP_ITEM_1 "I've made no mistakes."
@@ -101,7 +101,7 @@ public:
break;
case GOSSIP_ACTION_INFO_DEF+3:
player->CLOSE_GOSSIP_MENU();
DoScriptText(SAY_GAMESBEGIN_1, creature);
creature->AI()->Talk(SAY_GAMESBEGIN_1);
CAST_AI(boss_victor_nefarius::boss_victor_nefariusAI, creature->AI())->BeginEvent(player);
break;
}
@@ -238,7 +238,7 @@ public:
void BeginEvent(Player* target)
{
DoScriptText(SAY_GAMESBEGIN_2, me);
Talk(SAY_GAMESBEGIN_2);
//Trinity::Singleton<MapManager>::Instance().GetMap(me->GetMapId(), me)->GetPlayers().begin();
/*
@@ -26,23 +26,27 @@ EndScriptData */
#include "ScriptMgr.h"
#include "ScriptedCreature.h"
#define SAY_AGGRO -1532057
#define SAY_SUMMON1 -1532058
#define SAY_SUMMON2 -1532059
#define SAY_EVOCATE -1532060
#define SAY_ENRAGE -1532061
#define SAY_KILL1 -1532062
#define SAY_KILL2 -1532063
#define SAY_DEATH -1532064
enum Curator
{
SAY_AGGRO = 0,
SAY_SUMMON = 1,
SAY_EVOCATE = 2,
SAY_ENRAGE = 3,
SAY_KILL = 4,
SAY_DEATH = 5,
//Flare spell info
SPELL_ASTRAL_FLARE_PASSIVE = 30234, //Visual effect + Flare damage
//Curator spell info
SPELL_HATEFUL_BOLT = 30383,
SPELL_EVOCATION = 30254,
SPELL_ENRAGE = 30403, //Arcane Infusion: Transforms Curator and adds damage.
SPELL_BERSERK = 26662,
};
//Flare spell info
#define SPELL_ASTRAL_FLARE_PASSIVE 30234 //Visual effect + Flare damage
//Curator spell info
#define SPELL_HATEFUL_BOLT 30383
#define SPELL_EVOCATION 30254
#define SPELL_ENRAGE 30403 //Arcane Infusion: Transforms Curator and adds damage.
#define SPELL_BERSERK 26662
class boss_curator : public CreatureScript
{
@@ -78,17 +82,17 @@ public:
void KilledUnit(Unit* /*victim*/)
{
DoScriptText(RAND(SAY_KILL1, SAY_KILL2), me);
Talk(SAY_KILL);
}
void JustDied(Unit* /*killer*/)
{
DoScriptText(SAY_DEATH, me);
Talk(SAY_DEATH);
}
void EnterCombat(Unit* /*who*/)
{
DoScriptText(SAY_AGGRO, me);
Talk(SAY_AGGRO);
}
void UpdateAI(const uint32 diff)
@@ -109,7 +113,7 @@ public:
}
//may not be correct SAY (generic hard enrage)
DoScriptText(SAY_ENRAGE, me);
Talk(SAY_ENRAGE);
me->InterruptNonMeleeSpells(true);
DoCast(me, SPELL_BERSERK);
@@ -151,7 +155,7 @@ public:
//if this get's us below 10%, then we evocate (the 10th should be summoned now)
if (me->GetPower(POWER_MANA)*100 / me->GetMaxPower(POWER_MANA) < 10)
{
DoScriptText(SAY_EVOCATE, me);
Talk(SAY_EVOCATE);
me->InterruptNonMeleeSpells(false);
DoCast(me, SPELL_EVOCATION);
Evocating = true;
@@ -162,7 +166,7 @@ public:
{
if (urand(0, 1) == 0)
{
DoScriptText(RAND(SAY_SUMMON1, SAY_SUMMON2), me);
Talk(SAY_SUMMON);
}
}
}
@@ -174,7 +178,7 @@ public:
{
Enraged = true;
DoCast(me, SPELL_ENRAGE);
DoScriptText(SAY_ENRAGE, me);
Talk(SAY_ENRAGE);
}
}
@@ -26,19 +26,19 @@ EndScriptData */
#include "ScriptMgr.h"
#include "ScriptedCreature.h"
#define SAY_AGGRO -1532018
#define SAY_SLAY1 -1532019
#define SAY_SLAY2 -1532020
#define SAY_SLAY3 -1532021
#define SAY_REPENTANCE1 -1532022
#define SAY_REPENTANCE2 -1532023
#define SAY_DEATH -1532024
enum MaidenOfVirtue
{
SAY_AGGRO = 0,
SAY_SLAY = 1,
SAY_REPENTANCE = 2,
SAY_DEATH = 3,
#define SPELL_REPENTANCE 29511
#define SPELL_HOLYFIRE 29522
#define SPELL_HOLYWRATH 32445
#define SPELL_HOLYGROUND 29512
#define SPELL_BERSERK 26662
SPELL_REPENTANCE = 29511,
SPELL_HOLYFIRE = 29522,
SPELL_HOLYWRATH = 32445,
SPELL_HOLYGROUND = 29512,
SPELL_BERSERK = 26662,
};
class boss_maiden_of_virtue : public CreatureScript
{
@@ -76,17 +76,17 @@ public:
void KilledUnit(Unit* /*Victim*/)
{
if (urand(0, 1) == 0)
DoScriptText(RAND(SAY_SLAY1, SAY_SLAY2, SAY_SLAY3), me);
Talk(SAY_SLAY);
}
void JustDied(Unit* /*killer*/)
{
DoScriptText(SAY_DEATH, me);
Talk(SAY_DEATH);
}
void EnterCombat(Unit* /*who*/)
{
DoScriptText(SAY_AGGRO, me);
Talk(SAY_AGGRO);
}
void UpdateAI(const uint32 diff)
@@ -109,7 +109,7 @@ public:
if (Repentance_Timer <= diff)
{
DoCast(me->getVictim(), SPELL_REPENTANCE);
DoScriptText(RAND(SAY_REPENTANCE1, SAY_REPENTANCE2), me);
Talk(SAY_REPENTANCE);
Repentance_Timer = urand(25000, 35000); //A little randomness on that spell
} else Repentance_Timer -= diff;
@@ -27,26 +27,25 @@ EndScriptData */
#include "ScriptedCreature.h"
#include "SpellInfo.h"
#define SAY_MIDNIGHT_KILL -1532000
#define SAY_APPEAR1 -1532001
#define SAY_APPEAR2 -1532002
#define SAY_APPEAR3 -1532003
#define SAY_MOUNT -1532004
#define SAY_KILL1 -1532005
#define SAY_KILL2 -1532006
#define SAY_DISARMED -1532007
#define SAY_DEATH -1532008
#define SAY_RANDOM1 -1532009
#define SAY_RANDOM2 -1532010
enum Midnight
{
SAY_MIDNIGHT_KILL = 0,
SAY_APPEAR = 1,
SAY_MOUNT = 2,
SAY_KILL = 3,
SAY_DISARMED = 4,
SAY_DEATH = 5,
SAY_RANDOM = 6,
#define SPELL_SHADOWCLEAVE 29832
#define SPELL_INTANGIBLE_PRESENCE 29833
#define SPELL_BERSERKER_CHARGE 26561 //Only when mounted
SPELL_SHADOWCLEAVE = 29832,
SPELL_INTANGIBLE_PRESENCE = 29833,
SPELL_BERSERKER_CHARGE = 26561, //Only when mounted
#define MOUNTED_DISPLAYID 16040
MOUNTED_DISPLAYID = 16040,
//Attumen (TODO: Use the summoning spell instead of Creature id. It works, but is not convenient for us)
#define SUMMON_ATTUMEN 15550
//Attumen (TODO: Use the summoning spell instead of Creature id. It works, but is not convenient for us)
SUMMON_ATTUMEN = 15550,
};
class boss_attumen : public CreatureScript
{
@@ -94,14 +93,14 @@ public:
void KilledUnit(Unit* /*victim*/)
{
DoScriptText(RAND(SAY_KILL1, SAY_KILL2), me);
Talk(SAY_KILL);
}
void JustDied(Unit* /*killer*/)
{
DoScriptText(SAY_DEATH, me);
if (Unit* pMidnight = Unit::GetUnit(*me, Midnight))
pMidnight->Kill(pMidnight);
Talk(SAY_DEATH);
if (Unit* midnight = Unit::GetUnit(*me, Midnight))
midnight->Kill(midnight);
}
void UpdateAI(const uint32 diff);
@@ -109,7 +108,7 @@ public:
void SpellHit(Unit* /*source*/, const SpellInfo* spell)
{
if (spell->Mechanic == MECHANIC_DISARM)
DoScriptText(SAY_DISARMED, me);
Talk(SAY_DISARMED);
}
};
};
@@ -149,7 +148,7 @@ public:
if (Phase == 2)
{
if (Unit* unit = Unit::GetUnit(*me, Attumen))
DoScriptText(SAY_MIDNIGHT_KILL, unit);
Talk(SAY_MIDNIGHT_KILL, unit->GetGUID());
}
}
@@ -161,12 +160,12 @@ public:
if (Phase == 1 && HealthBelowPct(95))
{
Phase = 2;
if (Creature* pAttumen = me->SummonCreature(SUMMON_ATTUMEN, 0.0f, 0.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 30000))
if (Creature* attumen = me->SummonCreature(SUMMON_ATTUMEN, 0.0f, 0.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 30000))
{
Attumen = pAttumen->GetGUID();
pAttumen->AI()->AttackStart(me->getVictim());
SetMidnight(pAttumen, me->GetGUID());
DoScriptText(RAND(SAY_APPEAR1, SAY_APPEAR2, SAY_APPEAR3), pAttumen);
Attumen = attumen->GetGUID();
attumen->AI()->AttackStart(me->getVictim());
SetMidnight(attumen, me->GetGUID());
Talk(SAY_APPEAR, Attumen);
}
}
else if (Phase == 2 && HealthBelowPct(25))
@@ -204,7 +203,7 @@ public:
void Mount(Unit* pAttumen)
{
DoScriptText(SAY_MOUNT, pAttumen);
Talk(SAY_MOUNT, pAttumen->GetGUID());
Phase = 3;
me->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
pAttumen->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
@@ -274,7 +273,7 @@ void boss_attumen::boss_attumenAI::UpdateAI(const uint32 diff)
if (RandomYellTimer <= diff)
{
DoScriptText(RAND(SAY_RANDOM1, SAY_RANDOM2), me);
Talk(SAY_RANDOM);
RandomYellTimer = urand(30000, 60000);
} else RandomYellTimer -= diff;
@@ -27,19 +27,20 @@ EndScriptData */
#include "ScriptedCreature.h"
#include "karazhan.h"
#define SAY_AGGRO -1532011
#define SAY_SPECIAL_1 -1532012
#define SAY_SPECIAL_2 -1532013
#define SAY_KILL_1 -1532014
#define SAY_KILL_2 -1532015
#define SAY_KILL_3 -1532016
#define SAY_DEATH -1532017
enum Moroes
{
SAY_AGGRO = 0,
SAY_SPECIAL = 1,
SAY_KILL = 2,
SAY_DEATH = 3,
SPELL_VANISH = 29448,
SPELL_GARROTE = 37066,
SPELL_BLIND = 34694,
SPELL_GOUGE = 29425,
SPELL_FRENZY = 37023,
};
#define SPELL_VANISH 29448
#define SPELL_GARROTE 37066
#define SPELL_BLIND 34694
#define SPELL_GOUGE 29425
#define SPELL_FRENZY 37023
#define POS_Z 81.73f
@@ -124,19 +125,19 @@ public:
{
StartEvent();
DoScriptText(SAY_AGGRO, me);
Talk(SAY_AGGRO);
AddsAttack();
DoZoneInCombat();
}
void KilledUnit(Unit* /*victim*/)
{
DoScriptText(RAND(SAY_KILL_1, SAY_KILL_2, SAY_KILL_3), me);
Talk(SAY_KILL);
}
void JustDied(Unit* /*killer*/)
{
DoScriptText(SAY_DEATH, me);
Talk(SAY_DEATH);
if (instance)
instance->SetData(TYPE_MOROES, DONE);
@@ -294,7 +295,7 @@ public:
{
if (Wait_Timer <= diff)
{
DoScriptText(RAND(SAY_SPECIAL_1, SAY_SPECIAL_2), me);
Talk(SAY_SPECIAL);
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true))
target->CastSpell(target, SPELL_GARROTE, true);
@@ -28,17 +28,21 @@ EndScriptData */
#include "karazhan.h"
#include "Player.h"
#define EMOTE_PHASE_PORTAL -1532089
#define EMOTE_PHASE_BANISH -1532090
enum Netherspite
{
EMOTE_PHASE_PORTAL = 0,
EMOTE_PHASE_BANISH = 1,
SPELL_NETHERBURN_AURA = 30522,
SPELL_VOIDZONE = 37063,
SPELL_NETHER_INFUSION = 38688,
SPELL_NETHERBREATH = 38523,
SPELL_BANISH_VISUAL = 39833,
SPELL_BANISH_ROOT = 42716,
SPELL_EMPOWERMENT = 38549,
SPELL_NETHERSPITE_ROAR = 38684,
};
#define SPELL_NETHERBURN_AURA 30522
#define SPELL_VOIDZONE 37063
#define SPELL_NETHER_INFUSION 38688
#define SPELL_NETHERBREATH 38523
#define SPELL_BANISH_VISUAL 39833
#define SPELL_BANISH_ROOT 42716
#define SPELL_EMPOWERMENT 38549
#define SPELL_NETHERSPITE_ROAR 38684
const float PortalCoord[3][3] =
{
@@ -229,7 +233,7 @@ public:
PortalPhase = true;
PortalTimer = 10000;
EmpowermentTimer = 10000;
DoScriptText(EMOTE_PHASE_PORTAL, me);
Talk(EMOTE_PHASE_PORTAL);
}
void SwitchToBanishPhase()
@@ -241,7 +245,7 @@ public:
DestroyPortals();
PhaseTimer = 30000;
PortalPhase = false;
DoScriptText(EMOTE_PHASE_BANISH, me);
Talk(EMOTE_PHASE_BANISH);
for (int i=0; i<3; ++i)
me->RemoveAurasDueToSpell(NetherBuff[i]);
@@ -28,19 +28,6 @@ EndScriptData */
#include "karazhan.h"
#include "SpellInfo.h"
#define SAY_AGGRO -1532091
#define SAY_AXE_TOSS1 -1532092
#define SAY_AXE_TOSS2 -1532093
#define SAY_SPECIAL1 -1532094
#define SAY_SPECIAL2 -1532095
#define SAY_SPECIAL3 -1532096
#define SAY_SLAY1 -1532097
#define SAY_SLAY2 -1532098
#define SAY_SLAY3 -1532099
#define SAY_SUMMON1 -1532100
#define SAY_SUMMON2 -1532101
#define SAY_DEATH -1532102
// 18 Coordinates for Infernal spawns
struct InfernalPoint
{
@@ -71,31 +58,43 @@ static InfernalPoint InfernalPoints[] =
{-10935.7f, -1996.0f}
};
#define TOTAL_INFERNAL_POINTS 18
//Enfeeble is supposed to reduce hp to 1 and then heal player back to full when it ends
//Along with reducing healing and regen while enfeebled to 0%
//This spell effect will only reduce healing
enum PrinceMalchezaar
{
SAY_AGGRO = 0,
SAY_AXE_TOSS1 = 1,
SAY_AXE_TOSS2 = 2,
// SAY_SPECIAL1 = 3, Not used, needs to be implemented, but I don't know where it should be used.
// SAY_SPECIAL2 = 4, Not used, needs to be implemented, but I don't know where it should be used.
// SAY_SPECIAL3 = 5, Not used, needs to be implemented, but I don't know where it should be used.
SAY_SLAY = 6,
SAY_SUMMON = 7,
SAY_DEATH = 8,
#define SPELL_ENFEEBLE 30843 //Enfeeble during phase 1 and 2
#define SPELL_ENFEEBLE_EFFECT 41624
TOTAL_INFERNAL_POINTS = 18,
#define SPELL_SHADOWNOVA 30852 //Shadownova used during all phases
#define SPELL_SW_PAIN 30854 //Shadow word pain during phase 1 and 3 (different targeting rules though)
#define SPELL_THRASH_PASSIVE 12787 //Extra attack chance during phase 2
#define SPELL_SUNDER_ARMOR 30901 //Sunder armor during phase 2
#define SPELL_THRASH_AURA 12787 //Passive proc chance for thrash
#define SPELL_EQUIP_AXES 30857 //Visual for axe equiping
#define SPELL_AMPLIFY_DAMAGE 39095 //Amplifiy during phase 3
#define SPELL_CLEAVE 30131 //Same as Nightbane.
#define SPELL_HELLFIRE 30859 //Infenals' hellfire aura
#define NETHERSPITE_INFERNAL 17646 //The netherspite infernal creature
#define MALCHEZARS_AXE 17650 //Malchezar's axes (creatures), summoned during phase 3
SPELL_ENFEEBLE = 30843, //Enfeeble during phase 1 and 2
SPELL_ENFEEBLE_EFFECT = 41624,
#define INFERNAL_MODEL_INVISIBLE 11686 //Infernal Effects
#define SPELL_INFERNAL_RELAY 30834
SPELL_SHADOWNOVA = 30852, //Shadownova used during all phases
SPELL_SW_PAIN = 30854, //Shadow word pain during phase 1 and 3 (different targeting rules though)
SPELL_THRASH_PASSIVE = 12787, //Extra attack chance during phase 2
SPELL_SUNDER_ARMOR = 30901, //Sunder armor during phase 2
SPELL_THRASH_AURA = 12787, //Passive proc chance for thrash
SPELL_EQUIP_AXES = 30857, //Visual for axe equiping
SPELL_AMPLIFY_DAMAGE = 39095, //Amplifiy during phase 3
SPELL_CLEAVE = 30131, //Same as Nightbane.
SPELL_HELLFIRE = 30859, //Infenals' hellfire aura
NETHERSPITE_INFERNAL = 17646, //The netherspite infernal creature
MALCHEZARS_AXE = 17650, //Malchezar's axes (creatures), summoned during phase 3
#define EQUIP_ID_AXE 33542 //Axes info
INFERNAL_MODEL_INVISIBLE = 11686, //Infernal Effects
SPELL_INFERNAL_RELAY = 30834,
EQUIP_ID_AXE = 33542, //Axes info
};
//---------Infernal code first
class netherspite_infernal : public CreatureScript
@@ -245,12 +244,12 @@ public:
void KilledUnit(Unit* /*victim*/)
{
DoScriptText(RAND(SAY_SLAY1, SAY_SLAY2, SAY_SLAY3), me);
Talk(SAY_SLAY);
}
void JustDied(Unit* /*killer*/)
{
DoScriptText(SAY_DEATH, me);
Talk(SAY_DEATH);
AxesCleanup();
ClearWeapons();
@@ -266,7 +265,7 @@ public:
void EnterCombat(Unit* /*who*/)
{
DoScriptText(SAY_AGGRO, me);
Talk(SAY_AGGRO);
if (instance)
instance->HandleGameObject(instance->GetData64(DATA_GO_NETHER_DOOR), false); // Open the door leading further in
@@ -384,7 +383,7 @@ public:
DoCast(Infernal, SPELL_INFERNAL_RELAY);
}
DoScriptText(RAND(SAY_SUMMON1, SAY_SUMMON2), me);
Talk(SAY_SUMMON);
}
void UpdateAI(const uint32 diff)
@@ -416,7 +415,7 @@ public:
DoCast(me, SPELL_EQUIP_AXES);
//text
DoScriptText(SAY_AXE_TOSS1, me);
Talk(SAY_AXE_TOSS1);
//passive thrash aura
DoCast(me, SPELL_THRASH_AURA, true);
@@ -452,7 +451,7 @@ public:
//remove thrash
me->RemoveAurasDueToSpell(SPELL_THRASH_AURA);
DoScriptText(SAY_AXE_TOSS2, me);
Talk(SAY_AXE_TOSS2);
Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true);
for (uint8 i = 0; i < 2; ++i)
@@ -29,51 +29,48 @@ EndScriptData */
#include "GameObject.h"
#include "SpellInfo.h"
#define SAY_AGGRO1 -1532073
#define SAY_AGGRO2 -1532074
#define SAY_AGGRO3 -1532075
#define SAY_FLAMEWREATH1 -1532076
#define SAY_FLAMEWREATH2 -1532077
#define SAY_BLIZZARD1 -1532078
#define SAY_BLIZZARD2 -1532079
#define SAY_EXPLOSION1 -1532080
#define SAY_EXPLOSION2 -1532081
#define SAY_DRINK -1532082 //Low Mana / AoE Pyroblast
#define SAY_ELEMENTALS -1532083
#define SAY_KILL1 -1532084
#define SAY_KILL2 -1532085
#define SAY_TIMEOVER -1532086
#define SAY_DEATH -1532087
#define SAY_ATIESH -1532088 //Atiesh is equipped by a raid member
enum ShadeOfAran
{
SAY_AGGRO = 0,
SAY_FLAMEWREATH = 1,
SAY_BLIZZARD = 2,
SAY_EXPLOSION = 3,
SAY_DRINK = 4,
SAY_ELEMENTALS = 5,
SAY_KILL = 6,
SAY_TIMEOVER = 7,
SAY_DEATH = 8,
// SAY_ATIESH = 9, Unused
//Spells
#define SPELL_FROSTBOLT 29954
#define SPELL_FIREBALL 29953
#define SPELL_ARCMISSLE 29955
#define SPELL_CHAINSOFICE 29991
#define SPELL_DRAGONSBREATH 29964
#define SPELL_MASSSLOW 30035
#define SPELL_FLAME_WREATH 29946
#define SPELL_AOE_CS 29961
#define SPELL_PLAYERPULL 32265
#define SPELL_AEXPLOSION 29973
#define SPELL_MASS_POLY 29963
#define SPELL_BLINK_CENTER 29967
#define SPELL_ELEMENTALS 29962
#define SPELL_CONJURE 29975
#define SPELL_DRINK 30024
#define SPELL_POTION 32453
#define SPELL_AOE_PYROBLAST 29978
//Spells
SPELL_FROSTBOLT = 29954,
SPELL_FIREBALL = 29953,
SPELL_ARCMISSLE = 29955,
SPELL_CHAINSOFICE = 29991,
SPELL_DRAGONSBREATH = 29964,
SPELL_MASSSLOW = 30035,
SPELL_FLAME_WREATH = 29946,
SPELL_AOE_CS = 29961,
SPELL_PLAYERPULL = 32265,
SPELL_AEXPLOSION = 29973,
SPELL_MASS_POLY = 29963,
SPELL_BLINK_CENTER = 29967,
SPELL_ELEMENTALS = 29962,
SPELL_CONJURE = 29975,
SPELL_DRINK = 30024,
SPELL_POTION = 32453,
SPELL_AOE_PYROBLAST = 29978,
//Creature Spells
#define SPELL_CIRCULAR_BLIZZARD 29951 //29952 is the REAL circular blizzard that leaves persistant blizzards that last for 10 seconds
#define SPELL_WATERBOLT 31012
#define SPELL_SHADOW_PYRO 29978
//Creature Spells
SPELL_CIRCULAR_BLIZZARD = 29951,
SPELL_WATERBOLT = 31012,
SPELL_SHADOW_PYRO = 29978,
//Creatures
#define CREATURE_WATER_ELEMENTAL 17167
#define CREATURE_SHADOW_OF_ARAN 18254
#define CREATURE_ARAN_BLIZZARD 17161
//Creatures
CREATURE_WATER_ELEMENTAL = 17167,
CREATURE_SHADOW_OF_ARAN = 18254,
CREATURE_ARAN_BLIZZARD = 17161,
};
enum SuperSpell
{
@@ -160,12 +157,12 @@ public:
void KilledUnit(Unit* /*victim*/)
{
DoScriptText(RAND(SAY_KILL1, SAY_KILL2), me);
Talk(SAY_KILL);
}
void JustDied(Unit* /*killer*/)
{
DoScriptText(SAY_DEATH, me);
Talk(SAY_DEATH);
if (instance)
{
@@ -176,7 +173,7 @@ public:
void EnterCombat(Unit* /*who*/)
{
DoScriptText(RAND(SAY_AGGRO1, SAY_AGGRO2, SAY_AGGRO3), me);
Talk(SAY_AGGRO);
if (instance)
{
@@ -264,7 +261,7 @@ public:
Drinking = true;
me->InterruptNonMeleeSpells(false);
DoScriptText(SAY_DRINK, me);
Talk(SAY_DRINK);
if (!DrinkInturrupted)
{
@@ -384,7 +381,7 @@ public:
switch (LastSuperSpell)
{
case SUPER_AE:
DoScriptText(RAND(SAY_EXPLOSION1, SAY_EXPLOSION2), me);
Talk(SAY_EXPLOSION);
DoCast(me, SPELL_BLINK_CENTER, true);
DoCast(me, SPELL_PLAYERPULL, true);
@@ -393,7 +390,7 @@ public:
break;
case SUPER_FLAME:
DoScriptText(RAND(SAY_FLAMEWREATH1, SAY_FLAMEWREATH2), me);
Talk(SAY_FLAMEWREATH);
FlameWreathTimer = 20000;
FlameWreathCheckTime = 500;
@@ -406,7 +403,7 @@ public:
break;
case SUPER_BLIZZARD:
DoScriptText(RAND(SAY_BLIZZARD1, SAY_BLIZZARD2), me);
Talk(SAY_BLIZZARD);
if (Creature* pSpawn = me->SummonCreature(CREATURE_ARAN_BLIZZARD, 0.0f, 0.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_DESPAWN, 25000))
{
@@ -432,7 +429,7 @@ public:
}
}
DoScriptText(SAY_ELEMENTALS, me);
Talk(SAY_ELEMENTALS);
}
if (BerserkTimer <= diff)
@@ -446,7 +443,7 @@ public:
}
}
DoScriptText(SAY_TIMEOVER, me);
Talk(SAY_TIMEOVER);
BerserkTimer = 60000;
} else BerserkTimer -= diff;
@@ -28,35 +28,36 @@ EndScriptData */
#include "karazhan.h"
#include "PassiveAI.h"
#define SAY_SLAY1 -1532065
#define SAY_SLAY2 -1532066
#define SAY_DEATH -1532067
#define SAY_AGGRO -1532068
#define SAY_SACRIFICE1 -1532069
#define SAY_SACRIFICE2 -1532070
#define SAY_SUMMON1 -1532071
#define SAY_SUMMON2 -1532072
enum TerestianIllhoof
{
SAY_SLAY = 1,
SAY_DEATH = 2,
SAY_AGGRO = 3,
SAY_SACRIFICE = 4,
SAY_SUMMON = 5,
#define SPELL_SUMMON_DEMONCHAINS 30120 // Summons demonic chains that maintain the ritual of sacrifice.
#define SPELL_DEMON_CHAINS 30206 // Instant - Visual Effect
#define SPELL_ENRAGE 23537 // Increases the caster's attack speed by 50% and the Physical damage it deals by 219 to 281 for 10 min.
#define SPELL_SHADOW_BOLT 30055 // Hurls a bolt of dark magic at an enemy, inflicting Shadow damage.
#define SPELL_SACRIFICE 30115 // Teleports and adds the debuff
#define SPELL_BERSERK 32965 // Increases attack speed by 75%. Periodically casts Shadow Bolt Volley.
#define SPELL_SUMMON_FIENDISIMP 30184 // Summons a Fiendish Imp.
#define SPELL_SUMMON_IMP 30066 // Summons Kil'rek
SPELL_SUMMON_DEMONCHAINS = 30120, // Summons demonic chains that maintain the ritual of sacrifice.
SPELL_DEMON_CHAINS = 30206, // Instant - Visual Effect
SPELL_ENRAGE = 23537, // Increases the caster's attack speed by 50% and the Physical damage it deals by 219 to 281 for 10 min.
SPELL_SHADOW_BOLT = 30055, // Hurls a bolt of dark magic at an enemy, inflicting Shadow damage.
SPELL_SACRIFICE = 30115, // Teleports and adds the debuff
SPELL_BERSERK = 32965, // Increases attack speed by 75%. Periodically casts Shadow Bolt Volley.
SPELL_SUMMON_FIENDISIMP = 30184, // Summons a Fiendish Imp.
SPELL_SUMMON_IMP = 30066, // Summons Kil'rek
#define SPELL_FIENDISH_PORTAL 30171 // Opens portal and summons Fiendish Portal, 2 sec cast
#define SPELL_FIENDISH_PORTAL_1 30179 // Opens portal and summons Fiendish Portal, instant cast
SPELL_FIENDISH_PORTAL = 30171, // Opens portal and summons Fiendish Portal, 2 sec cast
SPELL_FIENDISH_PORTAL_1 = 30179, // Opens portal and summons Fiendish Portal, instant cast
#define SPELL_FIREBOLT 30050 // Blasts a target for 150 Fire damage.
#define SPELL_BROKEN_PACT 30065 // All damage taken increased by 25%.
#define SPELL_AMPLIFY_FLAMES 30053 // Increases the Fire damage taken by an enemy by 500 for 25 sec.
SPELL_FIREBOLT = 30050, // Blasts a target for 150 Fire damage.
SPELL_BROKEN_PACT = 30065, // All damage taken increased by 25%.
SPELL_AMPLIFY_FLAMES = 30053, // Increases the Fire damage taken by an enemy by 500 for 25 sec.
CREATURE_DEMONCHAINS = 17248,
CREATURE_FIENDISHIMP = 17267,
CREATURE_PORTAL = 17265,
CREATURE_KILREK = 17229,
};
#define CREATURE_DEMONCHAINS 17248
#define CREATURE_FIENDISHIMP 17267
#define CREATURE_PORTAL 17265
#define CREATURE_KILREK 17229
class mob_kilrek : public CreatureScript
{
@@ -319,7 +320,7 @@ public:
void EnterCombat(Unit* /*who*/)
{
DoScriptText(SAY_AGGRO, me);
Talk(SAY_AGGRO);
}
void JustSummoned(Creature* summoned)
@@ -331,7 +332,7 @@ public:
if (summoned->GetUInt32Value(UNIT_CREATED_BY_SPELL) == SPELL_FIENDISH_PORTAL_1)
{
DoScriptText(RAND(SAY_SUMMON1, SAY_SUMMON2), me);
Talk(SAY_SUMMON);
SummonedPortals = true;
}
}
@@ -339,7 +340,7 @@ public:
void KilledUnit(Unit* /*victim*/)
{
DoScriptText(RAND(SAY_SLAY1, SAY_SLAY2), me);
Talk(SAY_SLAY);
}
void JustDied(Unit* /*killer*/)
@@ -355,7 +356,7 @@ public:
}
}
DoScriptText(SAY_DEATH, me);
Talk(SAY_DEATH);
if (instance)
instance->SetData(TYPE_TERESTIAN, DONE);
@@ -378,7 +379,7 @@ public:
{
CAST_AI(mob_demon_chain::mob_demon_chainAI, Chains->AI())->SacrificeGUID = target->GetGUID();
Chains->CastSpell(Chains, SPELL_DEMON_CHAINS, true);
DoScriptText(RAND(SAY_SACRIFICE1, SAY_SACRIFICE2), me);
Talk(SAY_SACRIFICE);
SacrificeTimer = 30000;
}
}
@@ -33,64 +33,69 @@ EndScriptData */
/***********************************/
/*** OPERA WIZARD OF OZ EVENT *****/
/*********************************/
enum Says
{
SAY_DOROTHEE_DEATH = 0,
SAY_DOROTHEE_SUMMON = 1,
SAY_DOROTHEE_TITO_DEATH = 2,
SAY_DOROTHEE_AGGRO = 3,
#define SAY_DOROTHEE_DEATH -1532025
#define SAY_DOROTHEE_SUMMON -1532026
#define SAY_DOROTHEE_TITO_DEATH -1532027
#define SAY_DOROTHEE_AGGRO -1532028
SAY_ROAR_AGGRO = 0,
SAY_ROAR_DEATH = 1,
SAY_ROAR_SLAY = 2,
#define SAY_ROAR_AGGRO -1532029
#define SAY_ROAR_DEATH -1532030
#define SAY_ROAR_SLAY -1532031
SAY_STRAWMAN_AGGRO = 0,
SAY_STRAWMAN_DEATH = 1,
SAY_STRAWMAN_SLAY = 2,
#define SAY_STRAWMAN_AGGRO -1532032
#define SAY_STRAWMAN_DEATH -1532033
#define SAY_STRAWMAN_SLAY -1532034
SAY_TINHEAD_AGGRO = 0,
SAY_TINHEAD_DEATH = 1,
SAY_TINHEAD_SLAY = 2,
EMOTE_RUST = 3,
#define SAY_TINHEAD_AGGRO -1532035
#define SAY_TINHEAD_DEATH -1532036
#define SAY_TINHEAD_SLAY -1532037
#define EMOTE_RUST -1532038
SAY_CRONE_AGGRO = 0,
SAY_CRONE_DEATH = 1,
SAY_CRONE_SLAY = 2,
};
#define SAY_CRONE_AGGRO -1532039
#define SAY_CRONE_AGGRO2 -1532040
#define SAY_CRONE_DEATH -1532041
#define SAY_CRONE_SLAY -1532042
enum Spells
{
// Dorothee
SPELL_WATERBOLT = 31012,
SPELL_SCREAM = 31013,
SPELL_SUMMONTITO = 31014,
/**** Spells ****/
// Dorothee
#define SPELL_WATERBOLT 31012
#define SPELL_SCREAM 31013
#define SPELL_SUMMONTITO 31014
// Tito
SPELL_YIPPING = 31015,
// Tito
#define SPELL_YIPPING 31015
// Strawman
SPELL_BRAIN_BASH = 31046,
SPELL_BRAIN_WIPE = 31069,
SPELL_BURNING_STRAW = 31075,
// Strawman
#define SPELL_BRAIN_BASH 31046
#define SPELL_BRAIN_WIPE 31069
#define SPELL_BURNING_STRAW 31075
// Tinhead
SPELL_CLEAVE = 31043,
SPELL_RUST = 31086,
// Tinhead
#define SPELL_CLEAVE 31043
#define SPELL_RUST 31086
// Roar
SPELL_MANGLE = 31041,
SPELL_SHRED = 31042,
SPELL_FRIGHTENED_SCREAM = 31013,
// Roar
#define SPELL_MANGLE 31041
#define SPELL_SHRED 31042
#define SPELL_FRIGHTENED_SCREAM 31013
// Crone
SPELL_CHAIN_LIGHTNING = 32337,
// Crone
#define SPELL_CHAIN_LIGHTNING 32337
// Cyclone
SPELL_KNOCKBACK = 32334,
SPELL_CYCLONE_VISUAL = 32332,
};
// Cyclone
#define SPELL_KNOCKBACK 32334
#define SPELL_CYCLONE_VISUAL 32332
/** Creature Entries **/
#define CREATURE_TITO 17548
#define CREATURE_CYCLONE 18412
#define CREATURE_CRONE 18168
enum Creatures
{
CREATURE_TITO = 17548,
CREATURE_CYCLONE = 18412,
CREATURE_CRONE = 18168,
};
void SummonCroneIfReady(InstanceScript* instance, Creature* creature)
{
@@ -148,7 +153,7 @@ public:
void EnterCombat(Unit* /*who*/)
{
DoScriptText(SAY_DOROTHEE_AGGRO, me);
Talk(SAY_DOROTHEE_AGGRO);
}
void JustReachedHome()
@@ -160,7 +165,7 @@ public:
void JustDied(Unit* /*killer*/)
{
DoScriptText(SAY_DOROTHEE_DEATH, me);
Talk(SAY_DOROTHEE_DEATH);
if (instance)
SummonCroneIfReady(instance, me);
@@ -253,7 +258,7 @@ public:
if (Dorothee && Dorothee->isAlive())
{
CAST_AI(boss_dorothee::boss_dorotheeAI, Dorothee->AI())->TitoDied = true;
DoScriptText(SAY_DOROTHEE_TITO_DEATH, Dorothee);
Talk(SAY_DOROTHEE_TITO_DEATH, Dorothee->GetGUID());
}
}
}
@@ -278,7 +283,7 @@ void boss_dorothee::boss_dorotheeAI::SummonTito()
{
if (Creature* pTito = me->SummonCreature(CREATURE_TITO, 0.0f, 0.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30000))
{
DoScriptText(SAY_DOROTHEE_SUMMON, me);
Talk(SAY_DOROTHEE_SUMMON);
CAST_AI(mob_tito::mob_titoAI, pTito->AI())->DorotheeGUID = me->GetGUID();
pTito->AI()->AttackStart(me->getVictim());
SummonedTito = true;
@@ -334,7 +339,7 @@ public:
void EnterCombat(Unit* /*who*/)
{
DoScriptText(SAY_STRAWMAN_AGGRO, me);
Talk(SAY_STRAWMAN_AGGRO);
}
void JustReachedHome()
@@ -357,7 +362,7 @@ public:
void JustDied(Unit* /*killer*/)
{
DoScriptText(SAY_STRAWMAN_DEATH, me);
Talk(SAY_STRAWMAN_DEATH);
if (instance)
SummonCroneIfReady(instance, me);
@@ -365,7 +370,7 @@ public:
void KilledUnit(Unit* /*victim*/)
{
DoScriptText(SAY_STRAWMAN_SLAY, me);
Talk(SAY_STRAWMAN_SLAY);
}
void UpdateAI(const uint32 diff)
@@ -436,7 +441,7 @@ public:
void EnterCombat(Unit* /*who*/)
{
DoScriptText(SAY_TINHEAD_AGGRO, me);
Talk(SAY_TINHEAD_AGGRO);
}
void JustReachedHome()
@@ -462,7 +467,7 @@ public:
void JustDied(Unit* /*killer*/)
{
DoScriptText(SAY_TINHEAD_DEATH, me);
Talk(SAY_TINHEAD_DEATH);
if (instance)
SummonCroneIfReady(instance, me);
@@ -470,7 +475,7 @@ public:
void KilledUnit(Unit* /*victim*/)
{
DoScriptText(SAY_TINHEAD_SLAY, me);
Talk(SAY_TINHEAD_SLAY);
}
void UpdateAI(const uint32 diff)
@@ -498,7 +503,7 @@ public:
if (RustTimer <= diff)
{
++RustCount;
DoScriptText(EMOTE_RUST, me);
Talk(EMOTE_RUST);
DoCast(me, SPELL_RUST);
RustTimer = 6000;
} else RustTimer -= diff;
@@ -559,7 +564,7 @@ public:
void EnterCombat(Unit* /*who*/)
{
DoScriptText(SAY_ROAR_AGGRO, me);
Talk(SAY_ROAR_AGGRO);
}
void JustReachedHome()
@@ -569,7 +574,7 @@ public:
void JustDied(Unit* /*killer*/)
{
DoScriptText(SAY_ROAR_DEATH, me);
Talk(SAY_ROAR_DEATH);
if (instance)
SummonCroneIfReady(instance, me);
@@ -577,7 +582,7 @@ public:
void KilledUnit(Unit* /*victim*/)
{
DoScriptText(SAY_ROAR_SLAY, me);
Talk(SAY_ROAR_SLAY);
}
void UpdateAI(const uint32 diff)
@@ -650,16 +655,21 @@ public:
me->DespawnOrUnsummon();
}
void KilledUnit(Unit* /*victim*/)
{
Talk(SAY_CRONE_SLAY);
}
void EnterCombat(Unit* /*who*/)
{
DoScriptText(RAND(SAY_CRONE_AGGRO, SAY_CRONE_AGGRO2), me);
Talk(SAY_CRONE_AGGRO);
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC);
}
void JustDied(Unit* /*killer*/)
{
DoScriptText(SAY_CRONE_DEATH, me);
Talk(SAY_CRONE_DEATH);
if (instance)
{
@@ -744,22 +754,24 @@ public:
/**************************************/
/**** Opera Red Riding Hood Event* ***/
/************************************/
enum RedRidingHood
{
SAY_WOLF_AGGRO = 0,
SAY_WOLF_SLAY = 1,
SAY_WOLF_HOOD = 2,
SOUND_WOLF_DEATH = 9275,
/**** Yells for the Wolf ****/
#define SAY_WOLF_AGGRO -1532043
#define SAY_WOLF_SLAY -1532044
#define SAY_WOLF_HOOD -1532045
#define SOUND_WOLF_DEATH 9275 //Only sound on death, no text.
SPELL_LITTLE_RED_RIDING_HOOD = 30768,
SPELL_TERRIFYING_HOWL = 30752,
SPELL_WIDE_SWIPE = 30761,
CREATURE_BIG_BAD_WOLF = 17521,
};
/**** Spells For The Wolf ****/
#define SPELL_LITTLE_RED_RIDING_HOOD 30768
#define SPELL_TERRIFYING_HOWL 30752
#define SPELL_WIDE_SWIPE 30761
#define GOSSIP_GRANDMA "What phat lewtz you have grandmother?"
/**** The Wolf's Entry* ***/
#define CREATURE_BIG_BAD_WOLF 17521
class npc_grandmother : public CreatureScript
{
@@ -831,7 +843,12 @@ public:
void EnterCombat(Unit* /*who*/)
{
DoScriptText(SAY_WOLF_AGGRO, me);
Talk(SAY_WOLF_AGGRO);
}
void KilledUnit(Unit* /*victim*/)
{
Talk(SAY_WOLF_SLAY);
}
void JustReachedHome()
@@ -867,7 +884,7 @@ public:
{
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true))
{
DoScriptText(SAY_WOLF_HOOD, me);
Talk(SAY_WOLF_HOOD);
DoCast(target, SPELL_LITTLE_RED_RIDING_HOOD, true);
TempThreat = DoGetThreat(target);
if (TempThreat)
@@ -917,41 +934,41 @@ public:
/******** Opera Romeo and Juliet Event* ******/
/********************************************/
/**** Speech *****/
#define SAY_JULIANNE_AGGRO -1532046
#define SAY_JULIANNE_ENTER -1532047
#define SAY_JULIANNE_DEATH01 -1532048
#define SAY_JULIANNE_DEATH02 -1532049
#define SAY_JULIANNE_RESURRECT -1532050
#define SAY_JULIANNE_SLAY -1532051
enum JulianneRomulo
{
/**** Speech *****/
SAY_JULIANNE_AGGRO = 0,
SAY_JULIANNE_ENTER = 1,
SAY_JULIANNE_DEATH01 = 2,
SAY_JULIANNE_DEATH02 = 3,
SAY_JULIANNE_RESURRECT = 4,
SAY_JULIANNE_SLAY = 5,
#define SAY_ROMULO_AGGRO -1532052
#define SAY_ROMULO_DEATH -1532053
#define SAY_ROMULO_ENTER -1532054
#define SAY_ROMULO_RESURRECT -1532055
#define SAY_ROMULO_SLAY -1532056
SAY_ROMULO_AGGRO = 0,
SAY_ROMULO_DEATH = 1,
SAY_ROMULO_ENTER = 2,
SAY_ROMULO_RESURRECT = 3,
SAY_ROMULO_SLAY = 4,
/***** Spells For Julianne *****/
#define SPELL_BLINDING_PASSION 30890
#define SPELL_DEVOTION 30887
#define SPELL_ETERNAL_AFFECTION 30878
#define SPELL_POWERFUL_ATTRACTION 30889
#define SPELL_DRINK_POISON 30907
SPELL_BLINDING_PASSION = 30890,
SPELL_DEVOTION = 30887,
SPELL_ETERNAL_AFFECTION = 30878,
SPELL_POWERFUL_ATTRACTION = 30889,
SPELL_DRINK_POISON = 30907,
/***** Spells For Romulo ****/
#define SPELL_BACKWARD_LUNGE 30815
#define SPELL_DARING 30841
#define SPELL_DEADLY_SWATHE 30817
#define SPELL_POISON_THRUST 30822
SPELL_BACKWARD_LUNGE = 30815,
SPELL_DARING = 30841,
SPELL_DEADLY_SWATHE = 30817,
SPELL_POISON_THRUST = 30822,
/**** Other Misc. Spells ****/
#define SPELL_UNDYING_LOVE 30951
#define SPELL_RES_VISUAL 24171
SPELL_UNDYING_LOVE = 30951,
SPELL_RES_VISUAL = 24171,
CREATURE_ROMULO = 17533,
ROMULO_X = -10900,
ROMULO_Y = -1758,
};
/*** Misc. Information ****/
#define CREATURE_ROMULO 17533
#define ROMULO_X -10900
#define ROMULO_Y -1758
enum RAJPhase
{
@@ -1078,7 +1095,7 @@ public:
{
if (Spell->Id == SPELL_DRINK_POISON)
{
DoScriptText(SAY_JULIANNE_DEATH01, me);
Talk(SAY_JULIANNE_DEATH01);
DrinkPoisonTimer = 2500;
}
}
@@ -1087,7 +1104,7 @@ public:
void JustDied(Unit* /*killer*/)
{
DoScriptText(SAY_JULIANNE_DEATH02, me);
Talk(SAY_JULIANNE_DEATH02);
if (instance)
{
@@ -1101,7 +1118,7 @@ public:
void KilledUnit(Unit* /*victim*/)
{
DoScriptText(SAY_JULIANNE_SLAY, me);
Talk(SAY_JULIANNE_SLAY);
}
void UpdateAI(const uint32 diff);
@@ -1172,7 +1189,7 @@ public:
if (Phase == PHASE_ROMULO)
{
DoScriptText(SAY_ROMULO_DEATH, me);
Talk(SAY_ROMULO_DEATH);
PretendToDie(me);
IsFakingDeath = true;
Phase = PHASE_BOTH;
@@ -1219,7 +1236,7 @@ public:
void EnterCombat(Unit* /*who*/)
{
DoScriptText(SAY_ROMULO_AGGRO, me);
Talk(SAY_ROMULO_AGGRO);
if (JulianneGUID)
{
Creature* Julianne = (Unit::GetCreature((*me), JulianneGUID));
@@ -1241,7 +1258,7 @@ public:
void JustDied(Unit* /*killer*/)
{
DoScriptText(SAY_ROMULO_DEATH, me);
Talk(SAY_ROMULO_DEATH);
if (instance)
{
@@ -1256,7 +1273,7 @@ public:
void KilledUnit(Unit* /*victim*/)
{
DoScriptText(SAY_ROMULO_SLAY, me);
Talk(SAY_ROMULO_SLAY);
}
void UpdateAI(const uint32 diff)
@@ -1271,7 +1288,7 @@ public:
Creature* Julianne = (Unit::GetCreature((*me), JulianneGUID));
if (Julianne && CAST_AI(boss_julianne::boss_julianneAI, Julianne->AI())->IsFakingDeath)
{
DoScriptText(SAY_ROMULO_RESURRECT, me);
Talk(SAY_ROMULO_RESURRECT);
Resurrect(Julianne);
CAST_AI(boss_julianne::boss_julianneAI, Julianne->AI())->IsFakingDeath = false;
JulianneDead = false;
@@ -1320,7 +1337,7 @@ void boss_julianne::boss_julianneAI::UpdateAI(const uint32 diff)
{
if (EntryYellTimer <= diff)
{
DoScriptText(SAY_JULIANNE_ENTER, me);
Talk(SAY_JULIANNE_ENTER);
EntryYellTimer = 0;
} else EntryYellTimer -= diff;
}
@@ -1329,7 +1346,7 @@ void boss_julianne::boss_julianneAI::UpdateAI(const uint32 diff)
{
if (AggroYellTimer <= diff)
{
DoScriptText(SAY_JULIANNE_AGGRO, me);
Talk(SAY_JULIANNE_AGGRO);
me->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
me->setFaction(16);
AggroYellTimer = 0;
@@ -1391,7 +1408,7 @@ void boss_julianne::boss_julianneAI::UpdateAI(const uint32 diff)
Creature* Romulo = (Unit::GetCreature((*me), RomuloGUID));
if (Romulo && CAST_AI(boss_romulo::boss_romuloAI, Romulo->AI())->IsFakingDeath)
{
DoScriptText(SAY_JULIANNE_RESURRECT, me);
Talk(SAY_JULIANNE_RESURRECT);
Resurrect(Romulo);
CAST_AI(boss_romulo::boss_romuloAI, Romulo->AI())->IsFakingDeath = false;
RomuloDead = false;
@@ -63,26 +63,26 @@ struct Dialogue
static Dialogue OzDialogue[]=
{
{-1532103, 6000},
{-1532104, 18000},
{-1532105, 9000},
{-1532106, 15000}
{0, 6000},
{1, 18000},
{2, 9000},
{3, 15000}
};
static Dialogue HoodDialogue[]=
{
{-1532107, 6000},
{-1532108, 10000},
{-1532109, 14000},
{-1532110, 15000}
{4, 6000},
{5, 10000},
{6, 14000},
{7, 15000}
};
static Dialogue RAJDialogue[]=
{
{-1532111, 5000},
{-1532112, 7000},
{-1532113, 14000},
{-1532114, 14000}
{8, 5000},
{9, 7000},
{10, 14000},
{11, 14000}
};
// Entries and spawn locations for creatures in Oz event
@@ -225,7 +225,8 @@ public:
}
if (text)
DoScriptText(text, me);
CreatureAI::Talk(text);
}
void PrepareEncounter()
@@ -28,8 +28,8 @@ EndScriptData */
enum eEnums
{
SAY_AGGRO = -1189019,
SAY_SPECIALAE = -1189020,
SAY_AGGRO = 0,
SAY_SPECIALAE = 1,
SPELL_POLYMORPH = 13323,
SPELL_AOESILENCE = 8988,
@@ -69,7 +69,7 @@ public:
void EnterCombat(Unit* /*who*/)
{
DoScriptText(SAY_AGGRO, me);
Talk(SAY_AGGRO);
}
void UpdateAI(const uint32 diff)
@@ -93,7 +93,7 @@ public:
if (me->IsNonMeleeSpellCasted(false))
return;
DoScriptText(SAY_SPECIALAE, me);
Talk(SAY_SPECIALAE);
DoCast(me, SPELL_ARCANEBUBBLE);
bCanDetonate = true;
@@ -28,9 +28,9 @@ EndScriptData */
enum eEnums
{
SAY_AGGRO = -1189016,
SAY_HEALTH = -1189017,
SAY_KILL = -1189018,
SAY_AGGRO = 0,
SAY_HEALTH = 1,
SAY_KILL = 2,
SPELL_FLAMESHOCK = 8053,
SPELL_SHADOWBOLT = 1106,
@@ -69,12 +69,12 @@ public:
void EnterCombat(Unit* /*who*/)
{
DoScriptText(SAY_AGGRO, me);
Talk(SAY_AGGRO);
}
void KilledUnit(Unit* /*Victim*/)
{
DoScriptText(SAY_KILL, me);
Talk(SAY_KILL);
}
void UpdateAI(const uint32 diff)
@@ -85,7 +85,7 @@ public:
//If we are <35% hp
if (!HpYell && !HealthAbovePct(35))
{
DoScriptText(SAY_HEALTH, me);
Talk(SAY_HEALTH);
HpYell = true;
}
@@ -34,13 +34,14 @@ EndScriptData */
//this texts are already used by 3975 and 3976
enum Says
{
SAY_ENTRANCE = -1189001,
SAY_REJOINED = -1189002,
SAY_LOST_HEAD = -1189003,
SAY_CONFLAGRATION = -1189004,
SAY_SPROUTING_PUMPKINS = -1189005,
SAY_PLAYER_DEATH = -1189006,
SAY_DEATH = -1189007
SAY_LOST_HEAD = 0,
SAY_PLAYER_DEATH = 1,
SAY_ENTRANCE = 0,
SAY_REJOINED = 1,
SAY_CONFLAGRATION = 2,
SAY_SPROUTING_PUMPKINS = 3,
SAY_DEATH = 4,
};
uint32 RandomLaugh[] = {11965, 11975, 11976};
@@ -251,13 +252,17 @@ public:
laugh = urand(15000, 30000);
}
void EnterCombat(Unit* /*who*/) {}
void SaySound(int32 textEntry, Unit* target = 0)
void EnterCombat(Unit* /*who*/) { }
void SaySound(uint8 textEntry, Unit* target = 0)
{
DoScriptText(textEntry, me, target);
if (target)
Talk(textEntry, target->GetGUID());
else
Talk(textEntry);
//DoCast(me, SPELL_HEAD_SPEAKS, true);
Creature* speaker = DoSpawnCreature(HELPER, 0, 0, 0, 0, TEMPSUMMON_TIMED_DESPAWN, 1000);
if (speaker)
if (Creature* speaker = DoSpawnCreature(HELPER, 0, 0, 0, 0, TEMPSUMMON_TIMED_DESPAWN, 1000))
speaker->CastSpell(speaker, SPELL_HEAD_SPEAKS, false);
laugh += 3000;
}
@@ -517,9 +522,12 @@ public:
}
}
void SaySound(int32 textEntry, Unit* target = 0)
void SaySound(uint8 textEntry, Unit* target = 0)
{
DoScriptText(textEntry, me, target);
if (target)
Talk(textEntry, target->GetGUID());
else
Talk(textEntry);
laugh += 4000;
}
@@ -29,15 +29,11 @@ EndScriptData */
enum Says
{
SAY_AGGRO = -1189000,
SAY_WHIRLWIND = -1189001,
SAY_ENRAGE = -1189002,
SAY_KILL = -1189003
};
enum Emotes
{
EMOTE_ENRAGE = -1189004
SAY_AGGRO = 0,
SAY_WHIRLWIND = 1,
SAY_ENRAGE = 2,
SAY_KILL = 3,
EMOTE_ENRAGE = 4
};
enum Spells
@@ -82,13 +78,13 @@ public:
void EnterCombat(Unit* /*who*/)
{
DoScriptText(SAY_AGGRO, me);
Talk(SAY_AGGRO);
DoCast(me, SPELL_RUSHINGCHARGE);
}
void KilledUnit(Unit* /*victim*/)
{
DoScriptText(SAY_KILL, me);
Talk(SAY_KILL);
}
void JustDied(Unit* /*killer*/)
@@ -105,8 +101,8 @@ public:
//If we are <30% hp goes Enraged
if (!Enrage && !HealthAbovePct(30) && !me->IsNonMeleeSpellCasted(false))
{
DoScriptText(EMOTE_ENRAGE, me);
DoScriptText(SAY_ENRAGE, me);
Talk(EMOTE_ENRAGE);
Talk(SAY_ENRAGE);
DoCast(me, SPELL_FRENZY);
Enrage = true;
}
@@ -122,7 +118,7 @@ public:
// Whirlwind_Timer
if (Whirlwind_Timer <= diff)
{
DoScriptText(SAY_WHIRLWIND, me);
Talk(SAY_WHIRLWIND);
DoCast(me->getVictim(), SPELL_WHIRLWIND);
Whirlwind_Timer = 30000;
}
@@ -28,7 +28,7 @@ EndScriptData */
enum eEnums
{
SAY_AGGRO = -1189021,
SAY_AGGRO = 0,
SPELL_SUMMONSCARLETHOUND = 17164,
SPELL_BLOODLUST = 6742
};
@@ -56,7 +56,7 @@ public:
void EnterCombat(Unit* /*who*/)
{
DoScriptText(SAY_AGGRO, me);
Talk(SAY_AGGRO);
}
void UpdateAI(const uint32 diff)
@@ -29,11 +29,11 @@ EndScriptData */
enum Says
{
SAY_AGGRO = -1189011,
SAY_HEALTH1 = -1189012,
SAY_HEALTH2 = -1189013,
SAY_KILL = -1189014,
SAY_TRIGGER_VORREL = -1189015
SAY_AGGRO = 0,
SAY_HEALTH1 = 1,
SAY_HEALTH2 = 2,
SAY_KILL = 3,
SAY_TRIGGER_VORREL = 0
};
enum Spells
@@ -71,12 +71,12 @@ public:
void EnterCombat(Unit* /*who*/)
{
DoScriptText(SAY_AGGRO, me);
Talk(SAY_AGGRO);
}
void KilledUnit(Unit* /*Victim*/)
{
DoScriptText(SAY_KILL, me);
Talk(SAY_KILL);
}
void JustDied(Unit* /*killer*/)
@@ -85,8 +85,8 @@ public:
return;
//Any other Actions to do with vorrel? setStandState?
if (Unit* vorrel = Unit::GetUnit(*me, instance->GetData64(DATA_VORREL)))
DoScriptText(SAY_TRIGGER_VORREL, vorrel);
if (Creature* vorrel = Creature::GetCreature(*me, instance->GetData64(DATA_VORREL)))
vorrel->AI()->Talk(SAY_TRIGGER_VORREL);
}
void UpdateAI(const uint32 diff)
@@ -97,13 +97,13 @@ public:
//If we are low on hp Do sayings
if (!Yell60 && !HealthAbovePct(60))
{
DoScriptText(SAY_HEALTH1, me);
Talk(SAY_HEALTH1);
Yell60 = true;
}
if (!Yell30 && !HealthAbovePct(30))
{
DoScriptText(SAY_HEALTH2, me);
Talk(SAY_HEALTH2);
Yell30 = true;
}
@@ -31,14 +31,14 @@ EndScriptData */
enum Says
{
//Mograine says
SAY_MO_AGGRO = -1189005,
SAY_MO_KILL = -1189006,
SAY_MO_RESSURECTED = -1189007,
SAY_MO_AGGRO = 0,
SAY_MO_KILL = 1,
SAY_MO_RESSURECTED = 2,
//Whitemane says
SAY_WH_INTRO = -1189008,
SAY_WH_KILL = -1189009,
SAY_WH_RESSURECT = -1189010,
SAY_WH_INTRO = 0,
SAY_WH_KILL = 1,
SAY_WH_RESSURECT = 2,
};
enum Spells
@@ -114,7 +114,7 @@ public:
void EnterCombat(Unit* /*who*/)
{
DoScriptText(SAY_MO_AGGRO, me);
Talk(SAY_MO_AGGRO);
DoCast(me, SPELL_RETRIBUTIONAURA);
me->CallForHelp(VISIBLE_RANGE);
@@ -122,7 +122,7 @@ public:
void KilledUnit(Unit* /*victim*/)
{
DoScriptText(SAY_MO_KILL, me);
Talk(SAY_MO_KILL);
}
void DamageTaken(Unit* /*doneBy*/, uint32 &damage)
@@ -167,7 +167,7 @@ public:
//When hit with ressurection say text
if (spell->Id == SPELL_SCARLETRESURRECTION)
{
DoScriptText(SAY_MO_RESSURECTED, me);
Talk(SAY_MO_RESSURECTED);
_bFakeDeath = false;
if (instance)
@@ -276,12 +276,12 @@ public:
void EnterCombat(Unit* /*who*/)
{
DoScriptText(SAY_WH_INTRO, me);
Talk(SAY_WH_INTRO);
}
void KilledUnit(Unit* /*victim*/)
{
DoScriptText(SAY_WH_KILL, me);
Talk(SAY_WH_KILL);
}
void DamageTaken(Unit* /*attacker*/, uint32& damage)
@@ -303,7 +303,7 @@ public:
if (Unit* Mograine = Unit::GetUnit(*me, instance->GetData64(DATA_MOGRAINE)))
{
DoCast(Mograine, SPELL_SCARLETRESURRECTION);
DoScriptText(SAY_WH_RESSURECT, me);
Talk(SAY_WH_RESSURECT);
_bCanResurrect = false;
}
}
@@ -23,6 +23,7 @@ SDComment:
SDCategory: Shadowfang Keep
EndScriptData */
#include "ScriptedCreature.h"
#include "ScriptMgr.h"
#include "InstanceScript.h"
#include "shadowfang_keep.h"
@@ -32,9 +33,9 @@ EndScriptData */
enum eEnums
{
SAY_BOSS_DIE_AD = -1033007,
SAY_BOSS_DIE_AS = -1033008,
SAY_ARCHMAGE = -1033009,
SAY_BOSS_DIE_AD = 0,
SAY_BOSS_DIE_AS = 0,
SAY_ARCHMAGE = 0,
NPC_ASH = 3850,
NPC_ADA = 3849,
@@ -139,8 +140,8 @@ public:
if (pAda && pAda->isAlive() && pAsh && pAsh->isAlive())
{
DoScriptText(SAY_BOSS_DIE_AD, pAda);
DoScriptText(SAY_BOSS_DIE_AS, pAsh);
pAda->AI()->Talk(SAY_BOSS_DIE_AD);
pAsh->AI()->Talk(SAY_BOSS_DIE_AS);
}
}
@@ -257,7 +258,7 @@ public:
summon->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE_TO_PC);
summon->SetReactState(REACT_DEFENSIVE);
summon->CastSpell(summon, SPELL_ASHCROMBE_TELEPORT, true);
DoScriptText(SAY_ARCHMAGE, summon);
summon->AI()->Talk(SAY_ARCHMAGE);
uiTimer = 2000;
uiPhase = 2;
break;
@@ -42,13 +42,13 @@ EndContentData */
enum eEnums
{
SAY_FREE_AS = -1033000,
SAY_OPEN_DOOR_AS = -1033001,
SAY_POST_DOOR_AS = -1033002,
SAY_FREE_AD = -1033003,
SAY_OPEN_DOOR_AD = -1033004,
SAY_POST1_DOOR_AD = -1033005,
SAY_POST2_DOOR_AD = -1033006,
SAY_FREE_AS = 0,
SAY_OPEN_DOOR_AS = 1,
SAY_POST_DOOR_AS = 2,
SAY_FREE_AD = 0,
SAY_OPEN_DOOR_AD = 1,
SAY_POST1_DOOR_AD = 2,
SAY_POST2_DOOR_AD = 3,
SPELL_UNLOCK = 6421,
NPC_ASH = 3850,
@@ -110,15 +110,15 @@ public:
{
case 0:
if (uiNpcEntry == NPC_ASH)
DoScriptText(SAY_FREE_AS, me);
Talk(SAY_FREE_AS);
else
DoScriptText(SAY_FREE_AD, me);
Talk(SAY_FREE_AD);
break;
case 10:
if (uiNpcEntry == NPC_ASH)
DoScriptText(SAY_OPEN_DOOR_AS, me);
Talk(SAY_OPEN_DOOR_AS);
else
DoScriptText(SAY_OPEN_DOOR_AD, me);
Talk(SAY_OPEN_DOOR_AD);
break;
case 11:
if (uiNpcEntry == NPC_ASH)
@@ -126,16 +126,16 @@ public:
break;
case 12:
if (uiNpcEntry == NPC_ASH)
DoScriptText(SAY_POST_DOOR_AS, me);
Talk(SAY_POST_DOOR_AS);
else
DoScriptText(SAY_POST1_DOOR_AD, me);
Talk(SAY_POST1_DOOR_AD);
if (instance)
instance->SetData(TYPE_FREE_NPC, DONE);
break;
case 13:
if (uiNpcEntry != NPC_ASH)
DoScriptText(SAY_POST2_DOOR_AD, me);
Talk(SAY_POST2_DOOR_AD);
break;
}
}
@@ -28,41 +28,37 @@ EndScriptData */
enum Quotes
{
YELL_INTRO = -1580017,
YELL_INTRO_BREAK_ICE = -1580018,
YELL_INTRO_CHARGE = -1580019,
YELL_INTRO_KILL_MADRIGOSA = -1580020,
YELL_INTRO_TAUNT = -1580021,
YELL_INTRO = 0,
YELL_INTRO_BREAK_ICE = 1,
YELL_INTRO_CHARGE = 2,
YELL_INTRO_KILL_MADRIGOSA = 3,
YELL_INTRO_TAUNT = 4,
YELL_MADR_ICE_BARRIER = -1580031,
YELL_MADR_INTRO = -1580032,
YELL_MADR_ICE_BLOCK = -1580033,
YELL_MADR_TRAP = -1580034,
YELL_MADR_DEATH = -1580035,
YELL_AGGRO = 5,
YELL_KILL = 6,
YELL_LOVE = 7,
YELL_BERSERK = 8,
YELL_DEATH = 9,
YELL_AGGRO = -1580022,
YELL_KILL1 = -1580023,
YELL_KILL2 = -1580024,
YELL_KILL3 = -1580025,
YELL_LOVE1 = -1580026,
YELL_LOVE2 = -1580027,
YELL_LOVE3 = -1580028,
YELL_BERSERK = -1580029,
YELL_DEATH = -1580030
YELL_MADR_ICE_BARRIER = 0,
YELL_MADR_INTRO = 1,
YELL_MADR_ICE_BLOCK = 2,
YELL_MADR_TRAP = 3,
YELL_MADR_DEATH = 4,
};
enum Spells
{
SPELL_METEOR_SLASH = 45150,
SPELL_BURN = 46394,
SPELL_STOMP = 45185,
SPELL_BERSERK = 26662,
SPELL_DUAL_WIELD = 42459,
SPELL_METEOR_SLASH = 45150,
SPELL_BURN = 46394,
SPELL_STOMP = 45185,
SPELL_BERSERK = 26662,
SPELL_DUAL_WIELD = 42459,
SPELL_INTRO_FROST_BLAST = 45203,
SPELL_INTRO_FROSTBOLT = 44843,
SPELL_INTRO_ENCAPSULATE = 45665,
SPELL_INTRO_ENCAPSULATE_CHANELLING = 45661
SPELL_INTRO_FROST_BLAST = 45203,
SPELL_INTRO_FROSTBOLT = 44843,
SPELL_INTRO_ENCAPSULATE = 45665,
SPELL_INTRO_ENCAPSULATE_CHANELLING = 45661
};
#define FELMYST 25038
@@ -122,7 +118,7 @@ public:
void EnterCombat(Unit* /*who*/)
{
DoScriptText(YELL_AGGRO, me);
Talk(YELL_AGGRO);
if (instance)
instance->SetData(DATA_BRUTALLUS_EVENT, IN_PROGRESS);
@@ -130,12 +126,12 @@ public:
void KilledUnit(Unit* /*victim*/)
{
DoScriptText(RAND(YELL_KILL1, YELL_KILL2, YELL_KILL3), me);
Talk(YELL_KILL);
}
void JustDied(Unit* /*killer*/)
{
DoScriptText(YELL_DEATH, me);
Talk(YELL_DEATH);
if (instance)
{
@@ -199,19 +195,19 @@ public:
switch (IntroPhase)
{
case 0:
DoScriptText(YELL_MADR_ICE_BARRIER, Madrigosa);
Madrigosa->AI()->Talk(YELL_MADR_ICE_BARRIER);
IntroPhaseTimer = 7000;
++IntroPhase;
break;
case 1:
me->SetInFront(Madrigosa);
Madrigosa->SetInFront(me);
DoScriptText(YELL_MADR_INTRO, Madrigosa, me);
Madrigosa->AI()->Talk(YELL_MADR_INTRO, me->GetGUID());
IntroPhaseTimer = 9000;
++IntroPhase;
break;
case 2:
DoScriptText(YELL_INTRO, me, Madrigosa);
Talk(YELL_INTRO, Madrigosa->GetGUID());
IntroPhaseTimer = 13000;
++IntroPhase;
break;
@@ -225,32 +221,32 @@ public:
++IntroPhase;
break;
case 4:
DoScriptText(YELL_INTRO_BREAK_ICE, me);
Talk(YELL_INTRO_BREAK_ICE);
IntroPhaseTimer = 6000;
++IntroPhase;
break;
case 5:
Madrigosa->CastSpell(me, SPELL_INTRO_ENCAPSULATE_CHANELLING, false);
DoScriptText(YELL_MADR_TRAP, Madrigosa);
Madrigosa->AI()->Talk(YELL_MADR_TRAP);
DoCast(me, SPELL_INTRO_ENCAPSULATE);
IntroPhaseTimer = 11000;
++IntroPhase;
break;
case 6:
DoScriptText(YELL_INTRO_CHARGE, me);
Talk(YELL_INTRO_CHARGE);
IntroPhaseTimer = 5000;
++IntroPhase;
break;
case 7:
me->Kill(Madrigosa);
DoScriptText(YELL_MADR_DEATH, Madrigosa);
Madrigosa->AI()->Talk(YELL_MADR_DEATH);
me->SetFullHealth();
me->AttackStop();
IntroPhaseTimer = 4000;
++IntroPhase;
break;
case 8:
DoScriptText(YELL_INTRO_KILL_MADRIGOSA, me);
Talk(YELL_INTRO_KILL_MADRIGOSA);
me->SetOrientation(0.14f);
me->StopMoving();
Madrigosa->setDeathState(CORPSE);
@@ -258,7 +254,7 @@ public:
++IntroPhase;
break;
case 9:
DoScriptText(YELL_INTRO_TAUNT, me);
Talk(YELL_INTRO_TAUNT);
IntroPhaseTimer = 5000;
++IntroPhase;
break;
@@ -316,7 +312,7 @@ public:
if (StompTimer <= diff)
{
DoScriptText(RAND(YELL_LOVE1, YELL_LOVE2, YELL_LOVE3), me);
Talk(YELL_LOVE);
DoCast(me->getVictim(), SPELL_STOMP);
StompTimer = 30000;
} else StompTimer -= diff;
@@ -336,7 +332,7 @@ public:
if (BerserkTimer < diff && !Enraged)
{
DoScriptText(YELL_BERSERK, me);
Talk(YELL_BERSERK);
DoCast(me, SPELL_BERSERK);
Enraged = true;
} else BerserkTimer -= diff;
@@ -28,35 +28,27 @@ EndScriptData */
enum Quotes
{
//Alytesh
YELL_CANFLAGRATION = -1580044,
YELL_SISTER_SACROLASH_DEAD = -1580045,
YELL_ALY_KILL_1 = -1580046,
YELL_ALY_KILL_2 = -1580047,
YELL_ALY_DEAD = -1580048,
YELL_BERSERK = -1580049,
YELL_INTRO_SAC_1 = 0,
YELL_INTRO_SAC_3 = 1,
YELL_INTRO_SAC_5 = 2,
YELL_INTRO_SAC_7 = 3,
YELL_SAC_DEAD = 4,
EMOTE_SHADOW_NOVA = 5,
YELL_ENRAGE = 6,
YELL_SISTER_ALYTHESS_DEAD = 7,
YELL_SAC_KILL = 8,
YELL_SHADOW_NOVA = 9,
//Sacrolash
YELL_SHADOW_NOVA = -1580050,
YELL_SISTER_ALYTHESS_DEAD = -1580051,
YELL_SAC_KILL_1 = -1580052,
YELL_SAC_KILL_2 = -1580053,
SAY_SAC_DEAD = -1580054,
YELL_ENRAGE = -1580055,
//Intro
YELL_INTRO_SAC_1 = -1580056,
YELL_INTRO_ALY_2 = -1580057,
YELL_INTRO_SAC_3 = -1580058,
YELL_INTRO_ALY_4 = -1580059,
YELL_INTRO_SAC_5 = -1580060,
YELL_INTRO_ALY_6 = -1580061,
YELL_INTRO_SAC_7 = -1580062,
YELL_INTRO_ALY_8 = -1580063,
//Emote
EMOTE_SHADOW_NOVA = -1580064,
EMOTE_CONFLAGRATION = -1580065
YELL_INTRO_ALY_2 = 0,
YELL_INTRO_ALY_4 = 1,
YELL_INTRO_ALY_6 = 2,
YELL_INTRO_ALY_8 = 3,
EMOTE_CONFLAGRATION = 4,
YELL_ALY_KILL = 5,
YELL_ALY_DEAD = 6,
YELL_SISTER_SACROLASH_DEAD = 7,
YELL_CANFLAGRATION = 8,
YELL_BERSERK = 9,
};
enum Spells
@@ -165,7 +157,7 @@ public:
void KilledUnit(Unit* /*victim*/)
{
if (rand()%4 == 0)
DoScriptText(RAND(YELL_SAC_KILL_1, YELL_SAC_KILL_2), me);
Talk(YELL_SAC_KILL);
}
void JustDied(Unit* /*killer*/)
@@ -173,7 +165,7 @@ public:
// only if ALY death
if (SisterDeath)
{
DoScriptText(SAY_SAC_DEAD, me);
Talk(YELL_SAC_DEAD);
if (instance)
instance->SetData(DATA_EREDAR_TWINS_EVENT, DONE);
@@ -235,7 +227,7 @@ public:
Temp = Unit::GetUnit(*me, instance->GetData64(DATA_ALYTHESS));
if (Temp && Temp->isDead())
{
DoScriptText(YELL_SISTER_ALYTHESS_DEAD, me);
Talk(YELL_SISTER_ALYTHESS_DEAD);
DoCast(me, SPELL_EMPOWER);
me->InterruptSpell(CURRENT_GENERIC_SPELL);
SisterDeath = true;
@@ -275,8 +267,8 @@ public:
if (!SisterDeath)
{
if (target)
DoScriptText(EMOTE_SHADOW_NOVA, me, target);
DoScriptText(YELL_SHADOW_NOVA, me);
Talk(EMOTE_SHADOW_NOVA, target->GetGUID());
Talk(YELL_SHADOW_NOVA);
}
ShadownovaTimer = 30000+(rand()%5000);
}
@@ -324,7 +316,7 @@ public:
if (EnrageTimer < diff && !Enraged)
{
me->InterruptSpell(CURRENT_GENERIC_SPELL);
DoScriptText(YELL_ENRAGE, me);
Talk(YELL_ENRAGE);
DoCast(me, SPELL_ENRAGE);
Enraged = true;
} else EnrageTimer -= diff;
@@ -457,7 +449,7 @@ public:
{
if (rand()%4 == 0)
{
DoScriptText(RAND(YELL_ALY_KILL_1, YELL_ALY_KILL_2), me);
Talk(YELL_ALY_KILL);
}
}
@@ -465,7 +457,7 @@ public:
{
if (SisterDeath)
{
DoScriptText(YELL_ALY_DEAD, me);
Talk(YELL_ALY_DEAD);
if (instance)
instance->SetData(DATA_EREDAR_TWINS_EVENT, DONE);
@@ -528,24 +520,24 @@ public:
case 0: return 0;
case 1:
if (Sacrolash)
DoScriptText(YELL_INTRO_SAC_1, Sacrolash);
Sacrolash->AI()->Talk(YELL_INTRO_SAC_1);
return 1000;
case 2: DoScriptText(YELL_INTRO_ALY_2, me); return 1000;
case 2: Talk(YELL_INTRO_ALY_2); return 1000;
case 3:
if (Sacrolash)
DoScriptText(YELL_INTRO_SAC_3, Sacrolash);
Sacrolash->AI()->Talk(YELL_INTRO_SAC_3);
return 2000;
case 4: DoScriptText(YELL_INTRO_ALY_4, me); return 1000;
case 4: Talk(YELL_INTRO_ALY_4); return 1000;
case 5:
if (Sacrolash)
DoScriptText(YELL_INTRO_SAC_5, Sacrolash);
Sacrolash->AI()->Talk(YELL_INTRO_SAC_5);
return 2000;
case 6: DoScriptText(YELL_INTRO_ALY_6, me); return 1000;
case 6: Talk(YELL_INTRO_ALY_6); return 1000;
case 7:
if (Sacrolash)
DoScriptText(YELL_INTRO_SAC_7, Sacrolash);
Sacrolash->AI()->Talk(YELL_INTRO_SAC_7);
return 3000;
case 8: DoScriptText(YELL_INTRO_ALY_8, me); return 900000;
case 8: Talk(YELL_INTRO_ALY_8); return 900000;
}
return 10000;
}
@@ -568,7 +560,7 @@ public:
Temp = Unit::GetUnit(*me, instance->GetData64(DATA_SACROLASH));
if (Temp && Temp->isDead())
{
DoScriptText(YELL_SISTER_SACROLASH_DEAD, me);
Talk(YELL_SISTER_SACROLASH_DEAD);
DoCast(me, SPELL_EMPOWER);
me->InterruptSpell(CURRENT_GENERIC_SPELL);
SisterDeath = true;
@@ -622,8 +614,8 @@ public:
if (!SisterDeath)
{
if (target)
DoScriptText(EMOTE_CONFLAGRATION, me, target);
DoScriptText(YELL_CANFLAGRATION, me);
Talk(EMOTE_CONFLAGRATION, target->GetGUID());
Talk(YELL_CANFLAGRATION);
}
BlazeTimer = 4000;
@@ -661,7 +653,7 @@ public:
if (EnrageTimer < diff && !Enraged)
{
me->InterruptSpell(CURRENT_GENERIC_SPELL);
DoScriptText(YELL_BERSERK, me);
Talk(YELL_BERSERK);
DoCast(me, SPELL_ENRAGE);
Enraged = true;
} else EnrageTimer -= diff;
@@ -31,14 +31,13 @@ EndScriptData */
enum Yells
{
YELL_BIRTH = -1580036,
YELL_KILL1 = -1580037,
YELL_KILL2 = -1580038,
YELL_BREATH = -1580039,
YELL_TAKEOFF = -1580040,
YELL_BERSERK = -1580041,
YELL_DEATH = -1580042,
YELL_KALECGOS = -1580043, // after felmyst's death spawned and say this
YELL_BIRTH = 0,
YELL_KILL = 1,
YELL_BREATH = 2,
YELL_TAKEOFF = 3,
YELL_BERSERK = 4,
YELL_DEATH = 5,
//YELL_KALECGOS = 6, Not used. After felmyst's death spawned and say this
};
enum Spells
@@ -181,17 +180,17 @@ public:
void KilledUnit(Unit* /*victim*/)
{
DoScriptText(RAND(YELL_KILL1, YELL_KILL2), me);
Talk(YELL_KILL);
}
void JustRespawned()
{
DoScriptText(YELL_BIRTH, me);
Talk(YELL_BIRTH);
}
void JustDied(Unit* /*killer*/)
{
DoScriptText(YELL_DEATH, me);
Talk(YELL_DEATH);
if (instance)
instance->SetData(DATA_FELMYST_EVENT, DONE);
@@ -279,7 +278,7 @@ public:
me->GetMotionMaster()->Clear(false);
me->HandleEmoteCommand(EMOTE_ONESHOT_LIFTOFF);
me->StopMoving();
DoScriptText(YELL_TAKEOFF, me);
Talk(YELL_TAKEOFF);
events.ScheduleEvent(EVENT_FLIGHT_SEQUENCE, 2000);
break;
case 1:
@@ -424,7 +423,7 @@ public:
switch (events.ExecuteEvent())
{
case EVENT_BERSERK:
DoScriptText(YELL_BERSERK, me);
Talk(YELL_BERSERK);
DoCast(me, SPELL_BERSERK, true);
events.ScheduleEvent(EVENT_BERSERK, 10000);
break;
@@ -459,7 +458,7 @@ public:
switch (events.ExecuteEvent())
{
case EVENT_BERSERK:
DoScriptText(YELL_BERSERK, me);
Talk(YELL_BERSERK);
DoCast(me, SPELL_BERSERK, true);
break;
case EVENT_FLIGHT_SEQUENCE:
@@ -31,60 +31,52 @@ EndScriptData */
enum Yells
{
//Kalecgos dragon form
SAY_EVIL_AGGRO = -1580000,
SAY_EVIL_SPELL1 = -1580001,
SAY_EVIL_SPELL2 = -1580002,
SAY_EVIL_SLAY1 = -1580003,
SAY_EVIL_SLAY2 = -1580004,
SAY_EVIL_ENRAGE = -1580005,
SAY_SATH_AGGRO = 0,
SAY_SATH_SLAY = 1,
SAY_SATH_DEATH = 2,
SAY_SATH_SPELL1 = 3,
SAY_SATH_SPELL2 = 4,
//Kalecgos humanoid form
SAY_GOOD_AGGRO = -1580006,
SAY_GOOD_NEAR_DEATH = -1580007,
SAY_GOOD_NEAR_DEATH2 = -1580008,
SAY_GOOD_PLRWIN = -1580009,
SAY_EVIL_AGGRO = 0,
SAY_EVIL_SLAY = 1,
SAY_GOOD_PLRWIN = 2,
SAY_EVIL_ENRAGE = 3,
//Sathrovarr
SAY_SATH_AGGRO = -1580010,
SAY_SATH_DEATH = -1580011,
SAY_SATH_SPELL1 = -1580012,
SAY_SATH_SPELL2 = -1580013,
SAY_SATH_SLAY1 = -1580014,
SAY_SATH_SLAY2 = -1580015,
SAY_SATH_ENRAGE = -1580016,
SAY_GOOD_AGGRO = 0,
SAY_GOOD_NEAR_DEATH = 1,
SAY_GOOD_NEAR_DEATH2 = 2,
};
enum Spells
{
AURA_SUNWELL_RADIANCE = 45769,
AURA_SPECTRAL_EXHAUSTION = 44867,
AURA_SPECTRAL_REALM = 46021,
AURA_SPECTRAL_INVISIBILITY = 44801,
AURA_DEMONIC_VISUAL = 44800,
AURA_SUNWELL_RADIANCE = 45769,
AURA_SPECTRAL_EXHAUSTION = 44867,
AURA_SPECTRAL_REALM = 46021,
AURA_SPECTRAL_INVISIBILITY = 44801,
AURA_DEMONIC_VISUAL = 44800,
SPELL_SPECTRAL_BLAST = 44869,
SPELL_TELEPORT_SPECTRAL = 46019,
SPELL_ARCANE_BUFFET = 45018,
SPELL_FROST_BREATH = 44799,
SPELL_TAIL_LASH = 45122,
SPELL_SPECTRAL_BLAST = 44869,
SPELL_TELEPORT_SPECTRAL = 46019,
SPELL_ARCANE_BUFFET = 45018,
SPELL_FROST_BREATH = 44799,
SPELL_TAIL_LASH = 45122,
SPELL_BANISH = 44836,
SPELL_TRANSFORM_KALEC = 44670,
SPELL_ENRAGE = 44807,
SPELL_BANISH = 44836,
SPELL_TRANSFORM_KALEC = 44670,
SPELL_ENRAGE = 44807,
SPELL_CORRUPTION_STRIKE = 45029,
SPELL_AGONY_CURSE = 45032,
SPELL_SHADOW_BOLT = 45031,
SPELL_CORRUPTION_STRIKE = 45029,
SPELL_AGONY_CURSE = 45032,
SPELL_SHADOW_BOLT = 45031,
SPELL_HEROIC_STRIKE = 45026,
SPELL_REVITALIZE = 45027
SPELL_HEROIC_STRIKE = 45026,
SPELL_REVITALIZE = 45027
};
enum SWPActions
{
DO_ENRAGE = 1,
DO_BANISH = 2,
DO_ENRAGE = 1,
DO_BANISH = 2,
};
#define GO_FAILED "You are unable to use this currently."
@@ -360,7 +352,7 @@ public:
void EnterCombat(Unit* /*who*/)
{
me->SetStandState(UNIT_STAND_STATE_STAND);
DoScriptText(SAY_EVIL_AGGRO, me);
Talk(SAY_EVIL_AGGRO);
DoZoneInCombat();
if (instance)
@@ -369,7 +361,7 @@ public:
void KilledUnit(Unit* /*victim*/)
{
DoScriptText(RAND(SAY_EVIL_SLAY1, SAY_EVIL_SLAY2), me);
Talk(SAY_EVIL_SLAY);
}
void MovementInform(uint32 type, uint32 /*id*/)
@@ -408,7 +400,7 @@ public:
TalkTimer = 1000;
break;
case 2:
DoScriptText(SAY_GOOD_PLRWIN, me);
Talk(SAY_GOOD_PLRWIN);
TalkTimer = 10000;
break;
case 3:
@@ -426,7 +418,7 @@ public:
switch (TalkSequence)
{
case 1:
DoScriptText(SAY_EVIL_ENRAGE, me);
Talk(SAY_EVIL_ENRAGE);
TalkTimer = 3000;
break;
case 2:
@@ -505,20 +497,20 @@ public:
switch (YellSequence)
{
case 0:
DoScriptText(SAY_GOOD_AGGRO, me);
Talk(SAY_GOOD_AGGRO);
++YellSequence;
break;
case 1:
if (HealthBelowPct(50))
{
DoScriptText(SAY_GOOD_NEAR_DEATH, me);
Talk(SAY_GOOD_NEAR_DEATH);
++YellSequence;
}
break;
case 2:
if (HealthBelowPct(10))
{
DoScriptText(SAY_GOOD_NEAR_DEATH2, me);
Talk(SAY_GOOD_NEAR_DEATH2);
++YellSequence;
}
break;
@@ -642,7 +634,7 @@ public:
me->AddThreat(Kalec, 100.0f);
Kalec->setActive(true);
}
DoScriptText(SAY_SATH_AGGRO, me);
Talk(SAY_SATH_AGGRO);
}
void DamageTaken(Unit* done_by, uint32 &damage)
@@ -664,12 +656,12 @@ public:
EnterEvadeMode();
return;
}
DoScriptText(RAND(SAY_SATH_SLAY1, SAY_SATH_SLAY2), me);
Talk(SAY_SATH_SLAY);
}
void JustDied(Unit* /*killer*/)
{
DoScriptText(SAY_SATH_DEATH, me);
Talk(SAY_SATH_DEATH);
me->SetPosition(me->GetPositionX(), me->GetPositionY(), DRAGON_REALM_Z, me->GetOrientation());
TeleportAllPlayersBack();
if (Creature* Kalecgos = Unit::GetCreature(*me, KalecgosGUID))
@@ -781,7 +773,7 @@ public:
if (ShadowBoltTimer <= diff)
{
if (!(rand()%5))DoScriptText(SAY_SATH_SPELL1, me);
if (!(rand()%5))Talk(SAY_SATH_SPELL1);
DoCast(me, SPELL_SHADOW_BOLT);
ShadowBoltTimer = 7000+(rand()%3000);
} else ShadowBoltTimer -= diff;
@@ -796,7 +788,7 @@ public:
if (CorruptionStrikeTimer <= diff)
{
if (!(rand()%5))DoScriptText(SAY_SATH_SPELL2, me);
if (!(rand()%5))Talk(SAY_SATH_SPELL2);
DoCast(me->getVictim(), SPELL_CORRUPTION_STRIKE);
CorruptionStrikeTimer = 13000;
} else CorruptionStrikeTimer -= diff;
@@ -33,46 +33,34 @@ EndScriptData */
/*** Speech and sounds***/
enum Yells
{
// These are used throughout Sunwell and Magisters(?). Players can hear this while running through the instances.
SAY_KJ_OFFCOMBAT1 = -1580066,
SAY_KJ_OFFCOMBAT2 = -1580067,
SAY_KJ_OFFCOMBAT3 = -1580068,
SAY_KJ_OFFCOMBAT4 = -1580069,
SAY_KJ_OFFCOMBAT5 = -1580070,
SAY_KJ_OFFCOMBAT = 0,
SAY_KALECGOS_ENCOURAGE = 0,
SAY_KALECGOS_READY1 = 1,
SAY_KALECGOS_READY2 = 2,
SAY_KALECGOS_READY3 = 3,
SAY_KALECGOS_READY4 = 4,
SAY_KALECGOS_AWAKEN = 5,
SAY_KALECGOS_LETGO = 6,
SAY_KALECGOS_FOCUS = 7,
SAY_KALECGOS_FATE = 8,
SAY_KALECGOS_GOODBYE = 9,
SAY_KALECGOS_JOIN = 10,
// Encounter speech and sounds
SAY_KJ_EMERGE = -1580071,
SAY_KJ_SLAY1 = -1580072,
SAY_KJ_SLAY2 = -1580073,
SAY_KJ_REFLECTION1 = -1580074,
SAY_KJ_REFLECTION2 = -1580075,
SAY_KJ_DARKNESS1 = -1580076,
SAY_KJ_DARKNESS2 = -1580077,
SAY_KJ_DARKNESS3 = -1580078,
SAY_KJ_PHASE3 = -1580079,
SAY_KJ_PHASE4 = -1580080,
SAY_KJ_PHASE5 = -1580081,
SAY_KJ_DEATH = -1580093,
EMOTE_KJ_DARKNESS = -1580094,
SAY_KJ_DEATH = 0,
SAY_KJ_SLAY = 1,
SAY_KJ_REFLECTION = 2,
SAY_KJ_EMERGE = 3,
SAY_KJ_DARKNESS = 4,
SAY_KJ_PHASE3 = 5,
SAY_KJ_PHASE4 = 6,
SAY_KJ_PHASE5 = 7,
EMOTE_KJ_DARKNESS = 8,
/*** Kalecgos - Anveena speech at the beginning of Phase 5; Anveena's sacrifice ***/
SAY_KALECGOS_AWAKEN = -1580082,
SAY_ANVEENA_IMPRISONED = -1580083,
SAY_KALECGOS_LETGO = -1580084,
SAY_ANVEENA_LOST = -1580085,
SAY_KALECGOS_FOCUS = -1580086,
SAY_ANVEENA_KALEC = -1580087,
SAY_KALECGOS_FATE = -1580088,
SAY_ANVEENA_GOODBYE = -1580089,
SAY_KALECGOS_GOODBYE = -1580090,
SAY_KALECGOS_ENCOURAGE = -1580091,
/*** Kalecgos says throughout the fight ***/
SAY_KALECGOS_JOIN = -1580092,
SAY_KALEC_ORB_READY1 = -1580095,
SAY_KALEC_ORB_READY2 = -1580096,
SAY_KALEC_ORB_READY3 = -1580097,
SAY_KALEC_ORB_READY4 = -1580098
SAY_ANVEENA_IMPRISONED = 0,
SAY_ANVEENA_LOST = 1,
SAY_ANVEENA_KALEC = 2,
SAY_ANVEENA_GOODBYE = 3,
};
/*** Spells used during the encounter ***/
@@ -322,7 +310,7 @@ public:
pOrb->Refresh();
}
}
DoScriptText(SAY_KALECGOS_ENCOURAGE, me);
Talk(SAY_KALECGOS_ENCOURAGE);
}
else
{
@@ -338,10 +326,10 @@ public:
++EmpowerCount;
switch (EmpowerCount)
{
case 1: DoScriptText(SAY_KALEC_ORB_READY1, me); break;
case 2: DoScriptText(SAY_KALEC_ORB_READY2, me); break;
case 3: DoScriptText(SAY_KALEC_ORB_READY3, me); break;
case 4: DoScriptText(SAY_KALEC_ORB_READY4, me); break;
case 1: Talk(SAY_KALECGOS_READY1); break;
case 2: Talk(SAY_KALECGOS_READY2); break;
case 3: Talk(SAY_KALECGOS_READY3); break;
case 4: Talk(SAY_KALECGOS_READY4); break;
}
}
}
@@ -469,7 +457,7 @@ public:
if (uiRandomSayTimer < diff)
{
if (instance && instance->GetData(DATA_MURU_EVENT) != DONE && instance->GetData(DATA_KILJAEDEN_EVENT) == NOT_STARTED)
DoScriptText(RAND(SAY_KJ_OFFCOMBAT1, SAY_KJ_OFFCOMBAT2, SAY_KJ_OFFCOMBAT3, SAY_KJ_OFFCOMBAT4, SAY_KJ_OFFCOMBAT5), me);
Talk(SAY_KJ_OFFCOMBAT);
uiRandomSayTimer = 30000;
} else uiRandomSayTimer -= diff;
@@ -613,7 +601,7 @@ public:
void JustDied(Unit* /*killer*/)
{
DoScriptText(SAY_KJ_DEATH, me);
Talk(SAY_KJ_DEATH);
summons.DespawnAll();
if (instance)
@@ -622,7 +610,7 @@ public:
void KilledUnit(Unit* /*victim*/)
{
DoScriptText(RAND(SAY_KJ_SLAY1, SAY_KJ_SLAY2), me);
Talk(SAY_KJ_SLAY);
}
void EnterEvadeMode()
@@ -657,7 +645,7 @@ public:
void CastSinisterReflection()
{
DoScriptText(RAND(SAY_KJ_REFLECTION1, SAY_KJ_REFLECTION2), me);
Talk(SAY_KJ_REFLECTION);
for (uint8 i = 0; i < 4; ++i)
{
if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 100, true, -SPELL_VENGEANCE_OF_THE_BLUE_FLIGHT))
@@ -717,8 +705,8 @@ public:
{
SpeechTimer = 0;
if (instance)
if (Creature* pSpeechCreature = Unit::GetCreature(*me, instance->GetData64(Speeches[speechCount].creature)))
DoScriptText(Speeches[speechCount].textid, pSpeechCreature);
if (Creature* speechCreature = Unit::GetCreature(*me, instance->GetData64(Speeches[speechCount].creature)))
speechCreature->AI()->Talk(Speeches[speechCount].textid);
if (speechCount == 12)
if (Creature* pAnveena = Unit::GetCreature(*me, instance->GetData64(DATA_ANVEENA)))
pAnveena->CastSpell(me, SPELL_SACRIFICE_OF_ANVEENA, false);
@@ -799,7 +787,7 @@ public:
// Begins to channel for 8 seconds, then deals 50'000 damage to all raid members.
if (!IsInDarkness)
{
DoScriptText(EMOTE_KJ_DARKNESS, me);
Talk(EMOTE_KJ_DARKNESS);
DoCastAOE(SPELL_DARKNESS_OF_A_THOUSAND_SOULS, false);
ChangeTimers(true, 9000);
Timer[TIMER_DARKNESS] = 8750;
@@ -813,7 +801,7 @@ public:
Timer[TIMER_DARKNESS] = (Phase == PHASE_SACRIFICE) ? 15000 : urand(40000, 70000);
IsInDarkness = false;
DoCastAOE(SPELL_DARKNESS_OF_A_THOUSAND_SOULS_DAMAGE);
DoScriptText(RAND(SAY_KJ_DARKNESS1, SAY_KJ_DARKNESS2, SAY_KJ_DARKNESS3), me);
Talk(SAY_KJ_DARKNESS);
}
Timer[TIMER_SOUL_FLAY] = 9000;
}
@@ -26,11 +26,13 @@ EndScriptData */
#include "ScriptMgr.h"
#include "ScriptedCreature.h"
#define SAY_AGGRO -1070000
#define SPELL_ARCINGSMASH 8374
#define SPELL_KNOCKAWAY 10101
#define SPELL_WSTOMP 11876
enum Ironaya
{
SAY_AGGRO = 0,
SPELL_ARCINGSMASH = 8374,
SPELL_KNOCKAWAY = 10101,
SPELL_WSTOMP = 11876,
};
class boss_ironaya : public CreatureScript
{
@@ -58,7 +60,7 @@ class boss_ironaya : public CreatureScript
void EnterCombat(Unit* /*who*/)
{
DoScriptText(SAY_AGGRO, me);
Talk(SAY_AGGRO);
}
void UpdateAI(const uint32 uiDiff)
@@ -476,7 +476,7 @@ class instance_uldaman : public InstanceMapScript
case 2:
case 3:
case 4:
return vVaultWalker.at(identifier);
return vVaultWalker.at(identifier - 1);
case 5:
case 6:
case 7:
@@ -31,16 +31,15 @@ EndScriptData */
enum eEnums
{
SAY_AGGRO = -1568000,
SAY_FIRE_BOMBS = -1568001,
SAY_SUMMON_HATCHER = -1568002,
SAY_ALL_EGGS = -1568003,
SAY_BERSERK = -1568004,
SAY_SLAY_1 = -1568005,
SAY_SLAY_2 = -1568006,
SAY_DEATH = -1568007,
SAY_EVENT_STRANGERS = -1568008,
SAY_EVENT_FRIENDS = -1568009,
SAY_AGGRO = 0,
SAY_FIRE_BOMBS = 1,
SAY_SUMMON_HATCHER = 2,
SAY_ALL_EGGS = 3,
SAY_BERSERK = 4,
SAY_SLAY = 5,
SAY_DEATH = 6,
SAY_EVENT_STRANGERS = 7,
SAY_EVENT_FRIENDS = 8,
// Jan'alai
SPELL_FLAME_BREATH = 43140,
@@ -163,7 +162,7 @@ class boss_janalai : public CreatureScript
void JustDied(Unit* /*killer*/)
{
DoScriptText(SAY_DEATH, me);
Talk(SAY_DEATH);
if (instance)
instance->SetData(DATA_JANALAIEVENT, DONE);
@@ -171,7 +170,7 @@ class boss_janalai : public CreatureScript
void KilledUnit(Unit* /*victim*/)
{
DoScriptText(RAND(SAY_SLAY_1, SAY_SLAY_2), me);
Talk(SAY_SLAY);
}
void EnterCombat(Unit* /*who*/)
@@ -179,7 +178,7 @@ class boss_janalai : public CreatureScript
if (instance)
instance->SetData(DATA_JANALAIEVENT, IN_PROGRESS);
DoScriptText(SAY_AGGRO, me);
Talk(SAY_AGGRO);
// DoZoneInCombat();
}
@@ -352,7 +351,7 @@ class boss_janalai : public CreatureScript
}
else
{
DoScriptText(SAY_BERSERK, me);
Talk(SAY_BERSERK);
DoCast(me, SPELL_BERSERK, true);
EnrageTimer = 300000;
}
@@ -360,7 +359,7 @@ class boss_janalai : public CreatureScript
if (BombTimer <= diff)
{
DoScriptText(SAY_FIRE_BOMBS, me);
Talk(SAY_FIRE_BOMBS);
me->AttackStop();
me->GetMotionMaster()->Clear();
@@ -393,7 +392,7 @@ class boss_janalai : public CreatureScript
{
if (HealthBelowPct(35))
{
DoScriptText(SAY_ALL_EGGS, me);
Talk(SAY_ALL_EGGS);
me->AttackStop();
me->GetMotionMaster()->Clear();
@@ -407,7 +406,7 @@ class boss_janalai : public CreatureScript
{
if (HatchAllEggs(0))
{
DoScriptText(SAY_SUMMON_HATCHER, me);
Talk(SAY_SUMMON_HATCHER);
me->SummonCreature(MOB_AMANI_HATCHER, hatcherway[0][0][0], hatcherway[0][0][1], hatcherway[0][0][2], 0, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 10000);
me->SummonCreature(MOB_AMANI_HATCHER, hatcherway[1][0][0], hatcherway[1][0][1], hatcherway[1][0][2], 0, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 10000);
HatcherTimer = 90000;
@@ -38,11 +38,11 @@ EndContentData */
enum eOOX
{
SAY_OOX_START = -1000287,
SAY_OOX_AGGRO1 = -1000288,
SAY_OOX_AGGRO2 = -1000289,
SAY_OOX_AMBUSH = -1000290,
SAY_OOX_END = -1000292,
SAY_OOX_START = 0,
SAY_OOX_AGGRO = 1,
SAY_OOX_AMBUSH = 3,
SAY_OOX_AMBUSH_REPLY = 4,
SAY_OOX_END = 5,
QUEST_RESQUE_OOX_09 = 836,
@@ -69,7 +69,7 @@ public:
else if (player->GetTeam() == HORDE)
creature->setFaction(FACTION_ESCORTEE_H);
DoScriptText(SAY_OOX_START, creature, player);
creature->AI()->Talk(SAY_OOX_START, player->GetGUID());
if (npc_00x09hlAI* pEscortAI = CAST_AI(npc_00x09hl::npc_00x09hlAI, creature->AI()))
pEscortAI->Start(false, false, player->GetGUID(), quest);
@@ -93,13 +93,13 @@ public:
switch (waypointId)
{
case 26:
DoScriptText(SAY_OOX_AMBUSH, me);
Talk(SAY_OOX_AMBUSH);
break;
case 43:
DoScriptText(SAY_OOX_AMBUSH, me);
Talk(SAY_OOX_AMBUSH);
break;
case 64:
DoScriptText(SAY_OOX_END, me);
Talk(SAY_OOX_END);
if (Player* player = GetPlayerForEscort())
player->GroupEventHappens(QUEST_RESQUE_OOX_09, me);
break;
@@ -136,10 +136,7 @@ public:
if (who->GetEntry() == NPC_MARAUDING_OWL || who->GetEntry() == NPC_VILE_AMBUSHER)
return;
if (rand()%1)
DoScriptText(SAY_OOX_AGGRO1, me);
else
DoScriptText(SAY_OOX_AGGRO2, me);
Talk(SAY_OOX_AGGRO);
}
void JustSummoned(Creature* summoned)
@@ -149,6 +146,207 @@ public:
};
};
<<<<<<< HEAD
=======
/*######
## npc_rinji
######*/
enum eRinji
{
SAY_RIN_BY_OUTRUNNER = 0,
SAY_RIN_FREE = 0, //from here
SAY_RIN_HELP = 1,
SAY_RIN_COMPLETE = 2,
SAY_RIN_PROGRESS_1 = 3,
SAY_RIN_PROGRESS_2 = 4,
QUEST_RINJI_TRAPPED = 2742,
NPC_RANGER = 2694,
NPC_OUTRUNNER = 2691,
GO_RINJI_CAGE = 142036
};
struct Location
{
float m_fX, m_fY, m_fZ;
};
Location m_afAmbushSpawn[] =
{
{191.296204f, -2839.329346f, 107.388f},
{70.972466f, -2848.674805f, 109.459f}
};
Location m_afAmbushMoveTo[] =
{
{166.630386f, -2824.780273f, 108.153f},
{70.886589f, -2874.335449f, 116.675f}
};
class npc_rinji : public CreatureScript
{
public:
npc_rinji() : CreatureScript("npc_rinji") { }
bool OnQuestAccept(Player* player, Creature* creature, const Quest* quest)
{
if (quest->GetQuestId() == QUEST_RINJI_TRAPPED)
{
if (GameObject* go = creature->FindNearestGameObject(GO_RINJI_CAGE, INTERACTION_DISTANCE))
go->UseDoorOrButton();
if (npc_rinjiAI* pEscortAI = CAST_AI(npc_rinji::npc_rinjiAI, creature->AI()))
pEscortAI->Start(false, false, player->GetGUID(), quest);
}
return true;
}
CreatureAI* GetAI(Creature* creature) const
{
return new npc_rinjiAI(creature);
}
struct npc_rinjiAI : public npc_escortAI
{
npc_rinjiAI(Creature* creature) : npc_escortAI(creature)
{
m_bIsByOutrunner = false;
m_iSpawnId = 0;
}
bool m_bIsByOutrunner;
uint32 m_uiPostEventCount;
uint32 m_uiPostEventTimer;
int m_iSpawnId;
void Reset()
{
m_uiPostEventCount = 0;
m_uiPostEventTimer = 3000;
}
void JustRespawned()
{
m_bIsByOutrunner = false;
m_iSpawnId = 0;
npc_escortAI::JustRespawned();
}
void EnterCombat(Unit* who)
{
if (HasEscortState(STATE_ESCORT_ESCORTING))
{
if (who->GetEntry() == NPC_OUTRUNNER && !m_bIsByOutrunner)
{
if (Creature* talker = who->ToCreature())
talker->AI()->Talk(SAY_RIN_BY_OUTRUNNER);
m_bIsByOutrunner = true;
}
if (rand()%4)
return;
//only if attacked and escorter is not in combat?
Talk(SAY_RIN_HELP);
}
}
void DoSpawnAmbush(bool bFirst)
{
if (!bFirst)
m_iSpawnId = 1;
me->SummonCreature(NPC_RANGER,
m_afAmbushSpawn[m_iSpawnId].m_fX, m_afAmbushSpawn[m_iSpawnId].m_fY, m_afAmbushSpawn[m_iSpawnId].m_fZ, 0.0f,
TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 60000);
for (int i = 0; i < 2; ++i)
{
me->SummonCreature(NPC_OUTRUNNER,
m_afAmbushSpawn[m_iSpawnId].m_fX, m_afAmbushSpawn[m_iSpawnId].m_fY, m_afAmbushSpawn[m_iSpawnId].m_fZ, 0.0f,
TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 60000);
}
}
void JustSummoned(Creature* summoned)
{
summoned->SetWalk(false);
summoned->GetMotionMaster()->MovePoint(0, m_afAmbushMoveTo[m_iSpawnId].m_fX, m_afAmbushMoveTo[m_iSpawnId].m_fY, m_afAmbushMoveTo[m_iSpawnId].m_fZ);
}
void WaypointReached(uint32 waypointId)
{
Player* player = GetPlayerForEscort();
if (!player)
return;
switch (waypointId)
{
case 1:
Talk(SAY_RIN_FREE, player->GetGUID());
break;
case 7:
DoSpawnAmbush(true);
break;
case 13:
DoSpawnAmbush(false);
break;
case 17:
Talk(SAY_RIN_COMPLETE, player->GetGUID());
player->GroupEventHappens(QUEST_RINJI_TRAPPED, me);
SetRun();
m_uiPostEventCount = 1;
break;
}
}
void UpdateEscortAI(const uint32 uiDiff)
{
//Check if we have a current target
if (!UpdateVictim())
{
if (HasEscortState(STATE_ESCORT_ESCORTING) && m_uiPostEventCount)
{
if (m_uiPostEventTimer <= uiDiff)
{
m_uiPostEventTimer = 3000;
if (Player* player = GetPlayerForEscort())
{
switch (m_uiPostEventCount)
{
case 1:
Talk(SAY_RIN_PROGRESS_1, player->GetGUID());
++m_uiPostEventCount;
break;
case 2:
Talk(SAY_RIN_PROGRESS_2, player->GetGUID());
m_uiPostEventCount = 0;
break;
}
}
else
{
me->DespawnOrUnsummon();
return;
}
}
else
m_uiPostEventTimer -= uiDiff;
}
return;
}
DoMeleeAttackIfReady();
}
};
};
>>>>>>> master
void AddSC_hinterlands()
{
new npc_00x09hl();
@@ -41,8 +41,8 @@ EndContentData */
enum Sylvanas
{
QUEST_JOURNEY_TO_UNDERCITY = 9180,
SAY_LAMENT_END = -1000196,
EMOTE_LAMENT_END = -1000197,
EMOTE_LAMENT_END = 0,
SAY_LAMENT_END = 1,
SOUND_CREDIT = 10896,
ENTRY_HIGHBORNE_LAMENTER = 21628,
@@ -153,8 +153,8 @@ public:
LamentEventTimer = 2000;
if (!me->HasAura(SPELL_SYLVANAS_CAST))
{
DoScriptText(SAY_LAMENT_END, me);
DoScriptText(EMOTE_LAMENT_END, me);
Talk(SAY_LAMENT_END);
Talk(EMOTE_LAMENT_END);
LamentEvent = false;
}
} else LamentEventTimer -= diff;
@@ -203,7 +203,7 @@ class boss_anubarak_trial : public CreatureScript
{
Talk(SAY_KILL_PLAYER);
if (instance)
instance->SetData(DATA_TRIBUTE_TO_IMMORTALITY_ELEGIBLE, 0);
instance->SetData(DATA_TRIBUTE_TO_IMMORTALITY_ELIGIBLE, 0);
}
}
@@ -647,7 +647,7 @@ struct boss_faction_championsAI : public BossAI
temp->AI()->Talk(SAY_KILL_PLAYER);
instance->SetData(DATA_TRIBUTE_TO_IMMORTALITY_ELEGIBLE, 0);
instance->SetData(DATA_TRIBUTE_TO_IMMORTALITY_ELIGIBLE, 0);
}
}
}
@@ -128,7 +128,7 @@ class boss_jaraxxus : public CreatureScript
{
Talk(SAY_KILL_PLAYER);
if (instance)
instance->SetData(DATA_TRIBUTE_TO_IMMORTALITY_ELEGIBLE, 0);
instance->SetData(DATA_TRIBUTE_TO_IMMORTALITY_ELIGIBLE, 0);
}
}
@@ -550,7 +550,7 @@ struct boss_jormungarAI : public BossAI
{
if (who->GetTypeId() == TYPEID_PLAYER)
if (instance)
instance->SetData(DATA_TRIBUTE_TO_IMMORTALITY_ELEGIBLE, 0);
instance->SetData(DATA_TRIBUTE_TO_IMMORTALITY_ELIGIBLE, 0);
}
void EnterCombat(Unit* /*who*/)
@@ -952,7 +952,7 @@ class boss_icehowl : public CreatureScript
if (who->GetTypeId() == TYPEID_PLAYER)
{
if (instance)
instance->SetData(DATA_TRIBUTE_TO_IMMORTALITY_ELEGIBLE, 0);
instance->SetData(DATA_TRIBUTE_TO_IMMORTALITY_ELIGIBLE, 0);
}
}
@@ -194,7 +194,7 @@ struct boss_twin_baseAI : public BossAI
{
Talk(SAY_KILL_PLAYER);
if (instance)
instance->SetData(DATA_TRIBUTE_TO_IMMORTALITY_ELEGIBLE, 0);
instance->SetData(DATA_TRIBUTE_TO_IMMORTALITY_ELIGIBLE, 0);
}
}
@@ -42,7 +42,7 @@ class instance_trial_of_the_crusader : public InstanceMapScript
ResilienceWillFixItTimer = 0;
SnoboldCount = 0;
MistressOfPainCount = 0;
TributeToImmortalityElegible = true;
TributeToImmortalityEligible = true;
NeedSave = false;
TirionFordringGUID = 0;
@@ -462,8 +462,8 @@ class instance_trial_of_the_crusader : public InstanceMapScript
else if (data == DECREASE)
--MistressOfPainCount;
break;
case DATA_TRIBUTE_TO_IMMORTALITY_ELEGIBLE:
TributeToImmortalityElegible = false;
case DATA_TRIBUTE_TO_IMMORTALITY_ELIGIBLE:
TributeToImmortalityEligible = false;
break;
default:
break;
@@ -722,7 +722,7 @@ class instance_trial_of_the_crusader : public InstanceMapScript
return TrialCounter == 50;
case A_TRIBUTE_TO_IMMORTALITY_HORDE:
case A_TRIBUTE_TO_IMMORTALITY_ALLIANCE:
return TrialCounter == 50 && TributeToImmortalityElegible;
return TrialCounter == 50 && TributeToImmortalityEligible;
case A_TRIBUTE_TO_DEDICATED_INSANITY:
return false/*uiGrandCrusaderAttemptsLeft == 50 && !bHasAtAnyStagePlayerEquippedTooGoodItem*/;
default:
@@ -769,7 +769,7 @@ class instance_trial_of_the_crusader : public InstanceMapScript
uint32 ResilienceWillFixItTimer;
uint8 SnoboldCount;
uint8 MistressOfPainCount;
bool TributeToImmortalityElegible;
bool TributeToImmortalityEligible;
};
InstanceScript* GetInstanceScript(InstanceMap* map) const
@@ -24,7 +24,7 @@ enum
DATA_SNOBOLD_COUNT = 301,
DATA_MISTRESS_OF_PAIN_COUNT = 302,
DATA_TRIBUTE_TO_IMMORTALITY_ELEGIBLE = 303,
DATA_TRIBUTE_TO_IMMORTALITY_ELIGIBLE = 303,
INCREASE = 501,
DECREASE = 502,