diff --git a/ScriptMgr.cpp b/ScriptMgr.cpp index 5252713..a8120b3 100644 --- a/ScriptMgr.cpp +++ b/ScriptMgr.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ @@ -13,8 +13,9 @@ #include "../system/system.h" #include "../../../game/ScriptMgr.h" +typedef std::vector SDScriptVec; int num_sc_scripts; -Script *m_scripts[MAX_SCRIPTS]; +SDScriptVec m_scripts; Config SD2Config; @@ -22,6 +23,8 @@ QueryResult* strSD2Pquery(char* str) { return SD2Database.Query(str); } +// Not registered scripts storage +std::map m_scriptStorage; void FillSpellSummary(); @@ -36,7 +39,7 @@ void LoadDatabase() return; } - //Initialize connection to DB + // Initialize connection to DB if (SD2Database.Initialize(strSD2DBinfo.c_str())) { outstring_log("SD2: ScriptDev2 database at %s initialized.", strSD2DBinfo.c_str()); @@ -68,8 +71,13 @@ void FreeScriptLibrary() delete []SpellSummary; // Free resources before library unload - for(int i=0; i::iterator itr = m_scriptStorage.begin(); itr != m_scriptStorage.end(); ++itr) + delete itr->second; num_sc_scripts = 0; SD2Database.HaltDelayThread(); @@ -78,7 +86,7 @@ void FreeScriptLibrary() MANGOS_DLL_EXPORT void InitScriptLibrary() { - //ScriptDev2 startup + // ScriptDev2 startup outstring_log(""); outstring_log(" MMM MMM MM"); outstring_log("M MM M M M M"); @@ -89,19 +97,19 @@ void InitScriptLibrary() outstring_log(" MMM MMM http://www.scriptdev2.com"); outstring_log(""); - //Get configuration file + // Get configuration file if (!SD2Config.SetSource(_SCRIPTDEV2_CONFIG)) error_log("SD2: Unable to open configuration file. Database will be unaccessible. Configuration values will use default."); else outstring_log("SD2: Using configuration file %s",_SCRIPTDEV2_CONFIG); - //Check config file version + // Check config file version if (SD2Config.GetIntDefault("ConfVersion", 0) != SD2_CONF_VERSION) error_log("SD2: Configuration file version doesn't match expected version. Some config variables may be wrong or missing."); outstring_log(""); - //Load database (must be called after SD2Config.SetSource). + // Load database (must be called after SD2Config.SetSource). LoadDatabase(); outstring_log("SD2: Loading C++ scripts"); @@ -109,13 +117,22 @@ void InitScriptLibrary() bar.step(); outstring_log(""); - for(int i=0; i> Loaded %i C++ Scripts.", num_sc_scripts); } @@ -210,8 +227,7 @@ void DoScriptText(int32 iTextEntry, WorldObject* pSource, Unit* pTarget) void Script::RegisterSelf(bool bReportError) { - int id = GetScriptId(Name.c_str()); - if (id != 0) + if (uint32 id = GetScriptId(Name.c_str())) { m_scripts[id] = this; ++num_sc_scripts; @@ -219,9 +235,9 @@ void Script::RegisterSelf(bool bReportError) else { if (bReportError) - error_log("SD2: Script registering but ScriptName %s is not assigned in database. Script will not be used.", (this)->Name.c_str()); + error_log("SD2: Script registering but ScriptName %s is not assigned in database. Script will not be used.", Name.c_str()); - delete this; + m_scriptStorage.insert(std::make_pair(Name.c_str(), this)); } } @@ -523,3 +539,12 @@ InstanceData* CreateInstanceData(Map* pMap) return tmpscript->GetInstanceData(pMap); } + +Script* GetScriptByName(std::string scriptName) +{ + std::map::const_iterator itr = m_scriptStorage.find(scriptName); + if (itr != m_scriptStorage.end()) + return itr->second; + else + return NULL; +} diff --git a/ScriptMgr.h b/ScriptMgr.h index 0077a8d..affb853 100644 --- a/ScriptMgr.h +++ b/ScriptMgr.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ @@ -23,7 +23,6 @@ class WorldObject; class Aura; class Object; -#define MAX_SCRIPTS 5000 //72 bytes each (approx 351kb) #define VISIBLE_RANGE (166.0f) //MAX visible range (size of grid) #define DEFAULT_TEXT "" @@ -76,6 +75,9 @@ void DoScriptText(int32 iTextEntry, WorldObject* pSource, Unit* pTarget = NULL); //DB query QueryResult* strSD2Pquery(char*); +// Not registered scripts storage +Script* GetScriptByName(std::string scriptName); + #if COMPILER == COMPILER_GNU #define FUNC_PTR(name,callconvention,returntype,parameters) typedef returntype(*name)parameters __attribute__ ((callconvention)); #else diff --git a/VC90/90ScriptDev2.vcproj b/VC90/90ScriptDev2.vcproj index ac1292e..ef3ca0e 100644 --- a/VC90/90ScriptDev2.vcproj +++ b/VC90/90ScriptDev2.vcproj @@ -1558,6 +1558,10 @@ RelativePath="..\scripts\kalimdor\razorfen_kraul\instance_razorfen_kraul.cpp" > + + @@ -2473,10 +2477,6 @@ RelativePath="..\scripts\northrend\icecrown_citadel\icecrown_citadel\instance_icecrown_citadel.cpp" > - - - - @@ -2560,10 +2556,6 @@ RelativePath="..\scripts\northrend\icecrown_citadel\frozen_halls\forge_of_souls\instance_forge_of_souls.cpp" > - - @@ -3080,6 +3072,70 @@ > + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + ','16796','6','0','0','Lanathel resurrect Princes'), + +-- Blood Queen Lana'thel +('-1631321','Это было неразумное решение!','You have made an... unwise... decision.','16782','6','0','0','Lanathel Aggro'), +('-1631322','Я только попробую на вкус...','Just a taste...','16783','6','0','0','Lanathel Bite 01'), +('-1631323','Я голодна!','Know my hunger!','16784','6','0','0','Lanathel Bite 02'), +('-1631324','Смерть вас не спасет!','Death is no escape!','16785','6','0','0','Lanathel Add'), +('-1631325','Страдайте же!','SUFFER!','16786','6','0','0','Lanathel Special 01'), +('-1631326','Как вам такое?','Can you handle this?','16787','6','0','0','Lanathel Special 02'), +('-1631327','Начинаем представление!','Here it comes.','16788','6','0','0','Lanathel Special 03'), +('-1631328','Не повезло...','How... Unfortunate...','16789','6','0','0','Lanathel Reset'), +('-1631329','Нет. Моя прелесть, приятного аппетита!','Yes... feed my precious one! You\'re mine now!','16790','6','0','0','Lanathel Mind Control'), +('-1631330','Вот как... У тебя не получилось?','Really...? Is that all you\'ve got?','16791','6','0','0','Lanathel Slay 01'), +('-1631331','Какая жалость...','Such a pity!','16792','6','0','0','Lanathel Slay 02'), +('-1631332','Сейчас все кончится!','THIS! ENDS! NOW!','16793','6','0','0','Lanathel Berserk'), +('-1631333','Но... Мы ведь так хорошо ладили...','But... we were getting along... so well...','16794','6','0','0','Lanathel Death'), +('-1631334','Восстаньте братья! И уничтожьте наших врагов!','Rise up brothers! And destroy our enemies!','16796','6','0','0','Lanathel Empower'), +('-1631335','Ха-х!','Ha!','16797','6','0','0','Lanathel say'), +('-1631338','Ах-ха...','Oo...','16798','6','0','0','Lanathel say'), +('-1631339','Ых...','Oh...','16799','6','0','0','Lanathel say'), + +-- Valithria Dreamwalker +('-1631401','Герои! Вы должны мне помочь! Мои силы на исходе... Залечите мои раны...','Heroes, lend me your aid! I... I cannot hold them off much longer! You must heal my wounds!','17064','6','0','0','Valithria Aggro'), +('-1631402','Одержимые не знают отдыха...','No rest for the wicked...','17065','6','0','0','Valithria Slay Bad Hostile NPC'), +('-1631403','Прискобная потеря.','A tragic loss...','17066','6','0','0','Valithria Slay Good - Player'), +('-1631404','Неудачники!','FAILURES!','17067','6','0','0','Valithria Berserk'), +('-1631405','Я открыла портал в изумрудный сон. Там вы найдете спасение, герои!','I have opened a portal into the Dream. Your salvation lies within, heroes.','17068','6','0','0','Valithria Dream World Open'), +('-1631406','Я долго не продержусь!','I will not last much longer!','17069','6','0','0','Valithria Health Low'), +('-1631407','Силы возвращаются ко мне! Герои, еще немного!','My strength is returning! Press on, heroes!','17070','6','0','0','Valithria Health High'), +('-1631408','Я излечилась! Изера, даруй мне силу покончить с этими нечестивыми тварями!','I am renewed! Ysera grants me the favor to lay these foul creatures to rest!','17071','6','0','0','Valithria Win'), +('-1631409','Простите меня, я не могу остано... ВСЕ ВО ВЛАСТИ КОШМАРА!','Forgive me for what I do! I... cannot... stop... ONLY NIGHTMARES REMAIN!','17072','6','0','0','Valithria Lose'), + +-- Sindragosa +('-1631420','Глупцы! Зачем вы сюда явились? Ледяные ветра Нордскола унесут ваши души!','You are fools who have come to this place! The icy winds of Northrend will consume your souls!','17007','6','0','0','Sindragosa Aggro'), +('-1631421','Погибни!','Perish!','17008','6','0','0','Sindragosa Slay 01'), +('-1631422','Удел смертных!','A flaw of mortality...','17009','6','0','0','Sindragosa Slay 02'), +('-1631423','Наконец-то! Свободна!','Free...at last...','17010','6','0','0','Sindragosa Death'), +('-1631424','Хватит! Эти игры меня утомляют!','Enough! I tire of these games!','17011','6','0','0','Sindragosa Berserk'), +('-1631425','Здесь ваше вторжение и окончится! Никто не уцелеет!','Your incursion ends here! None shall survive!','17012','6','0','0','Sindragosa Take Off - fly'), +('-1631426','Вы чувствуете, как ледяная ладонь смерти сжимает сердце?','Can you feel the cold hand of death upon your heart?','17013','6','0','0','Sindragosa Freeze'), +('-1631427','Трепещите, смертные! Ибо ваша жалкая магия теперь бессильна!','Suffer, mortals, as your pathetic magic betrays you!','17014','6','0','0','Sindragosa Arcane'), +('-1631428','А-а-а! Жжот! Что это за колдовство?','Suffer, mortals, as your pathetic magic betrays you!','17015','6','0','0','Sindragosa Special'), +('-1631429','А теперь почувствуйте всю мощь Господина и погрузитесь в отчаяние!','Now feel my master\'s limitless power and despair!','17016','6','0','0','Sindragosa Low HP'), + +-- Lich king +('-1631501','Неужели прибыли, наконец, хваленые силы света? Мне бросить Ледяную скорбь и сдаться на твою милость, Фордринг?','So...the Light\'s vaunted justice has finally arrived. Shall I lay down Frostmourne and throw myself at your mercy, Fordring?','17349','6','0','0','Lich King SAY_INTRO1'), +('-1631503','Ты пройдешь через эти мучения сам.','You will learn of that first hand. When my work is complete, you will beg for mercy -- and I will deny you. Your anguished cries will be testament to my unbridled power.','17350','6','0','0','Lich King SAY_INTRO3'), +('-1631505','Я оставлю тебя в живых, чтобы ты увидел финал! Не могу допустить чтобы величайший служитель света пропустил рождение МОЕГО мира!','I\'ll keep you alive to witness the end, Fordring. I would not want the Light\'s greatest champion to miss seeing this wretched world remade in my image.','17351','6','0','0','Lich King SAY_AGGRO'), +('-1631506','Ну же, герои! В вашей ярости - МОЯ сила!','Come then champions, feed me your rage!','17352','6','0','0','Lich King SAY'), +('-1631507','Сомнений нет - вы сильнейшие герои Азерота! Вы преодолели все препятствия, которые я воздвиг перед вами! Сильнейшие из моих слуг пали под вашим натиском, сгорели в пламени вашей ярости!','No question remains unanswered. No doubts linger. You are Azeroth\'s greatest champions! You overcame every challenge I laid before you. My mightiest servants have fallen before your relentless onslaught, your unbridled fury..','17353','6','0','0','Lich King SAY'), +('-1631508','Что движет вами? Праведность? Не знаю...','Is it truly righteousness that drives you? I wonder.','17354','6','0','0','Lich King SAY'), +('-1631509','Ты отлично их обучил, Фордринг! Ты привел сюда лучших воинов, которых знал мир! И отдал их в мои руки. Как я и рассчитывал.','You trained them well, Fordring. You delivered the greatest fighting force this world has ever known... right into my hands -- exactly as I intended. You shall be rewarded for your unwitting sacrifice.','17355','6','0','0','Lich King SAY'), +('-1631510','Смотри как я буду воскрешать их и превращать в воинов Плети! Они повергнут этот мир в пучину хаоса. Азерот падет от их рук. И ты станешь первой жертвой. ','Watch now as I raise them from the dead to become masters of the Scourge. They will shroud this world in chaos and destruction. Azeroth\'s fall will come at their hands -- and you will be the first to die.','17356','6','0','0','Lich King SAY'), +('-1631511','Мне по душе эта ирония!','I delight in the irony.','17357','6','0','0','Lich King SAY'), +('-1631512','Невозможно!','Impossible...','17358','6','0','0','Lich King SAY'), +('-1631513','Да! Вы меня и правда ранили. Я слишком долго с вами играл. Испытайте на себе возмездие Смерти!','You gnats actually hurt me! Perhaps I\'ve toyed with you long enough, now taste the vengeance of the grave!','17359','6','0','0','Lich King SAY'), +('-1631514','А-а-х!','...','17360','6','0','0','Lich King SAY'), +('-1631515','И вот я стою как лев пред агнцами. И не дрожат они.','Now I stand, the lion before the lambs... and they do not fear.','17361','6','0','0','Lich King SAY'), +('-1631516','Им неведом страх!','They cannot fear.','17362','6','0','0','Lich King SAY'), +('-1631517','Надежда тает!','Hope wanes!','17363','6','0','0','Lich King SAY'), +('-1631518','Пришел конец!','The end has come!','17364','6','0','0','Lich King SAY'), +('-1631519','Встречайте трагический финал!','Face now your tragic end!','17365','6','0','0','Lich King SAY_KILL'), +('-1631520','Ледяная скорбь жаждет крови!','Frostmourne hungers...','17366','6','0','0','Lich King SAY'), +('-1631521','Ледяная скорбь, повинуйся мне!','Argh... Frostmourne, obey me!','17367','6','0','0','Lich King SAY'), +('-1631522','Ледяная скорбь поглотит душу вашего товарища!','Frostmourne feeds on the soul of your fallen ally!','17368','6','0','0','Lich King SAY_KILL'), +('-1631523','Я проморожу вас насквозь и вы разлетитесь на ледяные осколки!','I will freeze you from within until all that remains is an icy husk!','17369','6','0','0','Lich King SAY'), +('-1631524','Смотрите, как мир рушится вокруг вас!','Watch as the world around you collapses!','17370','6','0','0','Lich King SAY_WIN'), +('-1631525','Конец света!','Apocalypse!','17371','6','0','0','Lich King SAY'), +('-1631526','Склонись перед своим господином и повелителем!','Bow down before your lord and master!','17372','6','0','0','Lich King SAY'), +('-1631527','Валькирия! Твой господин зовет!','Val\'kyr, your master calls!','17373','6','0','0','Lich King SAY_SUMMON'), +('-1631528','...','...','17374','6','0','0','Lich King SAY_DEATH'), +('-1631531','Оскверняю!','Defile!','0','3','0','0','Lich King SAY'), + +-- Tirion +('-1631552','Мы даруем тебе быструю смерть, Артас! Более быструю чем ты заслуживаешь за то что замучил и погубил десятки тысяч жизней!','We will grant you a swift death, Arthas. More than can be said for the thousands you\'ve tortured and slain.','17390','6','0','0','Tirion SAY_INTRO2'), +('-1631554','Да будет так! Герои, в атаку','So be it. Champions, attack!','17391','6','0','0','Tirion SAY_INTRO4'), +('-1631555','Свет! Даруй мне последнее благословение! Дай мне разбить эти оковы!','LIGHT, GRANT ME ONE FINAL BLESSING. GIVE ME THE STRENGTH... TO SHATTER THESE BONDS!','17392','6','0','0','Tirion SAY'), +('-1631556','Хватит, Артас! Твоя ненависть не заберет больше ни одной жизни!','No more, Arthas! No more lives will be consumed by your hatred!','17393','6','0','0','Tirion SAY'), + +-- Menethil +('-1631557','Вы пришли чтобы вершить суд над Артасом? Чтобы уничтожить короля-лича?','You have come to bring Arthas to justice? To see the Lich King destroyed?','17394','6','0','0','Terenas Menethil II SAY'), +('-1631558','Вы не должны оказаться во власти Ледяной скорби. Иначе, как и я, будете навеки порабощены этим проклятым клинком.','First, you must escape Frostmourne\'s hold, or be damned as I am; trapped within this cursed blade for all eternity.','17395','6','0','0','Terenas Menethil II SAY'), +('-1631559','Помогите мне уничтожить эти истерзанные души. Вместе мы вытянем силу из ледяной скорби и ослабим короля-лича.','Aid me in destroying these tortured souls! Together we will loosen Frostmourne\'s hold and weaken the Lich King from within!','17396','6','0','0','Terenas Menethil II SAY'), +('-1631560','Наконец я свободен. Все кончено, сын мой. Настал час расплаты.','Free at last! It is over, my son. This is the moment of reckoning.','17397','6','0','0','Terenas Menethil II SAY'), +('-1631561','Поднимитесь, воины света!','Rise up, champions of the Light!','17398','6','0','0',' SAY'), + +-- Adds +('-1631590','Р-р-р-рота, подъем!','','0','6','0','0','custom message'), +('-1631591','Хилы, не спать!','','0','6','0','0','custom message'), +('-1631592','ДД поднажали!','','0','6','0','0','custom message'), +('-1631593','Лидер, гони лентяев из рейда! А то еще час возиться будете!','','0','6','0','0','custom message'), +('-1631594','Ну вот вы и прикончили Артаса. Теперь будем ждать Катаклизм.','','0','6','0','0','custom message'); + +-- Gossips +DELETE FROM `gossip_texts` WHERE `entry` BETWEEN -3631610 AND -3631600; +INSERT INTO `gossip_texts` (`entry`, `content_default`, `content_loc1`, `content_loc2`, `content_loc3`, `content_loc4`, `content_loc5`, `content_loc6`, `content_loc7`, `content_loc8`, `comment`) VALUES +('-3631600', "Light\'s Hammer", NULL, NULL, NULL, NULL, NULL, NULL, NULL, "Молот света", "IceCrown citadel teleporter text 1"), +('-3631601', "Oratory of the Damned", NULL, NULL, NULL, NULL, NULL, NULL, NULL, "Молельня проклятых", "IceCrown citadel teleporter text 2"), +('-3631602', "Rampart of Skulls", NULL, NULL, NULL, NULL, NULL, NULL, NULL, "Черепной вал", "IceCrown citadel teleporter text 3"), +('-3631603', "Deathbringer\'s Rise", NULL, NULL, NULL, NULL, NULL, NULL, NULL, "Подъем Смертоносного", "IceCrown citadel teleporter text 4"), +('-3631604', "Icecrown Citadel", NULL, NULL, NULL, NULL, NULL, NULL, NULL, "Цитадель Ледяной Короны", "IceCrown citadel teleporter text 5"), +('-3631605', "The Sanctum of Blood", NULL, NULL, NULL, NULL, NULL, NULL, NULL, "Святилище крови", "IceCrown citadel teleporter text 6"), +('-3631606', "Frost Queen\'s Lair", NULL, NULL, NULL, NULL, NULL, NULL, NULL, "Логово Королевы льда", "IceCrown citadel teleporter text 7"), +('-3631607', "Frozen Throne", NULL, NULL, NULL, NULL, NULL, NULL, NULL, "Ледяной трон", "IceCrown citadel teleporter text 8"), +('-3631608', "We are ready, Tirion!", NULL, NULL, NULL, NULL, NULL, NULL, NULL, "Всегда готовы, дедуля!", "IceCrown citadel Tirion gossip"); diff --git a/addition/721_icecrown_spelltable_scriptdev2.sql b/addition/721_icecrown_spelltable_scriptdev2.sql new file mode 100644 index 0000000..6fae738 --- /dev/null +++ b/addition/721_icecrown_spelltable_scriptdev2.sql @@ -0,0 +1,426 @@ +-- Icecrown citadel spelltable + +-- Lord Marrowgar +DELETE FROM `boss_spell_table` WHERE `entry` = 36612; +INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_N25`, `spellID_H10`, `spellID_H25`, `timerMin_N10`, `timerMin_N25`, `timerMin_H10`, `timerMin_H25`, `timerMax_N10`, `timerMax_N25`, `timerMax_H10`, `timerMax_H25`, `locData_x`, `locData_y`, `locData_z`, `CastType`, `isVisualEffect`, `isBugged`) VALUES +(36612, 71021, 0, 0, 0, 10000, 0, 0, 0, 25000, 0, 0, 0, 0, 0, 0, 3, 0, 0), +(36612, 69138, 0, 0, 0, 6000, 0, 0, 0, 12000, 0, 0, 0, 0, 0, 0, 1, 0, 0), +(36612, 71580, 0, 0, 0, 6000, 0, 0, 0, 12000, 0, 0, 0, 0, 0, 0, 1, 0, 0), +(36612, 69146, 0, 0, 0, 15000, 0, 0, 0, 25000, 0, 0, 0, 0, 0, 0, 1, 0, 0), +(36612, 69057, 0, 0, 0, 17000, 0, 0, 0, 27000, 0, 0, 0, 0, 0, 0, 6, 0, 0), +(36612, 69076, 0, 0, 0, 60000, 0, 0, 0, 60000, 0, 0, 0, 0, 0, 0, 1, 0, 0), +(36612, 69075, 0, 0, 0, 2000, 0, 0, 0, 2000, 0, 0, 0, 5, 0, 0, 12, 0, 1), +(36612, 47008, 0, 0, 0, 600000, 0, 0, 0, 600000, 0, 0, 0, 0, 0, 0, 1, 0, 0); +-- summons +INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `timerMin_N10`, `timerMax_N10`, `data1`, `data2`, `data3`, `data4`, `locData_x`, `locData_y`, `locData_z`, `CastType` ) VALUES +(36612, 38711, 20000, 40000, 1, 1, 2, 2, 1, 5, 0, 9), +(36612, 36672, 45000, 45000, 1, 1, 2, 2, 75, 100, 0, 9); +-- Cold flame +DELETE FROM `boss_spell_table` WHERE `entry` = 36672; +INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_N25`, `spellID_H10`, `spellID_H25`, `timerMin_N10`, `timerMin_N25`, `timerMin_H10`, `timerMin_H25`, `timerMax_N10`, `timerMax_N25`, `timerMax_H10`, `timerMax_H25`, `data1`, `data2`, `data3`, `data4`, `locData_x`, `locData_y`, `locData_z`, `CastType`, `isVisualEffect`, `isBugged`) VALUES +(36672, 69145, 0, 0, 0, 15000, 0, 0, 0, 15000, 0, 0, 0, 15, 15, 15, 15, 0, 0, 0, 1, 0, 0), +(36672, 69147, 0, 0, 0, 2000, 0, 0, 0, 2000, 0, 0, 0, 15000, 15000, 30000, 30000, 0, 0, 0, 1, 0, 0), +(36672, 69146, 0, 0, 0, 1000, 0, 0, 0, 1000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0); +INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `timerMin_N10`, `timerMax_N10`, `data1`, `data2`, `data3`, `data4`, `locData_x`, `locData_y`, `locData_z`, `CastType` ) VALUES +(36672, 36672, 30000, 30000, 1, 1, 1, 1, 0, 0, 0, 11); +-- Bone spike +DELETE FROM `boss_spell_table` WHERE `entry` = 38711; +INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_N25`, `spellID_H10`, `spellID_H25`, `timerMin_N10`, `timerMin_N25`, `timerMin_H10`, `timerMin_H25`, `timerMax_N10`, `timerMax_N25`, `timerMax_H10`, `timerMax_H25`, `CastType`, `isVisualEffect`, `isBugged`) VALUES +(38711, 46598, 0, 0, 0, 1000, 0, 0, 0, 1000, 0, 0, 0, 18, 0, 0), +(38711, 69065, 0, 0, 0, 1000, 0, 0, 0, 1000, 0, 0, 0, 6, 0, 0); + +-- Lady Deathwhisper +DELETE FROM `boss_spell_table` WHERE `entry` = 36855; +INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_N25`, `spellID_H10`, `spellID_H25`, `timerMin_N10`, `timerMin_N25`, `timerMin_H10`, `timerMin_H25`, `timerMax_N10`, `timerMax_N25`, `timerMax_H10`, `timerMax_H25`, `CastType`, `isVisualEffect`, `isBugged`) VALUES +(36855, 70842, 0, 0, 0, 15000, 0, 0, 0, 25000, 0, 0, 0, 1, 0, 0), +(36855, 47008, 0, 0, 0, 600000, 0, 0, 0, 600000, 0, 0, 0, 1, 0, 0), +(36855, 71254, 72008, 72008, 72504, 5000, 0, 0, 0, 8000, 0, 0, 0, 4, 0, 0), +(36855, 71420, 72501, 72007, 72502, 15000, 0, 0, 0, 25000, 0, 0, 0, 4, 0, 0), +(36855, 71001, 0, 0, 0, 15000, 0, 0, 0, 25000, 0, 0, 0, 4, 0, 0), +(36855, 71204, 0, 0, 0, 10000, 0, 0, 0, 20000, 0, 0, 0, 3, 0, 0), +(36855, 70901, 0, 0, 0, 10000, 0, 0, 0, 25000, 0, 0, 0, 6, 0, 0), +(36855, 71289, 0, 0, 0, 15000, 0, 0, 0, 25000, 0, 0, 0, 4, 0, 0), +(36855, 71494, 0, 0, 0, 8000, 0, 0, 0, 15000, 0, 0, 0, 1, 0, 0); +-- summons +INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `timerMin_N10`, `timerMax_N10`, `data1`, `data2`, `data3`, `data4`, `locData_x`, `locData_y`, `locData_z`, `CastType` ) VALUES +(36855, 37890, 45000, 75000, 1, 1, 2, 2, 75, 100, 0, 11), +(36855, 37949, 45000, 75000, 1, 1, 2, 2, 75, 100, 0, 11), +(36855, 38010, 45000, 45000, 1, 1, 2, 2, 75, 100, 0, 9), +(36855, 38222, 8000, 15000, 1, 1, 1, 1, 75, 100, 0, 9), +(36855, 38009, 45000, 45000, 1, 1, 2, 2, 75, 100, 0, 9); +-- Vengeful shade +DELETE FROM `boss_spell_table` WHERE `entry` = 38222; +INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_N25`, `spellID_H10`, `spellID_H25`, `timerMin_N10`, `timerMin_N25`, `timerMin_H10`, `timerMin_H25`, `timerMax_N10`, `timerMax_N25`, `timerMax_H10`, `timerMax_H25`, `CastType`, `isVisualEffect`, `isBugged`) VALUES +(38222, 71494, 0, 0, 0, 1000, 0, 0, 0, 1000, 0, 0, 0, 1, 0, 0), +(38222, 71544, 0, 0, 0, 1000, 0, 0, 0, 1000, 0, 0, 0, 3, 0, 0); +-- Adherent +DELETE FROM `boss_spell_table` WHERE `entry` = 37949; +INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_N25`, `spellID_H10`, `spellID_H25`, `timerMin_N10`, `timerMin_N25`, `timerMin_H10`, `timerMin_H25`, `timerMax_N10`, `timerMax_N25`, `timerMax_H10`, `timerMax_H25`, `CastType`, `isVisualEffect`, `isBugged`) VALUES +(37949, 71129, 0, 0, 0, 15000, 0, 0, 0, 20000, 0, 0, 0, 3, 0, 0), +(37949, 70594, 0, 0, 0, 5000, 0, 0, 0, 10000, 0, 0, 0, 4, 0, 0), +(37949, 71254, 0, 0, 0, 5000, 0, 0, 0, 15000, 0, 0, 0, 4, 0, 0), +(37949, 70906, 0, 0, 0, 10000, 0, 0, 0, 20000, 0, 0, 0, 4, 0, 0), +(37949, 70903, 0, 0, 0, 1000, 0, 0, 0, 2000, 0, 0, 0, 1, 0, 0), +(37949, 71237, 0, 0, 0, 10000, 0, 0, 0, 20000, 0, 0, 0, 3, 0, 0), +(37949, 70768, 0, 0, 0, 5000, 0, 0, 0, 10000, 0, 0, 0, 4, 0, 0), +(37949, 41236, 0, 0, 0, 5000, 0, 0, 0, 10000, 0, 0, 0, 1, 0, 0), +(37949, 71234, 0, 0, 0, 5000, 0, 0, 0, 10000, 0, 0, 0, 4, 0, 0); +-- Fanatic +DELETE FROM `boss_spell_table` WHERE `entry` = 37890; +INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_N25`, `spellID_H10`, `spellID_H25`, `timerMin_N10`, `timerMin_N25`, `timerMin_H10`, `timerMin_H25`, `timerMax_N10`, `timerMax_N25`, `timerMax_H10`, `timerMax_H25`, `CastType`, `isVisualEffect`, `isBugged`) VALUES +(37890, 70659, 0, 0, 0, 5000, 0, 0, 0, 10000, 0, 0, 0, 3, 0, 0), +(37890, 70670, 0, 0, 0, 5000, 0, 0, 0, 10000, 0, 0, 0, 3, 0, 0), +(37890, 70674, 0, 0, 0, 5000, 0, 0, 0, 10000, 0, 0, 0, 1, 0, 0); + +-- Gunship battle +-- Frost wyrm +DELETE FROM `boss_spell_table` WHERE `entry` = 37230; +INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_N25`, `spellID_H10`, `spellID_H25`, `timerMin_N10`, `timerMin_N25`, `timerMin_H10`, `timerMin_H25`, `timerMax_N10`, `timerMax_N25`, `timerMax_H10`, `timerMax_H25`, `CastType`, `isVisualEffect`, `isBugged`) VALUES +(37230, 70116, 0, 0, 0, 15000, 0, 0, 0, 25000, 0, 0, 0, 4, 0, 0), +(37230, 70362, 0, 0, 0, 20000, 0, 0, 0, 25000, 0, 0, 0, 4, 0, 0), +(37230, 70361, 0, 0, 0, 3000, 0, 0, 0, 5000, 0, 0, 0, 3, 0, 0), +(37230, 47008, 0, 0, 0, 180000, 0, 0, 0, 180000, 0, 0, 0, 1, 0, 0); + +-- Rotted frost giant +DELETE FROM `boss_spell_table` WHERE `entry` IN (38490, 38494); +INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_N25`, `spellID_H10`, `spellID_H25`, `timerMin_N10`, `timerMin_N25`, `timerMin_H10`, `timerMin_H25`, `timerMax_N10`, `timerMax_N25`, `timerMax_H10`, `timerMax_H25`, `CastType`, `isVisualEffect`, `isBugged`) VALUES +(38490, 64652, 0, 0, 0, 15000, 0, 0, 0, 27000, 0, 0, 0, 4, 0, 0), +(38490, 72865, 0, 0, 0, 30000, 0, 0, 0, 45000, 0, 0, 0, 4, 0, 0), +(38490, 47008, 0, 0, 0, 300000, 0, 0, 0, 300000, 0, 0, 0, 1, 0, 0); +INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_N25`, `spellID_H10`, `spellID_H25`, `timerMin_N10`, `timerMin_N25`, `timerMin_H10`, `timerMin_H25`, `timerMax_N10`, `timerMax_N25`, `timerMax_H10`, `timerMax_H25`, `CastType`, `isVisualEffect`, `isBugged`) VALUES +(38494, 64652, 0, 0, 0, 15000, 0, 0, 0, 27000, 0, 0, 0, 4, 0, 0), +(38494, 72865, 0, 0, 0, 25000, 0, 0, 0, 40000, 0, 0, 0, 4, 0, 0), +(38494, 47008, 0, 0, 0, 300000, 0, 0, 0, 300000, 0, 0, 0, 1, 0, 0); + +-- Deathbringer Saurfang +DELETE FROM `boss_spell_table` WHERE `entry` = 37813; +INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_N25`, `spellID_H10`, `spellID_H25`, `timerMin_N10`, `timerMin_N25`, `timerMin_H10`, `timerMin_H25`, `timerMax_N10`, `timerMax_N25`, `timerMax_H10`, `timerMax_H25`,`data1`, `data2`, `data3`, `data4`, `CastType`, `isVisualEffect`, `isBugged`) VALUES +(37813, 72178, 0, 0, 0, 20000, 0, 0, 0, 15000, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0), +(37813, 72371, 0, 0, 0, 3000, 0, 0, 0, 5000, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0), +(37813, 72256, 0, 0, 0, 1000, 0, 0, 0, 1000, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0), +(37813, 72293, 0, 0, 0, 35000, 0, 0, 0, 45000, 0, 0, 0, 0, 0, 0, 0, 6, 0, 0), +(37813, 72737, 0, 0, 0, 15000, 0, 0, 0, 27000, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0), +(37813, 72385, 0, 0, 0, 20000, 0, 0, 0, 40000, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0), +(37813, 72380, 0, 0, 0, 25000, 0, 0, 0, 45000, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0), +(37813, 72408, 0, 0, 0, 20000, 0, 0, 0, 40000, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0), +(37813, 72172, 0, 0, 0, 45000, 0, 0, 0, 45000, 0, 0, 0, 2, 5, 2, 5, 1, 0, 0), +(37813, 72173, 0, 0, 0, 45000, 0, 0, 0, 45000, 0, 0, 0, 2, 5, 2, 5, 1, 0, 0), +(37813, 72356, 0, 0, 0, 45000, 0, 0, 0, 45000, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0), +(37813, 72357, 0, 0, 0, 45000, 0, 0, 0, 45000, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0), +(37813, 72358, 0, 0, 0, 45000, 0, 0, 0, 45000, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0), +(37813, 72769, 0, 0, 0, 15000, 0, 0, 0, 27000, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0), +(37813, 72723, 0, 0, 0, 15000, 0, 0, 0, 27000, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0), +(37813, 72242, 0, 0, 0, 1000, 0, 0, 0, 1000, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0), +(37813, 47008, 0, 0, 0, 480000, 0, 0, 0, 480000, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0); +-- summons +INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `timerMin_N10`, `timerMax_N10`, `data1`, `data2`, `data3`, `data4`, `locData_x`, `locData_y`, `locData_z`, `CastType` ) VALUES +(37813, 38508, 45000, 45000, 1, 1, 2, 2, 15, 25, 0, 9); +-- Blood beast +DELETE FROM `boss_spell_table` WHERE `entry` = 38508; +INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_N25`, `spellID_H10`, `spellID_H25`, `timerMin_N10`, `timerMin_N25`, `timerMin_H10`, `timerMin_H25`, `timerMax_N10`, `timerMax_N25`, `timerMax_H10`, `timerMax_H25`, `CastType`, `isVisualEffect`, `isBugged`) VALUES +(38508, 72176, 0, 0, 0, 15000, 0, 0, 0, 27000, 0, 0, 0, 1, 0, 0), +(38508, 72723, 0, 0, 0, 15000, 0, 0, 0, 27000, 0, 0, 0, 1, 0, 0), +(38508, 72769, 0, 0, 0, 15000, 0, 0, 0, 27000, 0, 0, 0, 1, 0, 0), +(38508, 21150, 0, 0, 0, 15000, 0, 0, 0, 27000, 0, 0, 0, 1, 0, 0); + + +-- Festergut +DELETE FROM `boss_spell_table` WHERE `entry` = 36626; +INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_N25`, `spellID_H10`, `spellID_H25`, `timerMin_N10`, `timerMin_N25`, `timerMin_H10`, `timerMin_H25`, `timerMax_N10`, `timerMax_N25`, `timerMax_H10`, `timerMax_H25`, `locData_x`, `locData_y`, `locData_z`, `CastType`, `isVisualEffect`, `isBugged`) VALUES +( 36626, 69157, 0, 0, 0, 20000, 0, 0, 0, 20000, 0, 0, 0, 0, 0, 0, 1, 0, 0), +( 36626, 69162, 0, 0, 0, 20000, 0, 0, 0, 20000, 0, 0, 0, 0, 0, 0, 1, 0, 0), +( 36626, 69164, 0, 0, 0, 20000, 0, 0, 0, 20000, 0, 0, 0, 0, 0, 0, 1, 0, 0), +( 36626, 69126, 0, 0, 0, 20000, 0, 0, 0, 20000, 0, 0, 0, 0, 0, 0, 6, 0, 0), +( 36626, 69152, 0, 0, 0, 20000, 0, 0, 0, 20000, 0, 0, 0, 0, 0, 0, 6, 0, 0), +( 36626, 69154, 0, 0, 0, 20000, 0, 0, 0, 20000, 0, 0, 0, 0, 0, 0, 6, 0, 0), +( 36626, 69165, 0, 0, 0, 10000, 0, 0, 0, 30000, 0, 0, 0, 0, 0, 0, 1, 0, 0), +( 36626, 69195, 0, 0, 0, 20000, 0, 0, 0, 20000, 0, 0, 0, 0, 0, 0, 1, 0, 0), +( 36626, 69278, 0, 0, 0, 20000, 0, 0, 0, 20000, 0, 0, 0, 0, 0, 0, 1, 0, 0), +( 36626, 69279, 0, 0, 0, 20000, 0, 0, 0, 20000, 0, 0, 0, 0, 0, 0, 1, 0, 0), +( 36626, 69290, 0, 0, 0, 20000, 0, 0, 0, 20000, 0, 0, 0, 0, 0, 0, 1, 0, 0), +( 36626, 69291, 0, 0, 0, 20000, 0, 0, 0, 30000, 0, 0, 0, 0, 0, 0, 6, 0, 1), +( 36626, 72219, 0, 0, 0, 15000, 0, 0, 0, 25000, 0, 0, 0, 0, 0, 0, 3, 0, 0), +( 36626, 72227, 0, 0, 0, 20000, 0, 0, 0, 30000, 0, 0, 0, 0, 0, 0, 6, 0, 1), +( 36626, 72272, 0, 0, 0, 20000, 0, 0, 0, 30000, 0, 0, 0, 0, 0, 0, 6, 0, 0), +( 36626, 69244, 0, 0, 0, 20000, 0, 0, 0, 30000, 0, 0, 0, 0, 0, 0, 6, 0, 0), +( 36626, 69248, 0, 0, 0, 20000, 0, 0, 0, 30000, 0, 0, 0, 0, 0, 0, 6, 0, 0), +( 36626, 72287, 0, 0, 0, 20000, 0, 0, 0, 30000, 0, 0, 0, 0, 0, 0, 1, 0, 0), +( 36626, 71379, 0, 0, 0, 20000, 0, 0, 0, 30000, 0, 0, 0, 0, 0, 0, 6, 0, 1), +( 36626, 47008, 0, 0, 0, 600000, 0, 0, 0, 600000, 0, 0, 0, 0, 0, 0, 1, 0, 0); +-- summons +INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `timerMin_N10`, `timerMax_N10`, `data1`, `data2`, `data3`, `data4`, `locData_x`, `locData_y`, `locData_z`, `CastType` ) VALUES +(36626, 38548, 12000, 12000, 1, 1, 1, 1, 10, 20, 0, 11); + +-- Rotface +DELETE FROM `boss_spell_table` WHERE `entry` = 36627; +INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_N25`, `spellID_H10`, `spellID_H25`, `timerMin_N10`, `timerMin_N25`, `timerMin_H10`, `timerMin_H25`, `timerMax_N10`, `timerMax_N25`, `timerMax_H10`, `timerMax_H25`,`data1`, `data2`, `data3`, `data4`, `CastType`, `isVisualEffect`, `isBugged`) VALUES +(36627, 69508, 0, 0, 0, 15000, 0, 0, 0, 20000, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0), +(36627, 69674, 0, 0, 0, 1000, 0, 0, 0, 1000, 0, 0, 0, 0, 0, 0, 0, 6, 0, 0), +(36627, 70003, 0, 0, 0, 15000, 0, 0, 0, 15000, 0, 0, 0, 1, 2, 1, 3, 6, 0, 0), +(36627, 69788, 0, 0, 0, 20000, 0, 0, 0, 40000, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0), +(36627, 69783, 0, 0, 0, 30000, 0, 0, 0, 45000, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0), +(36627, 47008, 0, 0, 0, 600000, 0, 0, 0, 600000, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0), +(36627, 69789, 0, 0, 0, 20000, 0, 0, 0, 40000, 0, 0, 0, 0, 0, 0, 0, 6, 0, 1); +-- summons +INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `timerMin_N10`, `timerMax_N10`, `data1`, `data2`, `data3`, `data4`, `locData_x`, `locData_y`, `locData_z`, `CastType` ) VALUES +(36627, 36897, 12000, 12000, 1, 1, 1, 1, 1, 5, 0, 9), +(36627, 37986, 15000, 15000, 1, 1, 1, 1, 10, 20, 0, 11), +(36627, 37013, 15000, 15000, 1, 1, 1, 1, 0, 0, 0, 11); +-- Small ooze +DELETE FROM `boss_spell_table` WHERE `entry` = 36897; +INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_N25`, `spellID_H10`, `spellID_H25`, `timerMin_N10`, `timerMin_N25`, `timerMin_H10`, `timerMin_H25`, `timerMax_N10`, `timerMax_N25`, `timerMax_H10`, `timerMax_H25`, `CastType`, `isVisualEffect`, `isBugged`) VALUES +(36897,69774, 0, 0, 0, 10000, 0, 0, 0, 15000, 0, 0, 0, 4, 0, 0), +(36897,69750, 0, 0, 0, 10000, 0, 0, 0, 15000, 0, 0, 0, 1, 0, 0), +(36897,69644, 0, 0, 0, 10000, 0, 0, 0, 15000, 0, 0, 0, 6, 0, 0), +(36897,69889, 0, 0, 0, 10000, 0, 0, 0, 15000, 0, 0, 0, 6, 0, 0); +-- summons +INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `timerMin_N10`, `timerMax_N10`, `data1`, `data2`, `data3`, `data4`, `locData_x`, `locData_y`, `locData_z`, `CastType` ) VALUES +(36897, 36899, 12000, 12000, 1, 1, 1, 1, 1, 5, 0, 9); +-- Big ooze +DELETE FROM `boss_spell_table` WHERE `entry` = 36899; +INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_N25`, `spellID_H10`, `spellID_H25`, `timerMin_N10`, `timerMin_N25`, `timerMin_H10`, `timerMin_H25`, `timerMax_N10`, `timerMax_N25`, `timerMax_H10`, `timerMax_H25`, `CastType`, `isVisualEffect`, `isBugged`) VALUES +(36899,69774, 0, 0, 0, 15000, 0, 0, 0, 25000, 0, 0, 0, 4, 0, 0), +(36899,69839, 0, 0, 0, 6000, 0, 0, 0, 6000, 0, 0, 0, 1, 0, 0), +(36899,69760, 0, 0, 0, 10000, 0, 0, 0, 15000, 0, 0, 0, 1, 0, 0), +(36899,69644, 0, 0, 0, 10000, 0, 0, 0, 15000, 0, 0, 0, 1, 0, 0), +(36899,69558, 0, 0, 0, 10000, 0, 0, 0, 15000, 0, 0, 0, 1, 0, 0), +(36899,69889, 0, 0, 0, 10000, 0, 0, 0, 15000, 0, 0, 0, 6, 0, 0); +-- Ooze explode stalker +DELETE FROM `boss_spell_table` WHERE `entry` = 38107; +INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_N25`, `spellID_H10`, `spellID_H25`, `timerMin_N10`, `timerMin_N25`, `timerMin_H10`, `timerMin_H25`, `timerMax_N10`, `timerMax_N25`, `timerMax_H10`, `timerMax_H25`, `CastType`, `isVisualEffect`, `isBugged`) VALUES +(38107,69840, 0, 0, 0, 2000, 0, 0, 0, 2000, 0, 0, 0, 1, 0, 0); + +-- Professor Putricide +DELETE FROM `boss_spell_table` WHERE `entry` = 36678; +INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_N25`, `spellID_H10`, `spellID_H25`, `timerMin_N10`, `timerMin_N25`, `timerMin_H10`, `timerMin_H25`, `timerMax_N10`, `timerMax_N25`, `timerMax_H10`, `timerMax_H25`, `locData_x`, `CastType`, `isVisualEffect`, `isBugged`) VALUES +(36678,70351, 0, 0, 0, 40000, 0, 0, 0, 60000, 0, 0, 0, 0, 1, 0, 0), +(36678,71617, 0, 0, 0, 10000, 0, 0, 0, 20000, 0, 0, 0, 0, 3, 0, 0), +(36678,71615, 0, 0, 0, 10000, 0, 0, 0, 20000, 0, 0, 0, 100, 12, 0, 0), +(36678,71618, 0, 0, 0, 10000, 0, 0, 0, 20000, 0, 0, 0, 100, 12, 0, 0), +(36678,71621, 0, 0, 0, 10000, 0, 0, 0, 20000, 0, 0, 0, 0, 3, 0, 0), +(36678,71278, 0, 0, 0, 10000, 0, 0, 0, 20000, 0, 0, 0, 0, 3, 0, 0), +(36678,71279, 0, 0, 0, 10000, 0, 0, 0, 20000, 0, 0, 0, 0, 3, 0, 0), +(36678,71893, 0, 0, 0, 10000, 0, 0, 0, 20000, 0, 0, 0, 0, 3, 0, 0), +(36678,71273, 0, 0, 0, 8000, 0, 0, 0, 15000, 0, 0, 0, 0, 1, 0, 0), +(36678,71275, 0, 0, 0, 8000, 0, 0, 0, 15000, 0, 0, 0, 0, 1, 0, 0), +(36678,71276, 0, 0, 0, 8000, 0, 0, 0, 15000, 0, 0, 0, 0, 1, 0, 0), +(36678,71702, 0, 0, 0, 10000, 0, 0, 0, 20000, 0, 0, 0, 0, 1, 0, 0), +(36678,71703, 0, 0, 0, 10000, 0, 0, 0, 20000, 0, 0, 0, 0, 1, 0, 0), +(36678,71603, 0, 0, 0, 10000, 0, 0, 0, 20000, 0, 0, 0, 0, 3, 0, 0), +(36678,70311, 0, 0, 0, 10000, 0, 0, 0, 20000, 0, 0, 0, 0, 1, 0, 0), +(36678,47008, 0, 0, 0, 600000, 0, 0, 0, 600000, 0, 0, 0, 0, 1, 0, 0), +(36678,71518, 0, 0, 0, 1000, 0, 0, 0, 1000, 0, 0, 0, 0, 6, 0, 1), +(36678,72672, 0, 0, 0, 10000, 0, 0, 0, 25000, 0, 0, 0, 0, 3, 0, 0); +INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_N25`, `spellID_H10`, `spellID_H25`, `timerMin_N10`, `timerMin_N25`, `timerMin_H10`, `timerMin_H25`, `timerMax_N10`, `timerMax_N25`, `timerMax_H10`, `timerMax_H25`, `locData_x`, `locData_y`, `locData_z`, `CastType`, `isVisualEffect`, `isBugged`) VALUES +(36678,70342, 0, 0, 0, 30000, 0, 0, 0, 60000, 0, 0, 0, 10, 40, 0, 15, 0, 0), +(36678,70852, 0, 0, 0, 15000, 0, 0, 0, 25000, 0, 0, 0, 10, 30, 0, 15, 0, 0); + +-- summons +INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `timerMin_N10`, `timerMax_N10`, `data1`, `data2`, `data3`, `data4`, `locData_x`, `locData_y`, `locData_z`, `CastType` ) VALUES +(36678, 37562, 20000, 40000, 1, 1, 1, 1, 5, 10, 0, 9), +(36678, 38159, 8000, 20000, 1, 1, 1, 1, 20, 40, 0, 9), +(36678, 37690, 40000, 60000, 1, 1, 1, 1, 10, 40, 0, 9), +(36678, 37697, 20000, 40000, 1, 1, 1, 1, 5, 10, 0, 9); +-- Gas cloud +DELETE FROM `boss_spell_table` WHERE `entry` = 37562; +INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_N25`, `spellID_H10`, `spellID_H25`, `timerMin_N10`, `timerMin_N25`, `timerMin_H10`, `timerMin_H25`, `timerMax_N10`, `timerMax_N25`, `timerMax_H10`, `timerMax_H25`, `CastType`, `isVisualEffect`, `isBugged`) VALUES +(37562,70672, 0, 0, 0, 10000, 0, 0, 0, 20000, 0, 0, 0, 6, 0, 0), +(37562,70215, 0, 0, 0, 10000, 0, 0, 0, 20000, 0, 0, 0, 6, 0, 0), +(37562,71770, 0, 0, 0, 10000, 0, 0, 0, 20000, 0, 0, 0, 6, 0, 1), +(37562,70812, 0, 0, 0, 10000, 0, 0, 0, 20000, 0, 0, 0, 6, 0, 1), +(37562,70701, 0, 0, 0, 10000, 0, 0, 0, 20000, 0, 0, 0, 6, 0, 0); +-- Volatile ooze +DELETE FROM `boss_spell_table` WHERE `entry` = 37697; +INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_N25`, `spellID_H10`, `spellID_H25`, `timerMin_N10`, `timerMin_N25`, `timerMin_H10`, `timerMin_H25`, `timerMax_N10`, `timerMax_N25`, `timerMax_H10`, `timerMax_H25`, `CastType`, `isVisualEffect`, `isBugged`) VALUES +(37697,70492, 0, 0, 0, 10000, 0, 0, 0, 20000, 0, 0, 0, 1, 0, 0), +(37697,70530, 0, 0, 0, 10000, 0, 0, 0, 20000, 0, 0, 0, 6, 0, 1), +(37697,71770, 0, 0, 0, 10000, 0, 0, 0, 20000, 0, 0, 0, 6, 0, 1), +(37697,70447, 0, 0, 0, 10000, 0, 0, 0, 20000, 0, 0, 0, 6, 0, 0); +-- Mutated abomination (pet?) +DELETE FROM `boss_spell_table` WHERE `entry` = 37672; +INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_N25`, `spellID_H10`, `spellID_H25`, `timerMin_N10`, `timerMin_N25`, `timerMin_H10`, `timerMin_H25`, `timerMax_N10`, `timerMax_N25`, `timerMax_H10`, `timerMax_H25`, `CastType`, `isVisualEffect`, `isBugged`) VALUES +(37672,70311, 0, 0, 0, 10000, 0, 0, 0, 20000, 0, 0, 0, 1, 0, 0), +(37672,72527, 0, 0, 0, 10000, 0, 0, 0, 20000, 0, 0, 0, 3, 0, 0), +(37672,72539, 0, 0, 0, 10000, 0, 0, 0, 20000, 0, 0, 0, 3, 0, 0), +(37672,70542, 0, 0, 0, 10000, 0, 0, 0, 20000, 0, 0, 0, 3, 0, 0), +(37672,70405, 0, 0, 0, 10000, 0, 0, 0, 20000, 0, 0, 0, 1, 0, 0); + +-- Taldaram +DELETE FROM `boss_spell_table` WHERE `entry` = 37973; +INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_N25`, `spellID_H10`, `spellID_H25`, `timerMin_N10`, `timerMin_N25`, `timerMin_H10`, `timerMin_H25`, `timerMax_N10`, `timerMax_N25`, `timerMax_H10`, `timerMax_H25`, `locData_x`, `locData_y`, `locData_z`, `CastType`, `isVisualEffect`, `isBugged`) VALUES +(37973, 71807, 0, 0, 0, 50000, 0, 0, 0, 10000, 0, 0, 0, 0, 0, 0, 3, 0, 0), +(37973, 71718, 0, 0, 0, 10000, 0, 0, 0, 25000, 0, 0, 0, 0, 0, 0, 4, 0, 0), +(37973, 71719, 0, 0, 0, 10000, 0, 0, 0, 25000, 0, 0, 0, 0, 0, 0, 15, 0, 0), +(37973, 72040, 0, 0, 0, 10000, 0, 0, 0, 25000, 0, 0, 0, 0, 0, 0, 4, 0, 0), +(37973, 72041, 0, 0, 0, 10000, 0, 0, 0, 25000, 0, 0, 0, 0, 0, 0, 15, 0, 0), +(37973, 70952, 0, 0, 0, 30000, 0, 0, 0, 30000, 0, 0, 0, 0, 0, 0, 1, 0, 0), +(37973, 70981, 0, 0, 0, 30000, 0, 0, 0, 30000, 0, 0, 0, 0, 0, 0, 1, 0, 0), +(37973, 70982, 0, 0, 0, 30000, 0, 0, 0, 30000, 0, 0, 0, 0, 0, 0, 1, 0, 0), +(37973, 71598, 0, 0, 0, 30000, 0, 0, 0, 30000, 0, 0, 0, 0, 0, 0, 1, 0, 0), +(37973, 70983, 0, 0, 0, 1000, 0, 0, 0, 1000, 0, 0, 0, 0, 0, 0, 1, 0, 0), +(37973, 47008, 0, 0, 0, 600000, 0, 0, 0, 600000, 0, 0, 0, 0, 0, 0, 1, 0, 0); + +-- Valanar +DELETE FROM `boss_spell_table` WHERE `entry` = 37970; +INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_N25`, `spellID_H10`, `spellID_H25`, `timerMin_N10`, `timerMin_N25`, `timerMin_H10`, `timerMin_H25`, `timerMax_N10`, `timerMax_N25`, `timerMax_H10`, `timerMax_H25`, `locData_x`, `locData_y`, `locData_z`, `CastType`, `isVisualEffect`, `isBugged`) VALUES +(37970, 72053, 0, 0, 0, 10000, 0, 0, 0, 25000, 0, 0, 0, 0, 0, 0, 4, 0, 0), +(37970, 71598, 0, 0, 0, 30000, 0, 0, 0, 30000, 0, 0, 0, 0, 0, 0, 1, 0, 0), +(37970, 38459, 0, 0, 0, 10000, 0, 0, 0, 25000, 0, 0, 0, 0, 0, 0, 11, 0, 0), +(37970, 72037, 0, 0, 0, 10000, 0, 0, 0, 25000, 0, 0, 0, 0, 0, 0, 1, 0, 0), +(37970, 38422, 0, 0, 0, 10000, 0, 0, 0, 25000, 0, 0, 0, 0, 0, 0, 11, 0, 0), +(37970, 71945, 0, 0, 0, 10000, 0, 0, 0, 25000, 0, 0, 0, 0, 0, 0, 6, 0, 0), +(37970, 47008, 0, 0, 0, 600000, 0, 0, 0, 600000, 0, 0, 0, 0, 0, 0, 1, 0, 0), +(37970, 70983, 0, 0, 0, 1000, 0, 0, 0, 1000, 0, 0, 0, 0, 0, 0, 1, 0, 0), +(37970, 70981, 0, 0, 0, 30000, 0, 0, 0, 30000, 0, 0, 0, 0, 0, 0, 1, 0, 0), +(37970, 70982, 0, 0, 0, 30000, 0, 0, 0, 30000, 0, 0, 0, 0, 0, 0, 1, 0, 0), +(37970, 70952, 0, 0, 0, 30000, 0, 0, 0, 30000, 0, 0, 0, 0, 0, 0, 1, 0, 0), +(37970, 72039, 0, 0, 0, 10000, 0, 0, 0, 25000, 0, 0, 0, 0, 0, 0, 4, 0, 0); + +-- Keleseth +DELETE FROM `boss_spell_table` WHERE `entry` = 37972; +INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_N25`, `spellID_H10`, `spellID_H25`, `timerMin_N10`, `timerMin_N25`, `timerMin_H10`, `timerMin_H25`, `timerMax_N10`, `timerMax_N25`, `timerMax_H10`, `timerMax_H25`, `locData_x`, `locData_y`, `locData_z`, `CastType`, `isVisualEffect`, `isBugged`) VALUES +(37972, 71405, 0, 0, 0, 5000, 0, 0, 0, 8000, 0, 0, 0, 0, 0, 0, 3, 0, 0), +(37972, 71598, 0, 0, 0, 30000, 0, 0, 0, 30000, 0, 0, 0, 0, 0, 0, 1, 0, 0), +(37972, 71815, 0, 0, 0, 10000, 0, 0, 0, 15000, 0, 0, 0, 0, 0, 0, 3, 0, 0), +(37972, 71943, 0, 0, 0, 10000, 0, 0, 0, 25000, 0, 0, 0, 0, 0, 0, 1, 0, 0), +(37972, 71822, 0, 0, 0, 10000, 0, 0, 0, 25000, 0, 0, 0, 0, 0, 0, 4, 0, 0), +(37972, 47008, 0, 0, 0, 600000, 0, 0, 0, 600000, 0, 0, 0, 0, 0, 0, 1, 0, 0), +(37972, 70952, 0, 0, 0, 30000, 0, 0, 0, 30000, 0, 0, 0, 0, 0, 0, 1, 0, 0), +(37972, 70981, 0, 0, 0, 30000, 0, 0, 0, 30000, 0, 0, 0, 0, 0, 0, 1, 0, 0), +(37972, 70982, 0, 0, 0, 30000, 0, 0, 0, 30000, 0, 0, 0, 0, 0, 0, 1, 0, 0), +(37972, 70983, 0, 0, 0, 1000, 0, 0, 0, 1000, 0, 0, 0, 0, 0, 0, 1, 0, 0); + +-- Lanathel +DELETE FROM `boss_spell_table` WHERE `entry` = 37955; +INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_N25`, `spellID_H10`, `spellID_H25`, `timerMin_N10`, `timerMin_N25`, `timerMin_H10`, `timerMin_H25`, `timerMax_N10`, `timerMax_N25`, `timerMax_H10`, `timerMax_H25`, `locData_x`, `locData_y`, `locData_z`, `CastType`, `isVisualEffect`, `isBugged`) VALUES +(37955, 72981, 0, 0, 0, 10000, 0, 0, 0, 25000, 0, 0, 0, 0, 0, 0, 1, 0, 0), +(37955, 71623, 0, 0, 0, 10000, 0, 0, 0, 25000, 0, 0, 0, 0, 0, 0, 6, 0, 0), +(37955, 70451, 70451, 71510, 71510, 10000, 0, 0, 0, 25000, 0, 0, 0, 0, 0, 0, 6, 0, 1), +(37955, 70445, 70445, 70821, 70821, 10000, 0, 0, 0, 25000, 0, 0, 0, 0, 0, 0, 6, 0, 0), +(37955, 71726, 0, 0, 0, 10000, 0, 0, 0, 25000, 0, 0, 0, 0, 0, 0, 4, 0, 0), +(37955, 70867, 71473, 71532, 71533, 10000, 0, 0, 0, 25000, 0, 0, 0, 0, 0, 0, 4, 0, 0), +(37955, 70871, 0, 0, 0, 10000, 0, 0, 0, 25000, 0, 0, 0, 0, 0, 0, 4, 0, 0), +(37955, 70923, 0, 0, 0, 10000, 0, 0, 0, 25000, 0, 0, 0, 0, 0, 0, 4, 0, 0), +(37955, 71340, 0, 0, 0, 10000, 0, 0, 0, 25000, 0, 0, 0, 0, 0, 0, 4, 0, 0), +(37955, 71264, 0, 0, 0, 20000, 0, 0, 0, 35000, 0, 0, 0, 0, 0, 0, 4, 0, 0), +(37955, 71446, 0, 0, 0, 7000, 0, 0, 0, 12000, 0, 0, 0, 0, 0, 0, 4, 0, 0), +(37955, 71772, 0, 0, 0, 40000, 0, 0, 0, 60000, 0, 0, 0, 0, 0, 0, 1, 0, 0), +(37955, 47008, 0, 0, 0, 600000, 0, 0, 0, 600000, 0, 0, 0, 0, 0, 0, 1, 0, 0), +(37955, 72934, 0, 0, 0, 1000, 0, 0, 0, 1000, 0, 0, 0, 0, 0, 0, 6, 0, 1), +(37955, 71952, 0, 0, 0, 5000, 0, 0, 0, 8000, 0, 0, 0, 0, 0, 0, 1, 0, 0); + +-- Valithria +DELETE FROM `boss_spell_table` WHERE `entry` = 36789; +INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_N25`, `spellID_H10`, `spellID_H25`, `timerMin_N10`, `timerMin_N25`, `timerMin_H10`, `timerMin_H25`, `timerMax_N10`, `timerMax_N25`, `timerMax_H10`, `timerMax_H25`, `locData_x`, `locData_y`, `locData_z`, `CastType`, `isVisualEffect`, `isBugged`) VALUES +(36789, 71977, 0, 0, 0, 30000, 0, 0, 0, 60000, 0, 0, 0, 0, 0, 0, 1, 0, 0), +(36789, 71987, 0, 0, 0, 10000, 0, 0, 0, 25000, 0, 0, 0, 0, 0, 0, 1, 1, 0), +(36789, 72481, 0, 0, 0, 10000, 0, 0, 0, 25000, 0, 0, 0, 0, 0, 0, 1, 0, 0), +(36789, 70873, 0, 0, 0, 8000, 0, 0, 0, 15000, 0, 0, 0, 0, 0, 0, 1, 0, 0), +(36789, 71189, 0, 0, 0, 3000, 0, 0, 0, 3000, 0, 0, 0, 0, 0, 0, 1, 0, 0), +(36789, 72724, 0, 0, 0, 3000, 0, 0, 0, 3000, 0, 0, 0, 0, 0, 0, 1, 0, 0), +(36789, 70904, 0, 0, 0, 5000, 0, 0, 0, 5000, 0, 0, 0, 0, 0, 0, 1, 0, 1), +(36789, 71196, 0, 0, 0, 8000, 0, 0, 0, 15000, 0, 0, 0, 0, 0, 0, 1, 0, 0), +(36789, 70702, 0, 0, 0, 15000, 0, 0, 0, 25000, 0, 0, 0, 0, 0, 0, 16, 0, 1); +-- summons +INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `timerMin_N10`, `timerMax_N10`, `data1`, `data2`, `data3`, `data4`, `locData_x`, `locData_y`, `locData_z`, `CastType` ) VALUES +(36789, 38429, 30000, 40000, 1, 1, 1, 1, 5, 70, 0, 9), +(36789, 37868, 30000, 45000, 1, 1, 1, 1, 1, 3, 0, 11), +(36789, 37863, 30000, 45000, 1, 1, 1, 1, 1, 3, 0, 11), +(36789, 36791, 30000, 45000, 1, 1, 1, 1, 1, 3, 0, 11), +(36789, 37934, 30000, 45000, 1, 1, 1, 1, 1, 3, 0, 11), +(36789, 37886, 30000, 45000, 1, 1, 1, 1, 1, 3, 0, 11); +-- Nightmare portal +DELETE FROM `boss_spell_table` WHERE `entry` = 38429; +INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_N25`, `spellID_H10`, `spellID_H25`, `timerMin_N10`, `timerMin_N25`, `timerMin_H10`, `timerMin_H25`, `timerMax_N10`, `timerMax_N25`, `timerMax_H10`, `timerMax_H25`, `locData_x`, `locData_y`, `locData_z`, `CastType`, `isVisualEffect`, `isBugged`) VALUES +(38429, 70873, 0, 0, 0, 2000, 0, 0, 0, 2000, 0, 0, 0, 0, 0, 0, 1, 0, 1); + +-- Sindragosa +DELETE FROM `boss_spell_table` WHERE `entry` = 36853; +INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_N25`, `spellID_H10`, `spellID_H25`, `timerMin_N10`, `timerMin_N25`, `timerMin_H10`, `timerMin_H25`, `timerMax_N10`, `timerMax_N25`, `timerMax_H10`, `timerMax_H25`, `locData_x`, `locData_y`, `locData_z`, `CastType`, `isVisualEffect`, `isBugged`) VALUES +(36853, 70084, 0, 0, 0, 8000, 0, 0, 0, 15000, 0, 0, 0, 0, 0, 0, 1, 0, 0), +(36853, 57764, 0, 0, 0, 8000, 0, 0, 0, 15000, 0, 0, 0, 0, 0, 0, 1, 1, 0), +(36853, 19983, 0, 0, 0, 8000, 0, 0, 0, 15000, 0, 0, 0, 0, 0, 0, 3, 0, 0), +(36853, 71077, 0, 0, 0, 8000, 0, 0, 0, 15000, 0, 0, 0, 0, 0, 0, 4, 0, 0), +(36853, 69649, 0, 0, 0, 20000, 0, 0, 0, 35000, 0, 0, 0, 0, 0, 0, 4, 0, 0), +(36853, 70107, 0, 0, 0, 8000, 0, 0, 0, 15000, 0, 0, 0, 0, 0, 0, 4, 0, 0), +(36853, 69762, 0, 0, 0, 10000, 0, 0, 0, 15000, 0, 0, 0, 0, 0, 0, 4, 0, 0), +(36853, 69766, 0, 0, 0, 8000, 0, 0, 0, 15000, 0, 0, 0, 0, 0, 0, 6, 0, 0), +(36853, 69846, 0, 0, 0, 15000, 0, 0, 0, 20000, 0, 0, 0, 50.0, 100.0, 0, 15, 0, 0), +(36853, 70117, 0, 0, 0, 30000, 0, 0, 0, 40000, 0, 0, 0, 0, 0, 0, 1, 0, 0), +(36853, 70123, 0, 0, 0, 20000, 0, 0, 0, 35000, 0, 0, 0, 0, 0, 0, 1, 0, 0), +(36853, 70126, 0, 0, 0, 90000, 0, 0, 0, 90000, 0, 0, 0, 0, 0, 0, 4, 0, 0), +(36853, 70157, 0, 0, 0, 6000, 0, 0, 0, 6000, 0, 0, 0, 0, 0, 0, 6, 0, 0), +(36853, 71665, 0, 0, 0, 8000, 0, 0, 0, 15000, 0, 0, 0, 0, 0, 0, 6, 0, 0), +(36853, 69845, 0, 0, 0, 8000, 0, 0, 0, 15000, 0, 0, 0, 0, 0, 0, 4, 0, 0), +(36853, 36980, 0, 0, 0, 90000, 0, 0, 0, 90000, 0, 0, 0, 0, 0, 0, 9, 0, 0), +(36853, 47008, 0, 0, 0, 600000, 0, 0, 0, 600000, 0, 0, 0, 0, 0, 0, 1, 0, 0), +(36853, 72289, 0, 0, 0, 1000, 0, 0, 0, 1000, 0, 0, 0, 0, 0, 0, 12, 0, 1), +(36853, 70128, 0, 0, 0, 8000, 0, 0, 0, 15000, 0, 0, 0, 30.0, 0, 0, 12, 0, 0); + +UPDATE`boss_spell_table` SET `data1` = 2, `data2` = 5, `data3` = 2, `data4` =5 WHERE `entry` = 36853 AND `spellID_N10` = 70126; +UPDATE`boss_spell_table` SET `data1` = 4, `data2` = 4, `data3` = 4, `data4` =4 WHERE `entry` = 36853 AND `spellID_N10` = 69845; + +-- Rimefang +DELETE FROM `boss_spell_table` WHERE `entry` = 37533; +INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_N25`, `spellID_H10`, `spellID_H25`, `timerMin_N10`, `timerMin_N25`, `timerMin_H10`, `timerMin_H25`, `timerMax_N10`, `timerMax_N25`, `timerMax_H10`, `timerMax_H25`, `locData_x`, `locData_y`, `locData_z`, `CastType`, `isVisualEffect`, `isBugged`) VALUES +(37533, 71387, 0, 0, 0, 0, 0, 0, 0, 3600000, 0, 0, 0, 0, 0, 0, 1, 0, 0), +(37533, 71386, 0, 0, 0, 5000, 0, 0, 0, 8000, 0, 0, 0, 0, 0, 0, 4, 0, 0), +(37533, 71376, 0, 0, 0, 4000, 0, 0, 0, 8000, 0, 0, 0, 0, 0, 0, 4, 0, 0); +-- Spinestalker +DELETE FROM `boss_spell_table` WHERE `entry` = 37534; +INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_N25`, `spellID_H10`, `spellID_H25`, `timerMin_N10`, `timerMin_N25`, `timerMin_H10`, `timerMin_H25`, `timerMax_N10`, `timerMax_N25`, `timerMax_H10`, `timerMax_H25`, `locData_x`, `locData_y`, `locData_z`, `CastType`, `isVisualEffect`, `isBugged`) VALUES +(37534, 36922, 0, 0, 0, 8000, 0, 0, 0, 24000, 0, 0, 0, 0, 0, 0, 1, 0, 0), +(37534, 40505, 0, 0, 0, 5000, 0, 0, 0, 8000, 0, 0, 0, 0, 0, 0, 3, 0, 0), +(37534, 71369, 0, 0, 0, 4000, 0, 0, 0, 8000, 0, 0, 0, 0, 0, 0, 4, 0, 0); +-- Ice tomb +DELETE FROM `boss_spell_table` WHERE `entry` = 36980; +INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_N25`, `spellID_H10`, `spellID_H25`, `timerMin_N10`, `timerMin_N25`, `timerMin_H10`, `timerMin_H25`, `timerMax_N10`, `timerMax_N25`, `timerMax_H10`, `timerMax_H25`, `locData_x`, `locData_y`, `locData_z`, `CastType`, `isVisualEffect`, `isBugged`) VALUES +(36980, 70157, 0, 0, 0, 2000, 0, 0, 0, 2000, 0, 0, 0, 0, 0, 0, 6, 0, 0); + +-- Lich king +DELETE FROM `boss_spell_table` WHERE `entry` = 36597; +INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_N25`, `spellID_H10`, `spellID_H25`, `timerMin_N10`, `timerMin_N25`, `timerMin_H10`, `timerMin_H25`, `timerMax_N10`, `timerMax_N25`, `timerMax_H10`, `timerMax_H25`, `locData_x`, `locData_y`, `locData_z`, `CastType`, `isVisualEffect`, `isBugged`) VALUES +(36597, 70541, 0, 0, 0, 6000, 0, 0, 0, 12000, 0, 0, 0, 60, 0, 0, 12, 0, 0), +(36597, 70337, 0, 0, 0, 8000, 0, 0, 0, 15000, 0, 0, 0, 0, 0, 0, 4, 0, 0), +(36597, 74074, 0, 0, 0, 8000, 0, 0, 0, 15000, 0, 0, 0, 0, 0, 0, 4, 0, 0), +(36597, 69409, 0, 0, 0, 10000, 0, 0, 0, 15000, 0, 0, 0, 0, 0, 0, 3, 0, 0), +(36597, 72762, 0, 0, 0, 20000, 0, 0, 0, 25000, 0, 0, 0, 0, 0, 0, 4, 0, 0), +(36597, 68980, 0, 0, 0, 1500, 0, 0, 0, 25000, 0, 0, 0, 0, 0, 0, 4, 0, 0), +(36597, 68981, 0, 0, 0, 60000, 0, 0, 0, 60000, 0, 0, 0, 0, 0, 0, 1, 0, 0), +(36597, 72133, 0, 0, 0, 5000, 0, 0, 0, 10000, 0, 0, 0, 0, 0, 0, 1, 0, 0), +(36597, 72262, 0, 0, 0, 5000, 0, 0, 0, 5000, 0, 0, 0, 0, 0, 0, 1, 0, 0), +(36597, 69201, 0, 0, 0, 5000, 0, 0, 0, 15000, 0, 0, 0, 0, 0, 0, 4, 0, 1), +(36597, 69200, 0, 0, 0, 5000, 0, 0, 0, 15000, 0, 0, 0, 0, 0, 0, 4, 0, 0), +(36597, 69242, 0, 0, 0, 8000, 0, 0, 0, 15000, 0, 0, 0, 0, 0, 0, 1, 0, 0), +(36597, 69103, 0, 0, 0, 3000, 0, 0, 0, 5000, 0, 0, 0, 0, 0, 0, 1, 0, 0), +(36597, 69099, 0, 0, 0, 8000, 0, 0, 0, 15000, 0, 0, 0, 0, 0, 0, 1, 0, 0), +(36597, 69108, 0, 0, 0, 8000, 0, 0, 0, 15000, 0, 0, 0, 0, 0, 0, 1, 0, 0), +(36597, 70358, 0, 0, 0, 40000, 0, 0, 0, 70000, 0, 0, 0, 0, 0, 0, 1, 0, 0), +(36597, 70372, 0, 0, 0, 40000, 0, 0, 0, 70000, 0, 0, 0, 0, 0, 0, 1, 0, 0), +(36597, 72149, 0, 0, 0, 8000, 0, 0, 0, 15000, 0, 0, 0, 0, 0, 0, 1, 0, 0), +(36597, 72143, 0, 0, 0, 8000, 0, 0, 0, 15000, 0, 0, 0, 0, 0, 0, 1, 0, 0), +(36597, 70503, 0, 0, 0, 8000, 0, 0, 0, 15000, 0, 0, 0, 0, 0, 0, 1, 0, 0), +(36597, 69037, 0, 0, 0, 20000, 0, 0, 0, 40000, 0, 0, 0, 0, 0, 0, 1, 0, 0), +(36597, 36609, 0, 0, 0, 20000, 0, 0, 0, 40000, 0, 0, 0, 0, 0, 0, 9, 0, 0), +(36597, 71769, 0, 0, 0, 8000, 0, 0, 0, 15000, 0, 0, 0, 0, 0, 0, 1, 0, 0), +(36597, 70063, 0, 0, 0, 8000, 0, 0, 0, 15000, 0, 0, 0, 0, 0, 0, 1, 0, 1), +(36597, 47008, 0, 0, 0, 900000, 0, 0, 0, 900000, 0, 0, 0, 0, 0, 0, 1, 0, 0), +(36597, 74352, 0, 0, 0, 8000, 0, 0, 0, 15000, 0, 0, 0, 0, 0, 0, 1, 0, 0); +-- summons +INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `timerMin_N10`, `timerMax_N10`, `data1`, `data2`, `data3`, `data4`, `locData_x`, `locData_y`, `locData_z`, `CastType` ) VALUES +(36597, 37799, 60000, 60000, 8, 10, 10, 10, 15, 25, 0, 11), +(36597, 70498, 3600001, 3600001, 12, 12, 15, 15, 15, 25, 0, 1); +-- ice sphere +DELETE FROM `boss_spell_table` WHERE `entry` = 36633; +INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_N25`, `spellID_H10`, `spellID_H25`, `timerMin_N10`, `timerMin_N25`, `timerMin_H10`, `timerMin_H25`, `timerMax_N10`, `timerMax_N25`, `timerMax_H10`, `timerMax_H25`, `locData_x`, `locData_y`, `locData_z`, `CastType`, `isVisualEffect`, `isBugged`) VALUES +(36633, 69099, 0, 0, 0, 2000, 0, 0, 0, 2000, 0, 0, 0, 0, 0, 0, 6, 0, 0), +(36633, 69108, 0, 0, 0, 2000, 0, 0, 0, 2000, 0, 0, 0, 0, 0, 0, 3, 0, 0), +(36633, 69090, 0, 0, 0, 8000, 0, 0, 0, 24000, 0, 0, 0, 0, 0, 0, 1, 0, 0); +-- vile spirit +DELETE FROM `boss_spell_table` WHERE `entry` = 37799; +INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_N25`, `spellID_H10`, `spellID_H25`, `timerMin_N10`, `timerMin_N25`, `timerMin_H10`, `timerMin_H25`, `timerMax_N10`, `timerMax_N25`, `timerMax_H10`, `timerMax_H25`, `locData_x`, `locData_y`, `locData_z`, `CastType`, `isVisualEffect`, `isBugged`) VALUES +(37799, 70503, 0, 0, 0, 10000, 0, 0, 0, 10000, 0, 0, 0, 0, 0, 0, 1, 0, 0); +-- raging spirit +DELETE FROM `boss_spell_table` WHERE `entry` = 36701; +INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_N25`, `spellID_H10`, `spellID_H25`, `timerMin_N10`, `timerMin_N25`, `timerMin_H10`, `timerMin_H25`, `timerMax_N10`, `timerMax_N25`, `timerMax_H10`, `timerMax_H25`, `locData_x`, `locData_y`, `locData_z`, `CastType`, `isVisualEffect`, `isBugged`) VALUES +(36701, 69242, 0, 0, 0, 2000, 0, 0, 0, 5000, 0, 0, 0, 0, 0, 0, 3, 0, 0); diff --git a/addition/722_eye_of_eternity_mangos.sql b/addition/722_eye_of_eternity_mangos.sql new file mode 100644 index 0000000..57f9695 --- /dev/null +++ b/addition/722_eye_of_eternity_mangos.sql @@ -0,0 +1,31 @@ +-- Eye of Eternity from Tassadar && bwsrv +UPDATE `instance_template` SET `ScriptName`='instance_eye_of_eternity' WHERE map=616; +UPDATE `gameobject_template` SET `ScriptName`='go_focusing_iris' WHERE entry IN (193958, 193960); +UPDATE `creature_template` SET `ScriptName`='boss_malygos' WHERE entry=28859; +UPDATE `creature_template` SET `ScriptName`='npc_power_spark' WHERE entry=30084; +UPDATE `creature_template` SET `ScriptName`='npc_nexus_lord' WHERE entry=30245; +UPDATE `creature_template` SET `ScriptName`='npc_scion_of_eternity' WHERE entry=30249; +UPDATE `creature_template` SET `ScriptName`='npc_hover_disk' WHERE entry=30248; +UPDATE `creature_template` SET `PowerType` = 3, `InhabitType` = 3, `ScriptName`='npc_whyrmrest_skytalon' WHERE entry=30161; +UPDATE `creature_template` SET `PowerType` = 3, `InhabitType` = 3 WHERE entry=31752; +UPDATE `creature_template` SET `ScriptName`='npc_alexstrasza' WHERE entry=32295; + +REPLACE INTO `creature_template_addon` VALUES (30161,0,0,0,0,0,0,'57403'); +REPLACE INTO `creature_template_addon` VALUES (31752,0,0,0,0,0,0,'57403'); + +-- spawn Alexstrasza's Gift and Heart of Magic +DELETE FROM `gameobject` WHERE id IN (193905, 193967, 194158, 194159); +INSERT INTO `gameobject` (id, map, spawnMask, phaseMask, position_x, position_y, position_z, orientation, rotation0, rotation1, rotation2, rotation3, spawntimesecs, animprogress, state) VALUES +(193905, 616, 1, 1, 754.544, 1301.71, 220.083, 0, 0, 0, 0, 0, -604800, 100, 1), +(193967, 616, 2, 1, 754.544, 1301.71, 220.083, 0, 0, 0, 0, 0, -604800, 100, 1), +(194158, 616, 1, 1, 759.544, 1306.71, 225.083, 0, 0, 0, 0, 0, -604800, 100, 1), +(194159, 616, 2, 1, 759.544, 1306.71, 225.083, 0, 0, 0, 0, 0, -604800, 100, 1); + +-- vehicle data for Hover Disks and Wyrmrest Skytalons (normal and heroic) +UPDATE `creature_template` SET vehicle_id=220, Spell1=56091, Spell2=56092, Spell3=57090, Spell4=57143, Spell5=57108, Spell6=57092 WHERE entry IN (30161, 31752); + +UPDATE `creature_template` SET vehicle_id=223 WHERE entry IN (30248, 31749); + +DELETE FROM `npc_spellclick_spells` WHERE npc_entry=30248; +INSERT INTO `npc_spellclick_spells` (npc_entry, spell_id, quest_start, quest_start_active, quest_end, cast_flags) VALUES +(30248, 48754, 0, 0, 0, 1); diff --git a/addition/722_eye_of_eternity_scriptdev2.sql b/addition/722_eye_of_eternity_scriptdev2.sql new file mode 100644 index 0000000..96c1d12 --- /dev/null +++ b/addition/722_eye_of_eternity_scriptdev2.sql @@ -0,0 +1,38 @@ +-- Eye of Eternity +-- russian translation from lanc +REPLACE INTO `script_texts` (entry, content_default, content_loc1, content_loc2, content_loc3, content_loc4, content_loc5, content_loc6, content_loc7, content_loc8, sound, type, language, emote, comment) VALUES +(-1616000, 'Lesser beings, intruding here! A shame that your excess courage does not compensate for your stupidity!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, '?????? ????????, ?????????? ????! ??? ???? ??? ??? ?? ?? ??? ????? ??? ???? ?????????!', '14512', '1', '0', '457', NULL), +(-1616001, 'None but the blue dragonflight are welcome here! Perhaps this is the work of Alexstrasza? Well then, she has sent you to your deaths.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, '?????? ????? ????? ???????? ?? ????????? ????????? ?????! ????????, ??? ??????? ??????????? ??? ?, ?????? ??? ??????? ??? ?? ?????? ??????.', '14513', '1', '0', '457', NULL), +(-1616002, 'What could you hope to accomplish, to storm brazenly into my domain? To employ MAGIC? Against ME? ', NULL, NULL, NULL, NULL, NULL, NULL, NULL, '? ??? ?? ???????????, ??????????? ????????? ? ??? ????????? ???????????? ?????? ?????? ?????', '14514', '1', '0', '457', NULL), +(-1616003, 'I am without limits here... the rules of your cherished reality do not apply... In this realm, I am in control...', NULL, NULL, NULL, NULL, NULL, NULL, NULL, '????? ???? ????? ?? ????????????... ?????? ????? ??????????? ?????????? ??? ???????????... ? ???? ???? ? ???????...', '14515', '1', '0', '457', NULL), +(-1616004, 'I give you one chance. Pledge fealty to me, and perhaps I won''t slaughter you for your insolence!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, '? ??? ??? ????. ?????????? ?? ???????? ??? ?, ????? ????, ? ?? ???????? ??? ?? ???? ????????!', '14516', '1', '0', '457', NULL), +(-1616005, 'My patience has reached its limit, I WILL BE RID OF YOU!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, '??? ???????? ???????, ???? ?? ??? ??????????!', '14517', '1', '0', '1', NULL), +(-1616006, 'Watch helplessly as your hopes are swept away...', NULL, NULL, NULL, NULL, NULL, NULL, NULL, '???????? ??????????, ??? ??????? ???? ???????...', '14525', '1', '0', '1', NULL), +(-1616007, 'I AM UNSTOPPABLE!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, '???? ?? ??????????!', '14533', '1', '0', '1', NULL), +(-1616008, 'Your stupidity has finally caught up to you!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, '?? ??? ?? ? ?????????? ?? ????? ?????????!', '14519', '1', '0', '1', NULL), +(-1616009, 'More artifacts to confiscate...', NULL, NULL, NULL, NULL, NULL, NULL, NULL, '??? ???? ???????? ??? ???? ?????????...', '14520', '1', '0', '1', NULL), +(-1616010, ' How very... naive...', NULL, NULL, NULL, NULL, NULL, NULL, NULL, '???! ??! ??! ??!??! ??! ???... ??????...', '14521', '1', '0', '1', NULL), +(-1616012, 'I had hoped to end your lives quickly, but you have proven more...resilient then I had anticipated. Nonetheless, your efforts are in vain, it is you reckless, careless mortals who are to blame for this war! I do what I must...And if it means your...extinction...THEN SO BE IT!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, '? ???????? ?????? ? ???? ?????????, ?? ?? ????????? ?????... ????????, ??? ? ??????. ??? ?? ?????, ??? ???? ??????? ??????, ??? ?? ????????????, ?????????, ????????, ?? ???????? ? ???? ?????! ? ?????? ?? ??? ? ?????? ???????... ???? ??? ????????? ?????? ??????? ???????????... ?? ????? ???!', '14522', '1', '0', '1', NULL), +(-1616013, 'Few have experienced the pain I will now inflict upon you!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, '???????? ?????????? ????, ???????? ???, ??? ? ?????? ??????? ???!', '14523', '1', '0', '1', NULL), +(-1616014, 'YOU WILL NOT SUCCEED WHILE I DRAW BREATH!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, '', '14518', '1', '0', '1', NULL), +(-1616015, 'Malygos takes a deep breath...', NULL, NULL, NULL, NULL, NULL, NULL, NULL, '', '0', '3', '0', '1', NULL), +(-1616016, 'I will teach you IGNORANT children just how little you know of magic...', NULL, NULL, NULL, NULL, NULL, NULL, NULL, '? ?????? ???, ????????????? ?????, ??? ???? ?? ?????? ? ?????...', '14524', '1', '0', '1', NULL), +(-1616017, 'ENOUGH! If you intend to reclaim Azeroth magic, then you shall have it...', NULL, NULL, NULL, NULL, NULL, NULL, NULL, '??????! ??? ?? ?????? ????? ???????, ?? ?? ?? ????????...', '14529', '1', '0', '1', NULL), +(-1616018, 'Now your benefactors make their appearance...But they are too late. The powers contained here are sufficient to destroy the world ten times over! What do you think they will do to you?', NULL, NULL, NULL, NULL, NULL, NULL, NULL, '??? ? ???? ??????????? ?????????... ?? ??????? ??????. ??? ??????????? ????? ?????? ????? ????????? ???? ??? ?????? ??? ??????! ? ??? ?? ??????? ??? ??????? ? ?????', '14530', '1', '0', '1', NULL), +(-1616019, 'SUBMIT!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, '??????????!', '14531', '1', '0', '1', NULL), +(-1616020, 'Your energy will be put to good use!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, '???? ??????? ?????????? ?? ??????????!', '14526', '1', '0', '1', NULL), +(-1616021, 'I AM THE SPELL-WEAVER! My power is INFINITE!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, '? ????????? ?????! ??? ???? ???????????!', '14527', '1', '0', '1', NULL), +(-1616022, 'Your spirit will linger here forever!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, '???? ??? ????? ????? ????????? ?????!', '14528', '1', '0', '1', NULL), +(-1616023, 'Alexstrasza! Another of your brood falls!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, '??????????! ??? ???? ?? ????? ???!', '14534', '1', '0', '1', NULL), +(-1616024, 'Little more then gnats!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, '???? ?????? ??????!', '14535', '1', '0', '1', NULL), +(-1616025, 'Your red allies will share your fate...', NULL, NULL, NULL, NULL, NULL, NULL, NULL, '????? ??????? ????????? ???? ???? ??????...', '14536', '1', '0', '1', NULL), +(-1616026, 'The powers at work here exceed anything you could possibly imagine!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, '??? ?? ?????? ???????????, ????? ??????? ???? ???, ??????????????? ?????!', '14532', '1', '0', '1', NULL), +(-1616027, 'Still standing? Not for long...', NULL, NULL, NULL, NULL, NULL, NULL, NULL, '??? ?? ?????? ?????????...', '14537', '1', '0', '1', NULL), +(-1616028, 'Your cause is lost!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, '?? ?????????!', '14538', '1', '0', '1', NULL), +(-1616029, 'Your fragile mind will be shattered!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, '??? ??????? ????? ????? ????????!', '14539', '1', '0', '1', NULL), +(-1616030, 'UNTHINKABLE! The mortals will destroy... e-everything... my sister... what have you-', NULL, NULL, NULL, NULL, NULL, NULL, NULL, '??????????! ???????? ????????... ???... ?????? ???... ??? ??...', '14540', '1', '0', '1', NULL), +(-1616031, 'I did what I had to, brother. You gave me no alternative.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, '', '14406', '1', '0', '1', NULL), +(-1616032, 'And so ends the Nexus War.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, '????? ??????? ????????.', '14407', '1', '0', '1', NULL), +(-1616033, 'This resolution pains me deeply, but the destruction, the monumental loss of life had to end. Regardless of Malygos recent transgressions, I will mourn his loss. He was once a guardian, a protector. This day, one of the world mightiest has fallen.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, '????? ????? ?????????? ??????? ????, ?? ?????????? ? ???????????? ?????? ?????? ?????? ???? ???? ???????????. ???????? ?? ????????? ??????????? ????????, ? ???? ?????????? ???. ?????-?? ?? ??? ???????????, ??????????. ??????? ??? ???? ?? ?????????? ????? ????!', '14408', '1', '0', '1', NULL), +(-1616034, 'The red dragonflight will take on the burden of mending the devastation wrought on Azeroth. Return home to your people and rest. Tomorrow will bring you new challenges, and you must be ready to face them. Life...goes on.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, '??????? ??????? ??????? ?? ???? ????? ?????????? ??? ???????. ????????????? ????? ? ????? ????? ? ?????????. ??????? ????? ??? ????? ?????????, ? ?? ?????? ???? ?????? ? ???. ?????... ????????????.', '14409', '1', '0', '1', NULL), +(-1616035, 'A Power Spark forms from a nearby rift!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, '', '0', '3', '0', '1', NULL); diff --git a/addition/723_icecrown_down_mangos.sql b/addition/723_icecrown_down_mangos.sql new file mode 100644 index 0000000..9d5d448 --- /dev/null +++ b/addition/723_icecrown_down_mangos.sql @@ -0,0 +1,137 @@ +-- Forge of souls +UPDATE `instance_template` SET `ScriptName`='instance_forge_of_souls' WHERE `map`=632; +UPDATE `creature_template` SET `ScriptName`='boss_bronjahm', `AIName` ='' WHERE `entry`=36497; +UPDATE `creature_template` SET `ScriptName`='mob_soul_fragment', `modelid_1`= 30233, `modelid_3`= 30233, `AIName` ='' WHERE `entry`=36535; +-- UPDATE `creature_template` SET `ScriptName`='mob_soul_storm', `AIName` ='' WHERE `entry`=; + +-- UPDATE `creature_template` SET `ScriptName`='boss_devourer', `AIName` ='' WHERE `entry`=33113; +UPDATE `creature_template` SET `AIName`='', `Scriptname`='boss_devourer_of_souls' where `entry` IN (36502); +UPDATE `creature_template` SET `AIName`='', `Scriptname`='npc_well_of_soul' where `entry` IN (36536); +UPDATE `creature_template` SET `AIName`='', `Scriptname`='npc_unleashed_soul' where `entry` IN (36595); + +UPDATE `creature_template` SET `AIName`='', `Scriptname`='npc_jaina_and_sylvana_FSintro' where `entry` IN (37597, 37596); +UPDATE `creature_template` SET `AIName`='', `Scriptname`='npc_jaina_and_sylvana_FSextro' where `entry` IN (38160, 38161); +UPDATE `creature_template` SET `scale`='0.8', `equipment_id`='1221' where `entry` IN (37597, 38160, 36993, 38188, 37221, 36955); +UPDATE `creature_template` SET `scale`='0.8' where `entry` IN (36658, 37225, 37223, 37226, 37554); +UPDATE `creature_template` SET `npcflag`='0' where `entry` IN (38160, 38161); +UPDATE `creature_template` SET `npcflag`='3' where `entry` IN (37597, 37596, 36993, 36990); +UPDATE `creature_template` SET `scale`='1' where `entry` IN (38161, 37596, 36990); +UPDATE `creature_template` SET `scale`='1' where `entry` IN (37755); +UPDATE `creature_template` SET `equipment_id`='1290' where `entry` IN (36990, 37596, 38161, 38189, 37223, 37554); +-- UPDATE `creature_template` SET `AIName`='', `Scriptname`='npc_soulguard_watchman' where `entry` IN (36478); +-- UPDATE `creature_template` SET `AIName`='', `Scriptname`='npc_soulguard_reaper' where `entry` IN (36499); +-- UPDATE `creature_template` SET `AIName`='', `Scriptname`='npc_soulguard_adept' where `entry` IN (36620); +-- UPDATE `creature_template` SET `AIName`='', `Scriptname`='npc_soulguard_bonecaster' where `entry` IN (36564); +-- UPDATE `creature_template` SET `AIName`='', `Scriptname`='npc_soulguard_animator' where `entry` IN (36516); +-- UPDATE `creature_template` SET `AIName`='', `Scriptname`='npc_soul_horror' where `entry` IN (36522); +-- UPDATE `creature_template` SET `AIName`='', `Scriptname`='npc_npc_spectral_warden' where `entry` IN (36666); + +-- Pit of saron +UPDATE `instance_template` SET `ScriptName`='instance_pit_of_saron' WHERE `map`=658; +UPDATE `creature_template` SET `ScriptName`='boss_ick', `AIName` ='' WHERE `entry`=36476; +UPDATE `creature_template` SET `ScriptName`='boss_krick', `AIName` ='' WHERE `entry`=36477; +UPDATE `creature_template` SET `ScriptName`='mob_exploding_orb', `AIName` ='' WHERE `entry`=36610; +UPDATE `creature_template` SET `ScriptName`='boss_forgemaster_garfrost', `AIName` ='' WHERE `entry`=36494; +UPDATE `creature_template` SET `ScriptName`='boss_scourgelord_tyrannus', `AIName` ='' WHERE `entry`=36658; +UPDATE `creature_template` SET `ScriptName`='boss_rimefang', `AIName` ='' WHERE `entry`=36661; +-- UPDATE `creature_template` SET `ScriptName`='npc_jaina_or_sylvanas_POSintro', `AIName` ='' WHERE `entry` IN (36990,36993); +-- UPDATE `creature_template` SET `ScriptName`='npc_jaina_or_sylvanas_POSoutro', `AIName` ='' WHERE `entry` IN (38189,38188); + +-- Halls of reflection +UPDATE `instance_template` SET `ScriptName` = 'instance_halls_of_reflection' WHERE map=668; +UPDATE `gameobject_template` SET `ScriptName` = '' WHERE `entry` IN (202236,202302); +DELETE FROM `creature` WHERE `map` = 668 AND `id` IN (38177,38176,38173,38172,38567,38175,36940,36941,37069); + +UPDATE `creature_template` SET `ScriptName`='generic_creature' WHERE `entry` IN (38177,38176,38173,38172,38567,38175); + +UPDATE `gameobject_template` SET `faction` = '114' WHERE `entry` IN (197341, 201976); +UPDATE `gameobject_template` SET `faction`='1375' WHERE `entry` IN (197341, 202302, 201385, 201596); + +UPDATE `creature_template` SET `speed_walk`='1.5', `speed_run`='2.0' WHERE `entry` IN (36954, 37226); +UPDATE `creature_template` SET `AIName`='', `Scriptname`='npc_jaina_and_sylvana_HRintro' WHERE `entry` IN (37221, 37223); +UPDATE `creature_template` SET `AIName`='', `Scriptname`='boss_falric' WHERE `entry` IN (38112); +UPDATE `creature_template` SET `AIName`='', `Scriptname`='boss_marwyn' WHERE `entry` IN (38113); +UPDATE `creature_template` SET `AIName`='', `Scriptname`='boss_lich_king_intro_hor' WHERE `entry` IN (36954); +UPDATE `creature_template` SET `AIName`='', `Scriptname`='boss_lich_king_hr' WHERE `entry` IN (37226); +UPDATE `creature_template` SET `AIName`='', `Scriptname`='npc_jaina_and_sylvana_HRextro' WHERE `entry` IN (36955, 37554); +UPDATE `creature_template` SET `AIName`='', `Scriptname`='npc_undead_hor' WHERE `entry` IN (36940,36941,37069); +UPDATE `creature_template` SET `scale`='0.8', `equipment_id`='1221' WHERE `entry` IN (37221, 36955); +UPDATE `creature_template` SET `equipment_id`='1290' WHERE `entry` IN (37223, 37554); +UPDATE `creature_template` SET `equipment_id`='0' WHERE `entry`=36954; +UPDATE `creature_template` SET `scale`='1' WHERE `entry` IN (37223); +UPDATE `creature_template` SET `scale`='0.8' WHERE `entry` IN (36658, 37225, 37223, 37226, 37554); +UPDATE `creature_template` SET `unit_flags`='768', `type_flags`='268435564' WHERE `entry` IN (38177, 38176, 38173, 38172, 38567, 38175); +UPDATE `creature_template` SET `AIName`='', `Scriptname`='npc_frostworn_general' WHERE `entry`=36723; +UPDATE `creature_template` SET `AIName`='', `Scriptname`='npc_spiritual_reflection' WHERE `entry`=37068; + +REPLACE INTO `spell_script_target` (`entry`, `type`, `targetEntry`) VALUES ('70464', '1', '36881'); +REPLACE INTO `spell_script_target` (`entry`, `type`, `targetEntry`) VALUES ('69708', '1', '37226'); +REPLACE INTO `spell_script_target` (`entry`, `type`, `targetEntry`) VALUES ('70194', '1', '37226'); +REPLACE INTO `spell_script_target` (`entry`, `type`, `targetEntry`) VALUES ('69784', '1', '37014'); + +REPLACE INTO `spell_script_target` (`entry`, `type`, `targetEntry`) VALUES ('69784', '1', '37014'); +REPLACE INTO `spell_script_target` (`entry`, `type`, `targetEntry`) VALUES ('70224', '1', '37014'); +REPLACE INTO `spell_script_target` (`entry`, `type`, `targetEntry`) VALUES ('70225', '1', '37014'); + +REPLACE INTO `spell_script_target` (`entry`, `type`, `targetEntry`) VALUES ('69431', '1', '37497'); +REPLACE INTO `spell_script_target` (`entry`, `type`, `targetEntry`) VALUES ('69431', '1', '37496'); +REPLACE INTO `spell_script_target` (`entry`, `type`, `targetEntry`) VALUES ('69431', '1', '37496'); + +REPLACE INTO `spell_script_target` (`entry`, `type`, `targetEntry`) VALUES ('69431', '1', '37588'); +REPLACE INTO `spell_script_target` (`entry`, `type`, `targetEntry`) VALUES ('69431', '1', '37584'); +REPLACE INTO `spell_script_target` (`entry`, `type`, `targetEntry`) VALUES ('69431', '1', '37587'); + +REPLACE INTO `creature_equip_template` VALUES ('38112', '50249', '49777', '0'); #Falric +UPDATE `creature_template` SET `equipment_id`='38112' WHERE `entry` IN (38112); + +REPLACE INTO `creature_equip_template` VALUES ('38113', '50248', '50248', '0'); #Marwyn +UPDATE `creature_template` SET `equipment_id`='38113' WHERE `entry` IN (38113); +REPLACE INTO `creature` (`guid`, `id`, `map`, `spawnMask`, `phaseMask`, `modelid`, `equipment_id`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `spawndist`, `currentwaypoint`, `curhealth`, `curmana`, `DeathState`, `MovementType`) VALUES (135341, 38112, 668, 3, 1, 0, 0, 5276.81, 2037.45, 709.32, 5.58779, 604800, 0, 0, 377468, 0, 0, 0); +REPLACE INTO `creature` (`guid`, `id`, `map`, `spawnMask`, `phaseMask`, `modelid`, `equipment_id`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `spawndist`, `currentwaypoint`, `curhealth`, `curmana`, `DeathState`, `MovementType`) VALUES (135342, 38113, 668, 3, 1, 0, 0, 5341.72, 1975.74, 709.32, 2.40694, 604800, 0, 0, 539240, 0, 0, 0); + +REPLACE INTO `gameobject` (`guid`, `id`, `map`, `spawnMask`, `phaseMask`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecs`, `animprogress`, `state`) VALUES (14531739, 201596, 668, 1, 128, 5275.28, 1694.23, 786.147, 0.981225, 0, 0, 0.471166, 0.882044, 25, 0, 1); + +DELETE from `creature` WHERE `id`=36955; +INSERT INTO `creature` (`guid`, `id`, `map`, `spawnMask`, `phaseMask`, `modelid`, `equipment_id`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `spawndist`, `currentwaypoint`, `curhealth`, `curmana`, `DeathState`, `MovementType`) VALUES (135349, 36955, 668, 3, 128, 0, 0, 5547.27, 2256.95, 733.011, 0.835987, 7200, 0, 0, 252000, 881400, 0, 0); + +DELETE from `creature` WHERE `id`=37554; +INSERT INTO `creature` (`guid`, `id`, `map`, `spawnMask`, `phaseMask`, `modelid`, `equipment_id`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `spawndist`, `currentwaypoint`, `curhealth`, `curmana`, `DeathState`, `MovementType`) VALUES (135345, 37554, 668, 3, 64, 0, 0, 5547.27, 2256.95, 733.011, 0.835987, 7200, 0, 0, 252000, 881400, 0, 0); + +DELETE from `creature` WHERE `id`=37226; +INSERT INTO `creature` (`guid`, `id`, `map`, `spawnMask`, `phaseMask`, `modelid`, `equipment_id`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `spawndist`, `currentwaypoint`, `curhealth`, `curmana`, `DeathState`, `MovementType`) VALUES (135344, 37226, 668, 3, 1, 0, 0, 5551.29, 2261.33, 733.012, 4.0452, 604800, 0, 0, 27890000, 0, 0, 0); + +UPDATE `creature_template` SET `modelid_1` = 11686, `modelid_2` = 11686, `modelid_3` = 11686, `modelid_4` = 11686 WHERE `entry` IN (37014,37704); + +DELETE FROM `gameobject` WHERE `id` IN (201385,201596,202079); + +UPDATE `gameobject_template` SET `faction` = '114',`data0` = '0' WHERE `gameobject_template`.`entry` IN (197341,197342,197343); +UPDATE `gameobject` SET `state` = '1' WHERE `id` IN (197341,197342,197343); + +-- offlike way for icewalls operation +REPLACE INTO `spell_script_target` (`entry`, `type`, `targetEntry`) VALUES ('69768', '1', '37014'); +REPLACE INTO `spell_script_target` (`entry`, `type`, `targetEntry`) VALUES ('69767', '1', '37014'); +DELETE from `creature` WHERE `id`=37014; +UPDATE `creature_template` SET `AIName`='', `Scriptname`='npc_queldelar_hor' where `entry` IN (37158); +DELETE from `creature` WHERE `map` = 668 AND `id` IN (37221,37223,37554,36955); + +-- Captains chest (override) +DELETE FROM `gameobject` WHERE `id` IN (202212,201710,202337,202336); +UPDATE `gameobject_template` SET `flags` = 0 WHERE `gameobject_template`.`entry` IN (202212,201710,202337,202336); +INSERT INTO `gameobject` (`guid`, `id`, `map`, `spawnMask`, `phaseMask`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecs`, `animprogress`, `state`) VALUES +(972561, 202212, 668, 1, 65535, 5241.047, 1663.4364, 784.295166, 0.54, 0, 0, 0, 0, -604800, 100, 1), +(972562, 201710, 668, 1, 65535, 5241.047, 1663.4364, 784.295166, 0.54, 0, 0, 0, 0, -604800, 100, 1), +(972563, 202337, 668, 2, 65535, 5241.047, 1663.4364, 784.295166, 0.54, 0, 0, 0, 0, -604800, 100, 1), +(972564, 202336, 668, 2, 65535, 5241.047, 1663.4364, 784.295166, 0.54, 0, 0, 0, 0, -604800, 100, 1); +-- Dalaran portal (override) +DELETE FROM `gameobject` WHERE `guid` IN (972565); +INSERT INTO `gameobject` (`guid`, `id`, `map`, `spawnMask`, `phaseMask`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecs`, `animprogress`, `state`) VALUES +(972565, 202079, 668, 3, 65535, 5250.959961, 1639.359985, 784.302, 0, 0, 0, 0, 0, -604800, 100, 1); + + +/* Original Icewalls from YTDB +REPLACE INTO `gameobject` (`guid`, `id`, `map`, `spawnMask`, `phaseMask`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecs`, `animprogress`, `state`) VALUES +(3485, 201385, 668, 3, 1, 5540.39, 2086.48, 731.066, 1.00057, 0, 0, 0.479677, 0.877445, 604800, 100, 1), +(3438, 201385, 668, 3, 1, 5494.3, 1978.27, 736.689, 1.0885, 0, 0, 0.517777, 0.855516, 604800, 100, 1), +(3386, 201385, 668, 3, 1, 5434.27, 1881.12, 751.303, 0.923328, 0, 0, 0.445439, 0.895312, 604800, 100, 1), +(3383, 201385, 668, 3, 1, 5323.61, 1755.85, 770.305, 0.784186, 0, 0, 0.382124, 0.924111, 604800, 100, 1); +*/ \ No newline at end of file diff --git a/addition/723_icecrown_down_scriptdev2.sql b/addition/723_icecrown_down_scriptdev2.sql new file mode 100644 index 0000000..5bd6866 --- /dev/null +++ b/addition/723_icecrown_down_scriptdev2.sql @@ -0,0 +1,315 @@ +-- Pit of saron +DELETE FROM `script_texts` WHERE `entry` BETWEEN -1658100 AND -1658000; +INSERT INTO `script_texts` (`entry`,`content_default`,`content_loc1`,`content_loc2`,`content_loc3`,`content_loc4`,`content_loc5`,`content_loc6`,`content_loc7`,`content_loc8`,`sound`,`type`,`language`,`emote`,`comment`) VALUES +-- Garfrost +(-1658001,'Tiny creatures under feet, you bring Garfrost something good to eat!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,16912,1,0,0,'garfrost SAY_AGGRO'), +(-1658002,'Will save for snack. For later.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,16913,1,0,0,'garfrost SAY_SLAY_1'), +(-1658003,'That one maybe not so good to eat now. Stupid Garfrost! BAD! BAD!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,16914,1,0,0,'garfrost SAY_SLAY_2'), +(-1658004,'Garfrost hope giant underpants clean. Save boss great shame. For later.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,16915,1,0,0,'garfrost SAY_DEATH'), +(-1658005,'Axe too weak. Garfrost make better and CRUSH YOU!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,16916,1,0,0,'garfrost SAY_PHASE2'), +(-1658006,'Garfrost tired of puny mortals. Now your bones will freeze!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,16917,1,0,0,'garfrost SAY_PHASE3'), +(-1658007,'Another shall take his place. You waste your time.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,16752,1,0,0,'Tyrannus SAY_TYRANNUS_DEATH'), + +-- Krick +(-1658010,'Our work must not be interrupted! Ick! Take care of them!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,16926,1,0,0,'Krick SAY_AGGRO'), +(-1658011,'Ooh...We could probably use these parts!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,16927,1,0,0,'Krick SAY_SLAY_1'), +(-1658012,'Arms and legs are in short supply...Thanks for your contribution!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,16928,1,0,0,'Krick SAY_SLAY_2'), +(-1658013,'Enough moving around! Hold still while I blow them all up!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,16929,1,0,0,'Krick SAY_BARRAGE_1'), +(-1658014,'Krick begins rapidly conjuring explosive mines!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,3,0,0,'Krick SAY_BARRAGE_2'), +(-1658015,'Quickly! Poison them all while they''re still close!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,16930,1,0,0,'Krick SAY_POISON_NOVA'), +(-1658016,'No! That one! That one! Get that one!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,16931,1,0,0,'Krick SAY_CHASE_1'), +(-1658017,'I''ve changed my mind...go get that one instead!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,16932,1,0,0,'Krick SAY_CHASE_2'), +(-1658018,'What are you attacking him for? The dangerous one is over there,fool!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,16933,1,0,0,'Krick SAY_CHASE_3'), + +-- Ick +(-1658020,'Ick begins to unleash a toxic poison cloud!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,3,0,0,'Ick SAY_ICK_POISON_NOVA'), +(-1658021,'Ick is chasing you!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,3,0,0,'Ick SAY_ICK_CHASE_1'), + +-- Krick OUTRO +(-1658030,'Wait! Stop! Don''t kill me, please! I''ll tell you everything!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,16934,1,0,0,'Krick SAY_KRICK_OUTRO_1'), +(-1658031,'I''m not so naive as to believe your appeal for clemency, but I will listen.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,16611,1,0,0,'Jaina SAY_JAINA_OUTRO_2'), +(-1658032,'Why should the Banshee Queen spare your miserable life?',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,17033,1,0,0,'Sylvanas SAY_SYLVANAS_OUTRO_2'), +(-1658033,'What you seek is in the master''s lair, but you must destroy Tyrannus to gain entry. Within the Halls of Reflection you will find Frostmourne. It... it holds the truth.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,16935,1,0,0,'Krick SAY_KRICK_OUTRO_3'), +(-1658034,'Frostmourne lies unguarded? Impossible!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,16612,1,0,0,'Jaina SAY_JAINA_OUTRO_4'), +(-1658035,'Frostmourne? The Lich King is never without his blade! If you are lying to me...',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,17034,1,0,0,'Sylvanas SAY_SYLVANAS_OUTRO_4'), +(-1658036,'I swear it is true! Please, don''t kill me!!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,16936,1,0,0,'Krick SAY_KRICK_OUTRO_5'), +(-1658037,'Worthless gnat! Death is all that awaits you!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,16753,1,0,0,'Tyrannus SAY_TYRANNUS_OUTRO_7'), +(-1658038,'Urg... no!!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,16937,1,0,0,'Krick SAY_KRICK_OUTRO_8'), +(-1658039,'Do not think that I shall permit you entry into my master''s sanctum so easily. Pursue me if you dare.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,16754,1,0,0,'Tyrannus SAY_TYRANNUS_OUTRO_9'), +(-1658040,'What a cruel end. Come, heroes. We must see if the gnome''s story is true. If we can separate Arthas from Frostmourne, we might have a chance at stopping him.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,16613,1,0,0,'Jaina SAY_JAINA_OUTRO_10'), +(-1658041,'A fitting end for a traitor. Come, we must free the slaves and see what is within the Lich King''s chamber for ourselves.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,17035,1,0,0,'Sylvanas SAY_SYLVANAS_OUTRO_10'), + +-- Tyrannus +(-1658050,'Your pursuit shall be in vain, adventurers, for the Lich King has placed an army of undead at my command! Behold!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,16755,1,0,0,'Tyrannus SAY_AMBUSH_1'), +(-1658051,'Persistent whelps! You will not reach the entrance of my lord''s lair! Soldiers, destroy them!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,16756,1,0,0,'Tyrannus SAY_AMBUSH_2'), +(-1658052,'Rimefang! Trap them within the tunnel! Bury them alive!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,16757,1,0,0,'Tyrannus SAY_GAUNTLET_START'), +(-1658053,'Alas, brave, brave adventurers, your meddling has reached its end. Do you hear the clatter of bone and steel coming up the tunnel behind you? That is the sound of your impending demise.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,16758,1,0,0,'Tyrannus SAY_INTRO_1'), +(-1658054,'Ha, such an amusing gesture from the rabble. When I have finished with you, my master''s blade will feast upon your souls. Die!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,16759,1,0,0,'Tyrannus SAY_INTRO_2'), + +(-1658055,'I shall not fail The Lich King! Come and meet your end!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,16760,1,0,0,'Tyrannus SAY_AGGRO'), +(-1658056,'Such a shameful display... You are better off dead!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,16761,1,0,0,'Tyrannus SAY_SLAY_1'), +(-1658057,'Perhaps you should have stayed in the mountains!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,16762,1,0,0,'Tyrannus SAY_SLAY_2'), +(-1658058,'Impossible! Rimefang... Warn...',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,16763,1,0,0,'Tyrannus SAY_DEATH'), +(-1658059,'Rimefang, destroy this fool!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,16764,1,0,0,'Tyrannus SAY_MARK_RIMEFANG_1'), +(-1658060,'The frostwyrm Rimefang gazes at $N and readies an icy attack!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,3,0,0,'Tyrannus SAY_MARK_RIMEFANG_2'), +(-1658061,'Power... overwhelming!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,16765,1,0,0,'Tyrannus SAY_DARK_MIGHT_1'), +(-1658062,'Scourgelord Tyrannus roars and swells with dark might!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,3,0,0,'Tyrannus SAY_DARK_MIGHT_2'), + +(-1658063,'Brave champions, we owe you our lives, our freedom... Though it be a tiny gesture in the face of this enormous debt, I pledge that from this day forth, all will know of your deeds, and the blazing path of light you cut through the shadow of this dark citadel.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,1,0,0,'Gorkun SAY_GORKUN_OUTRO_1'), +(-1658064,'This day will stand as a testament not only to your valor, but to the fact that no foe, not even the Lich King himself, can stand when Alliance and Horde set aside their differences and ---',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,1,0,0,'Gorkun SAY_GORKUN_OUTRO_2'), +(-1658065,'Heroes, to me!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,16614,1,0,0,'Jaina SAY_JAYNA_OUTRO_3'), +(-1658066,'Take cover behind me! Quickly!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,17037,1,0,0,'Sylvanas SAY_SYLVANAS_OUTRO_3'), +(-1658067,'The Frost Queen is gone. We must keep moving - our objective is near.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,16615,0,0,0,'Jaina SAY_JAYNA_OUTRO_4'), +(-1658068,'I thought he''d never shut up. At last, Sindragosa silenced that long-winded fool. To the Halls of Reflection, champions! Our objective is near... I can sense it.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,17036,0,0,0,'Sylvanas SAY_SYLVANAS_OUTRO_4'), +(-1658069,'I... I could not save them... Damn you, Arthas! DAMN YOU!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,16616,0,0,0,'Jaina SAY_JAYNA_OUTRO_5'); + +-- Forge of souls +DELETE FROM `script_texts` WHERE `entry` BETWEEN -1632099 AND -1632000; +INSERT INTO `script_texts` (`entry`,`content_default`,`content_loc1`,`content_loc2`,`content_loc3`,`content_loc4`,`content_loc5`,`content_loc6`,`content_loc7`,`content_loc8`,`sound`,`type`,`language`,`emote`,`comment`) VALUES +-- Bronjham +(-1632001,'Finally...a captive audience!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'Наконец то! Гости пожаловали!',16595,6,0,0,'Bronjham SAY_AGGRO'), +(-1632002,'Fodder for the engine!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'Скормлю тебя машине!',16596,6,0,0,'Bronjham SAY_SLAY_1'), +(-1632003,'Another soul to strengthen the host!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'Еще одна душа обогатит вместилище!',16597,6,0,0,'Bronjham SAY_SLAY_2'), +(-1632004,'Oooooo...',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'Аааааааааааа...',16598,6,0,0,'Bronjham SAY_DEATH'), +(-1632005,'The vortex of the harvested calls to you!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'Вихрь погубленных душ, взываю к вам!',16599,3,0,0,'Bronjham SAY_SOUL_STORM'), +(-1632006,'I will sever the soul from your body!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'Я вырву душу из твоего тела!',16600,6,0,0,'Bronjham SAY_CORRUPT_SOUL'), + +-- Devourer of Souls +(-1632010,'You dare look upon the host of souls? I SHALL DEVOUR YOU WHOLE!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'Вы осмелились взглянуть на вместилище душ! Я сожру вас заживо!',16884,1,0,0,'Devoureur SAY_FACE_ANGER_AGGRO'), +(-1632011,'You dare look upon the host of souls? I SHALL DEVOUR YOU WHOLE!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,16890,1,0,0,'Devoureur SAY_FACE_DESIRE_AGGRO'), +(-1632012,'Damnation!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'Проклинаю тебя!',16885,1,0,0,'Devoureur SAY_FACE_ANGER_SLAY_1'), +(-1632013,'Damnation!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,16896,1,0,0,'Devoureur SAY_FACE_SORROW_SLAY_1'), +(-1632014,'Damnation!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,16891,1,0,0,'Devoureur SAY_FACE_DESIRE_SLAY_1'), +(-1632015,'Doomed for eternity!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'Обрекаю тебя на вечные муки!',16886,1,0,0,'Devoureur SAY_FACE_ANGER_SLAY_2'), +(-1632016,'Doomed for eternity!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,16897,1,0,0,'Devoureur SAY_FACE_SORROW_SLAY_2'), +(-1632017,'Doomed for eternity!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,16892,1,0,0,'Devoureur SAY_FACE_DESIRE_SLAY_2'), +(-1632018,'The swell of souls will not be abated! You only delay the inevitable!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'Вместилише душ не ослабнет! Вы лишь пытаетесь отсрочить неизбежное.',16887,1,0,0,'Devoureur SAY_FACE_ANGER_DEATH'), +(-1632019,'The swell of souls will not be abated! You only delay the inevitable!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,16898,1,0,0,'Devoureur SAY_FACE_SORROW_DEATH'), +(-1632020,'The swell of souls will not be abated! You only delay the inevitable!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,16893,1,0,0,'Devoureur SAY_FACE_DESIRE_DEATH'), +(-1632021,'Devourer of Souls begins to cast Mirrored Soul!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,3,0,0,'Devoureur EMOTE_MIRRORED_SOUL'), +(-1632022,'Devourer of Souls begins to Unleash Souls!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,3,0,0,'Devoureur EMOTE_UNLEASH_SOUL'), +(-1632023,'SUFFERING! ANGUISH! CHAOS! RISE AND FEED!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'Страдание, мучение, хаос! Восстаньте и пируйте!',16888,1,0,0,'Devoureur SAY_FACE_ANGER_UNLEASH_SOUL'), +(-1632024,'SUFFERING! ANGUISH! CHAOS! RISE AND FEED!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,16899,1,0,0,'Devoureur SAY_FACE_SORROW_UNLEASH_SOUL'), +(-1632025,'SUFFERING! ANGUISH! CHAOS! RISE AND FEED!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,16894,1,0,0,'Devoureur SAY_FACE_DESIRE_UNLEASH_SOUL'), +(-1632026,'Devourer of Souls begins to cast Wailing Souls!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,3,0,0,'Devoureur EMOTE_WAILING_SOUL'), +(-1632027,'Stare into the abyss, and see your end!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'Вглядитесь в бездну, и узрите свою смерть!',16889,1,0,0,'Devoureur SAY_FACE_ANGER_WAILING_SOUL'), +(-1632028,'Stare into the abyss, and see your end!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,16895,1,0,0,'Devoureur SAY_FACE_DESIRE_WAILING_SOUL'), +(-1632029,'Excellent work, champions! We shall set up our base camp in these chambers. My mages will get the Scourge transport device working shortly. Step inside it when you''re ready for your next mission. I will meet you on the other side.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'Вы справились. Мы разобьем лагерь в этих покоях. Вскоре мои маги заставят портал плети работать! Войдите в него, когда будете готовы к следующему заданию. Я присоеденусь к вам чуть позже.',16625,1,0,0,'Jaina SAY_JAINA_OUTRO'), +(-1632030,'Excellent work, champions! We shall set up our base camp in these chambers. My mages will get the Scourge transport device working shortly. Step inside when you are ready for your next mission. I will meet you on the other side.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'Превосходно! Мы разобьем лагерь в этих покоях! Вскоре мои маги заставят портал плети работать, войдите в него когда будете готовы к следующему заданию! Я присоединюсь к вам позже.',17044,1,0,0,'Sylvanas SAY_SYLVANAS_OUTRO'), + +-- Jaina +(-1632040,'Thank the light for seeing you here safely. We have much work to do if we are to defeat the Lich King and put an end to the Scourge.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'Слава свету! Вы целы и невредимы нам предстоит многое сделать, если мы хотим покончить с королем личем и плетью.',16617,0,0,0,'Jaina SAY_INTRO_1'), +(-1632041,'Our allies within the Argent Crusade and the Knights of the Ebon Blade have broken through the front gate of Icecrown and are attempting to establish a foothold within the Citadel.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'Серебряный Авангард и рыцари черного клинка прорвались через главные ворота и пытаются укрепить свои позиции в цитадели!',16618,0,0,0,'Jaina SAY_INTRO_2'), +(-1632042,'Their success hinges upon what we discover in these cursed halls. Although our mission is a wrought with peril, we must persevere!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'Их успех зависит от того что мы найдем этих ужасных залах. Пусть наша миссия опасна, но мы должны выстоять.',16619,0,0,0,'Jaina SAY_INTRO_3'), +(-1632043,'With the attention of the Lich King drawn toward the front gate, we will be working our way through the side in search of information that will enable us to defeat the Scourge - once and for all.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'Пока король лич отвлекся на главные ворота, мы проникнем внутрь другим путем и постараемся узнать как можно покончить с плетью раз и навсегда.',16620,0,0,0,'Jaina SAY_INTRO_4'), +(-1632044,'King Varian''s SI7 agents have gathered information about a private sanctum of the Lich King''s deep within a place called the Halls of Reflection.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'Разведчики SI7 отправленные Варианом сообщают что покои короля находятся в глубине дворца! Это место называется Залами отражений.',16621,0,0,0,'Jaina SAY_INTRO_5'), +(-1632045,'We will carve a path through this wretched place and find a way to enter the Halls of Reflection. I sense powerful magic hidden away within those walls... Magic that could be the key to destroy the Scourge.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'Мы проложим себе путь сквозь это проклятое место и найдем вход в залы отражений. Я чувствую что в них сокрыта могушественная магия, которая поможет нам сокрушить плеть!',16622,0,0,0,'Jaina SAY_INTRO_6'), +(-1632046,'Your first mission is to destroy the machines of death within this malevolent engine of souls, and clear a path for our soldiers.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'Ваша первая задача разрушить машины смерти в этом механизме душ, это откроет путь нашим солдатам.',16623,0,0,0,'Jaina SAY_INTRO_7'), +(-1632047,'Make haste, champions! I will prepare the troops to fall in behind you.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'Спешите герои, я прикажу солдатам следовать за вами!',16624,0,0,0,'Jaina SAY_INTRO_8'), + +-- Sylvanas +(-1632050,'The Argent Crusade and the Knights of the Ebon Blade have assaulted the gates of Icecrown Citadel and are preparing for a massive attack upon the Scourge. Our missition is a bit more subtle, but equally as important.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'Серебряный Авангард и рыцари черного клинка штурмуют ворота цитадели ледяной короны! И готовятся нанести решаюший удар! Мы будем действовать незаметно, но не менее эффективно.',17038,0,0,0,'Sylvanas SAY_INTRO_1'), +(-1632051,'With the attention of the Lich King turned towards the front gate, we''ll be working our way through the side in search of information that will enable us to defeat the Lich King - once and for all.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'Пока Король-Лич отвлекся мы проникнем внутрь другим путем и постараемся понять как можно покончить с ним раз и навсегда.',17039,0,0,0,'Sylvanas SAY_INTRO_2'), +(-1632052,'Our scouts have reported that the Lich King has a private chamber, outside of the Frozen Throne, deep within a place called the Halls of Reflection. That is our target, champions.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'Наши разведчики сообщили что покои короля лича находятся в глубине дворца, недалеко от ледяного трона. Это место называется залами отражений, туда и лежит наш путь.',17040,0,0,0,'Sylvanas SAY_INTRO_3'), +(-1632053,'We will cut a swath of destruction through this cursed place and find a way to enter the Halls of Reflection. If there is anything of value to be found here, it will be found in the Halls.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'Мы проложим себе путь сквозь это проклетое место и найдем и найдем вход в залы отражений! Если в цитадели и есть что то достойное внимания оно ждет нас именно там.',17041,0,0,0,'Sylvanas SAY_INTRO_4'), +(-1632054,'Your first mission is to destroy the machines of death within this wretched engine of souls, and clear a path for our soldiers.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'Вашей первой задачей будет разрушение машин смерти в этом гнусном механизме душ, это откроет путь к нашим солдатам',17042,0,0,0,'Sylvanas SAY_INTRO_5'), +(-1632055,'The Dark Lady watches over you. Make haste!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'Темная госпожа будет наблюдать за вами, спешите!',17043,0,0,0,'Sylvanas SAY_INTRO_6'); + +-- Halls of reflection (from MaxXx2021 aka Mioka) +DELETE FROM `script_texts` WHERE `entry` BETWEEN -1594540 AND -1594430; +INSERT INTO `script_texts` (`entry`,`content_default`,`content_loc8`,`sound`,`type`,`language`,`emote`,`comment`) VALUES +# SCENE - Hall Of Reflection (Intro) - PreUther +(-1594433, 'The chill of this place freezes the marrow of my bones!', 'Как же тут холодно... Кровь стынет в жилах.', 16631,0,0,1, '67234'), +(-1594434, 'I... I don\'t believe it! Frostmourne stands before us, unguarded! Just as the Gnome claimed. Come, heroes!', 'Я... Я не верю своим глазам. Ледяная скорбь перед нами без всякой охраны! Как и говорил гном. Вперед герои!', 17049,0,0,1, '67234'), +(-1594435, 'What is that? Up ahead! Could it be ... ? Heroes at my side!', 'Что это там впереди? Неужели? Скорее герои!', 16632,1,0,1, '67234'), +(-1594436, 'Frostmourne ... The blade that destroyed our kingdom ...', 'Ледяная Скорбь, клинок, разрушивший наше королевство...', 16633,1,0,1, '67234'), +(-1594437, 'Standing this close to the blade that ended my life... The pain... It is renewed.', 'Боль снова захлестывает меня, когда я так близко вижу меч, отнявший у меня жизнь.', 17050,0,0,1, '67234'), +(-1594438, 'Stand back! Touch that blade and your soul will be scarred for all eternity! I must attempt to commune with the spirits locked away within Frostmourne. Give me space, back up please!', 'Отойдите. Тот кто коснется этого клинка обречет себя на вечные муки. Я попытаюсь заговорить с душами заключенными в Ледяной скорби. Расступитесь... Чуть назад! Прошу.', 16634,1,0,1, '67234'), +(-1594439, 'I dare not touch it. Stand back! Stand back! As I attempt to commune with the blade. Perhaps our salvation lies within.', 'Я не смею его коснуться. Назад! Отступите! Я попробую установить связь с мечом. Возможно, спасение находится внутри!', 17051,1,0,1, '67234'), +# SCENE - Hall Of Reflection (Intro) - UtherDialog +(-1594440, 'Jaina! Could it truly be you?', 'Джайна? Неужели это ты?', 16666,0,0,1, '67234'), +(-1594441, 'Careful, girl. I\'ve heard talk of that cursed blade saving us before. Look around you and see what has been born of Frostmourne.', 'Осторожней девочка! Однажды мне уже говорили, что этот проклятый меч может нас спасти. Посмотри вокруг, и ты увидишь, что из этого вышло.', 16659,0,0,1, '67234'), +(-1594442, 'Uther! Dear Uther! I... I\'m so sorry.', 'Утер? Милый Утер! Мне... Мне так жаль.', 16635,0,0,1, '67234'), +(-1594443, 'Uther...Uther the Lightbringer. How...', 'Утер? Утер Светоносный? Как...', 17052,0,0,1, '67234'), +(-1594444, 'Jaina, you haven\'t much time. The Lich King sees what the sword sees. He will be here shortly.', 'Джайна, у вас мало времени. Король - Лич видит все что видит Ледяная Скорбь. Вскоре он будет здесь.', 16667,0,0,1, '67234'), +(-1594445, 'You haven\'t much time. The Lich King sees what the sword sees. He will be here shortly.', 'У вас мало времени. Король - Лич видит все что видит Ледяная Скорбь. Вскоре он будет здесь.', 16660,0,0,1, '67234'), +(-1594446, 'Arthas is here? Maybe I...', 'Артас здесь? Может я...', 16636,0,0,1, '67234'), +(-1594447, 'The Lich King is here? Then my destiny shall be fulfilled today!', 'Король - Лич здесь? Значит моя судьба решится сегодня!', 17053,1,0,1, '67234'), +(-1594448, 'No, girl. Arthas is not here. Arthas is merely a presence within the Lich King\'s mind. A dwindling presence...', 'Нет девочка. Артаса здесь нет. Артас лишь тень, мелькающая в сознании Короля - Лича. Смутная тень.', 16668,0,0,1, '67234'), +(-1594449, 'You cannot defeat the Lich King. Not here. You would be a fool to try. He will kill those who follow you and raise them as powerful servants of the Scourge. But for you, Sylvanas, his reward for you would be worse than the last.', 'Вам не победить Короля - Лича. Покрайней мере не здесь. Глупо и пытаться. Он убьет твоих соратников и воскресит их как воинов плети. Но что до тебя Сильвана, он готовит тебе участь еще страшнее, чем в прошлый раз.', 16661,0,0,1, '67234'), +(-1594450, 'But Uther, if there\'s any hope of reaching Arthas. I... I must try.', 'Но если есть малейшая надежда вернуть Артаса... Я должна попытаться!', 16637,0,0,1, '67234'), +(-1594451, 'There must be a way...', 'Должен быть способ!', 17054,0,0,1, '67234'), +(-1594452, 'Jaina, listen to me. You must destroy the Lich King. You cannot reason with him. He will kill you and your allies and raise you all as powerful soldiers of the Scourge.', 'Джайна послушай меня. Вам нужно уничтожить Короля - Лича. С ним нельзя договориться. Он убьет вас всех и превратит в могущественных воинов Плети.', 16669,0,0,1, '67234'), +(-1594453, 'Perhaps, but know this: there must always be a Lich King. Even if you were to strike down Arthas, another would have to take his place, for without the control of the Lich King, the Scourge would wash over this world like locusts, destroying all that they touched.', 'Возможно... Но знай! Король - Лич должен быть всегда. Даже если вы убьете Артаса кто то обязан будет занять его место. Лишившись правителя Плеть налетит на мир как стая саранчи и уничтожит все на своем пути.', 16662,0,0,1, '67234'), +(-1594454, 'Tell me how, Uther? How do I destroy my prince? My...', 'Но как Утер? Как мне убить моего принца, моего...', 16638,0,0,1, '67234'), +(-1594455, 'Who could bear such a burden?', 'Кому по силам такое бремя?', 17055,0,0,1, '67234'), +(-1594456, 'Snap out of it, girl. You must destroy the Lich King at the place where he merged with Ner\'zhul - atop the spire, at the Frozen Throne. It is the only way.', 'Забудь об этом девочка. Короля - Лича нужно уничтожить на том месте, где он слился с Нерзулом. На самой вершине, у Ледяного Трона!', 16670,0,0,1, '67234'), +(-1594457, 'I do not know, Banshee Queen. I suspect that the piece of Arthas that might be left inside the Lich King is all that holds the Scourge from annihilating Azeroth.', 'Не знаю, Королева Баньши... Если бы не Артас, который все еще является частью Короля - Лича, Плеть давно бы уже уничтожила Азерот.', 16663,0,0,1, '67234'), +(-1594458, 'You\'re right, Uther. Forgive me. I... I don\'t know what got a hold of me. We will deliver this information to the King and the knights that battle the Scourge within Icecrown Citadel.', 'Ты прав Утер, прости меня... Я не знаю что на меня нашло. Мы передадим твои слова Королю и рыцарям, которые сражаются с Плетью в Цитадели Ледяной Короны.', 16639,0,0,1, '67234'), +(-1594459, 'There is... something else that you should know about the Lich King. Control over the Scourge must never be lost. Even if you were to strike down the Lich King, another would have to take his place. For without the control of its master, the Scourge would run rampant across the world - destroying all living things.', 'Тебе нужно знать еще кое что о Короле - Личе. Плеть не должна выйти из под контроля. Даже если вы убьете Короля - Лича, кто-то должен будет занять его место. Без Короля Плеть налетит на мир как стая саранчи и уничтожит все живое.', 16671,0,0,1, '67234'), +(-1594460, 'Alas, the only way to defeat the Lich King is to destroy him at the place he was created.', 'Увы единственый способ одолеть Короля - Лича - это убить его там где он был порожден.', 16664,0,0,1, '67234'), +(-1594461, 'Who could bear such a burden?', 'Кому по силам такое бремя?', 16640,0,0,1, '67234'), +(-1594462, 'The Frozen Throne...', 'Ледяной Трон!', 17056,0,0,1, '67234'), +(-1594463, 'A grand sacrifice by a noble soul...', 'Великая жертва, благородной души.', 16672,0,0,1, '67234'), +(-1594464, 'I do not know, Jaina. I suspect that the piece of Arthas that might be left inside the Lich King is all that holds the Scourge from annihilating Azeroth.', 'Не знаю Джайна... мне кажется если бы не Артас, который все еще является частью Короля - Лича, Плеть давно бы уже уничтожила Азерот.', 16673,0,0,1, '67234'), +(-1594465, 'Then maybe there is still hope...', 'Но может еще есть надежда?', 16641,0,0,1, '67234'), +(-1594466, 'No, Jaina! ARRRRRRGHHHH... He... He is coming. You... You must...', 'Нет Джайна... Эээээ... Он... Он приближается... Вы... Вы должны...', 16674,1,0,1, '67234'), +(-1594467, 'Aye. ARRRRRRGHHHH... He... He is coming. You... You must...', 'Да... Эээээ... Он... Он приближается... Вы... Вы должны...', 16665,1,0,1, '67234'), +(-1594468, 'SILENCE, PALADIN!', 'Замолчи, паладин.', 17225,1,0,0, '67234'), +(-1594469, 'So you wish to commune with the dead? You shall have your wish.', 'Так ты хочешь поговорить с мертвыми? Нет ничего проще!', 17226,1,0,0, '67234'), +(-1594470, 'Falric. Marwyn. Bring their corpses to my chamber when you are through.', 'Фалрик, Марвин, когда закончите, принесите их тела в мои покои.', 17227,0,0,0, '67234'), +(-1594471, 'You won\'t deny me this, Arthas! I must know... I must find out...', 'Ты от меня не отмахнешься Артас. Я должна понять, я должна знать.', 16642,1,0,1, '67234'), +(-1594472, 'You will not escape me that easily, Arthas! I will have my vengeance!', 'Ты так просто от меня не уйдешь Артас. Я отомщу тебе!', 17057,1,0,1, '67234'), +(-1594473, '', 'Глупая девчонка! Тот кого ты ищещь давно убит! Теперь он лишь призрак, слабый отзвук в моем сознании!', 17229,1,0,0, '67234'), +(-1594474, '', 'Я не повторю прежней ошибки, Сильвана. На этот раз тебе не спастись. Ты не оправдала моего доверия и теперь тебя ждет только забвение!', 17228,1,0,0, '67234'), +(-1594475, 'As you wish, my lord.', 'Как пожелаете, мой господин!', 16717,1,0,0, '67234'), +(-1594476, 'As you wish, my lord.', 'Как пожелаете, мой господин!', 16741,1,0,0, '67234'), +# SCENE - Hall Of Reflection (Extro) - PreEscape +(-1594477, 'Your allies have arrived, Jaina, just as you promised. You will all become powerful agents of the Scourge.', 'Твои союзники прибыли, Джайна! Как ты и обещала... Ха-ха-ха-ха... Все вы станете могучими солдатами Плети...', 17212,1,0,0, '67234'), +(-1594478, 'I will not make the same mistake again, Sylvanas. This time there will be no escape. You will all serve me in death!', 'Я не повторю прежней ошибки, Сильвана! На этот раз тебе не спастись. Вы все будите служить мне после смерти...', 17213,1,0,0, '67234'), +(-1594479, 'He is too powerful, we must leave this place at once! My magic will hold him in place for only a short time! Come quickly, heroes!', 'Он слишком силен. Мы должны выбраться от сюда как можно скорее. Моя магия задержит его ненадолго, быстрее герои...', 16644,0,0,1, '67234'), +(-1594480, 'He\'s too powerful! Heroes, quickly, come to me! We must leave this place immediately! I will do what I can do hold him in place while we flee.', 'Он слишком силен. Герои скорее, за мной. Мы должны выбраться отсюда немедленно. Я постараюсь его задержать, пока мы будем убегать.', 17058,0,0,1, '67234'), +# SCENE - Hall Of Reflection (Extro) - Escape +(-1594481, 'Death\'s cold embrace awaits.', 'Смерть распростерла ледяные обьятия!', 17221,1,0,0, '67234'), +(-1594482, 'Rise minions, do not left them us!', 'Восстаньте прислужники, не дайте им сбежать!', 17216,1,0,0, '67234'), +(-1594483, 'Minions sees them. Bring their corpses back to me!', 'Схватите их! Принесите мне их тела!', 17222,1,0,0, '67234'), +(-1594484, 'No...', 'Надежды нет!', 17214,1,0,0, '67234'), +(-1594485, 'All is lost!', 'Смирись с судьбой.', 17215,1,0,0, '67234'), +(-1594486, 'There is no escape!', 'Бежать некуда!', 17217,1,0,0, '67234'), +(-1594487, 'I will destroy this barrier. You must hold the undead back!', 'Я разрушу эту преграду, а вы удерживайте нежить на расстоянии!', 16607,1,0,0, '67234'), +(-1594488, 'No wall can hold the Banshee Queen! Keep the undead at bay, heroes! I will tear this barrier down!', 'Никакие стены не удержат Королеву Баньши. Держите нежить на расстоянии, я сокрушу эту преграду.', 17029,1,0,0, '67234'), +(-1594489, 'Another ice wall! Keep the undead from interrupting my incantation so that I may bring this wall down!', 'Опять ледяная стена... Я разобью ее, только не дайте нежити прервать мои заклинания...', 16608,1,0,0, '67234'), +(-1594490, 'Another barrier? Stand strong, champions! I will bring the wall down!', 'Еще одна преграда. Держитесь герои! Я разрушу эту стену!', 17030,1,0,0, '67234'), +(-1594491, 'Succumb to the chill of the grave.', 'Покоритесь Леденящей смерти!', 17218,1,0,0, '67234'), +(-1594492, 'Another dead end.', 'Вы в ловушке!', 17219,1,0,0, '67234'), +(-1594493, 'How long can you fight it?', 'Как долго вы сможете сопротивляться?', 17220,1,0,0, '67234'), +(-1594494, '', 'Он с нами играет. Я покажу ему что бывает когда лед встречается со огнем!', 16609,0,0,0, '67234'), +(-1594495, 'Your barriers can\'t hold us back much longer, monster. I will shatter them all!', 'Твои преграды больше не задержат нас, чудовище. Я смету их с пути!', 16610,1,0,0, '67234'), +(-1594496, 'I grow tired of these games, Arthas! Your walls can\'t stop me!', 'Я устала от этих игр Артас. Твои стены не остановят меня!', 17031,1,0,0, '67234'), +(-1594497, 'You won\'t impede our escape, fiend. Keep the undead off me while I bring this barrier down!', 'Ты не помешаешь нам уйти, монстр. Сдерживайте нежить, а я уничтожу эту преграду.', 17032,1,0,0, '67234'), +(-1594498, 'There\'s an opening up ahead. GO NOW!', 'Я вижу выход, скорее!', 16645,1,0,0, '67234'), +(-1594499, 'We\'re almost there... Don\'t give up!', 'Мы почти выбрались, не сдавайтесь!', 16646,1,0,0, '67234'), +(-1594500, 'There\'s an opening up ahead. GO NOW!', 'Я вижу выход, скорее!', 17059,1,0,0, '67234'), +(-1594501, 'We\'re almost there! Don\'t give up!', 'Мы почти выбрались, не сдавайтесь!', 17060,1,0,0, '67234'), +(-1594502, 'It... It\'s a dead end. We have no choice but to fight. Steel yourself heroes, for this is our last stand!', 'Больше некуда бежать. Теперь нам придется сражаться. Это наша последняя битва!', 16647,1,0,0, '67234'), +(-1594503, 'BLASTED DEAD END! So this is how it ends. Prepare yourselves, heroes, for today we make our final stand!', 'Проклятый тупик, значит все закончится здесь. Готовьтесь герои, это наша последняя битва.', 17061,1,0,0, '67234'), +(-1594504, 'Nowhere to run! You\'re mine now...', 'Ха-ха-ха... Бежать некуда. Теперь вы мои!', 17223,1,0,0, '67234'), +(-1594505, 'Soldiers of Lordaeron, rise to meet your master\'s call!', 'Солдаты Лордерона, восстаньте по зову Господина!', 16714,1,0,0, '67234'), +(-1594506, 'The master surveyed his kingdom and found it... lacking. His judgement was swift and without mercy. Death to all!', 'Господин осмотрел свое королевство и признал его негодным! Его суд был быстрым и суровым - предать всех смерти!', 16738,1,0,0, '67234'), + +#Falric +(-1594507, 'Men, women and children... None were spared the master\'s wrath. Your death will be no different.', 'Мужчины, Женщины и дети... Никто не избежал гнева господина. Вы разделите их участь!', 16710,1,0,0, '67234'), +(-1594508, 'Marwyn, finish them...', 'Марвин... Добей их...', 16713,1,0,0, '67234'), +(-1594509, 'Sniveling maggot!', 'Сопливый червяк!', 16711,1,0,0, '67234'), +(-1594510, 'The children of Stratholme fought with more ferocity!', 'Стратхольмские детишки - и те сражались отчаяннее!', 16712,1,0,0, '67234'), +(-1594511, 'Despair... so delicious...', 'Как сладостно отчаянье!', 16715,1,0,0, '67234'), +(-1594512, 'Fear... so exhilarating...', 'Как приятен страх!', 16716,1,0,0, '67234'), + +#Marwyn +(-1594513, 'Death is all that you will find here!', 'Вы найдете здесь лишь смерть!', 16734,1,0,0, '67234'), +(-1594514, 'Yes... Run... Run to meet your destiny... Its bitter, cold embrace, awaits you.', 'Эээээ... Да... Бегите навстречу судьбе. Ее жестокие и холодные обьятия ждут вас...', 16737,1,0,0, '67234'), +(-1594515, 'I saw the same look in his eyes when he died. Terenas could hardly believe it. Hahahaha!', 'У Теренаса был такой же взгляд в миг смерти, он никак не мог поверить... Ха-ха-ха-ха-ха...', 16735,1,0,0, '67234'), +(-1594516, 'Choke on your suffering!', 'Захлебнись страданием!', 16736,1,0,0, '67234'), +(-1594517, 'Your flesh shall decay before your very eyes!', 'Вы увидите как разлагается ваша плоть!', 16739,1,0,0, '67234'), +(-1594518, 'Waste away into nothingness!', 'Сгиньте без следа!', 16740,1,0,0, '67234'), + +#FrostWorn General +(-1594519, 'You are not worthy to face the Lich King!', 'Вы недостойны предстать перед Королем - Личом!', 16921,1,0,0, '67234'), +(-1594520, 'Master, I have failed...', 'Господин... Я подвел вас...', 16922,1,0,0, '67234'), + +#add +(-1594531, '', 'Ну теперь-то точно пора сваливать.', 0,0,0,0, '67234'), +(-1594532, '', 'Вот вам сундук за работу.', 0,0,0,0, '67234'), +(-1594533, '', 'И, поскольку корабля с оффа не будет, вот вам портал в Даларан.', 0,0,0,0, '67234'); + +# Gossips +DELETE FROM `gossip_texts` WHERE `entry` BETWEEN -3594540 AND -3594530; +INSERT INTO `gossip_texts` (`entry`, `content_default`, `content_loc8`, `comment`) VALUES +(-3594536, 'Lady Jaina, we are ready for next mission!', 'Джайна, мы готовы!',''), +(-3594537, 'Lady Jaina, Let\'s go!', 'Давай быстрее!', ''), +(-3594538, 'Lady Sylvanas, we are ready for next mission!', 'Сильвана, мы готовы!', ''), +(-3594539, 'Lady Sylvanas, Let\'s go!', 'Поехали!', ''), +(-3594540, 'Let\'s go!', 'Побежали!', ''); + +-- Waipoints to escort event on Halls of reflection + +DELETE FROM script_waypoint WHERE entry=36955; +DELETE FROM script_waypoint WHERE entry=37226; +DELETE FROM script_waypoint WHERE entry=37554; + +INSERT INTO script_waypoint VALUES +-- Jaina + + (36955, 0, 5587.682,2228.586,733.011, 0, 'WP1'), + (36955, 1, 5600.715,2209.058,731.618, 0, 'WP2'), + (36955, 2, 5606.417,2193.029,731.129, 0, 'WP3'), + (36955, 3, 5598.562,2167.806,730.918, 0, 'WP4 - Summon IceWall 01'), + (36955, 4, 5556.436,2099.827,731.827, 0, 'WP5 - Spell Channel'), + (36955, 5, 5543.498,2071.234,731.702, 0, 'WP6'), + (36955, 6, 5528.969,2036.121,731.407, 0, 'WP7'), + (36955, 7, 5512.045,1996.702,735.122, 0, 'WP8'), + (36955, 8, 5504.490,1988.789,735.886, 0, 'WP9 - Spell Channel'), + (36955, 9, 5489.645,1966.389,737.653, 0, 'WP10'), + (36955, 10, 5475.517,1943.176,741.146, 0, 'WP11'), + (36955, 11, 5466.930,1926.049,743.536, 0, 'WP12'), + (36955, 12, 5445.157,1894.955,748.757, 0, 'WP13 - Spell Channel'), + (36955, 13, 5425.907,1869.708,753.237, 0, 'WP14'), + (36955, 14, 5405.118,1833.937,757.486, 0, 'WP15'), + (36955, 15, 5370.324,1799.375,761.007, 0, 'WP16'), + (36955, 16, 5335.422,1766.951,767.635, 0, 'WP17 - Spell Channel'), + (36955, 17, 5311.438,1739.390,774.165, 0, 'WP18'), + (36955, 18, 5283.589,1703.755,784.176, 0, 'WP19'), + (36955, 19, 5260.400,1677.775,784.301, 3000, 'WP20'), + (36955, 20, 5262.439,1680.410,784.294, 0, 'WP21'), + (36955, 21, 5260.400,1677.775,784.301, 0, 'WP22'), + +-- Sylvana + + (37554, 0, 5587.682,2228.586,733.011, 0, 'WP1'), + (37554, 1, 5600.715,2209.058,731.618, 0, 'WP2'), + (37554, 2, 5606.417,2193.029,731.129, 0, 'WP3'), + (37554, 3, 5598.562,2167.806,730.918, 0, 'WP4 - Summon IceWall 01'), + (37554, 4, 5556.436,2099.827,731.827, 0, 'WP5 - Spell Channel'), + (37554, 5, 5543.498,2071.234,731.702, 0, 'WP6'), + (37554, 6, 5528.969,2036.121,731.407, 0, 'WP7'), + (37554, 7, 5512.045,1996.702,735.122, 0, 'WP8'), + (37554, 8, 5504.490,1988.789,735.886, 0, 'WP9 - Spell Channel'), + (37554, 9, 5489.645,1966.389,737.653, 0, 'WP10'), + (37554, 10, 5475.517,1943.176,741.146, 0, 'WP11'), + (37554, 11, 5466.930,1926.049,743.536, 0, 'WP12'), + (37554, 12, 5445.157,1894.955,748.757, 0, 'WP13 - Spell Channel'), + (37554, 13, 5425.907,1869.708,753.237, 0, 'WP14'), + (37554, 14, 5405.118,1833.937,757.486, 0, 'WP15'), + (37554, 15, 5370.324,1799.375,761.007, 0, 'WP16'), + (37554, 16, 5335.422,1766.951,767.635, 0, 'WP17 - Spell Channel'), + (37554, 17, 5311.438,1739.390,774.165, 0, 'WP18'), + (37554, 18, 5283.589,1703.755,784.176, 0, 'WP19'), + (37554, 19, 5260.400,1677.775,784.301, 3000, 'WP20'), + (37554, 20, 5262.439,1680.410,784.294, 0, 'WP21'), + (37554, 21, 5260.400,1677.775,784.301, 0, 'WP22'), + +-- Lich King + + (37226, 0, 5577.187,2236.003,733.012, 0, 'WP1'), + (37226, 1, 5587.682,2228.586,733.011, 0, 'WP2'), + (37226, 2, 5600.715,2209.058,731.618, 0, 'WP3'), + (37226, 3, 5606.417,2193.029,731.129, 0, 'WP4'), + (37226, 4, 5598.562,2167.806,730.918, 0, 'WP5'), + (37226, 5, 5559.218,2106.802,731.229, 0, 'WP6'), + (37226, 6, 5543.498,2071.234,731.702, 0, 'WP7'), + (37226, 7, 5528.969,2036.121,731.407, 0, 'WP8'), + (37226, 8, 5512.045,1996.702,735.122, 0, 'WP9'), + (37226, 9, 5504.490,1988.789,735.886, 0, 'WP10'), + + (37226, 10, 5489.645,1966.389,737.653, 0, 'WP10'), + (37226, 11, 5475.517,1943.176,741.146, 0, 'WP11'), + (37226, 12, 5466.930,1926.049,743.536, 0, 'WP12'), + (37226, 13, 5445.157,1894.955,748.757, 0, 'WP13'), + (37226, 14, 5425.907,1869.708,753.237, 0, 'WP14'), + (37226, 15, 5405.118,1833.937,757.486, 0, 'WP15'), + (37226, 16, 5370.324,1799.375,761.007, 0, 'WP16'), + (37226, 17, 5335.422,1766.951,767.635, 0, 'WP17'), + (37226, 18, 5311.438,1739.390,774.165, 0, 'WP18'), + (37226, 19, 5283.589,1703.755,784.176, 0, 'WP19'), + (37226, 20, 5278.694,1697.912,785.692, 0, 'WP20'), + (37226, 21, 5283.589,1703.755,784.176, 0, 'WP19'); diff --git a/addition/723_icecrown_down_spelltable_scriptdev2.sql b/addition/723_icecrown_down_spelltable_scriptdev2.sql new file mode 100644 index 0000000..d76809a --- /dev/null +++ b/addition/723_icecrown_down_spelltable_scriptdev2.sql @@ -0,0 +1,53 @@ +-- Icecrown down spelltable + +-- Boss Bronjahm +DELETE FROM `boss_spell_table` WHERE `entry` = 36497; +INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_N25`, `timerMin_N10`, `timerMin_N25`, `timerMax_N10`, `timerMax_N25`, `data1`, `data2`, `data3`, `data4`, `locData_x`, `locData_y`, `locData_z`, `varData`, `StageMask_N`, `StageMask_H`, `CastType`, `isVisualEffect`, `isBugged`, `textEntry`, `comment`) VALUES +(36497, 68793, 0, 3000, 0, 8000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, NULL), +(36497, 36535, 0, 30000, 0, 30000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 11, 0, 0, 0, NULL), +(36497, 68839, 0, 15000, 0, 25000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, NULL), +(36497, 68858, 0, 1000, 0, 3000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, NULL), +(36497, 68988, 0, 1000, 0, 1000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, NULL), +(36497, 68950, 0, 8000, 0, 12000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, NULL), +(36497, 68872, 0, 1000, 0, 1000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, NULL), +(36497, 68921, 0, 360001, 0, 360001, 0, 0, 0, 0, 0, 10, 0, 0, 0, 0, 0, 12, 0, 0, 0, NULL), +(36497, 70043, 0, 2000, 0, 6000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, NULL); + +-- Spiritual reflection +DELETE FROM `boss_spell_table` WHERE `entry` = 37068; +INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_N25`, `timerMin_N10`, `timerMin_N25`, `timerMax_N10`, `timerMax_N25`, `data1`, `data2`, `data3`, `data4`, `locData_x`, `locData_y`, `locData_z`, `varData`, `StageMask_N`, `StageMask_H`, `CastType`, `isVisualEffect`, `isBugged`, `textEntry`, `comment`) VALUES +(37068, 69933, 0, 4000, 0, 8000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, NULL), +(37068, 69900, 0, 6000, 0, 15000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, NULL); + +-- HOR undead warriors +DELETE FROM `boss_spell_table` WHERE `entry` = 36941; +INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_N25`, `timerMin_N10`, `timerMin_N25`, `timerMax_N10`, `timerMax_N25`, `data1`, `data2`, `data3`, `data4`, `locData_x`, `locData_y`, `locData_z`, `varData`, `StageMask_N`, `StageMask_H`, `CastType`, `isVisualEffect`, `isBugged`, `textEntry`, `comment`) VALUES +(36941, 70144, 0, 15000, 0, 25000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, NULL), +(36941, 70080, 0, 4000, 0, 8000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, NULL), +(36941, 70145, 0, 10000, 0, 20000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, NULL); + +DELETE FROM `boss_spell_table` WHERE `entry` = 37069; +INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_N25`, `timerMin_N10`, `timerMin_N25`, `timerMax_N10`, `timerMax_N25`, `data1`, `data2`, `data3`, `data4`, `locData_x`, `locData_y`, `locData_z`, `varData`, `StageMask_N`, `StageMask_H`, `CastType`, `isVisualEffect`, `isBugged`, `textEntry`, `comment`) VALUES +(37069, 40505, 0, 5000, 0, 10000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, NULL); + +DELETE FROM `boss_spell_table` WHERE `entry` = 36940; +INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_N25`, `timerMin_N10`, `timerMin_N25`, `timerMax_N10`, `timerMax_N25`, `data1`, `data2`, `data3`, `data4`, `locData_x`, `locData_y`, `locData_z`, `varData`, `StageMask_N`, `StageMask_H`, `CastType`, `isVisualEffect`, `isBugged`, `textEntry`, `comment`) VALUES +(36940, 70150, 0, 5000, 0, 10000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, NULL); + +-- Boss Falric +DELETE FROM `boss_spell_table` WHERE `entry` = 38112; +INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_N25`, `timerMin_N10`, `timerMin_N25`, `timerMax_N10`, `timerMax_N25`, `data1`, `data2`, `data3`, `data4`, `locData_x`, `locData_y`, `locData_z`, `varData`, `StageMask_N`, `StageMask_H`, `CastType`, `isVisualEffect`, `isBugged`, `textEntry`, `comment`) VALUES +(38112, 72395, 0, 1000, 0, 1000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, NULL), +(38112, 72426, 0, 15000, 0, 25000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, -1594511, NULL), +(38112, 72435, 0, 25000, 0, 30000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, -1594512, NULL), +(38112, 72422, 0, 7000, 0, 14000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, NULL), +(38112, 47008, 0, 180000, 0, 180000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, NULL); + +-- Boss Marwin +DELETE FROM `boss_spell_table` WHERE `entry` = 38113; +INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_N25`, `timerMin_N10`, `timerMin_N25`, `timerMax_N10`, `timerMax_N25`, `data1`, `data2`, `data3`, `data4`, `locData_x`, `locData_y`, `locData_z`, `varData`, `StageMask_N`, `StageMask_H`, `CastType`, `isVisualEffect`, `isBugged`, `textEntry`, `comment`) VALUES +(38113, 72360, 0, 8000, 0, 12000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, NULL), +(38113, 72368, 0, 15000, 0, 20000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, NULL), +(38113, 72362, 0, 25000, 0, 30000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, -1594518, NULL), +(38113, 72436, 0, 10000, 0, 16000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, -1594518, NULL), +(38113, 47008, 0, 180000, 0, 180000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, NULL); diff --git a/addition/724_trial_of_crusader_mangos.sql b/addition/724_trial_of_crusader_mangos.sql new file mode 100644 index 0000000..3207fa1 --- /dev/null +++ b/addition/724_trial_of_crusader_mangos.sql @@ -0,0 +1,129 @@ +-- instance +UPDATE `instance_template` SET `ScriptName`='instance_trial_of_the_crusader' WHERE `map`=649; +DELETE FROM `creature` WHERE `map` = 649 AND `id` IN +(34797,34796,34799,35144,34780,34460,34463,34461,34471,34475,34472,34453,34455,34458,34454,34451,34456,34497,34496,34564,34467,35465,34468,35610,34473,34474,34441,34449,34448,34450,34606, 34605, 34607, 34564); + +-- announcers +UPDATE `creature_template` SET `npcflag`=1, `scriptname`='npc_toc_announcer' WHERE `entry`=34816; +DELETE FROM `creature` WHERE `map` = 649 AND `id` = 35766; + +DELETE FROM `npc_text` WHERE `ID` IN (724001, 724002, 724003, 724004, 724005, 724006); +INSERT INTO `npc_text` (`ID`, `Text0_0`) VALUES +(724001, 'Greetings $N! Are you ready to be tested in Crusaders Coliseum?'), +(724002, 'Are you ready for the next stage?'), +(724003, 'Are you ready to fight the champions of the Silver vanguard?'), +(724004, 'Are you ready for the next stage?'), +(724005, 'Are you ready to continue battle with Anub-Arak?'), +(724006, 'Today, the arena is closed. Script dungeon designed specifically for server Pandora http://wow.teletoria.ru (c) /dev/rsa 2010'); + +DELETE FROM `locales_npc_text` WHERE `entry` IN (724001, 724002, 724003, 724004, 724005, 724006); +INSERT INTO `locales_npc_text` (`entry`, `Text0_0_loc1`, `Text0_0_loc2`, `Text0_0_loc3`, `Text0_0_loc4`, `Text0_0_loc5`, `Text0_0_loc6`, `Text0_0_loc7`, `Text0_0_loc8`) VALUES +(724001, 'Greetings $N! Are you ready to be tested in Crusaders Coliseum?', NULL, NULL, NULL, NULL, NULL, NULL, 'Приветствую, $N! Вы готовы пройти Испытание Крестоносца?'), +(724002, 'Are you ready for the next stage?', NULL, NULL, NULL, NULL, NULL, NULL, 'Вы готовы к следующему этапу?'), +(724003, 'Are you ready to fight the champions of the Silver vanguard?', NULL, NULL, NULL, NULL, NULL, NULL, 'Вы готовы драться с чемпионами Серебряного авангарда?'), +(724004, 'Are you ready for the next stage?', NULL, NULL, NULL, NULL, NULL, NULL, 'Вы готовы к следующему этапу?'), +(724005, 'Are you ready to continue battle with Anub-Arak?', NULL, NULL, NULL, NULL, NULL, NULL, 'Вы готовы продолжить бой с Ануб-Араком?'), +(724006, 'Today, the arena is closed. Script dungeon designed specifically for server Pandora http://wow.teletoria.ru (c) /dev/rsa 2010', NULL, NULL, NULL, NULL, NULL, NULL, 'На сегодня арена закрыта. Скрипт инстанса разработан специально для сервера Пандора http://wow.teletoria.ru (c) /dev/rsa 2010'); + +UPDATE `creature_template` SET `scriptname`='boss_lich_king_toc' WHERE `entry`=35877; +UPDATE `creature_template` SET `minhealth`= 20000, `maxhealth` = 20000, `faction_A`= 1770, `faction_H` = 1770, `scriptname`='npc_fizzlebang_toc' WHERE `entry`=35458; +UPDATE `creature_template` SET `flags_extra`=0 WHERE `entry` IN (22517, 35651); +DELETE FROM `creature` WHERE `map` = 649 AND `id` IN (35651, 22517); + +UPDATE `creature_template` SET `scriptname`='npc_tirion_toc' WHERE `entry`=34996; +UPDATE `creature_template` SET `scriptname`='npc_garrosh_toc' WHERE `entry`=34995; +UPDATE `creature_template` SET `scriptname`='npc_rinn_toc' WHERE `entry`=34990; + +-- Grand crusaders +UPDATE `creature_template` SET `scriptname`='mob_toc_warrior', `AIName` ='' WHERE `entry` IN (34475,34453); +UPDATE `creature_template` SET `scriptname`='mob_toc_mage', `AIName` ='' WHERE `entry` IN (34468,34449); +UPDATE `creature_template` SET `scriptname`='mob_toc_shaman', `AIName` ='' WHERE `entry` IN (34463,34455); +UPDATE `creature_template` SET `scriptname`='mob_toc_enh_shaman', `AIName` ='' WHERE `entry` IN (34470,34444); +UPDATE `creature_template` SET `scriptname`='mob_toc_hunter', `AIName` ='' WHERE `entry` IN (34467,34448); +UPDATE `creature_template` SET `scriptname`='mob_toc_rogue', `AIName` ='' WHERE `entry` IN (34472,34454); +UPDATE `creature_template` SET `scriptname`='mob_toc_priest', `AIName` ='' WHERE `entry` IN (34466,34447); +UPDATE `creature_template` SET `scriptname`='mob_toc_shadow_priest', `AIName` ='' WHERE `entry` IN (34473,34441); +UPDATE `creature_template` SET `scriptname`='mob_toc_dk', `AIName` ='' WHERE `entry` IN (34461,34458); +UPDATE `creature_template` SET `scriptname`='mob_toc_paladin', `AIName` ='' WHERE `entry` IN (34465,34445); +UPDATE `creature_template` SET `scriptname`='mob_toc_retro_paladin', `AIName` ='' WHERE `entry` IN (34471,34456); +UPDATE `creature_template` SET `scriptname`='mob_toc_druid', `AIName` ='' WHERE `entry` IN (34460,34451); +UPDATE `creature_template` SET `scriptname`='mob_toc_boomkin', `AIName` ='' WHERE `entry` IN (34469,34459); +UPDATE `creature_template` SET `scriptname`='mob_toc_warlock' WHERE `entry` IN (34474,34450); + +UPDATE `creature_template` SET `scriptname`='mob_toc_pet_warlock', `AIName` ='' WHERE `entry` IN (35465); +UPDATE `creature_template` SET `scriptname`='mob_toc_pet_hunter', `AIName` ='' WHERE `entry` IN (35610); + +UPDATE `creature_template` SET `lootid`= 0 WHERE `entry` IN +(34460,34463,34461,34471,34475,34472,34453,34455,34458,34454,34451,34456,34467,35465,34468,35610,34473,34474,34441,34449,34448,34450); +UPDATE `creature_template` SET `lootid`= 0 WHERE `entry` IN +(12266,12209,12212,12281,12190,12284,12269,12272,12229,12187,12091,12088,12169,12103,12106,12112,12166,12163,12175,12183,12303,12300); +UPDATE `creature_template` SET `lootid`= 0 WHERE `entry` IN +(12267,12210,12213,12282,12191,12285,12270,12273,12230,12188,12092,12089,12170,12104,12107,12113,12167,12164,12181,12184,12304,12301); +UPDATE `creature_template` SET `lootid`= 0 WHERE `entry` IN +(12268,12211,12214,12283,12192,12286,12271,12274,12231,12189,12093,12090,12171,12105,12108,12114,12168,12165,12182,12185,12305,12302); + +-- N10 +DELETE FROM `creature_loot_template` WHERE `entry` IN +(34460,34463,34461,34471,34475,34472,34453,34455,34458,34454,34451,34456,34467,35465,34468,35610,34473,34474,34441,34449,34448,34450); +-- H10 +DELETE FROM `creature_loot_template` WHERE `entry` IN +(12266,12209,12212,12281,12190,12284,12269,12272,12229,12187,12091,12088,12169,12103,12106,12112,12166,12163,12175,12183,12303,12300); +-- N25 +DELETE FROM `creature_loot_template` WHERE `entry` IN +(12267,12210,12213,12282,12191,12285,12270,12273,12230,12188,12092,12089,12170,12104,12107,12113,12167,12164,12181,12184,12304,12301); +-- H25 +DELETE FROM `creature_loot_template` WHERE `entry` IN +(12268,12211,12214,12283,12192,12286,12271,12274,12231,12189,12093,12090,12171,12105,12108,12114,12168,12165,12182,12185,12305,12302); + +-- Nortrend beasts +DELETE FROM `creature_ai_scripts` WHERE `creature_id` IN (34796, 34799, 35144, 34797); +UPDATE `creature_template` SET `scriptname`='boss_gormok', `AIName` ='' WHERE `entry`=34796; +UPDATE `creature_template` SET `scriptname`='mob_snobold_vassal', `AIName` ='' WHERE `entry`=34800; + +UPDATE `creature_template` SET `scriptname`='boss_dreadscale', `AIName` ='' WHERE `entry`=34799; +UPDATE `creature_template` SET `scriptname`='boss_acidmaw', `AIName` ='' WHERE `entry`=35144; +UPDATE `creature_template` SET `scriptname`='mob_slime_pool', `minlevel` = 80, `maxlevel` = 80, `minhealth`= 30000, `maxhealth` = 30000,`AIName` ='', `faction_A`= 14, `faction_H` = 14, `modelid_1` = 11686, `modelid_3` = 11686 WHERE `entry` = 35176; + +UPDATE `creature_template` SET `scriptname`='boss_icehowl', `AIName` ='' WHERE `entry`=34797; + +UPDATE `creature_template` SET `lootid`= 0 WHERE `entry` IN (34796,34799,35144); +DELETE FROM `creature_loot_template` WHERE `entry` IN (34796,34799,35144); + +-- Jaraxxus +UPDATE `creature_template` SET `scriptname`='boss_jaraxxus', `AIName` ='' WHERE `entry`= 34780; +DELETE FROM `creature_ai_scripts` WHERE `creature_id` IN (34780, 34784, 34813, 34815, 34825, 34826); +UPDATE `creature_template` SET `scriptname`='mob_legion_flame', `minlevel` = 82, `maxlevel` = 82, `modelid_1` = 11686, `modelid_2` = 11686, `modelid_3` = 11686, `modelid_4` = 11686, `AIName` ='', `faction_A`= 14, `faction_H` = 14 WHERE `entry` = 34784; +UPDATE `creature_template` SET `scriptname`='mob_infernal_volcano', `AIName` ='' WHERE `entry` = 34813; +UPDATE `creature_template` SET `scriptname`='mob_fel_infernal', `AIName` ='' WHERE `entry` = 34815; +UPDATE `creature_template` SET `scriptname`='mob_nether_portal', `AIName` ='' WHERE `entry` = 34825; +UPDATE `creature_template` SET `scriptname`='mob_mistress_of_pain', `AIName` ='' WHERE `entry` = 34826; + +-- Valkiries +UPDATE `creature_template` SET `scriptname` = 'boss_fjola', `AIName` ='' WHERE `entry`=34497; +UPDATE `creature_template` SET `scriptname` = 'boss_eydis', `AIName` ='' WHERE `entry`=34496; +DELETE FROM `creature_ai_scripts` WHERE `creature_id` IN (34497, 34496, 34568, 34567); +UPDATE `creature_template` SET `npcflag`=1, `scriptname`='mob_light_essence', `AIName` ='' WHERE entry = 34568; +UPDATE `creature_template` SET `npcflag`=1, `scriptname`='mob_dark_essence', `AIName` ='' WHERE entry = 34567; +UPDATE `creature_template` SET `faction_A` = 14, `minlevel` = 82, `maxlevel` = 82,`faction_H` = 14, `AIName` ='', `scriptname`='mob_unleashed_dark' WHERE entry = 34628; +UPDATE `creature_template` SET `faction_A` = 14, `minlevel` = 82, `maxlevel` = 82,`faction_H` = 14, `AIName` ='', `scriptname`='mob_unleashed_light' WHERE entry = 34630; +-- Twin pact by Wowka321 +DELETE FROM `spell_script_target` WHERE `entry` IN (65875,67303,67304,67305,65876,67306,67307,67308); +INSERT INTO `spell_script_target` (`entry`, `type`, `targetEntry`) VALUES +('65875', '1', '34497'), +('67303', '1', '34497'), +('67304', '1', '34497'), +('67305', '1', '34497'), +('65876', '1', '34496'), +('67306', '1', '34496'), +('67307', '1', '34496'), +('67308', '1', '34496'); + +-- Anub'arak +UPDATE `creature_template` SET `scriptname`='boss_anubarak_trial', `unit_flags` = 0, `AIName` ='' WHERE `entry`=34564; + +DELETE FROM `creature_ai_scripts` WHERE `creature_id` IN (34606, 34605, 34607, 34564, 34660); +UPDATE `creature_template` SET `modelid_1` = 25144, `modelid_2` = 0, `modelid_3` = 25144, `modelid_4` = 0, `faction_A` = 14, `faction_H` = 14, `AIName` = '', `ScriptName` = 'mob_frost_sphere' WHERE `entry` = 34606; +UPDATE `creature_template` SET `scriptname`='mob_swarm_scarab', `AIName` ='' WHERE `entry`=34605; +UPDATE `creature_template` SET `scriptname`='mob_nerubian_borrower', `AIName` ='' WHERE `entry`=34607; +UPDATE `creature_template` SET `scriptname`='mob_anubarak_spike', `faction_A` = 14, `minlevel` = 80, `maxlevel` = 80,`faction_H` = 14, `AIName` ='' WHERE `entry`=34660; + diff --git a/addition/724_trial_of_crusader_scriptdev2.sql b/addition/724_trial_of_crusader_scriptdev2.sql new file mode 100644 index 0000000..3665ac1 --- /dev/null +++ b/addition/724_trial_of_crusader_scriptdev2.sql @@ -0,0 +1,83 @@ +-- TOC original texts/sounds (thanks to griffonheart) +-- english translation by Cristy +-- reworked by rsa + +DELETE FROM `script_texts` WHERE `entry` BETWEEN -1713799 AND -1713499; +INSERT INTO `script_texts` +(`comment`,`sound`, `entry`,`content_loc8`,`type`,`language`,`emote`,`content_default`) VALUES +('34996','16036','-1713500','Добро пожаловать, герои! Вы услышали призыв Серебряного Авангарда и без колебаний откликнулись на него! В этом колизее вам предстоит сразиться с опаснейшими противниками. Те из вас, кто смогут пережить испытания, войдут в ряды Серебряного Авангарда, который направится в Цитадель Ледяной Короны.','6','0','0','Welcome champions, you have heard the call of the argent crusade and you have boldly answered. It is here in the crusaders coliseum that you will face your greatest challenges. Those of you who survive the rigors of the coliseum will join the Argent Crusade on its marsh to ice crown citadel.'), +('34996','16038','-1713501','Из самых глубоких и темных пещер Грозовой Гряды был призван Гормок Пронзающий Бивень! В бой, герои!','6','0','0','Hailing from the deepest, darkest carverns of the storm peaks, Gormok the Impaler! Battle on, heroes!'), +('34990','16069','-1713502','Твои чудовища не чета героям Альянса, Тирион!','6','0','0','Your beast will be no match for my champions Tirion!'), +('34995','16026','-1713702','Я видел и более достойных соперников в багровом круге. Ты напрасно тратишь наше время, паладин.','6','0','0','Your beast will be no match for my champions Tirion!'), +('34796','0','-1713601','Мои рабы! Уничтожьте врага!','3','0','0','My slaves! Destroy the enemy!'), +('34996','16039','-1713503','Приготовьтесь к схватке с близнецами-чудовищами, Кислотной Утробой и Жуткой Чешуей!','6','0','0','Steel yourselves, heroes, for the twin terrors Acidmaw and Dreadscale. Enter the arena!'), +('34799','0','-1713504','После гибели товарища %s приходит в ярость!','3','0','0','After the death of sister %s goes berserk!'), +('34996','16040','-1713505','В воздухе повеяло ледяным дыханием следующего бойца: на арену выходит Ледяной Рев! Сражайтесь или погибните, чемпионы!','6','0','0','The air freezes with the introduction of our next combatant, Icehowl! Kill or be killed, champions!'), +('34797','0','-1713506','%s глядит на |3-3($n) и испускает гортанный вой!','3','0','0','%S looks at |3-3($n) and emits a guttural howl!'), +('34797','0','-1713507','%s врезается в стену Колизея и теряет ориентацию!','3','0','0','%S crashes into a wall of the Colosseum and lose focus!'), +('34797','0','-1713508','|3-3(%s) охватывает кипящая ярость, и он растаптывает всех на своем пути!','3','0','0','|3-3(%s) covers boiling rage, and he tramples all in its path!'), +('34996','16041','-1713509','Все чудовища повержены!','6','0','0','All the monsters defeated!'), +('34996','16042','-1713709','Прискорбно. Как яростно они не бились, чудовища Нордскола оказались сильнее. Почтим память павших героев минутой молчания.','6','0','0',''), +('34996','16043','-1713510','Сейчас великий чернокнижник Вилфред Непопамс призовет вашего нового противника. Готовьтесь к бою!','6','0','0','Grand Warlock Wilfred Fizzlebang will summon forth your next challenge. Stand by for his entry!'), +('35458','16268','-1713511','Благодарю, Верховный лорд. А теперь, смельчаки, я приступаю к ритуалу призыва. Когда я закончу, появится грозный демон!','6','0','0','Thank you, Highlord! Now challengers, I will begin the ritual of summoning! When I am done, a fearsome Doomguard will appear!'), +('35458','16269','-1713512','Готовьтесь к забвению!','6','0','0','Prepare for oblivion!'), +('35458','16270','-1713513','АГА! Получилось! Трепещи перед всевластным Вилфредом Непопамсом, мастером призыва! Ты покорен мне, демон!','6','0','0','Ah ha! Behold the absolute power of Wilfred Fizzlebang, master summoner! You are bound to ME, demon!'), +('34780','16143','-1713514','Ничтожный гном! Тебя погубит твоя самоуверенность!','6','0','0','Trifling gnome, your arrogance will be your undoing!'), +('35458','16271','-1713515','Тут я главный!','6','0','0','But I am in charge here-'), +('35458','0','-1713715','Ну вот, опять я облажался...','6','0','0','Agonized Scream!!!'), +('34996','16044','-1713516','Быстрей, герои, расправьтесь с повелителем демонов, прежде чем он откроет портал в свое темное царство!','6','0','0','Quickly, heroes! Destroy the demon lord before it can open a portal to its twisted demonic realm!'), +('34780','16144','-1713517','Перед вами Джараксус, эредарский повелитель Пылающего Легиона!','6','0','0','You face Jaraxxus, eredar lord of the Burning Legion!'), +('34780','0','-1713518','На вас направлено |cFFFF0000Пламя Легиона!|r','3','0','0','You have been sent |cFFFF0000Plamya Legion!|R'), +('34780','0','-1713519','%s создает врата Пустоты!','3','0','0','%S creates the gates of the Void!'), +('34780','0','-1713520','%s создает |cFF00FF00Вулкан инферналов!|r','3','0','0','%S creates |cFF00FF00Vulkan Infernals!|R'), +('34780','16150','-1713521','Явись, сестра! Господин зовет!','6','0','0','Come forth, sister! Your master calls!'), +('34780','0','-1713522','$n $gподвергся:подверглась; |cFF00FFFFИспепелению плоти!|r Исцелите $gего:ее;!','3','0','0','$N $gpodvergsya:been; |cFF00FFFFIspepeleniyu flesh!|R Heal $gego:it;!'), +('34780','16149','-1713523','ПЛОТЬ ОТ КОСТИ!','6','0','0','FLESH FROM BONE!'), +('34780','16151','-1713524','ИНФЕРНАЛ!','6','0','0','INFERNO!'), +('34780','16147','-1713525','Мое место займут другие. Ваш мир обречен...','6','0','0','Another will take my place. Your world is doomed.'), +('34996','16045','-1713526','Гибель Вилфреда Непопамса весьма трагична и должна послужить уроком тем, кто смеет беспечно играть с темной магией. К счастью, вы победили демона, и теперь вас ждет новый противник.','6','0','0','The loss of Wilfred Fizzlebang, while unfortunate, should be a lesson to those that dare dabble in dark magic. Alas, you are victorious and must now face the next challenge.'), +('34995','16021','-1713527','Подлые собаки Альянса! Вы выпустили повелителя демонов на воинов Орды? Ваша смерть будет быстрой!','6','0','0','Treacherous Alliance dogs! You summon a demon lord against warriors of the Horde!? Your deaths will be swift!'), +('34990','16064','-1713528','Альянсу не нужна помощь повелителя демонов, чтобы справиться с ордынским отродьем, пес!','6','0','0','The Alliance doesnt need the help of a demon lord to deal with Horde filth. Come, pig!'), +('34996','16046','-1713529','Тише! Успокойтесь! Никакого заговора здесь нет. Чернокнижник заигрался и поплатился за это. Турнир продолжается!','6','0','0','Everyone, calm down! Compose yourselves! There is no conspiracy at play here. The warlock acted on his own volition - outside of influences from the Alliance. The tournament must go on!'), +('34996','16047','-1713530','В следующем бою вы встретитесь с могучими рыцарями Серебряного Авангарда! Лишь победив их, вы заслужите достойную награду.','6','0','0','The next battle will be against the Argent Crusades most powerful knights! Only by defeating them will you be deemed worthy...'), +('34995','16023','-1713531','Орда требует справедливости! Мы вызываем Альянс на бой! Позволь нам встать на место твоих рыцарей, паладин. Мы покажем этим псам, как оскорблять Орду!','6','0','0','The Horde demands justice! We challenge the Alliance. Allow us to battle in place of your knights, paladin. We will show these dogs what it means to insult the Horde!'), +('34995','16066','-1713731','Они хотели запятнать честь Альянса, они пытались нас оклеветать! Я требую справедливости! Тириорн, позволь моим чемпионам сражаться вместо твоих рыцарей. Мы бросаем вызов Орде!','6','0','0','Our honor has been besmirched! They make wild claims and false accusations against us. I demand justice! Allow my champions to fight in place of your knights, Tirion. We challenge the Horde!'), +('34996','16048','-1713532','Хорошо. Да будет так. Сражайтесь с честью!','','0','0','Very well, I will allow it. Fight with honor!'), +('34995','16022','-1713533','Не щадите никого, герои Орды! ЛОК-ТАР ОГАР!','6','0','0','Show them no mercy, Horde champions! LOK-TAR OGAR!'), +('34995','16065','-1713733','Сражайтесь во славу Альянса, герои! Во имя вашего короля!','6','0','0','Fight for the glory of the Alliance, heroes! Honor your king and your people!'), +('34990','16067','-1713534','СЛАВА АЛЬЯНСУ!','6','0','0','GLORY OF THE ALLIANCE!'), +('34990','16024','-1713734','Это было лишь пробой того, что ждёт нас в будущем. За Орду!','6','0','0','LOK-TAR OGAR!'), +('34996','16049','-1713535','Пустая и горькая победа. После сегодняшних потерь мы стали слабее как целое. Кто еще, кроме Короля-лича, выиграет от подобной глупости? Пали великие воины. И ради чего? Истинная опасность еще впереди - нас ждет битва с Королем-личом.','6','0','0','A shallow and tragic victory. We are weaker as a whole from the losses suffered today. Who but the Lich King could benefit from such foolishness? Great warriors have lost their lives. And for what? The true threat looms ahead - the Lich King awaits us all in death.'), +('34996','16050','-1713536','Лишь сплотившись, вы сможете пройти последнее испытание. Из глубин Ледяной Короны навстречу вам подымаются две могучие воительницы Плети: жуткие валькирии, крылатые вестницы Короля-лича!','6','0','0','Only by working together will you overcome the final challenge. From the depths of Icecrown come two of the Scourges most powerful lieutenants: fearsome valkyr, winged harbingers of the Lich King!'), +('34996','16037','-1713537','Пусть состязания начнутся!','6','0','0','Let the games begin!'), +('34497','0','-1713538','%s начинает читать заклинание|cFFFFFFFFСветлая воронка!|r Переключение к |cFFFFFFFFСветлой|r сущности!','3','0','0','%S begins to read a spell |cFFFFFFFFSvetlaya funnel!|R switch to |cFFFFFFFFSvetloy|r essence!'), +('34497','0','-1713539','%s начинает читать заклинание Договор близнецов!','3','0','0','%S begins to read the spell Treaty twins!'), +('34496','0','-1713540','%s начинает читать заклинание |cFF9932CDТемная воронка!|r Переключение к |cFF9932CDТемной|r сущности!','3','0','0','%S begins to read a spell |cFF9932CDTemnaya funnel!|R switch to |cFF9932CDTemnoy|r essence!'), +('34497','16272','-1713541','Во имя темного повелителя. Во имя Короля-лича. Вы. Умрете.','6','0','0','In the name of our dark master. For the Lich King. You. Will. Die.'), +('34496','16272','-1713741','Во имя светлого повелителя. Во имя Короля-лича. Вы. Умрете.','6','0','0','In the name of our dark master. For the Lich King. You. Will. Die.'), +('34496','16279','-1713542','Да поглотит вас Свет!','6','0','0','Let the light consume you!'), +('34496','16277','-1713543','Пустое место!','6','0','0','Empty place!'), +('34497','16276','-1713544','Тебя оценили и признали ничтожеством.','6','0','0','You appreciated and acknowledged nothing.'), +('34497','16274','-1713545','ХАОС!','3','0','0','CHAOS!'), +('34496','16278','-1713546','Да поглотит вас Тьма!','6','0','0','Let the dark consume you!'), +('34496','16275','-1713547','Плеть не остановить...','6','0','0','The Scourge cannot be stopped...'), +('34990','16068','-1713548','Против Альянса не выстоять даже самым сильным прислужникам Короля-лича! Все славьте наших героев!','6','0','0','Against the Alliance can not stand even the most powerful henchmen of the Lich King! All glorify our heroes!'), +('34995','16025','-1713748','Ты все еще сомневаешься в могуществе Орды, паладин? Мы примем любой вызов!','6','0','0','Against the Horde does not withstand even the most powerful henchmen of the Lich King! All glorify our heroes!'), +('34996','16051','-1713549','Король-лич понес тяжелую потерю! Вы проявили себя как бесстрашные герои Серебряного Авангарда! Мы вместе нанесем удар по Цитадели Ледяной Короны и разнесем в клочья остатки Плети! Нет такого испытания, которое мы бы не могли пройти сообща!','6','0','0','A mighty blow has been dealt to the Lich King! You have proven yourselves able bodied champions of the Argent Crusade. Together we will strike at Icecrown Citadel and destroy what remains of the Scourge! There is no challenge that we cannot face united!'), +('16980','16321','-1713550','Будет тебе такое испытание, Фордринг.','6','0','0','You will have your challenge, Fordring.'), +('34996','16052','-1713551','Артас! Нас гораздо больше! Сложи Ледяную Скорбь, и я подарю тебе заслуженную смерть.','6','0','0','Arthas! You are hopelessly outnumbered! Lay down Frostmourne and I will grant you a just death.'), +('35877','16322','-1713552','Нерубианцы воздвигли целую империю под льдами Нордскола. Империю, на которой вы так бездумно построили свои дома. МОЮ ИМПЕРИЮ.','6','0','0','The Nerubians built an empire beneath the frozen wastes of Northrend. An empire that you so foolishly built your structures upon. MY EMPIRE.'), +('16980','16323','-1713553','Души твоих павших чемпионов будут принадлежать мне, Фордринг.','6','0','0','The souls of your fallen champions will be mine, Fordring.'), +('34564','16235','-1713554','А вот и гости заявились, как и обещал господин.','6','0','0','Ahhh... Our guests arrived, just as the master promised.'), +('34564','16234','-1713555','Это место станет вашей могилой!','3','0','0','This place will serve as your tomb!'), +('34564','16240','-1713556','Ауум на-л ак-к-к-к, ишшш. Вставайте, слуги мои. Время пожирать...','6','0','0','Auum na-l ak-k-k-k, isshhh. Rise, minions. Devour...'), +('34564','0','-1713557','%s зарывается в землю!','3','0','0','%S buries itself in the earth!'), +('34660','0','-1713558','Шипы %s преследуют $n!','3','0','0','%s spikes pursuing $n!'), +('34564','0','-1713559','%s вылезает на поверхность!','3','0','0','%S getting out of the ground!'), +('34564','16241','-1713560','Стая поглотит вас!','6','0','0','The swarm shall overtake you!'), +('34564','0','-1713561','%s выпускает рой жуков-трупоедов, чтобы восстановить здоровье!','3','0','0','%S produces a swarm of beetles Peon to restore your health!'), +('34564','16236','-1713562','Ф-лаккх шир!','6','0','0','F-lakkh shir!'), +('34564','16237','-1713563','Еще одна душа накормит хозяина.','6','0','0','Another soul to sate the host.'), +('34564','16238','-1713564','Я подвел тебя, господин...','6','0','0','I have failed you, master...'), +('36095','0','-1713565','Чемпионы, вы прошли испытание великого крестоносца! Знайте, что только самые сильные искатели приключений могли рассчитывать завершить это испытание.','6','0','0','Champions, you are alive! Not only have you defeated every challenge of the Trial of the Crusader, but thwarted Arthas directly! Your skill and cunning will prove to be a powerful weapon against the Scourge. Well done! Allow one of my mages to transport you back to the surface!'), +('36095','0','-1713566','Позвольте вручить вам эти сундуки в качестве заслуженной награды, и пусть его содержимое послужит вам верой и правдой в походе против Артаса в самом центре Цитадели Ледяной Короны!','6','0','0','Let me hand you the chests as a reward, and let its contents will serve you faithfully in the campaign against Arthas in the heart of the Icecrown Citadel!'); diff --git a/addition/724_trial_of_crusader_spelltable_scriptdev2.sql b/addition/724_trial_of_crusader_spelltable_scriptdev2.sql new file mode 100644 index 0000000..28f8cb7 --- /dev/null +++ b/addition/724_trial_of_crusader_spelltable_scriptdev2.sql @@ -0,0 +1,453 @@ +-- Trial of the crusader spelltable +DELETE FROM `boss_spell_table` WHERE `entry` IN +(34496,34497,34564,34605,34607,34780,34784,34796,34797,34799, 34800, 34813, 34815, 34826, 35144, 35176, 34606, 34660); + +-- Eydis Darkbane +INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_N25`, `spellID_H10`, `spellID_H25`, `timerMin_N10`, `timerMin_N25`, `timerMin_H10`, `timerMin_H25`, `timerMax_N10`, `timerMax_N25`, `timerMax_H10`, `timerMax_H25`, `data1`, `data2`, `data3`, `data4`, `locData_x`, `locData_y`, `locData_z`, `varData`, `StageMask_N`, `StageMask_H`, `CastType`, `isVisualEffect`, `isBugged`, `textEntry`, `comment`) VALUES +(34496, 64238, 0, 0, 0, 600000, 0, 0, 0, 600000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, NULL), +(34496, 65768, 0, 0, 0, 30000, 0, 0, 0, 30000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, NULL), +(34496, 65874, 0, 0, 0, 15000, 0, 0, 0, 15000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, NULL), +(34496, 65876, 0, 0, 0, 30000, 0, 0, 0, 45000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, NULL), +(34496, 65879, 0, 0, 0, 30000, 0, 0, 0, 30000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, NULL), +(34496, 65916, 0, 0, 0, 15000, 0, 0, 0, 15000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, NULL), +(34496, 66058, 0, 0, 0, 30000, 0, 0, 0, 45000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, NULL), +(34496, 66069, 0, 0, 0, 8000, 0, 0, 0, 15000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, NULL), +(34496, 67282, 0, 0, 0, 8000, 0, 6000, 0, 12000, 0, 8000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, NULL); +-- summons +INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `timerMin_N10`, `timerMax_N10`, `data1`, `data2`, `data3`, `data4`, `locData_x`, `locData_y`, `locData_z`, `CastType` ) VALUES +(34496, 34628, 45000, 45000, 1, 1, 2, 2, 10, 100, 0, 11); + +-- Fjola Lightbane +INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_N25`, `spellID_H10`, `spellID_H25`, `timerMin_N10`, `timerMin_N25`, `timerMin_H10`, `timerMin_H25`, `timerMax_N10`, `timerMax_N25`, `timerMax_H10`, `timerMax_H25`, `data1`, `data2`, `data3`, `data4`, `locData_x`, `locData_y`, `locData_z`, `varData`, `StageMask_N`, `StageMask_H`, `CastType`, `isVisualEffect`, `isBugged`, `textEntry`, `comment`) VALUES +(34497, 64238, 0, 0, 0, 600000, 0, 0, 0, 600000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, NULL), +(34497, 65766, 67270, 67271, 67272, 30000, 30000, 30000, 30000, 30000, 30000, 30000, 30000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, NULL), +(34497, 65858, 0, 0, 0, 15000, 0, 0, 0, 15000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, NULL), +(34497, 65875, 0, 0, 0, 30000, 0, 0, 0, 45000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, NULL), +(34497, 65879, 0, 0, 0, 30000, 0, 0, 0, 45000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, NULL), +(34497, 65916, 0, 0, 0, 15000, 0, 0, 0, 15000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, NULL), +(34497, 66046, 0, 0, 0, 30000, 0, 0, 0, 45000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, NULL), +(34497, 66075, 0, 0, 0, 8000, 0, 0, 0, 15000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, NULL), +(34497, 67297, 0, 0, 0, 8000, 0, 6000, 0, 0, 12000, 0, 8000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, NULL); +-- summons +INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `timerMin_N10`, `timerMax_N10`, `data1`, `data2`, `data3`, `data4`, `locData_x`, `locData_y`, `locData_z`, `CastType` ) VALUES +(34497, 34630, 45000, 45000, 1, 1, 2, 2, 10, 100, 0, 11); + +-- AnubArak +INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_N25`, `spellID_H10`, `spellID_H25`, `timerMin_N10`, `timerMin_N25`, `timerMin_H10`, `timerMin_H25`, `timerMax_N10`, `timerMax_N25`, `timerMax_H10`, `timerMax_H25`, `data1`, `data2`, `data3`, `data4`, `locData_x`, `locData_y`, `locData_z`, `varData`, `StageMask_N`, `StageMask_H`, `CastType`, `isVisualEffect`, `isBugged`, `textEntry`, `comment`) VALUES +(34564, 26662, 26662, 26662, 26662, 600000, 600000, 600000, 600000, 600000, 600000, 600000, 600000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, NULL), +(34564, 34605, 0, 0, 0, 90000, 0, 0, 0, 90000, 0, 0, 0, 0, 0, 0, 0, 20.0, 100.0, 0, 0, 0, 0, 9, 1, 0, 0, NULL), +(34564, 34660, 0, 0, 0, 20000, 0, 0, 0, 20000, 0, 0, 0, 0, 0, 0, 0, 5.0, 10.0, 0, 0, 0, 0, 9, 1, 0, 0, NULL), +(34564, 34606, 0, 0, 0, 5000, 0, 0, 0, 10000, 0, 0, 0, 0, 0, 0, 0, 10.0, 100.0, 0, 0, 0, 0, 9, 1, 0, 0, NULL), +(34564, 34607, 0, 0, 0, 70000, 0, 0, 0, 90000, 0, 0, 0, 0, 0, 0, 0, 20.0, 100.0, 0, 0, 0, 0, 9, 1, 0, 0, NULL), +(34564, 53421, 53421, 53421, 53421, 45000, 45000, 45000, 45000, 60000, 60000, 60000, 60000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, NULL), +(34564, 66169, 0, 0, 0, 20000, 0, 0, 0, 20000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, NULL), +(34564, 66012, 66012, 66012, 66012, 20000, 20000, 20000, 20000, 30000, 30000, 30000, 30000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, NULL), +(34564, 66013, 67700, 68509, 68510, 20000, 20000, 20000, 20000, 30000, 30000, 30000, 30000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, NULL), +(34564, 66339, 66339, 66339, 66339, 5000, 5000, 5000, 5000, 10000, 10000, 10000, 10000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 1, 0, 0, NULL), +(34564, 67574, 0, 0, 0, 20000, 20000, 20000, 20000, 30000, 30000, 30000, 30000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 1, 0, NULL), +(34564, 66118, 67630, 68646, 68647, 20000, 20000, 20000, 20000, 30000, 30000, 30000, 30000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, NULL), +(34564, 66240, 0, 0, 0, 20000, 20000, 20000, 20000, 30000, 30000, 30000, 30000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, NULL), +(34564, 66125, 0, 0, 0, 10000, 0, 0, 0, 10000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, NULL), +(34564, 67730, 0, 0, 0, 20000, 0, 0, 0, 30000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, NULL); + +-- Anub'arak scarab +INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_N25`, `spellID_H10`, `spellID_H25`, `timerMin_N10`, `timerMin_N25`, `timerMin_H10`, `timerMin_H25`, `timerMax_N10`, `timerMax_N25`, `timerMax_H10`, `timerMax_H25`, `data1`, `data2`, `data3`, `data4`, `locData_x`, `locData_y`, `locData_z`, `varData`, `StageMask_N`, `StageMask_H`, `CastType`, `isVisualEffect`, `isBugged`, `textEntry`, `comment`) VALUES +(34605, 66092, 0, 0, 0, 10000, 0, 0, 0, 20000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, NULL), +(34605, 67861, 0, 0, 0, 5000, 0, 0, 0, 15000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, NULL); + +-- Cold sphere +INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_N25`, `spellID_H10`, `spellID_H25`, `timerMin_N10`, `timerMin_N25`, `timerMin_H10`, `timerMin_H25`, `timerMax_N10`, `timerMax_N25`, `timerMax_H10`, `timerMax_H25`, `data1`, `data2`, `data3`, `data4`, `locData_x`, `locData_y`, `locData_z`, `varData`, `StageMask_N`, `StageMask_H`, `CastType`, `isVisualEffect`, `isBugged`, `textEntry`, `comment`) VALUES +(34606, 66193, 67855, 67856, 67857, 5000, 0, 0, 0, 5000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, NULL); + +-- Anub'arak spike +INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_N25`, `spellID_H10`, `spellID_H25`, `timerMin_N10`, `timerMin_N25`, `timerMin_H10`, `timerMin_H25`, `timerMax_N10`, `timerMax_N25`, `timerMax_H10`, `timerMax_H25`, `data1`, `data2`, `data3`, `data4`, `locData_x`, `locData_y`, `locData_z`, `varData`, `StageMask_N`, `StageMask_H`, `CastType`, `isVisualEffect`, `isBugged`, `textEntry`, `comment`) VALUES +(34660, 67574, 0, 0, 0, 20000, 0, 0, 0, 30000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, NULL), +(34660, 66193, 67855, 67856, 67857, 1000, 0, 0, 0, 1000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, NULL), +(34660, 65920, 65921, 65922, 65923, 1000, 0, 0, 0, 1000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, NULL); + +-- Nerubian Borrower +INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_N25`, `spellID_H10`, `spellID_H25`, `timerMin_N10`, `timerMin_N25`, `timerMin_H10`, `timerMin_H25`, `timerMax_N10`, `timerMax_N25`, `timerMax_H10`, `timerMax_H25`, `data1`, `data2`, `data3`, `data4`, `locData_x`, `locData_y`, `locData_z`, `varData`, `StageMask_N`, `StageMask_H`, `CastType`, `isVisualEffect`, `isBugged`, `textEntry`, `comment`) VALUES +(34607, 66129, 66129, 66129, 66129, 10000, 10000, 10000, 10000, 20000, 20000, 20000, 20000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, NULL), +(34607, 67322, 67322, 67322, 67322, 20000, 20000, 20000, 20000, 30000, 30000, 30000, 30000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, NULL), +(34607, 67847, 67847, 67847, 67847, 5000, 5000, 5000, 5000, 20000, 20000, 20000, 20000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, NULL); + +-- Jaraxxus +INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_N25`, `spellID_H10`, `spellID_H25`, `timerMin_N10`, `timerMin_N25`, `timerMin_H10`, `timerMin_H25`, `timerMax_N10`, `timerMax_N25`, `timerMax_H10`, `timerMax_H25`, `data1`, `data2`, `data3`, `data4`, `locData_x`, `locData_y`, `locData_z`, `varData`, `StageMask_N`, `StageMask_H`, `CastType`, `isVisualEffect`, `isBugged`, `textEntry`, `comment`) VALUES +(34780, 26662, 26662, 26662, 26662, 600000, 600000, 600000, 600000, 600000, 600000, 600000, 600000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, NULL), +(34780, 66197, 68123, 68124, 68125, 30000, 30000, 30000, 30000, 45000, 45000, 45000, 45000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, NULL), +(34780, 66237, 67049, 67050, 67051, 40000, 40000, 40000, 40000, 90000, 90000, 40000, 90000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, NULL), +(34780, 66242, 67060, 67060, 67060, 20000, 20000, 20000, 20000, 30000, 30000, 30000, 30000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, NULL), +(34780, 66264, 66264, 68405, 68405, 60000, 60000, 60000, 60000, 60000, 60000, 60000, 60000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 1, 1, 0, NULL), +(34780, 66528, 66528, 67029, 67029, 15000, 15000, 15000, 15000, 25000, 25000, 25000, 25000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, NULL), +(34780, 66532, 66963, 66964, 66965, 20000, 20000, 20000, 20000, 30000, 30000, 30000, 30000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, NULL), +(34780, 67108, 0, 0, 0, 30000, 0, 0, 0, 30000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, NULL), +(34780, 66255, 0, 0, 0, 30000, 0, 0, 0, 45000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, NULL), +(34780, 34825, 0, 0, 0, 60000, 0, 0, 0, 60000, 0, 0, 0, 0, 0, 0, 0, 20.0, 80.0, 0, 0, 0, 0, 10, 0, 0, 0, NULL), +(34780, 34813, 0, 0, 0, 60000, 0, 0, 0, 60000, 0, 0, 0, 0, 0, 0, 0, 20.0, 60.0, 0, 0, 0, 0, 10, 0, 0, 0, NULL); + +-- NPC Legion flame +INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_N25`, `spellID_H10`, `spellID_H25`, `timerMin_N10`, `timerMin_N25`, `timerMin_H10`, `timerMin_H25`, `timerMax_N10`, `timerMax_N25`, `timerMax_H10`, `timerMax_H25`, `data1`, `data2`, `data3`, `data4`, `locData_x`, `locData_y`, `locData_z`, `varData`, `StageMask_N`, `StageMask_H`, `CastType`, `isVisualEffect`, `isBugged`, `textEntry`, `comment`) VALUES +(34784, 66199, 68127, 68126, 68128, 30000, 30000, 30000, 30000, 45000, 45000, 45000, 45000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, NULL); + +-- Gormok +INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_N25`, `spellID_H10`, `spellID_H25`, `timerMin_N10`, `timerMin_N25`, `timerMin_H10`, `timerMin_H25`, `timerMax_N10`, `timerMax_N25`, `timerMax_H10`, `timerMax_H25`, `data1`, `data2`, `data3`, `data4`, `locData_x`, `locData_y`, `locData_z`, `varData`, `StageMask_N`, `StageMask_H`, `CastType`, `isVisualEffect`, `isBugged`, `textEntry`, `comment`) VALUES +(34796, 34800, 0, 0, 0, 30000, 0, 0, 0, 30000, 0, 0, 0, 0, 0, 0, 0, 20.0, 80.0, 0, 0, 0, 0, 9, 0, 0, 0, NULL), +(34796, 66331, 67477, 67478, 67479, 8000, 0, 0, 0, 15000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, NULL), +(34796, 66636, 0, 0, 0, 15000, 0, 0, 0, 30000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 0, 1, 0, NULL), +(34796, 67648, 0, 0, 0, 15000, 0, 0, 0, 40000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, NULL); + +-- Icehowl +INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_N25`, `spellID_H10`, `spellID_H25`, `timerMin_N10`, `timerMin_N25`, `timerMin_H10`, `timerMin_H25`, `timerMax_N10`, `timerMax_N25`, `timerMax_H10`, `timerMax_H25`, `data1`, `data2`, `data3`, `data4`, `locData_x`, `locData_y`, `locData_z`, `varData`, `StageMask_N`, `StageMask_H`, `CastType`, `isVisualEffect`, `isBugged`, `textEntry`, `comment`) VALUES +(34797, 66683, 67660, 67661, 67662, 30000, 30000, 30000, 30000, 30000, 30000, 30000, 30000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, NULL), +(34797, 66689, 67650, 67651, 67652, 25000, 25000, 25000, 25000, 40000, 40000, 40000, 40000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, NULL), +(34797, 66734, 0, 0, 0, 4000, 4000, 3000, 3000, 4000, 4000, 3000, 3000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, NULL), +(34797, 66770, 67654, 67655, 67656, 15000, 15000, 15000, 15000, 30000, 30000, 30000, 30000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, NULL), +(34797, 66758, 0, 0, 0, 15000, 0, 0, 0, 30000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, NULL), +(34797, 68667, 0, 0, 0, 8000, 0, 0, 0, 8000, 0, 0, 0, 0, 0, 0, 0, 200.0, 0, 0, 0, 0, 0, 12, 0, 1, 0, NULL), +(34797, 66759, 0, 0, 0, 300000, 0, 0, 0, 300000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, NULL), +(34797, 67345, 67663, 67664, 67665, 15000, 15000, 15000, 15000, 30000, 30000, 30000, 30000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, NULL); + +-- Dreadscale +INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_N25`, `spellID_H10`, `spellID_H25`, `timerMin_N10`, `timerMin_N25`, `timerMin_H10`, `timerMin_H25`, `timerMax_N10`, `timerMax_N25`, `timerMax_H10`, `timerMax_H25`, `data1`, `data2`, `data3`, `data4`, `locData_x`, `locData_y`, `locData_z`, `varData`, `StageMask_N`, `StageMask_H`, `CastType`, `isVisualEffect`, `isBugged`, `textEntry`, `comment`) VALUES +(34799, 53421, 0, 0, 0, 40000, 0, 0, 0, 40000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, NULL), +(34799, 66794, 67644, 67645, 67646, 15000, 15000, 15000, 15000, 30000, 30000, 30000, 30000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, NULL), +(34799, 66796, 67632, 67633, 67634, 15000, 15000, 15000, 15000, 30000, 30000, 30000, 30000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, NULL), +(34799, 66821, 66821, 66821, 66821, 15000, 15000, 15000, 15000, 30000, 30000, 30000, 30000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, NULL), +(34799, 66879, 67624, 67625, 67626, 15000, 15000, 15000, 15000, 30000, 30000, 30000, 30000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, NULL), +(34799, 66902, 67627, 67628, 67629, 15000, 15000, 15000, 15000, 30000, 30000, 30000, 30000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, NULL), +(34799, 66883, 67641, 67642, 67643, 15000, 15000, 15000, 15000, 30000, 30000, 30000, 30000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, NULL), +(34799, 35176, 0, 0, 0, 30000, 30000, 45000, 60000, 30000, 30000, 45000, 60000, 0, 0, 0, 0, 1, 5, 0, 0, 0, 0, 11, 0, 0, 0, NULL), +(34799, 68335, 68335, 68335, 68335, 20000, 20000, 20000, 20000, 20000, 20000, 20000, 20000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, NULL); + +-- Snobold vassal +INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_N25`, `spellID_H10`, `spellID_H25`, `timerMin_N10`, `timerMin_N25`, `timerMin_H10`, `timerMin_H25`, `timerMax_N10`, `timerMax_N25`, `timerMax_H10`, `timerMax_H25`, `data1`, `data2`, `data3`, `data4`, `locData_x`, `locData_y`, `locData_z`, `varData`, `StageMask_N`, `StageMask_H`, `CastType`, `isVisualEffect`, `isBugged`, `textEntry`, `comment`) VALUES +(34800, 66313, 0, 0, 0, 10000, 0, 0, 0, 20000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, NULL), +(34800, 66317, 0, 0, 0, 10000, 0, 0, 0, 30000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, NULL), +(34800, 66318, 0, 0, 0, 10000, 0, 0, 0, 30000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0, NULL), +(34800, 66406, 0, 0, 0, 10000, 0, 0, 0, 30000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, NULL), +(34800, 66407, 0, 0, 0, 10000, 0, 0, 0, 30000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, NULL), +(34800, 66408, 0, 0, 0, 10000, 0, 0, 0, 30000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, NULL), +(34800, 66636, 0, 0, 0, 15000, 0, 0, 0, 30000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8, 0, 1, 0, NULL); + +-- Infernal volcano +INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_N25`, `spellID_H10`, `spellID_H25`, `timerMin_N10`, `timerMin_N25`, `timerMin_H10`, `timerMin_H25`, `timerMax_N10`, `timerMax_N25`, `timerMax_H10`, `timerMax_H25`, `data1`, `data2`, `data3`, `data4`, `locData_x`, `locData_y`, `locData_z`, `varData`, `StageMask_N`, `StageMask_H`, `CastType`, `isVisualEffect`, `isBugged`, `textEntry`, `comment`) VALUES +(34813, 66255, 0, 0, 0, 30000, 0, 0, 0, 45000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, NULL), +(34813, 66258, 0, 0, 0, 20000, 0, 0, 0, 30000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, NULL); + +-- Fel infernal +INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_N25`, `spellID_H10`, `spellID_H25`, `timerMin_N10`, `timerMin_N25`, `timerMin_H10`, `timerMin_H25`, `timerMax_N10`, `timerMax_N25`, `timerMax_H10`, `timerMax_H25`, `data1`, `data2`, `data3`, `data4`, `locData_x`, `locData_y`, `locData_z`, `varData`, `StageMask_N`, `StageMask_H`, `CastType`, `isVisualEffect`, `isBugged`, `textEntry`, `comment`) VALUES +(34815, 66494, 66494, 66494, 66494, 20000, 20000, 20000, 20000, 30000, 30000, 30000, 30000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, NULL), +(34815, 67047, 67047, 67047, 67047, 20000, 20000, 20000, 20000, 30000, 30000, 30000, 30000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, NULL); + +-- Mistress of pain +INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_N25`, `spellID_H10`, `spellID_H25`, `timerMin_N10`, `timerMin_N25`, `timerMin_H10`, `timerMin_H25`, `timerMax_N10`, `timerMax_N25`, `timerMax_H10`, `timerMax_H25`, `data1`, `data2`, `data3`, `data4`, `locData_x`, `locData_y`, `locData_z`, `varData`, `StageMask_N`, `StageMask_H`, `CastType`, `isVisualEffect`, `isBugged`, `textEntry`, `comment`) VALUES +(34826, 66316, 66316, 66316, 66316, 20000, 20000, 20000, 20000, 30000, 30000, 30000, 30000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, NULL), +(34826, 67098, 67098, 67098, 67098, 20000, 20000, 20000, 20000, 30000, 30000, 30000, 30000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, NULL); + +-- Acidmaw +INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_N25`, `spellID_H10`, `spellID_H25`, `timerMin_N10`, `timerMin_N25`, `timerMin_H10`, `timerMin_H25`, `timerMax_N10`, `timerMax_N25`, `timerMax_H10`, `timerMax_H25`, `data1`, `data2`, `data3`, `data4`, `locData_x`, `locData_y`, `locData_z`, `varData`, `StageMask_N`, `StageMask_H`, `CastType`, `isVisualEffect`, `isBugged`, `textEntry`, `comment`) VALUES +(35144, 53421, 0, 0, 0, 40000, 0, 0, 0, 40000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, NULL), +(35144, 66794, 67644, 67645, 67646, 15000, 15000, 15000, 15000, 30000, 30000, 30000, 30000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, NULL), +(35144, 66819, 66819, 66819, 66819, 15000, 15000, 15000, 15000, 30000, 30000, 30000, 30000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, NULL), +(35144, 66824, 67612, 67613, 67614, 15000, 15000, 15000, 15000, 30000, 30000, 30000, 30000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, NULL), +(35144, 66880, 67606, 67607, 67608, 15000, 15000, 15000, 15000, 30000, 30000, 30000, 30000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, NULL), +(35144, 66901, 0, 0, 0, 15000, 0, 0, 0, 30000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, NULL), +(35144, 66883, 67641, 67642, 67643, 20000, 20000, 20000, 20000, 30000, 30000, 30000, 30000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 0, NULL), +(35144, 35176, 0, 0, 0, 30000, 30000, 45000, 60000, 30000, 30000, 45000, 60000, 0, 0, 0, 0, 1, 5, 0, 0, 0, 0, 11, 0, 0, 0, NULL), +(35144, 68335, 68335, 68335, 68335, 20000, 20000, 20000, 20000, 20000, 20000, 20000, 20000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, NULL); + +-- Slime pool +INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_N25`, `spellID_H10`, `spellID_H25`, `timerMin_N10`, `timerMin_N25`, `timerMin_H10`, `timerMin_H25`, `timerMax_N10`, `timerMax_N25`, `timerMax_H10`, `timerMax_H25`, `data1`, `data2`, `data3`, `data4`, `locData_x`, `locData_y`, `locData_z`, `varData`, `StageMask_N`, `StageMask_H`, `CastType`, `isVisualEffect`, `isBugged`, `textEntry`, `comment`) VALUES +(35176, 63084, 0, 0, 0, 1000, 0, 0, 0, 1000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, NULL), +(35176, 66882, 0, 0, 0, 500, 0, 0, 0, 500, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, NULL); + +-- Retro Paladins +DELETE FROM `boss_spell_table` WHERE `entry` IN (34471,34456); +INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_H10`, `timerMin_N10`, `timerMax_N10`, `CastType`) VALUES +(34471, 66011, 0, 180000, 180000, 3), +(34471, 66003, 0, 6000, 18000, 3), +(34471, 66010, 0, 0, 3600001, 1), +(34471, 66006, 0, 10000, 10000, 3), +(34471, 66007, 0, 40000, 40000, 3), +(34471, 66009, 0, 300000, 300000, 1), +(34471, 66005, 68018, 8000, 15000, 3), +(34471, 66008, 0, 60000, 60000, 4), +(34471, 66004, 68021, 10000, 15000, 1); +INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_H10`, `timerMin_N10`, `timerMax_N10`, `CastType`) VALUES +(34456, 66011, 0, 180000, 180000, 3), +(34456, 66003, 0, 6000, 18000, 3), +(34456, 66010, 0, 0, 3600001, 1), +(34456, 66006, 0, 10000, 10000, 3), +(34456, 66007, 0, 40000, 40000, 3), +(34456, 66009, 0, 300000, 300000, 1), +(34456, 66005, 68018, 8000, 15000, 3), +(34456, 66008, 0, 60000, 60000, 4), +(34456, 66004, 68021, 10000, 15000, 1); + +-- Pet's +DELETE FROM `boss_spell_table` WHERE `entry` IN (35465,35610); +INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_H10`, `timerMin_N10`, `timerMax_N10`, `CastType`) VALUES +(35465, 67518, 0, 15000, 30000, 3), +(35465, 67519, 0, 15000, 30000, 3); +INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_N25`, `spellID_H10`, `spellID_H25`, `timerMin_N10`, `timerMax_N10`, `CastType`) VALUES +(35610, 67793, 67980, 67981, 67982, 5000, 10000, 3); + +-- Druids +DELETE FROM `boss_spell_table` WHERE `entry` IN (34460,34451); +INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_H10`, `timerMin_N10`, `timerMax_N10`, `CastType`) VALUES +(34460, 66093, 67957, 5000, 15000, 14), +(34460, 66066, 67965, 10000, 20000, 14), +(34460, 66067, 67968, 10000, 20000, 14), +(34460, 66065, 67971, 10000, 20000, 14), +(34460, 66086, 67974, 40000, 90000, 1), +(34460, 65860, 0, 45000, 90000, 1), +(34460, 66068, 0, 15000, 30000, 6), +(34460, 66071, 0, 40000, 80000, 1); +INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_H10`, `timerMin_N10`, `timerMax_N10`, `CastType`) VALUES +(34451, 66093, 67957, 10000, 20000, 14), +(34451, 66066, 67965, 10000, 20000, 14), +(34451, 66067, 67968, 10000, 20000, 14), +(34451, 66065, 67971, 10000, 20000, 14), +(34451, 66086, 67974, 40000, 90000, 1), +(34451, 65860, 0, 45000, 90000, 1), +(34451, 66068, 0, 15000, 30000, 6), +(34451, 66071, 0, 40000, 80000, 1); + +-- Warriors +DELETE FROM `boss_spell_table` WHERE `entry` IN (34475,34453); +INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_H10`, `timerMin_N10`, `timerMax_N10`, `CastType`) VALUES +(34475, 65947, 0, 20000, 30000, 1), +(34475, 65930, 0, 10000, 60000, 3), +(34475, 65926, 0, 6000, 25000, 3), +(34475, 68764, 0, 3000, 25000, 3), +(34475, 65935, 0, 20000, 80000, 3), +(34475, 65924, 0, 30000, 90000, 1), +(34475, 65936, 0, 5000, 25000, 3), +(34475, 65940, 0, 10000, 25000, 3), +(34475, 65932, 0, 30000, 60000, 1); +INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_H10`, `timerMin_N10`, `timerMax_N10`, `CastType`) VALUES +(34453, 65947, 0, 20000, 30000, 1), +(34453, 65930, 0, 10000, 60000, 3), +(34453, 65926, 0, 6000, 25000, 3), +(34453, 68764, 0, 3000, 25000, 3), +(34453, 65935, 0, 20000, 80000, 3), +(34453, 65924, 0, 30000, 90000, 1), +(34453, 65936, 0, 5000, 25000, 3), +(34453, 65940, 0, 10000, 25000, 3), +(34453, 65932, 0, 30000, 60000, 1); + +-- Mage +DELETE FROM `boss_spell_table` WHERE `entry` IN (34468,34449); +INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_H10`, `timerMin_N10`, `timerMax_N10`, `CastType`) VALUES +(34468, 65799, 67995, 3000, 10000, 3), +(34468, 65791, 67998, 5000, 15000, 3), +(34468, 65800, 68001, 5000, 15000, 3), +(34468, 65793, 0, 7000, 25000, 1), +(34468, 65807, 68004, 5000, 15000, 4), +(34468, 65790, 0, 5000, 15000, 6), +(34468, 65792, 0, 7000, 15000, 1), +(34468, 65802, 0, 0, 3600001, 1), +(34468, 65801, 0, 15000, 40000, 4); +INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_H10`, `timerMin_N10`, `timerMax_N10`, `CastType`) VALUES +(34449, 65799, 67995, 3000, 10000, 3), +(34449, 65791, 67998, 5000, 15000, 3), +(34449, 65800, 68001, 5000, 15000, 3), +(34449, 65793, 0, 7000, 25000, 1), +(34449, 65807, 68004, 5000, 15000, 4), +(34449, 65790, 0, 5000, 15000, 6), +(34449, 65792, 0, 7000, 15000, 1), +(34449, 65802, 0, 0, 3600001, 1), +(34449, 65801, 0, 15000, 40000, 4); + +-- Shaman +DELETE FROM `boss_spell_table` WHERE `entry` IN (34463,34455); +INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_H10`, `timerMin_N10`, `timerMax_N10`, `CastType`) VALUES +(34463, 66055, 68115, 5000, 15000, 14), +(34463, 66053, 68118, 5000, 15000, 14), +(34463, 66056, 0, 5000, 15000, 14), +(34463, 65983, 0, 30000, 60000, 1), +(34463, 65980, 0, 5000, 15000, 6), +(34463, 66054, 0, 10000, 40000, 4), +(34463, 66063, 0, 5000, 15000, 14), +(34463, 65973, 68100, 5000, 15000, 4); +INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_H10`, `timerMin_N10`, `timerMax_N10`, `CastType`) VALUES +(34455, 66055, 68115, 5000, 15000, 14), +(34455, 66053, 68118, 5000, 15000, 14), +(34455, 66056, 0, 5000, 15000, 14), +(34455, 65983, 0, 30000, 60000, 1), +(34455, 65980, 0, 5000, 15000, 6), +(34455, 66054, 0, 10000, 40000, 4), +(34455, 66063, 0, 5000, 15000, 14), +(34455, 65973, 68100, 5000, 15000, 4); + +-- Enh shaman +DELETE FROM `boss_spell_table` WHERE `entry` IN (34470,34444); +INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_H10`, `timerMin_N10`, `timerMax_N10`, `CastType`) VALUES +(34470, 65973, 0, 5000, 8000, 4), +(34470, 65974, 0, 5000, 8000, 3), +(34470, 65983, 0, 25000, 600000, 1), +(34470, 65970, 0, 5000, 90000, 3); +INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_H10`, `timerMin_N10`, `timerMax_N10`, `CastType`) VALUES +(34444, 65973, 0, 5000, 8000, 4), +(34444, 65974, 0, 5000, 8000, 3), +(34444, 65983, 0, 25000, 600000, 1), +(34444, 65970, 0, 5000, 90000, 3); + +-- Hunter +DELETE FROM `boss_spell_table` WHERE `entry` IN (34467,34448); +INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_H10`, `timerMin_N10`, `timerMax_N10`, `CastType`) VALUES +(34467, 65583, 67978, 3000, 8000, 3), +(34467, 65871, 0, 20000, 120000, 1), +(34467, 65869, 0, 12000, 20000, 1), +(34467, 65866, 67984, 3000, 8000, 3), +(34467, 65880, 0, 12000, 30000, 1), +(34467, 65868, 67989, 4000, 8000, 3), +(34467, 65867, 0, 4000, 8000, 3), +(34467, 66207, 0, 4000, 8000, 3), +(34467, 65877, 0, 7000, 60000, 4); +INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_H10`, `timerMin_N10`, `timerMax_N10`, `CastType`) VALUES +(34448, 65583, 67978, 3000, 8000, 3), +(34448, 65871, 0, 20000, 120000, 1), +(34448, 65869, 0, 12000, 20000, 1), +(34448, 65866, 67984, 3000, 8000, 3), +(34448, 65880, 0, 12000, 30000, 1), +(34448, 65868, 67989, 4000, 8000, 3), +(34448, 65867, 0, 4000, 8000, 3), +(34448, 66207, 0, 4000, 8000, 3), +(34448, 65877, 0, 7000, 60000, 4); + +-- Rogue +DELETE FROM `boss_spell_table` WHERE `entry` IN (34472,34454); +INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_H10`, `timerMin_N10`, `timerMax_N10`, `CastType`) VALUES +(34472, 65955, 0, 8000, 10000, 3), +(34472, 65956, 0, 12000, 120000, 1), +(34472, 65960, 0, 7000, 8000, 6), +(34472, 65961, 0, 20000, 120000, 1), +(34472, 66178, 0, 10000, 8000, 3), +(34472, 65954, 0, 5000, 8000, 3), +(34472, 65957, 68095, 15000, 20000, 3); +INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_H10`, `timerMin_N10`, `timerMax_N10`, `CastType`) VALUES +(34454, 65955, 0, 8000, 10000, 3), +(34454, 65956, 0, 12000, 120000, 1), +(34454, 65960, 0, 7000, 8000, 6), +(34454, 65961, 0, 20000, 120000, 1), +(34454, 66178, 0, 10000, 8000, 3), +(34454, 65954, 0, 5000, 8000, 3), +(34454, 65957, 68095, 15000, 20000, 3); + +-- Priest +DELETE FROM `boss_spell_table` WHERE `entry` IN (34466,34447); +INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_H10`, `timerMin_N10`, `timerMax_N10`, `CastType`) VALUES +(34466, 66177, 68035, 3000, 8000, 14), +(34466, 66099, 68032, 3000, 8000, 14), +(34466, 66104, 68023, 3000, 8000, 14), +(34466, 66100, 68026, 3000, 8000, 4), +(34466, 65546, 0, 3000, 8000, 6), +(34466, 65543, 0, 5000, 25000, 1); +INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_H10`, `timerMin_N10`, `timerMax_N10`, `CastType`) VALUES +(34447, 66177, 68035, 3000, 8000, 14), +(34447, 66099, 68032, 3000, 8000, 14), +(34447, 66104, 68023, 3000, 8000, 14), +(34447, 66100, 68026, 3000, 8000, 4), +(34447, 65546, 0, 3000, 8000, 6), +(34447, 65543, 0, 5000, 25000, 1); + +-- Shadow priest +DELETE FROM `boss_spell_table` WHERE `entry` IN (34473,34441); +INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_H10`, `timerMin_N10`, `timerMax_N10`, `CastType`) VALUES +(34473, 65542, 0, 8000, 15000, 6), +(34473, 65490, 68091, 3000, 8000, 4), +(34473, 65541, 68088, 3000, 8000, 4), +(34473, 65488, 68042, 3000, 8000, 3), +(34473, 65492, 68038, 3000, 8000, 3), +(34473, 65545, 0, 3000, 8000, 3), +(34473, 65544, 0, 1000, 180000, 1), +(34473, 65546, 0, 3000, 8000, 4), +(34473, 65543, 0, 8000, 24000, 1), +(34473, 16592, 0, 3000, 8000, 1); +INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_H10`, `timerMin_N10`, `timerMax_N10`, `CastType`) VALUES +(34441, 65542, 0, 8000, 15000, 6), +(34441, 65490, 68091, 3000, 8000, 4), +(34441, 65541, 68088, 3000, 8000, 4), +(34441, 65488, 68042, 3000, 8000, 3), +(34441, 65492, 68038, 3000, 8000, 3), +(34441, 65545, 0, 3000, 8000, 3), +(34441, 65544, 0, 1000, 180000, 1), +(34441, 65546, 0, 3000, 8000, 4), +(34441, 65543, 0, 8000, 24000, 1), +(34441, 16592, 0, 3000, 8000, 1); + +-- Death knight +DELETE FROM `boss_spell_table` WHERE `entry` IN (34461,34458); +INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_H10`, `timerMin_N10`, `timerMax_N10`, `CastType`) VALUES +(34461, 66020, 0, 5000, 15000, 3), +(34461, 66019, 67930, 5000, 15000, 3), +(34461, 66017, 0, 5000, 15000, 3), +(34461, 66047, 67936, 5000, 15000, 3), +(34461, 66023, 0, 5000, 90000, 1), +(34461, 66021, 67939, 8000, 12000, 3), +(34461, 66018, 0, 10000, 90000, 6); +INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_H10`, `timerMin_N10`, `timerMax_N10`, `CastType`) VALUES +(34458, 66020, 0, 5000, 15000, 3), +(34458, 66019, 67930, 5000, 15000, 3), +(34458, 66017, 0, 5000, 15000, 3), +(34458, 66047, 67936, 5000, 15000, 3), +(34458, 66023, 0, 5000, 90000, 1), +(34458, 66021, 67939, 8000, 12000, 3), +(34458, 66018, 0, 10000, 90000, 6); + +-- Paladin +DELETE FROM `boss_spell_table` WHERE `entry` IN (34465,34445); +INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_H10`, `timerMin_N10`, `timerMax_N10`, `CastType`) VALUES +(34465, 68757, 0, 25000, 40000, 6), +(34465, 66010, 0, 0, 3600001, 14), +(34465, 66116, 0, 5000, 15000, 14), +(34465, 66113, 68008, 5000, 10000, 14), +(34465, 66112, 68011, 5000, 15000, 14), +(34465, 66009, 0, 0, 3600001, 6), +(34465, 66114, 68015, 6000, 15000, 14), +(34465, 66613, 0, 5000, 15000, 4); +INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_H10`, `timerMin_N10`, `timerMax_N10`, `CastType`) VALUES +(34445, 68757, 0, 25000, 40000, 6), +(34445, 66010, 0, 0, 3600001, 14), +(34445, 66116, 0, 5000, 15000, 14), +(34445, 66113, 68008, 5000, 10000, 14), +(34445, 66112, 68011, 5000, 15000, 14), +(34445, 66009, 0, 0, 3600001, 6), +(34445, 66114, 68015, 6000, 15000, 14), +(34445, 66613, 0, 5000, 15000, 4); + +-- Boomkin (druid in moonkin form) +DELETE FROM `boss_spell_table` WHERE `entry` IN (34469,34459); +INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_H10`, `timerMin_N10`, `timerMax_N10`, `CastType`) VALUES +(34469, 65859, 0, 5000, 40000, 4), +(34469, 65857, 0, 5000, 40000, 3), +(34469, 65863, 0, 10000, 40000, 4), +(34469, 65861, 0, 25000, 40000, 3), +(34469, 65855, 67942, 25000, 40000, 4), +(34469, 65856, 67945, 5000, 40000, 3), +(34469, 65854, 67948, 25000, 40000, 3), +(34469, 65860, 0, 5000, 120000, 1), +(34469, 65862, 67952, 25000, 40000, 3); + +-- Warlock +DELETE FROM `boss_spell_table` WHERE `entry` IN (34474,34450); +INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_H10`, `timerMin_N10`, `timerMax_N10`, `CastType`) VALUES +(34474, 65816, 68146, 15000, 30000, 1), +(34474, 65810, 68134, 15000, 30000, 4), +(34474, 65814, 68137, 15000, 30000, 4), +(34474, 65815, 0, 15000, 30000, 4), +(34474, 65809, 0, 4000, 15000, 4), +(34474, 65819, 68149, 15000, 30000, 3), +(34474, 65821, 68152, 3000, 10000, 3), +(34474, 65812, 68155, 2000, 10000, 4); +INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_H10`, `timerMin_N10`, `timerMax_N10`, `CastType`) VALUES +(34450, 65816, 68146, 15000, 30000, 1), +(34450, 65810, 68134, 15000, 30000, 4), +(34450, 65814, 68137, 15000, 30000, 4), +(34450, 65815, 0, 15000, 30000, 4), +(34450, 65809, 0, 4000, 15000, 4), +(34450, 65819, 68149, 15000, 30000, 3), +(34450, 65821, 68152, 3000, 10000, 3), +(34450, 65812, 68155, 2000, 10000, 4); + diff --git a/addition/726_naxxramas_mangos.sql b/addition/726_naxxramas_mangos.sql new file mode 100644 index 0000000..7574e93 --- /dev/null +++ b/addition/726_naxxramas_mangos.sql @@ -0,0 +1,108 @@ +-- Arachnid Quarter +UPDATE `creature_template` SET `ScriptName`='mob_crypt_guard' WHERE `entry` IN (16573); +UPDATE `creature_template` SET `ScriptName`='mob_worshippers' WHERE `entry`='16506'; +UPDATE `creature_template` SET `ScriptName`='mob_webwrap' WHERE `entry`='16486'; +UPDATE `creature_template` SET `flags_extra` = '2' WHERE `entry` IN ('16486','30183'); +DELETE FROM `creature_ai_scripts` WHERE `creature_id` IN (16506); +-- Construct Quarter +UPDATE `creature_template` SET `ScriptName`='boss_grobbulus' WHERE `entry`='15931'; +UPDATE `creature_template` SET `ScriptName`='npc_grobbulus_poison_cloud' WHERE `entry`='16363'; +UPDATE `creature_template` SET `ScriptName`='boss_thaddius', `unit_flags`=0 WHERE `entry`='15928'; +UPDATE `creature_template` SET `ScriptName`='mob_stalagg' WHERE `entry`='15929'; +UPDATE `creature_template` SET `ScriptName`='mob_feugen' WHERE `entry`='15930'; +UPDATE `creature_template` SET `unit_flags`=0 WHERE `entry` = '16027'; +UPDATE `creature_template` SET `ScriptName`='mob_zombie_chows' WHERE `entry` = '16360'; +-- Military Quarter +UPDATE `creature_template` SET `attackpower` = `attackpower`*40 WHERE `entry` IN (16061,29940); -- Instructor Razuvious +UPDATE `creature_template` SET `attackpower` = `attackpower`*12 WHERE `entry` IN (16803,29941); -- Death Knight Understudy +UPDATE `creature_template` SET `spell1`=61696, `spell2`=29060, `spell3`=29061 WHERE `entry` IN (16803); +UPDATE `creature` SET `MovementType`=0, `spawndist`=0 WHERE `id`=16211; +UPDATE `creature_template` SET `ScriptName`='boss_gothik' WHERE `entry`='16060'; +UPDATE `creature_template` SET `flags_extra` = '2' WHERE `entry` IN (16697); +UPDATE `gameobject` SET `spawntimesecs`=-604800 WHERE `id` IN ('181366','193426'); +-- Plague Quarter +UPDATE `creature_template` SET `ScriptName`='boss_heigan' WHERE `entry`='15936'; +UPDATE `creature_template` SET `ScriptName`='npc_loatheb_spores' WHERE `entry`='16286'; +-- Frostwyrm Lair +UPDATE `creature_template` SET `ScriptName`='boss_kelthuzad' WHERE `entry`='15990'; +UPDATE `creature_template` SET `ScriptName`='mob_shadow_issure', `flags_extra` = '2', `faction_A`=16, `faction_H`=16 WHERE `entry`='16129'; +-- Adds +UPDATE `creature_template` SET `AIName`='EventAI' WHERE `entry` IN (16981, 16427, 16429); +DELETE FROM `creature_ai_scripts` WHERE `creature_id` IN (16981, 16427, 16429); +INSERT INTO `creature_ai_scripts` VALUES +('1698101', '16981', '0', '0', '100', '3', '10000', '20000', '10000', '20000', '11', '54890', '1', '0', '0', '0', '0', '0', '0', '0', '0', '0', ''), +('1698102', '16981', '0', '0', '100', '5', '10000', '20000', '10000', '20000', '11', '54891', '1', '0', '0', '0', '0', '0', '0', '0', '0', '0', ''), +('1642701', '16427', '6', '0', '100', '3', '0', '0', '0', '0', '11', '28457', '6', '7', '0', '0', '0', '0', '0', '0', '0', '0', 'Soldiers of the Frozen Wastes - Dark Blast'), +('1642702', '16427', '6', '0', '100', '5', '0', '0', '0', '0', '11', '55714', '6', '7', '0', '0', '0', '0', '0', '0', '0', '0', 'Soldiers of the Frozen Wastes - Dark Blast'), +('1642901', '16429', '0', '0', '100', '3', '10000', '20000', '10000', '20000', '11', '28459', '1', '0', '0', '0', '0', '0', '0', '0', '0', '0', 'Soul Weaver - Wail of Souls'), +('1642902', '16429', '0', '0', '100', '5', '10000', '20000', '10000', '20000', '11', '55765', '1', '0', '0', '0', '0', '0', '0', '0', '0', '0', 'Soul Weaver - Wail of Souls'); +UPDATE gameobject SET `state`='1' WHERE `map`=533 AND `id` IN (181225,181124); +DELETE FROM `spell_target_position` WHERE `id` IN (28444); +INSERT INTO `spell_target_position` VALUES (28444, 533, 3005.776, -3483.284, 299.551, 1.552); +-- Portal at end +UPDATE `gameobject_template` SET `flags`=0 WHERE `entry` IN ('181575', '181576', '181577', '181578'); -- 16 +DELETE FROM `gameobject` WHERE `id` in ('181575', '181576', '181577', '181578'); +INSERT INTO `gameobject` (`id`, `map`, `spawnMask`, `phaseMask`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecs`, `animprogress`, `state`) VALUES +(181575, 533, 3, 1, 3521.34, -3942.85, 308.106, 2.12884, 0, 0, 1, 0, -604800, 0, 1), +(181576, 533, 3, 1, 3548.85, -2958.15, 302.688, 3.16206, 0, 0, 1, 0, -604800, 0, 1), +(181577, 533, 3, 1, 2909, -4025.02, 273.475, 3.14159, 0, 0, 1, 0, -604800, 0, 1), +(181578, 533, 3, 1, 2492.16, -2921.66, 241.276, 5.52219, 0, 0, 1, 0, -604800, 0, 1); + +INSERT IGNORE INTO `creature_template` (`entry`, `difficulty_entry_1`, `difficulty_entry_2`, `difficulty_entry_3`, `KillCredit1`, `KillCredit2`, `modelid_1`, `modelid_2`, `modelid_3`, `modelid_4`, `name`, `subname`, `IconName`, `minlevel`, `maxlevel`, `minhealth`, `maxhealth`, `minmana`, `maxmana`, `armor`, `faction_A`, `faction_H`, `npcflag`, `speed_walk`, `scale`, `rank`, `mindmg`, `maxdmg`, `dmgschool`, `attackpower`, `dmg_multiplier`, `baseattacktime`, `rangeattacktime`, `unit_class`, `unit_flags`, `dynamicflags`, `family`, `trainer_type`, `trainer_spell`, `trainer_class`, `trainer_race`, `minrangedmg`, `maxrangedmg`, `rangedattackpower`, `type`, `type_flags`, `lootid`, `pickpocketloot`, `skinloot`, `resistance1`, `resistance2`, `resistance3`, `resistance4`, `resistance5`, `resistance6`, `spell1`, `spell2`, `spell3`, `spell4`, `PetSpellDataId`, `mingold`, `maxgold`, `AIName`, `MovementType`, `InhabitType`, `unk16`, `unk17`, `RacialLeader`, `questItem1`, `questItem2`, `questItem3`, `questItem4`, `questItem5`, `questItem6`, `movementId`, `RegenHealth`, `equipment_id`, `mechanic_immune_mask`, `flags_extra`, `ScriptName`) values('2','0','0','0','0','0','0','0','0','0','Erupt trigger','',NULL,'80','80','200','300','20','30','0','21','21','0','1','1','0','0','0','0','0','1','0','0','1','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','0','','0','3','1','1','0','0','0','0','0','0','0','0','1','0','0','194',''); +REPLACE INTO `creature_template` (`entry`, `difficulty_entry_1`, `modelid_1`, `modelid_2`, `modelid_3`, `modelid_4`, `name`, `subname`, `IconName`, `minlevel`, `maxlevel`, `minhealth`, `maxhealth`, `minmana`, `maxmana`, `armor`, `faction_A`, `faction_H`, `npcflag`, `speed_walk`, `scale`, `rank`, `mindmg`, `maxdmg`, `dmgschool`, `attackpower`, `dmg_multiplier`, `baseattacktime`, `rangeattacktime`, `unit_class`, `unit_flags`, `dynamicflags`, `family`, `trainer_type`, `trainer_spell`, `trainer_class`, `trainer_race`, `minrangedmg`, `maxrangedmg`, `rangedattackpower`, `type`, `type_flags`, `lootid`, `pickpocketloot`, `skinloot`, `resistance1`, `resistance2`, `resistance3`, `resistance4`, `resistance5`, `resistance6`, `spell1`, `spell2`, `spell3`, `spell4`, `PetSpellDataId`, `mingold`, `maxgold`, `AIName`, `MovementType`, `InhabitType`, `unk16`, `unk17`, `RacialLeader`, `RegenHealth`, `equipment_id`, `mechanic_immune_mask`, `flags_extra`, `ScriptName`) VALUES (15384, 0, 18783, 0, 11686, 0, 'Plague Fissure', '', '', 83, 83, 4120, 4120, 0, 0, 0, 21, 21, 0, 1.1, 1, 0, 0, 0, 0, 0, 1, 2000, 0, 1, 33555206, 0, 0, 0, 0, 0, 0, 0, 1, 0, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, '', 0, 1, 1.35, 1, 0, 1, 0, 0, 130, 'npc_heigan_eruption'); + +-- Soul Weaver +UPDATE `creature_template` SET `minlevel` = 80, `maxlevel` = 80, `minhealth` = 56700, `maxhealth` = 56700 WHERE `entry` = 16429; +-- Guardian of Icecrown 10 men +UPDATE `creature_template` SET `minlevel` = 80, `maxlevel` = 80, `minhealth` = 2520000, `maxhealth` = 2520000, `dmg_multiplier` = 1.5, mechanic_immune_mask = 1073741823 WHERE entry = 16441; +-- Guardian of Icecrown 25 men +UPDATE `creature_template` SET `minlevel` = 80, `maxlevel` = 80, `minhealth` = 6300000, `maxhealth` = 6300000, `armor` = 7369, dmg_multiplier = 1.8, mechanic_immune_mask = 1073741823 WHERE entry = 30057; +-- Shadow Fissure +UPDATE `creature_template` SET `faction_A` = 35, `faction_H` = 35, `flags_extra` = 130 WHERE `entry` = 16129; + +UPDATE `gameobject_template` SET `flags` = 0 WHERE `entry` = 193426; + +DELETE FROM `gameobject` WHERE `guid`=21640; +INSERT INTO `gameobject` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`position_x`,`position_y`,`position_z`,`orientation`,`rotation0`,`rotation1`,`rotation2`,`rotation3`,`spawntimesecs`, `animprogress`,`state`) VALUES +(21640,193426, 533, 2, 1, 2511.51, -2943.93, 245.552, 5.48707, 0, 0, 0.387631, -0.921815, -604800, 100, 1); + +DELETE FROM `spell_script_target` WHERE `entry`=55479; +INSERT INTO `spell_script_target` (`entry`, `type`, `targetEntry`) VALUES (55479, 1, 16803); + +DELETE FROM `npc_gossip` WHERE `npc_guid` IN (128352, 128353); +DELETE FROM `npc_text` WHERE `ID`=100; +INSERT INTO `npc_gossip` (`npc_guid`, `textid`) VALUES (128352, 100); +INSERT INTO `npc_gossip` (`npc_guid`, `textid`) VALUES (128353, 100); +INSERT INTO `npc_text` (`ID`, `text0_0`, `text0_1`, `lang0`, `prob0`, `em0_0`, `em0_1`, `em0_2`, `em0_3`, `em0_4`, `em0_5`, `text1_0`, `text1_1`, `lang1`, `prob1`, `em1_0`, `em1_1`, `em1_2`, `em1_3`, `em1_4`, `em1_5`, `text2_0`, `text2_1`, `lang2`, `prob2`, `em2_0`, `em2_1`, `em2_2`, `em2_3`, `em2_4`, `em2_5`, `text3_0`, `text3_1`, `lang3`, `prob3`, `em3_0`, `em3_1`, `em3_2`, `em3_3`, `em3_4`, `em3_5`, `text4_0`, `text4_1`, `lang4`, `prob4`, `em4_0`, `em4_1`, `em4_2`, `em4_3`, `em4_4`, `em4_5`, `text5_0`, `text5_1`, `lang5`, `prob5`, `em5_0`, `em5_1`, `em5_2`, `em5_3`, `em5_4`, `em5_5`, `text6_0`, `text6_1`, `lang6`, `prob6`, `em6_0`, `em6_1`, `em6_2`, `em6_3`, `em6_4`, `em6_5`, `text7_0`, `text7_1`, `lang7`, `prob7`, `em7_0`, `em7_1`, `em7_2`, `em7_3`, `em7_4`, `em7_5`) VALUES (100, 'Hi. In front of you is standing a Instructor Razuvious. To defeat this boss, you ll need to use Mind Control. If you don t have any priest in your group, press button below.', '', 0, 1, 0, 0, 0, 0, 0, 0, '', '', 0, 0, 0, 0, 0, 0, 0, 0, '', '', 0, 0, 0, 0, 0, 0, 0, 0, '', '', 0, 0, 0, 0, 0, 0, 0, 0, '', '', 0, 0, 0, 0, 0, 0, 0, 0, '', '', 0, 0, 0, 0, 0, 0, 0, 0, '', '', 0, 0, 0, 0, 0, 0, 0, 0, '', '', 0, 0, 0, 0, 0, 0, 0, 0); + +UPDATE `creature` set `spawnMask` = 1 where `id` = 29912; + +DELETE FROM `creature_template` WHERE (`entry`=16803); +INSERT INTO `creature_template` (`entry`, `difficulty_entry_1`, `difficulty_entry_2`, `difficulty_entry_3`, `KillCredit1`, `KillCredit2`, `modelid_1`, `modelid_2`, `modelid_3`, `modelid_4`, `name`, `subname`, `IconName`, `gossip_menu_id`, `minlevel`, `maxlevel`, `minhealth`, `maxhealth`, `minmana`, `maxmana`, `armor`, `faction_A`, `faction_H`, `npcflag`, `speed_walk`, `scale`, `rank`, `mindmg`, `maxdmg`, `dmgschool`, `attackpower`, `dmg_multiplier`, `baseattacktime`, `rangeattacktime`, `unit_class`, `unit_flags`, `dynamicflags`, `family`, `trainer_type`, `trainer_spell`, `trainer_class`, `trainer_race`, `minrangedmg`, `maxrangedmg`, `rangedattackpower`, `type`, `type_flags`, `lootid`, `pickpocketloot`, `skinloot`, `resistance1`, `resistance2`, `resistance3`, `resistance4`, `resistance5`, `resistance6`, `spell1`, `spell2`, `spell3`, `spell4`, `PetSpellDataId`, `mingold`, `maxgold`, `AIName`, `MovementType`, `InhabitType`, `unk16`, `unk17`, `RacialLeader`, `questItem1`, `questItem2`, `questItem3`, `questItem4`, `questItem5`, `questItem6`, `movementId`, `RegenHealth`, `equipment_id`, `mechanic_immune_mask`, `flags_extra`, `ScriptName`) VALUES (16803, 29941, 0, 0, 0, 0, 16539, 0, 16539, 0, 'Death Knight Understudy', '', '', 0, 82, 82, 404430, 404430, 0, 0, 49905, 21, 21, 0, 1, 1, 1, 488, 642, 0, 782, 7.5, 2000, 0, 1, 32832, 0, 0, 0, 0, 0, 0, 363, 521, 121, 7, 72, 0, 0, 0, 0, 0, 0, 0, 0, 0, 61696, 29060, 29061, 0, 0, 0, 0, 'EventAI', 0, 3, 30, 2, 0, 22708, 0, 0, 0, 0, 0, 144, 1, 1728, 0, 0, ''); + +DELETE FROM `creature_template` WHERE (`entry`=29941); +INSERT INTO `creature_template` (`entry`, `difficulty_entry_1`, `difficulty_entry_2`, `difficulty_entry_3`, `KillCredit1`, `KillCredit2`, `modelid_1`, `modelid_2`, `modelid_3`, `modelid_4`, `name`, `subname`, `IconName`, `gossip_menu_id`, `minlevel`, `maxlevel`, `minhealth`, `maxhealth`, `minmana`, `maxmana`, `armor`, `faction_A`, `faction_H`, `npcflag`, `speed_walk`, `scale`, `rank`, `mindmg`, `maxdmg`, `dmgschool`, `attackpower`, `dmg_multiplier`, `baseattacktime`, `rangeattacktime`, `unit_class`, `unit_flags`, `dynamicflags`, `family`, `trainer_type`, `trainer_spell`, `trainer_class`, `trainer_race`, `minrangedmg`, `maxrangedmg`, `rangedattackpower`, `type`, `type_flags`, `lootid`, `pickpocketloot`, `skinloot`, `resistance1`, `resistance2`, `resistance3`, `resistance4`, `resistance5`, `resistance6`, `spell1`, `spell2`, `spell3`, `spell4`, `PetSpellDataId`, `mingold`, `maxgold`, `AIName`, `MovementType`, `InhabitType`, `unk16`, `unk17`, `RacialLeader`, `questItem1`, `questItem2`, `questItem3`, `questItem4`, `questItem5`, `questItem6`, `movementId`, `RegenHealth`, `equipment_id`, `mechanic_immune_mask`, `flags_extra`, `ScriptName`) VALUES (29941, 0, 0, 0, 0, 0, 16539, 0, 16539, 0, 'Death Knight Understudy (1)', '', '', 0, 82, 82, 404430, 404430, 0, 0, 49905, 14, 14, 0, 1.5, 1, 1, 488, 642, 0, 782, 13, 2000, 0, 1, 32832, 0, 0, 0, 0, 0, 0, 363, 521, 121, 7, 72, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, '', 0, 3, 30, 2, 0, 22708, 0, 0, 0, 0, 0, 144, 1, 0, 0, 0, ''); + +DELETE FROM `creature_template` WHERE (`entry`=16061); +INSERT INTO `creature_template` (`entry`, `difficulty_entry_1`, `difficulty_entry_2`, `difficulty_entry_3`, `KillCredit1`, `KillCredit2`, `modelid_1`, `modelid_2`, `modelid_3`, `modelid_4`, `name`, `subname`, `IconName`, `gossip_menu_id`, `minlevel`, `maxlevel`, `minhealth`, `maxhealth`, `minmana`, `maxmana`, `armor`, `faction_A`, `faction_H`, `npcflag`, `speed_walk`, `scale`, `rank`, `mindmg`, `maxdmg`, `dmgschool`, `attackpower`, `dmg_multiplier`, `baseattacktime`, `rangeattacktime`, `unit_class`, `unit_flags`, `dynamicflags`, `family`, `trainer_type`, `trainer_spell`, `trainer_class`, `trainer_race`, `minrangedmg`, `maxrangedmg`, `rangedattackpower`, `type`, `type_flags`, `lootid`, `pickpocketloot`, `skinloot`, `resistance1`, `resistance2`, `resistance3`, `resistance4`, `resistance5`, `resistance6`, `spell1`, `spell2`, `spell3`, `spell4`, `PetSpellDataId`, `mingold`, `maxgold`, `AIName`, `MovementType`, `InhabitType`, `unk16`, `unk17`, `RacialLeader`, `questItem1`, `questItem2`, `questItem3`, `questItem4`, `questItem5`, `questItem6`, `movementId`, `RegenHealth`, `equipment_id`, `mechanic_immune_mask`, `flags_extra`, `ScriptName`) VALUES (16061, 29940, 0, 0, 0, 0, 16582, 0, 16582, 0, 'Instructor Razuvious', '', '', 0, 83, 83, 3346800, 3346800, 0, 0, 10673, 21, 21, 0, 1.6, 1, 3, 1000, 1200, 0, 800, 70, 3500, 0, 1, 32832, 0, 0, 0, 0, 0, 0, 371, 535, 135, 6, 76, 16061, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1253602, 1532181, '', 0, 3, 240, 2, 0, 0, 0, 0, 0, 0, 0, 167, 1, 1718, 617299803, 1, 'boss_razuvious'); + +DELETE FROM `creature_template` WHERE (`entry`=29940); +INSERT INTO `creature_template` (`entry`, `difficulty_entry_1`, `difficulty_entry_2`, `difficulty_entry_3`, `KillCredit1`, `KillCredit2`, `modelid_1`, `modelid_2`, `modelid_3`, `modelid_4`, `name`, `subname`, `IconName`, `gossip_menu_id`, `minlevel`, `maxlevel`, `minhealth`, `maxhealth`, `minmana`, `maxmana`, `armor`, `faction_A`, `faction_H`, `npcflag`, `speed_walk`, `scale`, `rank`, `mindmg`, `maxdmg`, `dmgschool`, `attackpower`, `dmg_multiplier`, `baseattacktime`, `rangeattacktime`, `unit_class`, `unit_flags`, `dynamicflags`, `family`, `trainer_type`, `trainer_spell`, `trainer_class`, `trainer_race`, `minrangedmg`, `maxrangedmg`, `rangedattackpower`, `type`, `type_flags`, `lootid`, `pickpocketloot`, `skinloot`, `resistance1`, `resistance2`, `resistance3`, `resistance4`, `resistance5`, `resistance6`, `spell1`, `spell2`, `spell3`, `spell4`, `PetSpellDataId`, `mingold`, `maxgold`, `AIName`, `MovementType`, `InhabitType`, `unk16`, `unk17`, `RacialLeader`, `questItem1`, `questItem2`, `questItem3`, `questItem4`, `questItem5`, `questItem6`, `movementId`, `RegenHealth`, `equipment_id`, `mechanic_immune_mask`, `flags_extra`, `ScriptName`) VALUES (29940, 0, 0, 0, 0, 0, 16582, 0, 16582, 0, 'Instructor Razuvious (1)', '', '', 0, 83, 83, 10110125, 10110125, 0, 0, 10673, 21, 21, 0, 2, 1, 3, 1000, 1200, 0, 800, 70, 3500, 0, 1, 32832, 0, 0, 0, 0, 0, 0, 371, 535, 135, 6, 76, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2507204, 3064362, '', 0, 3, 725, 2, 0, 0, 0, 0, 0, 0, 0, 167, 1, 0, 617299803, 1, ''); + +DELETE FROM `creature_template` WHERE (`entry`=29912); +INSERT INTO `creature_template` (`entry`, `difficulty_entry_1`, `difficulty_entry_2`, `difficulty_entry_3`, `KillCredit1`, `KillCredit2`, `modelid_1`, `modelid_2`, `modelid_3`, `modelid_4`, `name`, `subname`, `IconName`, `gossip_menu_id`, `minlevel`, `maxlevel`, `minhealth`, `maxhealth`, `minmana`, `maxmana`, `armor`, `faction_A`, `faction_H`, `npcflag`, `speed_walk`, `scale`, `rank`, `mindmg`, `maxdmg`, `dmgschool`, `attackpower`, `dmg_multiplier`, `baseattacktime`, `rangeattacktime`, `unit_class`, `unit_flags`, `dynamicflags`, `family`, `trainer_type`, `trainer_spell`, `trainer_class`, `trainer_race`, `minrangedmg`, `maxrangedmg`, `rangedattackpower`, `type`, `type_flags`, `lootid`, `pickpocketloot`, `skinloot`, `resistance1`, `resistance2`, `resistance3`, `resistance4`, `resistance5`, `resistance6`, `spell1`, `spell2`, `spell3`, `spell4`, `PetSpellDataId`, `mingold`, `maxgold`, `AIName`, `MovementType`, `InhabitType`, `unk16`, `unk17`, `RacialLeader`, `questItem1`, `questItem2`, `questItem3`, `questItem4`, `questItem5`, `questItem6`, `movementId`, `RegenHealth`, `equipment_id`, `mechanic_immune_mask`, `flags_extra`, `ScriptName`) VALUES (29912, 0, 0, 0, 0, 0, 26620, 0, 26620, 0, 'Obedience Crystal', '', 'Interact', 0, 80, 80, 12600, 12600, 0, 0, 9729, 35, 35, 1, 1, 1, 0, 422, 586, 0, 642, 1, 2000, 0, 1, 64, 0, 0, 0, 0, 0, 0, 345, 509, 103, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, '', 0, 3, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 'npc_obedience_crystal'); + +UPDATE `creature` SET `MovementType` = 2 WHERE `guid` = 128312; +DELETE FROM `creature_movement` WHERE id = 128312; +INSERT INTO `creature_movement` (`id`,`POINT`,`position_x`,`position_y`,`position_z`) VALUES +(128312,1,2777.138672,-3110.880859,267.684509), +(128312,2,2781.611328,-3106.903076,267.684509), +(128312,3,2784.291748,-3098.885254,267.684509), +(128312,4,2781.093018,-3090.532959,267.684509), +(128312,5,2773.239014,-3085.609619,267.684509), +(128312,6,2765.775146,-3086.021240,267.684509), +(128312,7,2758.100586,-3091.694824,267.684509), +(128312,8,2755.643555,-3097.803467,267.684509), +(128312,9,2756.769775,-3104.073975,267.684509), +(128312,10,2760.447021,-3109.536621,267.684509), +(128312,11,2766.769531,-3112.940918,267.684509); diff --git a/addition/727_fishing_extravaganza_mangos.sql b/addition/727_fishing_extravaganza_mangos.sql new file mode 100644 index 0000000..a15624d --- /dev/null +++ b/addition/727_fishing_extravaganza_mangos.sql @@ -0,0 +1,44 @@ +-- set ai for riggle +UPDATE `creature_template` SET `ScriptName`='npc_riggle_bassbait' WHERE entry=15077; +-- updated start time for event Fishing Extravaganza +UPDATE `game_event` SET `start_time`='2009-06-14 14:00:00', `occurence`=10080, `length`=120 where entry=15; +-- Create Jang +DELETE FROM `creature` WHERE `id`=15078; +INSERT INTO `creature` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`modelid`,`equipment_id`,`position_x`,`position_y`,`position_z`,`orientation`,`spawntimesecs`,`spawndist`,`currentwaypoint`,`curhealth`,`curmana`,`DeathState`,`MovementType`) VALUES +(954687, 15078, 0, 1, 1, 0, 1711, -14438, 473.661, 15.3137, 3.65362, 25, 0, 0, 3200, 0, 0, 0); +-- Create Fishbot 5000 +DELETE FROM `creature` WHERE `id`=15079; +INSERT INTO `creature` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`modelid`,`equipment_id`,`position_x`,`position_y`,`position_z`,`orientation`,`spawntimesecs`,`spawndist`,`currentwaypoint`,`curhealth`,`curmana`,`DeathState`,`MovementType`) VALUES +(954688, 15079, 0, 1, 1, 0, 0, -14440, 477.446, 15.25, 3.71802, 25, 0, 0, 2600, 0, 0, 0); +-- Create Riggle Bassbait +DELETE FROM `creature` WHERE `id`=15077; +INSERT INTO `creature` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`modelid`,`equipment_id`,`position_x`,`position_y`,`position_z`,`orientation`,`spawntimesecs`,`spawndist`,`currentwaypoint`,`curhealth`,`curmana`,`DeathState`,`MovementType`) VALUES +(954689, 15077, 0, 1, 1, 0, 13, -14439.3, 475.42, 15.892, 3.68503, 25, 0, 0, 3700, 0, 0, 0); +-- Create Soapbox gameobject +DELETE FROM `gameobject` WHERE `id`=180403; +INSERT INTO `gameobject` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`position_x`,`position_y`,`position_z`,`orientation`,`rotation0`,`rotation1`,`rotation2`,`rotation3`,`spawntimesecs`,`animprogress`,`state`) VALUES +(954391, 180403, 0, 1, 1, -14439.3, 475.42, 15.2791, 3.68503, 0, 0, 0.963311, -0.268388, 25, 0, 1); + +-- new event - Fishing Extravaganza Questgivers +-- Remove NPC and GO from any other event. +DELETE FROM `game_event_creature` WHERE `guid` IN (954687,954688,954689); +DELETE FROM `game_event_gameobject`WHERE `guid`=954391; +-- Create Event +DELETE FROM `game_event` WHERE `entry`=35; +INSERT INTO `game_event` (`entry`, `start_time`, `end_time`, `occurence`, `length`, `holiday`, `description`) VALUES (35, '2009-03-29 14:00:00', '2020-12-31 00:00:00', 10080, 180, 0, 'Fishing Extravaganza Questgivers'); +-- Add NPCs to Event +DELETE FROM `game_event_creature` WHERE abs(`event`) = 35; +INSERT INTO `game_event_creature` (`guid`, `event`) VALUES (954687,35), (954688,35), (954689,35); +-- Add Soapbox to Event +DELETE FROM `game_event_gameobject` WHERE abs(`event`) = 35; +INSERT INTO `game_event_gameobject` (`guid`, `event`) VALUES (954391,35); +-- Remove Quests from normal DB: +DELETE FROM `creature_questrelation` WHERE quest IN (8193,8194,8225,8224,8221); +-- Add Quests to Event +-- Riggle Bassbait Quest: Master Angler +-- Jang Quest: Apprentice Angler +-- Fishbot 5000 Quest: Rare Fish - Brownell's Blue Striped Racer +-- Fishbot 5000 Quest: Rare Fish - Dezian Queenfish +-- Fishbot 5000 Quest: Rare Fish - Keefer's Angelfish +DELETE FROM `game_event_quest` WHERE `event` = 35; +INSERT INTO `game_event_quest` (`quest`,`event`) VALUES (8193,35), (8194,35), (8225,35), (8224,35), (8221,35); diff --git a/addition/727_fishing_extravaganza_scriptdev2.sql b/addition/727_fishing_extravaganza_scriptdev2.sql new file mode 100644 index 0000000..a6073c8 --- /dev/null +++ b/addition/727_fishing_extravaganza_scriptdev2.sql @@ -0,0 +1,6 @@ +-- add ai text for riggle +DELETE FROM `script_texts` WHERE `entry` IN (-1510356,-1510357,-1510358); +INSERT INTO `script_texts` (`entry`,`content_default`,`sound`,`type`,`language`,`emote`,`comment`) VALUES +(-1510356, 'Let the Fishing Tournament BEGIN!', 0, 6, 0, 0, 'riggle SAY_START'), +(-1510357, 'We have a winner! $N is the Master Angler!', 0, 6, 0, 0, 'riggle SAY_WINNER'), +(-1510358, 'And the Tastyfish have gone for the week! I will remain for another hour to allow you to turn in your fish!', 0, 6, 0, 0, 'riggle SAY_END'); diff --git a/addition/728_ruby_sanctum_mangos.sql b/addition/728_ruby_sanctum_mangos.sql new file mode 100644 index 0000000..9f59a43 --- /dev/null +++ b/addition/728_ruby_sanctum_mangos.sql @@ -0,0 +1,38 @@ +-- Ruby sanctum +UPDATE `instance_template` SET `ScriptName`='instance_ruby_sanctum' WHERE `map`=724; +-- Halion +UPDATE `creature_template` SET `ScriptName`='boss_halion_real', `AIName` ='' WHERE `entry`=39863; +UPDATE `creature_template` SET `ScriptName`='boss_halion_twilight', `AIName` ='' WHERE `entry`=40142; +UPDATE `creature_template` SET `ScriptName`='mob_halion_meteor', `AIName` ='' WHERE `entry` = 40029; +UPDATE `creature_template` SET `ScriptName`='mob_halion_flame', `AIName` ='' WHERE `entry` IN (40041); +UPDATE `creature_template` SET `ScriptName`='mob_halion_control', `AIName` ='' WHERE `entry` IN (40146); +UPDATE `creature_template` SET `ScriptName`='mob_halion_orb', `AIName` ='' WHERE `entry` IN (40083,40100); +UPDATE `creature_template` SET `ScriptName`='mob_orb_rotation_focus', `AIName` ='' WHERE `entry` = 40091; +UPDATE `creature_template` SET `ScriptName`='mob_orb_carrier', `AIName` ='' WHERE `entry` = 40081; +UPDATE `creature_template` SET `ScriptName`='mob_fiery_combustion', `AIName` ='' WHERE `entry` = 40001; +UPDATE `creature_template` SET `ScriptName`='mob_soul_consumption', `AIName` ='' WHERE `entry` = 40135; +UPDATE `creature_template` SET `ScriptName`='', `AIName` ='' WHERE `entry` IN (40143, 40144, 40145); +# +UPDATE `gameobject_template` SET `data10` = 74807, `faction` = '0', `ScriptName` = 'go_halion_portal_twilight' WHERE `gameobject_template`.`entry` IN (202794,202795); +UPDATE `gameobject_template` SET `faction` = '0', `ScriptName` = 'go_halion_portal_real' WHERE `gameobject_template`.`entry` IN (202796); + +-- Baltharus +UPDATE `creature_template` SET `ScriptName`='boss_baltharus', `AIName` ='', `dmg_multiplier` = 80 WHERE `entry`=39751; +UPDATE `creature_template` SET `ScriptName`='mob_baltharus_clone', `AIName` ='', `dmg_multiplier` = 80 WHERE `entry`=39899; +INSERT IGNORE INTO `creature_template` (`entry`, `difficulty_entry_1`, `difficulty_entry_2`, `difficulty_entry_3`, `KillCredit1`, `KillCredit2`, `modelid_1`, `modelid_2`, `modelid_3`, `modelid_4`, `name`, `subname`, `IconName`, `gossip_menu_id`, `minlevel`, `maxlevel`, `minhealth`, `maxhealth`, `minmana`, `maxmana`, `armor`, `faction_A`, `faction_H`, `npcflag`, `speed_walk`, `speed_run`, `scale`, `rank`, `mindmg`, `maxdmg`, `dmgschool`, `attackpower`, `dmg_multiplier`, `baseattacktime`, `rangeattacktime`, `unit_class`, `unit_flags`, `dynamicflags`, `family`, `trainer_type`, `trainer_spell`, `trainer_class`, `trainer_race`, `minrangedmg`, `maxrangedmg`, `rangedattackpower`, `type`, `type_flags`, `lootid`, `pickpocketloot`, `skinloot`, `resistance1`, `resistance2`, `resistance3`, `resistance4`, `resistance5`, `resistance6`, `spell1`, `spell2`, `spell3`, `spell4`, `PetSpellDataId`, `mingold`, `maxgold`, `AIName`, `MovementType`, `InhabitType`, `unk16`, `unk17`, `RacialLeader`, `questItem1`, `questItem2`, `questItem3`, `questItem4`, `questItem5`, `questItem6`, `movementId`, `RegenHealth`, `equipment_id`, `mechanic_immune_mask`, `flags_extra`, `ScriptName`) VALUES +(39900, 0, 0, 0, 0, 0, 11686, 0, 11686, 0, 'Baltharus Target Dummy', '', NULL, 0, 1, 1, 25, 27, 0, 0, 17, 35, 35, 0, 1, 1.14286, 1, 0, 1, 2, 0, 0, 1, 2000, 2000, 1, 33554432, 0, 0, 0, 0, 0, 0, 1, 2, 0, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, '', 0, 3, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 258, ''); +UPDATE `creature_template` SET `ScriptName`='', `AIName` ='' WHERE `entry`=39900; + +-- Zarithian +UPDATE `creature_template` SET `ScriptName`='boss_zarithian', `AIName` ='' WHERE `entry`=39746; +UPDATE `creature` SET `position_x` = '3008.552734',`position_y` = '530.471680',`position_z` = '89.195290',`orientation` = '6.16' WHERE `id` = 39746; +UPDATE `creature_template` SET `ScriptName`='mob_flamecaller_ruby', `AIName` ='' WHERE `entry`=39814; + +-- Saviana Ragefire +UPDATE `creature_template` SET `ScriptName`='boss_ragefire', `AIName` ='' WHERE `entry`=39747; +DELETE FROM `spell_script_target` WHERE `entry` IN (74455); +INSERT INTO `spell_script_target` (`entry`, `type`, `targetEntry`) VALUES +('74455', '1', '39747'); + +-- Xerestrasza +UPDATE `creature_template` SET `ScriptName`='mob_xerestrasza', `AIName` ='' WHERE `entry`=40429; diff --git a/addition/728_ruby_sanctum_scriptdev2.sql b/addition/728_ruby_sanctum_scriptdev2.sql new file mode 100644 index 0000000..dabe862 --- /dev/null +++ b/addition/728_ruby_sanctum_scriptdev2.sql @@ -0,0 +1,53 @@ +-- sound / text +DELETE FROM `script_texts` WHERE `entry` BETWEEN -1666406 AND -1666000; + +-- xerestrasza +INSERT INTO `script_texts` (`entry`, `content_default`, `content_loc8`, `sound`, `type`, `language`, `emote`, `comment`) VALUES +('-1666000','Help! I am trapped within this tree! I require aid!','Спасите! Я под этим деревом. Мне нужна помощь!','17490','6','0','0','SAY_XERESTRASZA_YELL_1'), +('-1666001','Thank you! I could have not held out for much longer. A terrible thing has happened here.','Спасибо! Без вас я бы долго не продержалась... Здесь произошли страшные события...','17491','0','0','0','SAY_XERESTRASZA_YELL_2'), +('-1666002','We believed that the Sanctum was well fortified, but we were not prepareted for the nature of this assault.','Святилище считалось неприступным, но до сих пор оно не подвергалось такому штурму...','17492','0','0','0','SAY_XERESTRASZA_SAY_1'), +('-1666003','The Black Dragonkin materialized from thin air, and set upon us before we could react.','Черные драконы явились из ниоткуда. Мы даже не успели понять что происходит...','17493','0','0','0','SAY_XERESTRASZA_SAY_2'), +('-1666004','We did not stand a chance. As my brethren perished around me, I managed to retreat hear and bar the entrance.','Силы были неравны, мои братья гибли один за другим. А я спряталась здесь и запечатала вход.','17494','0','0','0','SAY_XERESTRASZA_SAY_3'), +('-1666005','They slaughtered us with cold efficiency, but the true focus of their interest seemed to be the eggs kept here in the sanctum.','Нас убивали с расчетливой жестокостью, но основной целью врага была кладка яиц в святилище.','17495','0','0','0','SAY_XERESTRASZA_SAY_4'), +('-1666006','The commander of the forces on the ground here is a cruel brute named Zarithrian. But I fear there are greater powers at work.',' Атакой руководил кровожадный Заритриан, но, боюсь, тут замешано и более могущественное зло.','17496','0','0','0','SAY_XERESTRASZA_SAY_5'), +('-1666007','In their initial assault I caught a glimpse of their true leader, a fearsome full-grown Twilight Dragon.','В самом начале я ощутила присутствие их настоящего лидера - огромного сумеречного дракона.','17497','0','0','0','SAY_XERESTRASZA_SAY_6'), +('-1666008','I know not the extent of their plans heroes, but I know this: they cannot be allowed to succeed!','Герои, я не знаю чего добиваются эти захватчики. Одно я знаю точно - их нужно остановить!','17498','0','0','0','SAY_XERESTRASZA_SAY_7'), + +-- Halion +('-1666100','Meddlesome insects, you\'re too late! The Ruby Sanctum is lost.','Назойливая мошкара! Вы опоздали. Рубиновое святилище пало!','17499','6','0','0','SAY_HALION_SPAWN'), +('-1666101','Your world teeters on the brink of annihilation. You will all bear witness to the coming of a new age of destruction!','Этот мир вот-вот соскользнет в бездну. Вам выпала честь узреть начало эры РАЗРУШЕНИЯ!','17500','6','0','0','SAY_HALION_AGGRO'), +('-1666102','Another hero falls.','Сколько еще таких героев?','17501','6','0','0','SAY_HALION_SLAY_1'), +('-1666103','Ha Ha Ha!','','17502','6','0','0','SAY_HALION_SLAY_2'), +('-1666104','Relish this victory mortals, for it will be your last. This world will burn with the Master\'s return!','Это ваша последняя победа. Насладитесь сполна ее вкусом. Ибо когда вернется мой господин, этот мир сгинет в огне!','17503','6','0','0','SAY_HALION_DEATH'), +('-1666105','Not good enough!','Надоело!','17504','6','0','0','SAY_HALION_BERSERK'), +('-1666106','The heavens burn!','Небеса в огне!','17505','6','0','0','SAY_HALION_SPECIAL_1'), +('-1666107','Beware the shadow!','','17506','6','0','0','SAY_HALION_SPECIAL_2'), +('-1666108','You will find only suffering within the realm of Twilight. Enter if you dare.','Вы найдете только тьму в мире Сумерек. Входите, если посмеете.','17507','6','0','0','SAY_HALION_PHASE_2'), +('-1666109','I am the light AND the darkness! Cower mortals before the Herald of Deathwing!','Я есть свет и я есть тьма! Трепещите, ничтожные, перед посланником Смертокрыла!','17508','6','0','0','SAY_HALION_PHASE_3'), +('-1666110','The orbining spheres pulse with dark energy!','Во вращающихся сферах пульсирует темная энергия!','0','3','0','0',''), +('-1666111','Your companions\' effort force Halion further into the physical realm!','Ваши союзники протолкнули Халиона дальше в физический мир!','0','3','0','0',''), +('-1666112','Your companions\' effort force Halion further into the twilight realm!','Ваши союзники протолкнули Халиона дальше в реальный мир!','0','3','0','0',''), +('-1666113','Находясь в покое в одном из миров, Халион восстанавливает жизненные силы.','Находясь в покое в одном из миров, Халион восстанавливает жизненные силы.','0','3','0','0',''), + +-- Zarthrian +('-1666200','Alexstrasza has chosen capable allies. A pity that I must end you!','Алекстраза выбрала достойных союзников... Жаль, что придется ПРИКОНЧИТЬ ВАС!','17512','6','0','0','SAY_ZARITHRIAN_AGGRO'), +('-1666201','You thought you stood a chance?','Глупо было и надеяться!','17513','6','0','0','SAY_ZARITHRIAN_SLAY_1'), +('-1666202','It\'s for the best.','Все только к лучшему!','17514','6','0','0','SAY_ZARITHRIAN_SLAY_2'), +('-1666203','Halion! I\'m...aah!','ХАЛИОН! Я...','17515','6','0','0','SAY_ZARITHRIAN_DEATH'), +('-1666204','Turn them to ash, minions!','Слуги! Обратите их в пепел!','17516','6','0','0','SAY_ZARITHRIAN_SPECIAL_1'), + +-- baltharus +('-1666300','Ah, the entertainment has arrived...','А-а-а, цирк приехал.','17520','6','0','0','SAY_BALTHARUS_AGGRO'), +('-1666301','Baltharus leaves no survivors!','Балтар не оставляет живых!','17521','6','0','0','SAY_BALTHARUS_SLAY_1'), +('-1666302','This world has enough heroes!','В мире хватает героев и без тебя...','17522','6','0','0','SAY_BALTHARUS_SLAY_2'), +('-1666303','I...didn\'t see that coming...','Как… это могло произойти?..','17523','1','0','0','SAY_BALTHARUS_DEATH'), +('-1666304','Twice the pain and half the fun!','Вдвое сильнее страдание.','17524','6','0','0','SAY_BALTHARUS_SPECIAL_1'), +('-1666305','Your power wanes, ancient one! Soon, you will join your friends!','Твоя сила на исходе, Древнейшая! Скоро ты присоединишься к своим друзьям!','17525','6','0','0','SAY_BALTHARUS_YELL'), + +-- saviana +('-1666400','You will suffer for this intrusion...','Ваш-ш-ши муки с-cтанут платой за это вторжение!','17528','6','0','0','SAY_SAVIANA_AGGRO'), +('-1666401','As it should be!','Так и должно быть!','17529','6','0','0','SAY_SAVIANA_SLAY_1'), +('-1666402','Halion will be pleased...','Халион будет доволен!','17530','6','0','0','SAY_SAVIANA_SLAY_2'), +('-1666403','','О...','17531','6','0','0','SAY_SAVIANA_DEATH'), +('-1666404','Burn in the master\'s flame!','Горите в огне хозяина!','17532','6','0','0','SAY_SAVIANA_SPECIAL_1'), +('-1666405','','|3-3(%s) впадает в исступление!','0','3','0','0',''); diff --git a/addition/728_ruby_sanctum_spelltable_scriptdev2.sql b/addition/728_ruby_sanctum_spelltable_scriptdev2.sql new file mode 100644 index 0000000..15391e1 --- /dev/null +++ b/addition/728_ruby_sanctum_spelltable_scriptdev2.sql @@ -0,0 +1,133 @@ +-- Ruby sanctum spelltable +-- Boss Halion +DELETE FROM `boss_spell_table` WHERE `entry` = 39863; +INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_N25`, `spellID_H10`, `spellID_H25`, `timerMin_N10`, `timerMin_N25`, `timerMin_H10`, `timerMin_H25`, `timerMax_N10`, `timerMax_N25`, `timerMax_H10`, `timerMax_H25`, `locData_x`, `locData_y`, `locData_z`, `CastType`, `isVisualEffect`, `isBugged`, `textEntry`) VALUES +(39863, 74637, 0, 0, 0, 30000, 0, 0, 0, 30000, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0), +(39863, 74525, 0, 0, 0, 10000, 0, 0, 0, 20000, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0), +(39863, 74562, 0, 0, 0, 30000, 0, 0, 0, 40000, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0), +(39863, 74809, 0, 0, 0, 15000, 0, 0, 0, 25000, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0), +(39863, 74808, 0, 0, 0, 15000, 0, 0, 0, 25000, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0), +(39863, 75063, 0, 0, 0, 15000, 0, 0, 0, 25000, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0), +(39863, 26663, 0, 0, 0, 600000, 0, 0, 0, 600000, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0), +(39863, 78243, 0, 0, 0, 15000, 0, 0, 0, 25000, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0); + +-- Mob Meteor strike +DELETE FROM `boss_spell_table` WHERE `entry` = 40029; +INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_N25`, `spellID_H10`, `spellID_H25`, `timerMin_N10`, `timerMin_N25`, `timerMin_H10`, `timerMin_H25`, `timerMax_N10`, `timerMax_N25`, `timerMax_H10`, `timerMax_H25`, `data1`, `data2`, `data3`, `data4`, `locData_x`, `locData_y`, `locData_z`, `CastType`, `isVisualEffect`, `isBugged`) VALUES +(40029, 40041, 0, 0, 0, 20000, 0, 0, 0, 20000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 11, 0, 0), +(40029, 74641, 0, 0, 0, 500, 0, 0, 0, 500, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0), +(40029, 74648, 0, 0, 0, 4500, 0, 0, 0, 4500, 0, 0, 0, 5, 7, 5, 7, 0, 0, 0, 1, 0, 0); + +-- Mob Meteor flame +DELETE FROM `boss_spell_table` WHERE `entry` = 40041; +INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_N25`, `spellID_H10`, `spellID_H25`, `timerMin_N10`, `timerMin_N25`, `timerMin_H10`, `timerMin_H25`, `timerMax_N10`, `timerMax_N25`, `timerMax_H10`, `timerMax_H25`, `data1`, `data2`, `data3`, `data4`, `locData_x`, `locData_y`, `locData_z`, `CastType`, `isVisualEffect`, `isBugged`) VALUES +(40041, 74718, 0, 0, 0, 2000, 0, 0, 0, 2000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0); + +-- Mob soul consumption +DELETE FROM `boss_spell_table` WHERE `entry` = 40135; +INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_N25`, `spellID_H10`, `spellID_H25`, `timerMin_N10`, `timerMin_N25`, `timerMin_H10`, `timerMin_H25`, `timerMax_N10`, `timerMax_N25`, `timerMax_H10`, `timerMax_H25`, `data1`, `data2`, `data3`, `data4`, `locData_x`, `locData_y`, `locData_z`, `CastType`, `isVisualEffect`, `isBugged`) VALUES +(40135, 74803, 0, 0, 0, 60000, 0, 0, 0, 60000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0), +(40135, 74807, 0, 0, 0, 2000, 0, 0, 0, 2000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0); + +-- Mob fiery combustion +DELETE FROM `boss_spell_table` WHERE `entry` = 40001; +INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_N25`, `spellID_H10`, `spellID_H25`, `timerMin_N10`, `timerMin_N25`, `timerMin_H10`, `timerMin_H25`, `timerMax_N10`, `timerMax_N25`, `timerMax_H10`, `timerMax_H25`, `data1`, `data2`, `data3`, `data4`, `locData_x`, `locData_y`, `locData_z`, `CastType`, `isVisualEffect`, `isBugged`) VALUES +(40001, 74629, 0, 0, 0, 60000, 0, 0, 0, 60000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0), +(40001, 74807, 0, 0, 0, 2000, 0, 0, 0, 2000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0); + +-- Twilight Halion +DELETE FROM `boss_spell_table` WHERE `entry` = 40142; +INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_N25`, `spellID_H10`, `spellID_H25`, `timerMin_N10`, `timerMin_N25`, `timerMin_H10`, `timerMin_H25`, `timerMax_N10`, `timerMax_N25`, `timerMax_H10`, `timerMax_H25`, `locData_x`, `locData_y`, `locData_z`, `CastType`, `isVisualEffect`, `isBugged`, `textEntry`) VALUES +(40142, 74792, 0, 0, 0, 30000, 0, 0, 0, 40000, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0), +(40142, 74806, 0, 0, 0, 10000, 0, 0, 0, 20000, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0), +(40142, 78243, 0, 0, 0, 15000, 0, 0, 0, 25000, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0), +(40142, 74807, 0, 0, 0, 2000, 0, 0, 0, 2000, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0), +(40142, 26663, 0, 0, 0, 600000, 0, 0, 0, 600000, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0), +(40142, 75484, 0, 0, 0, 2000, 0, 0, 0, 2000, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0); + +-- Mob orb carrier +DELETE FROM `boss_spell_table` WHERE `entry` = 40081; +INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_N25`, `spellID_H10`, `spellID_H25`, `timerMin_N10`, `timerMin_N25`, `timerMin_H10`, `timerMin_H25`, `timerMax_N10`, `timerMax_N25`, `timerMax_H10`, `timerMax_H25`, `data1`, `data2`, `data3`, `data4`, `locData_x`, `locData_y`, `locData_z`, `CastType`, `isVisualEffect`, `isBugged`) VALUES +(40081, 77844, 0, 0, 0, 2000, 0, 0, 0, 2000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0), +(40081, 74807, 0, 0, 0, 2000, 0, 0, 0, 2000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0); + +-- Mobs shadow orbs +DELETE FROM `boss_spell_table` WHERE `entry` = 40083; +INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_N25`, `spellID_H10`, `spellID_H25`, `timerMin_N10`, `timerMin_N25`, `timerMin_H10`, `timerMin_H25`, `timerMax_N10`, `timerMax_N25`, `timerMax_H10`, `timerMax_H25`, `data1`, `data2`, `data3`, `data4`, `locData_x`, `locData_y`, `locData_z`, `CastType`, `isVisualEffect`, `isBugged`) VALUES +(40083, 77844, 0, 0, 0, 2000, 0, 0, 0, 2000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0), +(40083, 74807, 0, 0, 0, 2000, 0, 0, 0, 2000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0); +DELETE FROM `boss_spell_table` WHERE `entry` = 40100; +INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_N25`, `spellID_H10`, `spellID_H25`, `timerMin_N10`, `timerMin_N25`, `timerMin_H10`, `timerMin_H25`, `timerMax_N10`, `timerMax_N25`, `timerMax_H10`, `timerMax_H25`, `data1`, `data2`, `data3`, `data4`, `locData_x`, `locData_y`, `locData_z`, `CastType`, `isVisualEffect`, `isBugged`) VALUES +(40100, 77844, 0, 0, 0, 2000, 0, 0, 0, 2000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0), +(40100, 74807, 0, 0, 0, 2000, 0, 0, 0, 2000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0); + +-- Mob Halion control +DELETE FROM `boss_spell_table` WHERE `entry` = 40146; +INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_N25`, `spellID_H10`, `spellID_H25`, `timerMin_N10`, `timerMin_N25`, `timerMin_H10`, `timerMin_H25`, `timerMax_N10`, `timerMax_N25`, `timerMax_H10`, `timerMax_H25`, `data1`, `data2`, `data3`, `data4`, `locData_x`, `locData_y`, `locData_z`, `CastType`, `isVisualEffect`, `isBugged`) VALUES +(40146, 74826, 0, 0, 0, 5000, 0, 0, 0, 5000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 0, 1), +(40146, 74827, 0, 0, 0, 5000, 0, 0, 0, 5000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 0, 1), +(40146, 74828, 0, 0, 0, 5000, 0, 0, 0, 5000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 0, 1), +(40146, 74829, 0, 0, 0, 5000, 0, 0, 0, 5000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 0, 1), +(40146, 74830, 0, 0, 0, 5000, 0, 0, 0, 5000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 0, 1), +(40146, 74831, 0, 0, 0, 5000, 0, 0, 0, 5000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 0, 1), +(40146, 74832, 0, 0, 0, 5000, 0, 0, 0, 5000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 0, 1), +(40146, 74833, 0, 0, 0, 5000, 0, 0, 0, 5000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 0, 1), +(40146, 74834, 0, 0, 0, 5000, 0, 0, 0, 5000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 0, 1), +(40146, 74835, 0, 0, 0, 5000, 0, 0, 0, 5000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 0, 1), +(40146, 74836, 0, 0, 0, 5000, 0, 0, 0, 5000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 0, 1); + +/* +-- spelltable from notagain +-- Boss Halion +DELETE FROM `boss_spell_table` WHERE `entry` = 39863; +INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_N25`, `timerMin_N10`, `timerMin_N25`, `timerMax_N10`, `timerMax_N25`, `data1`, `data2`, `data3`, `data4`, +`locData_x`, `locData_y`, `locData_z`, `varData`, `StageMask_N`, `StageMask_H`, `CastType`, `isVisualEffect`, `isBugged`, `textEntry`, `comment`) VALUES +(39863, 78243, 0, 100, 0, 100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, NULL), +(39863, 74562, 0, 20000, 0, 30000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, NULL), +(39863, 74792, 0, 20000, 0, 30000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, NULL), +(39863, 75877, 0, 100, 0, 100, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, NULL), +(39863, 74525, 74527, 8000, 8000, 12000, 12000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, NULL), +(39863, 74806, 0, 8000, 0, 12000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, NULL), +(39863, 75484, 75485, 1000, 1000, 1000, 1000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7, 0, 0, 0, NULL); +*/ + +-- Boss Baltharus +DELETE FROM `boss_spell_table` WHERE `entry` = 39751; +INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_N25`, `spellID_H10`, `spellID_H25`, `timerMin_N10`, `timerMin_N25`, `timerMin_H10`, `timerMin_H25`, `timerMax_N10`, `timerMax_N25`, `timerMax_H10`, `timerMax_H25`, `locData_x`, `locData_y`, `locData_z`, `CastType`, `isVisualEffect`, `isBugged`, `textEntry`) VALUES +(39751, 40504, 0, 0, 0, 10000, 0, 0, 0, 15000, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0), +(39751, 75125, 0, 0, 0, 22000, 0, 0, 0, 22000, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0), +(39751, 74502, 0, 0, 0, 10000, 0, 0, 0, 25000, 0, 0, 0, 40, 0, 0, 4, 0, 1, 0), +(39751, 74505, 0, 0, 0, 22000, 0, 0, 0, 22000, 0, 0, 0, 40, 0, 0, 1, 0, 0, 0), +(39751, 74509, 0, 0, 0, 15000, 0, 0, 0, 25000, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0), +(39751, 74511, 0, 0, 0, 20000, 0, 0, 0, 45000, 0, 0, 0, 0, 0, 0, 1, 0, 0, -1666304), +(39751, 76221, 0, 0, 0, 1000, 0, 0, 0, 1000, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0); +-- mob Baltharus Clone +DELETE FROM `boss_spell_table` WHERE `entry` = 39899; +INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_N25`, `spellID_H10`, `spellID_H25`, `timerMin_N10`, `timerMin_N25`, `timerMin_H10`, `timerMin_H25`, `timerMax_N10`, `timerMax_N25`, `timerMax_H10`, `timerMax_H25`, `locData_x`, `locData_y`, `locData_z`, `CastType`, `isVisualEffect`, `isBugged`, `textEntry`) VALUES +(39899, 75125, 0, 0, 0, 22000, 0, 0, 0, 22000, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0), +(39899, 74502, 0, 0, 0, 10000, 0, 0, 0, 25000, 0, 0, 0, 40, 0, 0, 4, 0, 1, 0), +(39899, 40504, 0, 0, 0, 10000, 0, 0, 0, 15000, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0); + +-- Boss Zarithian +DELETE FROM `boss_spell_table` WHERE `entry` = 39746; +INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_N25`, `spellID_H10`, `spellID_H25`, `timerMin_N10`, `timerMin_N25`, `timerMin_H10`, `timerMin_H25`, `timerMax_N10`, `timerMax_N25`, `timerMax_H10`, `timerMax_H25`, `locData_x`, `locData_y`, `locData_z`, `CastType`, `isVisualEffect`, `isBugged`, `textEntry`) VALUES +(39746, 74367, 0, 0, 0, 10000, 0, 0, 0, 20000, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0), +(39746, 74384, 0, 0, 0, 15000, 0, 0, 0, 25000, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0), +(39746, 74398, 0, 0, 0, 45000, 0, 0, 0, 45000, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0), +(39746, 39814, 0, 0, 0, 15000, 0, 0, 0, 25000, 0, 0, 0, 40, 0, 0, 9, 0, 0, 0); +-- mob Onyx Falmecaller +DELETE FROM `boss_spell_table` WHERE `entry` = 39814; +INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_N25`, `spellID_H10`, `spellID_H25`, `timerMin_N10`, `timerMin_N25`, `timerMin_H10`, `timerMin_H25`, `timerMax_N10`, `timerMax_N25`, `timerMax_H10`, `timerMax_H25`, `locData_x`, `locData_y`, `locData_z`, `CastType`, `isVisualEffect`, `isBugged`, `textEntry`) VALUES +(39814, 74392, 0, 0, 0, 10000, 0, 0, 0, 25000, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0), +(39814, 74394, 0, 0, 0, 10000, 0, 0, 0, 25000, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0); + +-- Boss Saviana Ragefire +DELETE FROM `boss_spell_table` WHERE `entry` = 39747; +INSERT INTO `boss_spell_table` (`entry`, `spellID_N10`, `spellID_N25`, `spellID_H10`, `spellID_H25`, `timerMin_N10`, `timerMin_N25`, `timerMin_H10`, `timerMin_H25`, `timerMax_N10`, `timerMax_N25`, `timerMax_H10`, `timerMax_H25`,`data1`, `data2`, `data3`, `data4`, `locData_x`, `locData_y`, `locData_z`, `CastType`, `isVisualEffect`, `isBugged`, `textEntry`) VALUES +(39747, 78722, 0, 0, 0, 20000, 0, 0, 0, 40000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0 ,-1666405), +(39747, 74404, 0, 0, 0, 5000, 0, 0, 0, 15000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0), +(39747, 74453, 0, 0, 0, 12000, 0, 0, 0, 22000, 0, 0, 0, 2, 5, 3, 5, 0, 0, 0, 6, 0, 0, 0), +(39747, 74452, 0, 0, 0, 15000, 0, 0, 0, 25000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0), +(39747, 74455, 0, 0, 0, 5000, 0, 0, 0, 5000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0), +(39747, 74456, 0, 0, 0, 15000, 0, 0, 0, 25000, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6, 0, 0, 0); + diff --git a/addition/730_obsidian_sanctum_mangos.sql b/addition/730_obsidian_sanctum_mangos.sql new file mode 100644 index 0000000..f4f17db --- /dev/null +++ b/addition/730_obsidian_sanctum_mangos.sql @@ -0,0 +1,112 @@ +-- Obsidian sanctum (from PSZ and MaxXx2021) +UPDATE creature_template SET ScriptName='mob_fire_cyclone' WHERE entry = 30648; +UPDATE creature_template SET ScriptName='mob_flame_tsunami' WHERE entry = 30616; +UPDATE creature_template SET ScriptName='mob_lava_blaze' WHERE entry = 30643; + +-- CUSTOM hack to different hard mode loot +REPLACE INTO creature_template (entry, difficulty_entry_1, modelid_1, modelid_3, faction_A, faction_H, NAME, subname, minhealth, maxhealth, rank, lootid) VALUES +(288601, 313111, 27035, 27035, 103, 103, 'Sartharion', 'The Onyx Guardian', 1, 1, 3, 288601), +(288602, 313112, 27035, 27035, 103, 103, 'Sartharion', 'The Onyx Guardian', 1, 1, 3, 288602), +(288603, 313113, 27035, 27035, 103, 103, 'Sartharion', 'The Onyx Guardian', 1, 1, 3, 288603), +(313111, 0, 27035, 27035, 103, 103, 'Sartharion', 'The Onyx Guardian', 1, 1, 3, 313111), +(313112, 0, 27035, 27035, 103, 103, 'Sartharion', 'The Onyx Guardian', 1, 1, 3, 313112), +(313113, 0, 27035, 27035, 103, 103, 'Sartharion', 'The Onyx Guardian', 1, 1, 3, 313113); + +-- boss loot +DELETE FROM creature_loot_template WHERE entry IN (30452, 30451, 30449, 28860, 288601, 288602, 288603, 31534, 31520, 31535, 31311, 313111, 313112, 313113); +-- Tenebron, Shadron, Vesperon +UPDATE creature_template SET lootid=30449 WHERE entry IN (30452, 30451, 30449, 31534, 31520, 31535); +INSERT INTO creature_loot_template (entry, item, ChanceOrQuestChance, groupid, mincountOrRef, maxcount, lootcondition, condition_value1, condition_value2) VALUES +(30449, 47241, 100, 0, 1, 1, 0, 0, 0); +-- Sartharion +-- references +DELETE FROM reference_loot_template WHERE entry IN (615000, 615001, 615002, 615010, 615011, 615012); +INSERT INTO reference_loot_template (entry, item, ChanceOrQuestChance, groupid, mincountOrRef, maxcount, lootcondition, condition_value1, condition_value2) VALUES +-- normal, no drakes +(615000, 40426, 0, 2, 1, 1, 0, 0, 0), +(615000, 40427, 0, 2, 1, 1, 0, 0, 0), +(615000, 40428, 0, 2, 1, 1, 0, 0, 0), +(615000, 40429, 0, 2, 1, 1, 0, 0, 0), +(615000, 40430, 0, 2, 1, 1, 0, 0, 0), +(615000, 40613, 0, 1, 1, 1, 0, 0, 0), +(615000, 40614, 0, 1, 1, 1, 0, 0, 0), +(615000, 40615, 0, 1, 1, 1, 0, 0, 0), +(615000, 43345, 100, 0, 1, 1, 0, 0, 0), +(615000, 43347, 100, 0, 1, 1, 0, 0, 0), +-- normal, 1 drake +(615001, 43992, 0, 1, 1, 1, 0, 0, 0), +(615001, 43988, 0, 1, 1, 1, 0, 0, 0), +(615001, 43990, 0, 1, 1, 1, 0, 0, 0), +(615001, 43989, 0, 1, 1, 1, 0, 0, 0), +(615001, 43991, 0, 1, 1, 1, 0, 0, 0), +-- normal, 2 drakes +(615002, 43995, 0, 1, 1, 1, 0, 0, 0), +(615002, 43998, 0, 1, 1, 1, 0, 0, 0), +(615002, 43994, 0, 1, 1, 1, 0, 0, 0), +(615002, 43996, 0, 1, 1, 1, 0, 0, 0), +(615002, 43993, 0, 1, 1, 1, 0, 0, 0), +-- heroic, no drakes +(615010, 40431, 0, 2, 1, 1, 0, 0, 0), +(615010, 40432, 0, 3, 1, 1, 0, 0, 0), +(615010, 40433, 0, 3, 1, 1, 0, 0, 0), +(615010, 40437, 0, 2, 1, 1, 0, 0, 0), +(615010, 40438, 0, 3, 1, 1, 0, 0, 0), +(615010, 40439, 0, 3, 1, 1, 0, 0, 0), +(615010, 40446, 0, 2, 1, 1, 0, 0, 0), +(615010, 40451, 0, 2, 1, 1, 0, 0, 0), +(615010, 40453, 0, 3, 1, 1, 0, 0, 0), +(615010, 40455, 0, 2, 1, 1, 0, 0, 0), +(615010, 40628, 0, 1, 1, 1, 0, 0, 0), +(615010, 40629, 0, 1, 1, 1, 0, 0, 0), +(615010, 40630, 0, 1, 1, 1, 0, 0, 0), +(615010, 43345, 100, 0, 1, 1, 0, 0, 0), +(615010, 43346, 100, 0, 1, 1, 0, 0, 0), +-- heroic, 1 drake +(615011, 44003, 0, 1, 1, 1, 0, 0, 0), +(615011, 44002, 0, 1, 1, 1, 0, 0, 0), +(615011, 44000, 0, 1, 1, 1, 0, 0, 0), +(615011, 44004, 0, 1, 1, 1, 0, 0, 0), +-- heroic, 2 drakes +(615012, 44007, 0, 1, 1, 1, 0, 0, 0), +(615012, 44006, 0, 1, 1, 1, 0, 0, 0), +(615012, 44005, 0, 1, 1, 1, 0, 0, 0), +(615012, 44008, 0, 1, 1, 1, 0, 0, 0), +(615012, 44011, 0, 1, 1, 1, 0, 0, 0); +UPDATE creature_template SET lootid=entry WHERE entry IN (28860, 288601, 288602, 288603, 31311, 313111, 313112, 313113); +INSERT INTO creature_loot_template (entry, item, ChanceOrQuestChance, groupid, mincountOrRef, maxcount, lootcondition, condition_value1, condition_value2) VALUES +-- normal, no drakes +(28860, 615000, 100, 0, -615000, 1, 0, 0, 0), +(28860, 47241, 100, 0, 1, 1, 0, 0, 0), +-- normal, 1 drake +(288601, 615000, 100, 0, -615000, 1, 0, 0, 0), +(288601, 615001, 100, 0, -615001, 1, 0, 0, 0), +(288601, 47241, 100, 0, 2, 2, 0, 0, 0), +-- normal, 2 drakes +(288602, 615000, 100, 0, -615000, 1, 0, 0, 0), +(288602, 615001, 100, 0, -615001, 1, 0, 0, 0), +(288602, 615002, 100, 0, -615002, 1, 0, 0, 0), +(288602, 47241, 100, 0, 3, 3, 0, 0, 0), +-- normal, 3 drakes +(288603, 615000, 100, 0, -615000, 1, 0, 0, 0), +(288603, 615001, 100, 0, -615001, 1, 0, 0, 0), +(288603, 615002, 100, 0, -615002, 1, 0, 0, 0), +(288603, 43986, 100, 0, 1, 1, 0, 0, 0), +(288603, 47241, 100, 0, 4, 4, 0, 0, 0), +-- heroic, no drakes +(31311, 615010, 100, 0, -615010, 1, 0, 0, 0), +(31311, 47241, 100, 0, 1, 1, 0, 0, 0), +-- heroic, 1 drake +(313111, 615010, 100, 0, -615010, 1, 0, 0, 0), +(313111, 615011, 100, 0, -615011, 1, 0, 0, 0), +(313111, 47241, 100, 0, 2, 2, 0, 0, 0), +-- heroic, 2 drakes +(313112, 615010, 100, 0, -615010, 1, 0, 0, 0), +(313112, 615011, 100, 0, -615011, 1, 0, 0, 0), +(313112, 615012, 100, 0, -615012, 1, 0, 0, 0), +(313112, 47241, 100, 0, 3, 3, 0, 0, 0), +-- heroic, 3 drakes +(313113, 615010, 100, 0, -615010, 1, 0, 0, 0), +(313113, 615011, 100, 0, -615011, 1, 0, 0, 0), +(313113, 615012, 100, 0, -615012, 1, 0, 0, 0), +(313113, 43954, 100, 0, 1, 1, 0, 0, 0), +(313113, 47241, 100, 0, 4, 4, 0, 0, 0); diff --git a/addition/730_obsidian_sanctum_scriptdev2.sql b/addition/730_obsidian_sanctum_scriptdev2.sql new file mode 100644 index 0000000..3b33c42 --- /dev/null +++ b/addition/730_obsidian_sanctum_scriptdev2.sql @@ -0,0 +1,45 @@ +DELETE FROM `script_texts` WHERE `entry` BETWEEN -1615042 AND -1615000; +INSERT INTO `script_texts` (`entry`, `content_default`, `content_loc1`, `content_loc2`, `content_loc3`, `content_loc4`, `content_loc5`, `content_loc6`, `content_loc7`, `content_loc8`, `sound`, `type`, `language`, `emote`, `comment`) VALUES +(-1615042, '%s begins to open a Twilight Portal!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, '%s начинает открывать Врата Сумерек!', 0, 5, 0, 0, 'sartharion drake WHISPER_OPEN_PORTAL'), +(-1615041, 'A Vesperon Disciple appears in the Twilight!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'Ученик Весперон появляется в Сумерках!', 0, 5, 0, 0, 'shadron WHISPER_VESPERON_DICIPLE'), +(-1615040, 'Unlike, I have many talents.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'В отличии от вас, я кое что умею.', 14138, 1, 0, 0, 'vesperon SAY_VESPERON_SPECIAL_2'), +(-1615039, 'Aren''t you tricky...I have a few tricks of my own...', NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'С вами не просто... Но и со мной не легко...', 14137, 1, 0, 0, 'vesperon SAY_VESPERON_SPECIAL_1'), +(-1615038, 'Father was right about you, Sartharion...You are a weakling!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'Отец был прав насчет тебя, Сртарион... Ты слаб!', 14139, 1, 0, 0, 'vesperon SAY_VESPERON_RESPOND'), +(-1615037, 'I will pick my teeth with your bones!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'Я буду ковыряться в зубах вашими костями!', 14136, 1, 0, 0, 'vesperon SAY_VESPERON_BREATH'), +(-1615036, 'I still have some...fight..in...me...', NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'Я все еще... могу... драться...', 14140, 1, 0, 0, 'vesperon SAY_VESPERON_DEATH'), +(-1615035, 'Was that the best you can do?', NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'И это все, что ты можешь сделать?', 14135, 1, 0, 0, 'vesperon SAY_VESPERON_SLAY_2'), +(-1615034, 'The least you could do is put up a fight...', NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'Все, что тебе удалось, это затеять драку...', 14134, 1, 0, 0, 'vesperon SAY_VESPERON_SLAY_1'), +(-1615033, 'You pose no threat, lesser beings...give me your worst!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'Вы безобидны, ничтожные создания... покажите мне, на что вы способны!', 14133, 1, 0, 0, 'vesperon SAY_VESPERON_AGGRO'), +(-1615032, 'The lava surrounding %s churns!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'Потомство Весперона появляется в Сумерках!', 0, 5, 0, 0, 'sartharion WHISPER_LAVA_CHURN'), +(-1615031, 'This is why we call you lesser beeings.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'Вот поэтому мы и называем вас низшими созданиями.', 14097, 1, 0, 0, 'sartharion SAY_SARTHARION_SLAY_3'), +(-1615030, 'You are the grave disadvantage.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'Тебе смертельно не повезло.', 14096, 1, 0, 0, 'sartharion SAY_SARTHARION_SLAY_2'), +(-1615029, 'You will make a fine meal for the hatchlings.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'Из тебя выйдет хорошая закуска для детенышей.', 14094, 1, 0, 0, 'sartharion SAY_SARTHARION_SLAY_1'), +(-1615028, 'All will be reduced to ash!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'От вас останется всего лишь горстка пепла!', 14102, 1, 0, 0, 'sartharion SAY_SARTHARION_SPECIAL_4'), +(-1615027, 'How much heat can you take?', NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'Посмотрим, как вы переносите жару!', 14101, 1, 0, 0, 'sartharion SAY_SARTHARION_SPECIAL_3'), +(-1615026, 'Your charred bones will litter the floor!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'Ваши обугленные кости завалят весь пол!', 14100, 1, 0, 0, 'sartharion SAY_SARTHARION_SPECIAL_2'), +(-1615025, 'Such flammable little insects....', NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'Мелкая мошка хорошо горит...', 14099, 1, 0, 0, 'sartharion SAY_SARTHARION_SPECIAL_1'), +(-1615024, 'Such is the price... of failure...', NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'Такова цена... неудачи...', 14107, 1, 0, 0, 'sartharion SAY_SARTHARION_DEATH'), +(-1615023, 'Vesperon! The clutch is in danger! Assist me!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'Весперон! Кладка в опасности! Помоги мне!', 14104, 1, 0, 0, 'sartharion SAY_SARTHARION_CALL_VESPERON'), +(-1615022, 'Tenebron! The eggs are yours to protect as well!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'Тенеброн! Ты тоже должна защищать яйца!', 14106, 1, 0, 0, 'sartharion SAY_SARTHARION_CALL_TENEBRON'), +(-1615021, 'Shadron! Come to me, all is at risk!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'Шадрон! На помощь! Все на кону!', 14105, 1, 0, 0, 'sartharion SARTHARION_CALL_SHADRON'), +(-1615020, 'Burn, you miserable wretches!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'Гори, злосчастный сброд!', 14098, 1, 0, 0, 'sartharion SAY_SARTHARION_BREATH'), +(-1615019, 'This pathetic siege ends NOW!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'Это смехотворное сражение закончиться СЕЙЧАС ЖЕ!', 14103, 1, 0, 0, 'sartharion SAY_SARTHARION_BERSERK'), +(-1615018, 'It is my charge to watch over these eggs. I will see you burn before any harm comes to them!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'Моя обязанность - оберегать эти яйца. И вы сгорите прежде, чем хоть пальцем дотронетесь их.', 14093, 1, 0, 0, 'sartharion SAY_SARTHARION_AGGRO'), +(-1615017, '%s begins to hatch eggs in the twilight!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, '%s начинает высиживать яйца в сумерках!', 0, 5, 0, 0, 'tenebron WHISPER_HATCH_EGGS'), +(-1615016, 'I am no mere dragon! You will find I am much, much, more...', NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'Я не простой дракон! Увидите, совсем, совсем, не простой...', 14127, 1, 0, 0, 'tenebron SAY_TENEBRON_SPECIAL_2'), +(-1615015, 'Arrogant little creatures! To challenge powers you do not yet understand...', NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'Самонадеянные мелкие твари! Вы бросаете вызов силам, от понимания которых, вы еще далеки!', 14126, 1, 0, 0, 'tenebron SAY_TENEBRON_SPECIAL_1'), +(-1615014, 'It is amusing to watch you struggle. Very well, witness how it is done.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'Занятно наблюдать, как ты сражаешься. Хорошо, смотри, как надо это делать.', 14128, 1, 0, 0, 'tenebron SAY_TENEBRON_RESPOND'), +(-1615013, 'To darkness I condemn you...', NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'Приговариваю вас к тьме...', 14125, 1, 0, 0, 'tenebron SAY_TENEBRON_BREATH'), +(-1615012, 'I should not... have held back...', NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'Не надо было... вмешиваться...', 14129, 1, 0, 0, 'tenebron SAY_TENEBRON_DEATH'), +(-1615011, 'Typical... Just as I was having fun.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'Как обычно... Только я вошла во вкус.', 14124, 1, 0, 0, 'tenebron SAY_TENEBRON_SLAY_2'), +(-1615010, 'No contest.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'Не интересно.', 14123, 1, 0, 0, 'tenebron SAY_TENEBRON_SLAY_1'), +(-1615009, 'You have no place here. Your place is among the departed.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'Вам здесь не место. Ваше место - среди усопших.', 14122, 1, 0, 0, 'tenebron SAY_TENEBRON_AGGRO'), +(-1615008, 'A Shadron Disciple appears in the Twilight!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'Ученик Шадрон появляется в Сумерках!', 0, 5, 0, 0, 'shadron WHISPER_SHADRON_DICIPLE'), +(-1615007, 'On your knees!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'На колени!', 14116, 1, 0, 0, 'shadron SAY_SHADRON_SPECIAL_2'), +(-1615006, 'Father tought me well!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'Отец не зря учил меня!', 14115, 1, 0, 0, 'shadron SAY_SHADRON_SPECIAL_1'), +(-1615005, 'I will take pity on you Sartharion, just this once.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'Я пожалею тебя Сартарион, но только в этот раз.', 14117, 1, 0, 0, 'shadron SAY_SHADRON_RESPOND'), +(-1615004, 'You are easily bested! ', NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'Вас легко провести!', 14114, 1, 0, 0, 'shadron SAY_SHADRON_BREATH'), +(-1615003, 'We...are superior! How could this...be...', NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'Мы... выше всех! Как это... возможно...', 14118, 1, 0, 0, 'shadron SAY_SHADRON_DEATH'), +(-1615002, 'Such mediocre resistance!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'Какое слабое сопротивление!', 14113, 1, 0, 0, 'shadron SAY_SHADRON_SLAY_2'), +(-1615001, 'You are insignificant!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'Ты ничтожество!', 14112, 1, 0, 0, 'shadron SAY_SHADRON_SLAY_1'), +(-1615000, 'I fear nothing! Least of all you!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, 'Я не боюсь ничего! Тем более вас!', 14111, 1, 0, 0, 'shadron SAY_SHADRON_AGGRO'); diff --git a/addition/731_npc_special_mangos.sql b/addition/731_npc_special_mangos.sql new file mode 100644 index 0000000..a91690e --- /dev/null +++ b/addition/731_npc_special_mangos.sql @@ -0,0 +1,13 @@ +-- Snakes trap +UPDATE `creature_template` SET `ScriptName`='npc_snake_trap_serpents' WHERE `entry` IN (19921, 19833); +-- Mirror Immage +UPDATE `creature_template` SET `speed_walk` = 2.5, `modelid_1` = 11686, `modelid_3` = 11686, `minlevel` = 80, `maxlevel` = 80, `AIName` = '', `ScriptName`='npc_mirror_image' WHERE `entry` = 31216; +-- Rune blade +UPDATE `creature_template` SET `modelid_1` = 11686, `modelid_3` = 11686,`AIName` = '', `ScriptName`='npc_runeblade' WHERE `entry` = 27893; +-- DK Gargoyle +UPDATE `creature_template` SET `ScriptName` = 'npc_death_knight_gargoyle' WHERE `entry` = '27829'; +-- Explosive decoy +UPDATE `creature_template` SET `ScriptName` = 'npc_explosive_decoy' WHERE `entry` = '29134'; +-- Eye of Kilrogg +UPDATE `creature_template` SET `ScriptName` = 'npc_eye_of_kilrogg' WHERE `entry` = '4277'; + diff --git a/addition/732_azjol-nerub_mangos.sql b/addition/732_azjol-nerub_mangos.sql new file mode 100644 index 0000000..d2aece2 --- /dev/null +++ b/addition/732_azjol-nerub_mangos.sql @@ -0,0 +1,10 @@ +-- Azjol-Nerub from MaxXx2021 +UPDATE creature_template SET ScriptName = 'npc_watcher_gashra' WHERE entry = 28730; +UPDATE creature_template SET ScriptName = 'npc_watcher_narjil' WHERE entry = 28729; +UPDATE creature_template SET ScriptName = 'boss_krikthir' WHERE entry = 28684; +UPDATE creature_template SET ScriptName = 'npc_watcher_silthik' WHERE entry = 28731; +UPDATE creature_template SET ScriptName = 'boss_hadronox' WHERE entry = 28921; +UPDATE creature_template SET ScriptName = 'npc_anub_ar_warrior' WHERE entry = 28732; +UPDATE creature_template SET ScriptName = 'npc_anub_ar_skirmisher' WHERE entry = 28734; +UPDATE creature_template SET ScriptName = 'npc_anub_ar_shadowcaster' WHERE entry = 28733; +UPDATE creature_template SET ScriptName = 'npc_skittering_infector' WHERE entry = 28736; diff --git a/addition/733_mangos_ulduar_raid.sql b/addition/733_mangos_ulduar_raid.sql new file mode 100644 index 0000000..a6fea5c --- /dev/null +++ b/addition/733_mangos_ulduar_raid.sql @@ -0,0 +1,464 @@ +/* ULDUAR from Xfurry*/ + +-- Flame Leviathan +UPDATE creature_template SET ScriptName = 'boss_flame_leviathan' WHERE entry = 33113; +UPDATE creature_template SET ScriptName = 'mob_defense_turret' WHERE entry = 33142; + +-- Ignis +UPDATE creature_template SET mechanic_immune_mask=617299803, scriptname='boss_ignis' WHERE entry=33118; +UPDATE creature_template SET ScriptName = 'mob_iron_construct' WHERE entry = 33121; +REPLACE INTO `spell_script_target` (`entry`, `type`, `targetEntry`) VALUES ('64474', '1', '33118'); +REPLACE INTO `spell_script_target` (`entry`, `type`, `targetEntry`) VALUES ('64475', '1', '33118'); +-- this may not be correct +UPDATE creature_template SET minlevel=80, maxlevel=80, faction_h=1925, faction_a=1925, scale=0.5, scriptname='mob_scorch_target' WHERE entry=33221; + +-- Razorscale +UPDATE creature_template SET mechanic_immune_mask=617299803, scriptname='boss_razorscale' WHERE entry=33186; +-- original x=587.547, y= -174.927, z = 391.517; make the boss fly before encounter starts +UPDATE creature SET position_x = 590.346741, position_y = -226.947647, position_z = 442.897583 WHERE id = 33186; +UPDATE gameobject_template SET flags= 6553648, ScriptName='go_broken_harpoon' WHERE entry = 194565; +-- only 2 harpoons for 10 man +UPDATE gameobject SET spawnMask = 2 WHERE guid IN (73595, 73592); +-- mole machines & adds +UPDATE creature_template SET ScriptName = 'mob_mole_machine' WHERE entry = 33245; +UPDATE creature_template SET ScriptName = 'mob_dark_rune_watcher' WHERE entry = 33453; +UPDATE creature_template SET ScriptName = 'mob_dark_rune_sentinel' WHERE entry = 33846; +UPDATE creature_template SET ScriptName = 'mob_dark_rune_guardian' WHERE entry = 33388; +UPDATE creature_template SET ScriptName = 'npc_expedition_commander' WHERE entry = 33210; +UPDATE creature_template SET ScriptName = 'mob_devouring_flame_target' WHERE entry IN (34189, 34188); + +-- XT002 +UPDATE creature_template SET mechanic_immune_mask=617299803, scriptname='boss_xt002' WHERE entry=33293; +UPDATE creature_template SET ScriptName = 'mob_pummeler' WHERE entry = 33344; +UPDATE creature_template SET speed_run=0.5, faction_a=1925, faction_h=1925, scriptname='mob_boombot' WHERE entry=33346; +UPDATE creature_template SET speed_run=0.5 WHERE entry=33343; +UPDATE creature_template SET mechanic_immune_mask=652951551, scriptname='mob_xtheart' WHERE entry=33329; +UPDATE creature_template SET ScriptName = 'mob_voidzone' WHERE entry = 34001; +UPDATE creature_template SET minhealth = 176400, maxhealth = 176400, minlevel = 80, maxlevel = 80, faction_a = 14, faction_h = 14, ScriptName = 'mob_lifespark' WHERE entry = 34004; +UPDATE creature SET spawnMask = 0 WHERE id IN (34004); + +-- THIS IS A WORKAROUND FOR THE HARD MODE LOOT, PLEASE REMOVE IF YOU DON'T WANT TO USE IT! +-- hard loot for the heart +UPDATE creature_template SET lootid = 33329 WHERE entry = 33329; +UPDATE creature_template SET lootid = 33995 WHERE entry = 33995; +-- rewrite loot for XT to support hard mode: moved hard mode loot to XT heart +-- 10 man: +-- hard mode loot for the heart +DELETE FROM `creature_loot_template` WHERE (`entry`=33329); +INSERT INTO `creature_loot_template` VALUES +(33329, 45867, 0, 1, 1, 1, 0, 0, 0), +(33329, 45868, 0, 1, 1, 1, 0, 0, 0), +(33329, 45869, 0, 1, 1, 1, 0, 0, 0), +(33329, 45870, 0, 1, 1, 1, 0, 0, 0), +(33329, 45871, 0, 1, 1, 1, 0, 0, 0); +-- 25 man: +-- no hard loot on xt so moving to the heart +DELETE FROM `creature_loot_template` WHERE (`entry`=33995); +INSERT INTO `creature_loot_template` VALUES +(33995, 45445, 0, 1, 1, 1, 0, 0, 0), +(33995, 45443, 0, 1, 1, 1, 0, 0, 0), +(33995, 45444, 0, 1, 1, 1, 0, 0, 0), +(33995, 45446, 0, 1, 1, 1, 0, 0, 0), +(33995, 45442, 0, 1, 1, 1, 0, 0, 0); + +-- Iron council +UPDATE creature_template SET mechanic_immune_mask=619395071, scriptname='boss_brundir' WHERE entry=32857; +UPDATE creature_template SET mechanic_immune_mask=617299803, scriptname='boss_molgeim' WHERE entry=32927; +UPDATE creature_template SET mechanic_immune_mask=617299803, scriptname='boss_steelbreaker' WHERE entry=32867; +UPDATE creature_template SET ScriptName = 'mob_rune_of_power' WHERE entry = 33705; +UPDATE creature_template SET ScriptName = 'mob_rune_of_summoning' WHERE entry = 33051; +UPDATE creature_template SET ScriptName = 'mob_ulduar_lightning_elemental' WHERE entry = 32958; +UPDATE `creature_template` SET `mechanic_immune_mask` = 619397115 WHERE `entry` IN (32857, 33694); + +-- LOOT FOR THESE THREE SHOUDL BE PROGRESSIVE, MAYBE THIS IS NOT THE RIGHT WAY TO DO IT +-- update loot id: +-- brundir +UPDATE `creature_template` SET `lootid` = 32857 WHERE `entry` = 32857; +UPDATE `creature_template` SET `lootid` = 33694 WHERE `entry` = 33694; +-- molgeim = steelbreaker (I dont know exactly which items are missing from molgeim's loot so i'm leaving it the same for now); +UPDATE `creature_template` SET `lootid` = 32867 WHERE `entry` = 32927; +UPDATE `creature_template` SET `lootid` = 33693 WHERE `entry` = 33692; +-- Rewrite loot for council: this will allow us to use hard mode loot because only the last killed boss will be lootable +-- 10 man version +-- Brundir: +DELETE FROM `creature_loot_template` WHERE (`entry`=32857); +INSERT INTO `creature_loot_template` VALUES +(32857, 45322, 0, 2, 1, 1, 0, 0, 0), +(32857, 45324, 0, 1, 1, 1, 0, 0, 0), +(32857, 45329, 0, 2, 1, 1, 0, 0, 0), +(32857, 45330, 0, 1, 1, 1, 0, 0, 0), +(32857, 45331, 0, 2, 1, 1, 0, 0, 0), +(32857, 45332, 0, 1, 1, 1, 0, 0, 0), +(32857, 45333, 0, 2, 1, 1, 0, 0, 0), +(32857, 45378, 0, 2, 1, 1, 0, 0, 0), +(32857, 45418, 0, 1, 1, 1, 0, 0, 0), +(32857, 45423, 0, 1, 1, 1, 0, 0, 0), +-- emblem 100% drop +(32857, 47241, 100, 0, 1, 1, 0, 0, 0); +-- 25 man version +-- Brundir: +DELETE FROM `creature_loot_template` WHERE (`entry`=33694); +INSERT INTO `creature_loot_template` VALUES +(33694, 45224, 0, 3, 1, 1, 0, 0, 0), +(33694, 45228, 0, 3, 1, 1, 0, 0, 0), +(33694, 45233, 0, 3, 1, 1, 0, 0, 0), +(33694, 45234, 0, 3, 1, 1, 0, 0, 0), +(33694, 45236, 0, 3, 1, 1, 0, 0, 0), +(33694, 45226, 0, 2, 1, 1, 0, 0, 0), +(33694, 45235, 0, 2, 1, 1, 0, 0, 0), +(33694, 45237, 0, 2, 1, 1, 0, 0, 0), +(33694, 45238, 0, 2, 1, 1, 0, 0, 0), +(33694, 45239, 0, 2, 1, 1, 0, 0, 0), +(33694, 45193, 0, 1, 1, 1, 0, 0, 0), +(33694, 45225, 0, 1, 1, 1, 0, 0, 0), +(33694, 45227, 0, 1, 1, 1, 0, 0, 0), +(33694, 45232, 0, 1, 1, 1, 0, 0, 0), +(33694, 45240, 0, 1, 1, 1, 0, 0, 0), +(33694, 45038, 10, 0, 1, 1, 0, 0, 0), +(33694, 45087, 33, 0, 1, 2, 0, 0, 0), +(33694, 45089, 5, 0, -45089, 1, 0, 0, 0), +-- emblem 100% drop +(33694, 47241, 100, 0, 1, 1, 0, 0, 0); + +-- Kologarn +DELETE FROM creature WHERE id IN (32933, 32934); +-- fix arms position because of the missing vehicles +INSERT INTO creature (id, map, spawnMask, phaseMask, modelid, equipment_id, position_x, position_y, position_z, orientation, spawntimesecs, spawndist, currentwaypoint, curhealth, curmana, DeathState, MovementType) VALUES (32933, 603, 3, 65535, 0, 0, 1799.68, -24.3599, 452.227, 3.14747, 604800, 0, 0, 543855, 0, 0, 0); +INSERT INTO creature (id, map, spawnMask, phaseMask, modelid, equipment_id, position_x, position_y, position_z, orientation, spawntimesecs, spawndist, currentwaypoint, curhealth, curmana, DeathState, MovementType) VALUES (32934, 603, 3, 65535, 0, 0, 1799.68, -24.3599, 452.227, 3.14747, 604800, 0, 0, 543855, 0, 0, 0); +UPDATE creature_model_info SET bounding_radius=15, combat_reach=15 WHERE modelid IN (28638, 28822, 28821); +UPDATE creature_template SET mechanic_immune_mask=617299803, unit_flags = 0, scriptname='boss_kologarn' WHERE entry=32930; +UPDATE creature_template SET mechanic_immune_mask=652951551, scriptname='boss_right_arm' WHERE entry=32934; +UPDATE creature_template SET mechanic_immune_mask=652951551, scriptname='boss_left_arm' WHERE entry=32933; +UPDATE creature_template SET ScriptName = 'mob_ulduar_rubble' WHERE entry IN (33768, 33809, 33908, 33942); +UPDATE `gameobject` SET `position_y` = -35.6824, `position_x` = 1837.59 WHERE `id` IN (195047); +UPDATE `creature_template` SET `RegenHealth` = 1 WHERE `entry` = 33910; +UPDATE `creature_template` SET `RegenHealth` = 1 WHERE `entry` = 33911; + +-- Auriaya +UPDATE creature_template SET mechanic_immune_mask=583745371, equipment_id = 103000, scriptname='boss_auriaya' WHERE entry=33515; +UPDATE creature_template SET mechanic_immune_mask=619395071, scriptname='mob_feral_defender' WHERE entry=34035; +UPDATE creature_template SET minlevel=80, maxlevel=80, faction_h=14, faction_a=14, scriptname='mob_seeping_feral_essence' WHERE entry=34098; +UPDATE creature_template SET ScriptName = 'mob_sanctum_sentry' WHERE entry = 34014; +UPDATE `creature_template` SET `mechanic_immune_mask` = 619397115 WHERE `entry` IN (33515, 34175); +DELETE FROM creature_equip_template WHERE entry = 103000; +INSERT INTO creature_equip_template values (103000, 45315, 0, 0); +-- 2 more defenders for 25 man +DELETE FROM creature WHERE guid IN (800010, 800011); +INSERT INTO `creature` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`modelid`,`equipment_id`,`position_x`,`position_y`,`position_z`,`orientation`,`spawntimesecs`,`spawndist`,`currentwaypoint`,`curhealth`,`curmana`,`DeathState`,`MovementType`) VALUES +(800010, 34014, 603, 2, 65535, 0, 0, 1945.2, 37.2442, 411.356, 3.62107, 7200, 0, 0, 334680, 0, 0, 0), +(800011, 34014, 603, 2, 65535, 0, 0, 1936.11, 49.8233, 411.352, 3.85276, 7200, 0, 0, 334680, 0, 0, 0); +DELETE FROM `creature_movement` WHERE `id`=94378; +INSERT INTO `creature_movement` (`id`,`point`,`position_x`,`position_y`,`position_z`,`waittime`,`textid1`,`textid2`,`textid3`,`textid4`,`textid5`,`emote`,`spell`,`wpguid`,`orientation`,`model1`,`model2`) VALUES +-- UPDATED CREATURE MOVEMENT FOR AURIAYA, SHOULD MOVE AROUND THE CENTER SPIRE +#(94378, 4, 1916.56, -69.9669, 417.718, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2.2268, 0, 0), -- after hodir up +#(94378, 3, 1900.26, -24.0211, 417.722, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1.15909, 0, 0), -- center kolgoran +#(94378, 2, 1916.97, 21.1583, 417.748, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0.86988, 0, 0), -- before yogg up + +(94378, 1, 1925.012, 30.0067, 411.356, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0.69685, 0, 0), -- before yogg down +(94378, 2, 1957.04, 49.3067, 411.355, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0.37071, 0, 0), -- after yogg down +(94378, 3, 1967.38, 51.4931, 417.561, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0.09545, 0, 0), -- after yogg up +(94378, 4, 2013.07, 44.3788, 417.715, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5.71365, 0, 0), -- before mimiron up +(94378, 5, 2021.35, 37.9771, 411.387, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5.25205, 0, 0), -- before mimiron down +(94378, 6, 2046.36, 8.56725, 411.524, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5.203, 0, 0), -- after mimiron down +(94378, 7, 2053.32, -7.1366, 421.78, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4.85107, 0, 0), -- before freya up +(94378, 8, 2052.87, -40.8556, 421.706, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4.4223, 0, 0), -- after freya up +(94378, 9, 2045.00, -56.79369, 411.359, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4.20538, 0, 0), -- before thorim down +(94378, 10, 2022.18, -86.5468, 411.355, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3.60096, 0, 0), -- after thorim down +(94378, 11, 2012.94, -92.7106, 417.717, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3.28968, 0, 0), -- after thorim up +(94378, 12, 1968.83, -101.0946, 417.722, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2.662873, 0, 0),-- before hodir up +(94378, 13, 1958.08, -96.7855, 411.864, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2.763719, 0, 0), -- before hodir down +(94378, 14, 1924.12, -78.5404, 411.488, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2.210024, 0, 0), -- after hodir down + +(94378, 15, 1958.08, -96.7855, 411.864, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2.763719, 0, 0), -- before hodir down +(94378, 16, 1968.83, -101.0946, 417.722, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2.662873, 0, 0),-- before hodir up +(94378, 17, 2012.94, -92.7106, 417.717, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3.28968, 0, 0), -- after thorim up +(94378, 18, 2022.18, -86.5468, 411.355, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3.60096, 0, 0), -- after thorim down +(94378, 19, 2045.00, -56.79369, 411.359, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4.20538, 0, 0), -- before thorim down +(94378, 20, 2052.87, -40.8556, 421.706, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4.4223, 0, 0), -- after freya up +(94378, 21, 2053.32, -7.1366, 421.78, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4.85107, 0, 0), -- before freya up +(94378, 22, 2046.36, 8.56725, 411.524, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5.203, 0, 0), -- after mimiron down +(94378, 23, 2021.35, 37.9771, 411.387, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5.25205, 0, 0), -- before mimiron down +(94378, 24, 2013.07, 44.3788, 417.715, 0, 0, 0, 0, 0, 0, 0, 0, 0, 5.71365, 0, 0), -- before mimiron up +(94378, 25, 1967.38, 51.4931, 417.561, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0.09545, 0, 0), -- after yogg up +(94378, 26, 1957.04, 49.3067, 411.355, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0.37071, 0, 0); -- after yogg down + +-- Freya +UPDATE creature_template SET ScriptName = 'boss_freya' WHERE entry = 32906; +UPDATE creature_template SET ScriptName = 'boss_elder_brightleaf' WHERE entry = 32915; +UPDATE creature_template SET ScriptName = 'boss_elder_ironbranch' WHERE entry = 32913; +UPDATE creature_template SET ScriptName = 'boss_elder_stonebark' WHERE entry = 32914; +UPDATE creature_template SET ScriptName = 'mob_iron_roots' WHERE entry IN (33088, 33168); +UPDATE creature_template SET ScriptName = 'mob_freya_ground' WHERE entry IN (33215, 33228, 33170, 33050, 34129); +UPDATE creature_template SET ScriptName = 'mob_freya_spawned' WHERE entry IN (32916, 32919, 33202, 33203, 32918); +-- some aura fixes, this may be wrong +REPLACE INTO `spell_script_target` (`entry`, `type`, `targetEntry`) VALUES ('62525', '1', '32906'); +REPLACE INTO `spell_script_target` (`entry`, `type`, `targetEntry`) VALUES ('62524', '1', '32906'); +REPLACE INTO `spell_script_target` (`entry`, `type`, `targetEntry`) VALUES ('62521', '1', '32906'); +REPLACE INTO `spell_script_target` (`entry`, `type`, `targetEntry`) VALUES ('62385', '1', '32906'); +REPLACE INTO `spell_script_target` (`entry`, `type`, `targetEntry`) VALUES ('62387', '1', '32906'); +REPLACE INTO `spell_script_target` (`entry`, `type`, `targetEntry`) VALUES ('62386', '1', '32906'); + +-- Added hack for Freya's gift +DELETE FROM `gameobject` WHERE `id` IN (194324, 194325,194326,194327,194328,194329,194330,194331); +INSERT INTO `gameobject` (`guid`, `id`, `map`, `spawnMask`, `phaseMask`, `position_x`, `position_y`, `position_z`, `orientation`, `rotation0`, `rotation1`, `rotation2`, `rotation3`, `spawntimesecs`, `animprogress`, `state`) VALUES +(733324, 194324, 603, 1, 65535, 2374.876221, -78.512665, 425.073608, 3.260976, 0, 0, 0.706026, 0.708186, -604800, 100, 1), +(733325, 194325, 603, 1, 65535, 2374.876221, -78.512665, 425.073608, 3.260976, 0, 0, 0.706026, 0.708186, -604800, 100, 1), +(733326, 194326, 603, 1, 65535, 2374.876221, -78.512665, 425.073608, 3.260976, 0, 0, 0.706026, 0.708186, -604800, 100, 1), +(733327, 194327, 603, 1, 65535, 2374.876221, -78.512665, 425.073608, 3.260976, 0, 0, 0.706026, 0.708186, -604800, 100, 1), +(733328, 194328, 603, 2, 65535, 2374.876221, -78.512665, 425.073608, 3.260976, 0, 0, 0.706026, 0.708186, -604800, 100, 1), +(733329, 194329, 603, 2, 65535, 2374.876221, -78.512665, 425.073608, 3.260976, 0, 0, 0.706026, 0.708186, -604800, 100, 1), +(733330, 194330, 603, 2, 65535, 2374.876221, -78.512665, 425.073608, 3.260976, 0, 0, 0.706026, 0.708186, -604800, 100, 1), +(733331, 194331, 603, 2, 65535, 2374.876221, -78.512665, 425.073608, 3.260976, 0, 0, 0.706026, 0.708186, -604800, 100, 1); +-- Delete bugged spell from mobs +DELETE FROM `creature_ai_scripts` WHERE `creature_id` IN (33430,33732) AND `action1_param1` = 63007; + +-- Hodir +UPDATE creature_template SET ScriptName = 'boss_hodir' WHERE entry = 32845; +UPDATE creature_template SET ScriptName = 'mob_toasty_fire' WHERE entry = 33342; +UPDATE creature_template SET ScriptName = 'mob_flashFreeze' WHERE entry IN (32926); +UPDATE `creature_template` SET `modelid_1` = 15880 WHERE `entry` = 33174; +UPDATE `creature_template` SET `modelid_2` = 28470, ScriptName = 'mob_icicle' WHERE `entry` = 33169; +-- flash freeze that will lock the npcs IN iceblock +UPDATE creature_template SET `modelid_1` = 25865, ScriptName = 'mob_npc_flashFreeze' WHERE entry IN (32938, 33353); +UPDATE creature SET spawnMask = 3 WHERE id IN (32938); +UPDATE creature SET spawnMask = 2 WHERE id IN (32901, 32900, 32950, 32946,33333, 33330, 33326); +UPDATE creature_template SET ScriptName = 'npc_hodir_priest' WHERE entry IN (32897, 33326, 32948, 33330); +UPDATE creature_template SET ScriptName = 'npc_hodir_druid' WHERE entry IN (33325, 32901, 32941, 33333); +UPDATE creature_template SET ScriptName = 'npc_hodir_shaman' WHERE entry IN (33328, 32900, 33332, 32950); +UPDATE creature_template SET ScriptName = 'npc_hodir_mage' WHERE entry IN (32893, 33327, 33331, 32946); + +-- FIXED SOME POSITIONING FOR THE FRIENDLY NPCS, Besides this the freeze aura should also be fixed. +-- fixed npc positioning and added 4 extra flashfreeze for them. +-- 10 man: +-- mage +UPDATE creature SET position_x = 2000.9, position_y = -231.232 WHERE guid = 131930; +-- priest +UPDATE creature SET position_x = 2009.06, position_y = -244.058 WHERE guid = 131933; +DELETE FROM creature WHERE guid IN (800005); +INSERT INTO creature VALUES +(800005, 32897, 603, 3, 128,0,0, 2009.06, -244.058, 432.687, 1.68485, 7200,0,0, 5647, 0, 0, 0); -- aly priest +-- shaman +UPDATE creature SET position_x = 1983.75, position_y = -243.358 WHERE id = 33328; +UPDATE creature SET position_x = 1983.75, position_y = -243.358 WHERE id = 33332; +-- druid +UPDATE creature SET position_x = 2021.12, position_y = -236.648 WHERE id = 32941; +UPDATE creature SET position_x = 2021.12, position_y = -236.648 WHERE id = 33325; +-- 25 man: +-- druid +UPDATE creature SET position_x = 2013.5, position_y = -240.338 WHERE id = 32901; +DELETE FROM creature WHERE guid IN (800006); +INSERT INTO creature VALUES +(800006, 32938, 603, 2, 1,0,0, 2013.5, -240.338, 432.687, 1.68485, 7200,0,0, 5647, 0, 0, 0); +-- shaman: +UPDATE creature SET position_x = 2011.48, position_y = -232.79 WHERE id = 32900; +UPDATE creature SET position_x = 2011.48, position_y = -232.79 WHERE id = 32950; +DELETE FROM creature WHERE guid IN (800007); +INSERT INTO creature VALUES +(800007, 32938, 603, 2, 1,0,0, 2011.48, -232.79, 432.687, 1.68485, 7200,0,0, 5647, 0, 0, 0); +-- mage: +DELETE FROM creature WHERE guid IN (800008, 800010); +INSERT INTO creature VALUES +(800008, 33327, 603, 2, 128,0,0, 1978.49, -241.476, 432.687, 1.68485, 7200,0,0, 5647, 0, 0, 0), -- aly mage +(800010, 32938, 603, 2, 1,0,0, 1978.49, -241.476, 432.687, 1.68485, 7200,0,0, 5647, 0, 0, 0); +-- priest +UPDATE creature SET position_x = 1997.88, position_y = -239.394 WHERE id = 33330; +DELETE FROM creature WHERE guid IN (800009); +INSERT INTO creature VALUES +(800009, 32938, 603, 2, 1,0,0, 1997.88, -239.394, 432.687, 1.68485, 7200,0,0, 5647, 0, 0, 0); + +-- Mimiron +UPDATE `gameobject_template` SET `data0` = '60000' WHERE `entry` =194675; +UPDATE creature_template SET ScriptName = 'boss_mimiron' WHERE entry = 33350; +UPDATE creature_template SET `RegenHealth`= 0, ScriptName = 'boss_leviathan_mk' WHERE entry = 33432; +UPDATE creature_template SET ScriptName = 'leviathan_turret' WHERE entry = 34071; +UPDATE creature_template SET ScriptName = 'mob_mimiron_flames' WHERE entry IN (34363, 34121); +UPDATE creature_template SET `RegenHealth`= 0, ScriptName = 'boss_vx001' WHERE entry = 33651; +UPDATE creature_template SET `RegenHealth`= 0, ScriptName = 'boss_aerial_command_unit' WHERE entry = 33670; +UPDATE creature SET position_x = 2784.35, position_y = 2578.03, orientation = 3.2 WHERE id = 33350; +UPDATE creature SET position_x = 2794.86, position_y = 2597.83, orientation = 3.57, spawnMask = 3 WHERE id = 33432; +UPDATE gameobject_template SET flags = 6553632, data2 = 2000, ScriptName='go_red_button' WHERE entry = 194739; +UPDATE creature_template SET ScriptName = 'mob_proximity_mine' WHERE entry = 34362; +UPDATE creature_template SET ScriptName = 'mob_bomb_bot' WHERE entry IN (33836, 34192); +UPDATE creature_template SET `faction_A` = 14, `faction_H` = 14, `minlevel` = 80, `maxlevel` = 80, ScriptName = 'mob_emergency_bot' WHERE entry = 34147; +UPDATE creature_template SET ScriptName = 'mob_frost_bomb_ulduar' WHERE entry = 34149; +UPDATE creature_template SET ScriptName = 'mob_mimiron_inferno' WHERE entry = 33370; +UPDATE creature_template SET ScriptName = 'mob_assault_bot' WHERE entry = 34057; +UPDATE creature_template SET ScriptName = 'mob_magnetic_core' WHERE entry = 34068; +UPDATE `gameobject` SET `position_x` = 2734.73 WHERE `id` IN (194789, 194956); +-- spells, may not be correct +REPLACE INTO `spell_script_target` (`entry`, `type`, `targetEntry`) VALUES ('64444', '1', '33670'); +REPLACE INTO `spell_script_target` (`entry`, `type`, `targetEntry`) VALUES ('63414', '1', '33651'); +REPLACE INTO `spell_script_target` (`entry`, `type`, `targetEntry`) VALUES ('65101', '1', '33350'); +-- REPLACE INTO `spell_script_target` (`entry`, `type`, `targetEntry`) VALUES ('62909', '1', '33350'); + +-- SOME MIMIRON LOOT BOXES ARE MISSING IN YTDB, THIS IS THE FIX FOR IT! +-- mimiron loot fix: +-- INSERT two new boxes +DELETE FROM `gameobject` WHERE `id` IN (194957, 194958); +INSERT INTO `gameobject` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`position_x`,`position_y`,`position_z`,`orientation`,`rotation0`,`rotation1`,`rotation2`,`rotation3`,`spawntimesecs`,`animprogress`,`state`) VALUES +(110004, 194957, 603, 1, 65535, 2734.73, 2568.98, 364.314, 0.0139475, 0, 0, 0.00697369, 0.999976, -604800, 100, 1); +INSERT INTO `gameobject` (`guid`,`id`,`map`,`spawnMask`,`phaseMask`,`position_x`,`position_y`,`position_z`,`orientation`,`rotation0`,`rotation1`,`rotation2`,`rotation3`,`spawntimesecs`,`animprogress`,`state`) VALUES +(110005, 194958, 603, 2, 65535, 2734.73, 2568.98, 364.314, 0.0139475, 0, 0, 0.00697369, 0.999976, -604800, 100, 1); +-- 10 man hard: +DELETE FROM `gameobject_loot_template` WHERE (`entry`=194957); +INSERT INTO `gameobject_loot_template` VALUES +(194957, 45089, 5, 0, -45089, 1, 0, 0, 0), +(194957, 45095, 2.0408, 0, 1, 1, 0, 0, 0), +(194957, 45649, 100, 0, -45649, 1, 0, 0, 0), +(194957, 45663, 0.4028, 0, 1, 1, 0, 0, 0), +(194957, 45787, -100, 0, 1, 1, 0, 0, 0), +(194957, 47241, 100, 0, 1, 1, 0, 0, 0), +(194957, 45972, 0, 1, 1, 1, 0, 0, 0), +(194957, 45973, 0, 1, 1, 1, 0, 0, 0), +(194957, 45974, 0, 1, 1, 1, 0, 0, 0), +(194957, 45975, 0, 1, 1, 1, 0, 0, 0), +(194957, 45976, 0, 1, 1, 1, 0, 0, 0), +(194957, 45982, 0, 2, 1, 1, 0, 0, 0), +(194957, 45988, 0, 2, 1, 1, 0, 0, 0), +(194957, 45989, 0, 2, 1, 1, 0, 0, 0), +(194957, 45990, 0, 2, 1, 1, 0, 0, 0), +(194957, 45993, 0, 2, 1, 1, 0, 0, 0); +-- 25 man hard: +DELETE FROM `gameobject_loot_template` WHERE (`entry`=194958); +INSERT INTO `gameobject_loot_template` VALUES +(194958, 45038, 10, 0, 1, 1, 0, 0, 0), +(194958, 45087, 33, 0, 1, 1, 0, 0, 0), +(194958, 45089, 5, 0, -45089, 1, 0, 0, 0), +(194958, 45643, 100, 0, -45643, 1, 0, 0, 0), +(194958, 45816, -100, 0, 1, 1, 0, 0, 0), +(194958, 47241, 100, 0, 1, 1, 0, 0, 0), +(194958, 45489, 0, 1, 1, 1, 0, 0, 0), +(194958, 45490, 0, 1, 1, 1, 0, 0, 0), +(194958, 45491, 0, 1, 1, 1, 0, 0, 0), +(194958, 45492, 0, 1, 1, 1, 0, 0, 0), +(194958, 45493, 0, 1, 1, 1, 0, 0, 0), +(194958, 45494, 0, 2, 1, 1, 0, 0, 0), +(194958, 45495, 0, 2, 1, 1, 0, 0, 0), +(194958, 45496, 0, 2, 1, 1, 0, 0, 0), +(194958, 45497, 0, 2, 1, 1, 0, 0, 0), +(194958, 45663, 0, 2, 1, 1, 0, 0, 0); + +-- Thorim +UPDATE creature_template SET ScriptName = 'boss_thorim' WHERE entry = 32865; +UPDATE creature_template SET ScriptName = 'boss_runic_colossus' WHERE entry = 32872; +UPDATE creature_template SET ScriptName = 'boss_ancient_rune_giant' WHERE entry = 32873; +UPDATE creature_template SET ScriptName = 'npc_lightning_orb' WHERE entry = 33138; +UPDATE creature_template SET ScriptName = 'mob_thorim_trap_bunny' WHERE entry IN (33725, 33054); +UPDATE creature_template SET ScriptName = 'mob_thorim_preadds' WHERE entry IN (32885, 32883, 32907, 32908, 32882); +UPDATE creature SET spawnMask = 3 WHERE id = 32873; +UPDATE creature_template SET ScriptName = 'npc_sif' WHERE entry = 33196; +UPDATE `gameobject` SET `position_y` = -286.67, `position_z` = 419.50 WHERE `id` IN (194312, 194313, 194314, 194315); +UPDATE gameobject_template SET flags = 6553632, ScriptName='go_thorim_lever' WHERE entry = 194264; +-- adds +UPDATE creature_template SET ScriptName = 'mob_dark_rune_acolyte' WHERE entry = 33110; +UPDATE creature_template SET ScriptName = 'mob_dark_rune_champion' WHERE entry = 32876; +UPDATE creature_template SET ScriptName = 'mob_dark_rune_commoner' WHERE entry = 32904; +UPDATE creature_template SET ScriptName = 'mob_dark_rune_warbringer' WHERE entry = 32877; +UPDATE creature_template SET ScriptName = 'mob_dark_rune_ring_guard' WHERE entry = 32874; +UPDATE creature_template SET ScriptName = 'mob_dark_rune_honor_guard' WHERE entry = 33125; + +#DELETE FROM gameobject WHERE id = 194264; +#INSERT INTO gameobject VALUES (110010,194264,603,3,65535,2173.276, -252.805, 420.146, 3.027,0,0,0,0,604800,0,1); +UPDATE `creature` SET `phaseMask` = 128 WHERE `id` IN (32907, 32883); -- horde soldiers: phase 128 for aly: 65535 +UPDATE `creature` SET `phaseMask` = 64 WHERE `id` IN (32885, 32908); -- alliance soldiers: phase 64 for horde +-- reset pos to some creatures +-- SOME POSITION ADJUSTMENTS, CHECK YOUR DB FOR THIS +/* +UPDATE creature SET spawnMask = 0 WHERE guid IN (129413, 129412, 129856, 129857); +UPDATE `creature` SET `position_x` = 2222.69 WHERE `guid` = 129413; +UPDATE `creature` SET `position_x` = 2222.69 WHERE `guid` = 129412; +UPDATE `creature` SET `position_x` = 2227.34 WHERE `guid` = 129856; +UPDATE `creature` SET `position_x` = 2227.34 WHERE `guid` = 129857; + +UPDATE `creature` SET `position_y` = -437.73 WHERE `guid` = 129860; +UPDATE `creature` SET `position_y` = -437.73 WHERE `guid` = 129861; +UPDATE `creature` SET `position_y` = -434.64 WHERE `guid` = 129862; +UPDATE `creature` SET `position_y` = -434.64 WHERE `guid` = 129863; +UPDATE `creature` SET `position_y` = -434.64 WHERE `guid` = 129391; +*/ +REPLACE INTO `spell_script_target` (`entry`, `type`, `targetEntry`) VALUES ('62565', '1', '32865'); + +-- Vezax +UPDATE creature_template SET unit_flags = 0, ScriptName = 'boss_vezax' WHERE entry = 33271; +UPDATE creature_template SET MinHealth = 23009250, MaxHealth = 23009250, ScriptName = 'boss_vezax' WHERE entry = 33449; +UPDATE `creature_template` SET `mechanic_immune_mask` = 619397115 WHERE `entry` IN (33271, 33449); +UPDATE creature_template SET ScriptName = 'mob_saronite_animus' WHERE entry = 33524; +UPDATE creature_template SET ScriptName = 'mob_saronite_vapor', movementType = 1 WHERE entry = 33488; + +-- Yogg +UPDATE creature_template SET ScriptName = 'boss_yogg_saron' WHERE entry = 33288; +UPDATE creature_template SET `RegenHealth`= 0, `flags_extra` = 1,`type_flags` = 108, ScriptName = 'boss_sara' WHERE entry = 33134; +UPDATE creature SET spawnMask = 3, MovementType = 0 WHERE id = 33134; +UPDATE creature_template SET `RegenHealth`= 0, ScriptName = 'boss_brain_of_yogg_saron' WHERE entry = 33890; +UPDATE creature SET `spawntimesecs` = 604800 WHERE `id` = 33134; +UPDATE creature_template SET ScriptName = 'mob_corruptor_tentacle' WHERE entry = 33985; +UPDATE creature_template SET ScriptName = 'mob_constrictor_tentacle' WHERE entry = 33983; +UPDATE creature_template SET MinHealth = 40000, MaxHealth = 40000, minLevel = 80, maxLevel = 80, ScriptName = 'mob_vision_tentacle' WHERE entry = 33943; +UPDATE creature_template SET MinHealth = 400000, MaxHealth = 400000, ScriptName = 'mob_crusher_tentacle' WHERE entry = 33966; +UPDATE creature_template SET MinHealth = 220000, MaxHealth = 220000, ScriptName = 'mob_guardian_of_yogg_saron' WHERE entry = 33136; +UPDATE creature_template SET ScriptName = 'mob_immortal_guardian' WHERE entry = 33988; +UPDATE creature_template SET `faction_A` = 14, `faction_H` = 14, ScriptName = 'mob_death_orb' WHERE entry = 33882; +UPDATE creature_template SET ScriptName = 'mob_sanity_well' WHERE entry = 33991; +UPDATE creature_template SET scriptname='mob_madness_portal' WHERE `entry`=34072; +UPDATE creature_template SET scriptname='mob_laughing_skull' WHERE `entry`=33990; +UPDATE creature_template SET scriptname='mob_ominous_cloud' WHERE `entry`=33292; +UPDATE creature SET spawnMask = 3 WHERE id = 33292; +-- spells +REPLACE INTO `spell_script_target` (`entry`, `type`, `targetEntry`) VALUES ('63886', '1', '33882'); +-- Keepers +UPDATE creature_template SET ScriptName = 'keeper_hodir' WHERE entry = 33213; +UPDATE creature_template SET ScriptName = 'keeper_freya' WHERE entry = 33241; +UPDATE creature_template SET ScriptName = 'keeper_thorim' WHERE entry = 33242; +UPDATE creature_template SET ScriptName = 'keeper_mimiron' WHERE entry = 33244; +-- INSERT doors & yoggs brain INTO the brain room +DELETE FROM gameobject WHERE id IN (194635); +INSERT INTO gameobject VALUES (110000,194635,603,3,65535,2022.490,-25.389,261.961,0,0,0,0,0,604800,0,1); +DELETE FROM gameobject WHERE guid = 110001; +INSERT INTO gameobject VALUES (110001,194462,603,3,65535,2104.555, -25.635,242.646,0,0,0,0,0,604800,100,1); +DELETE FROM creature WHERE id IN (33890); +INSERT INTO creature VALUES (800000,33890,603,3,65535,0,0,1981.422,-22.442,255.011,0,604800,0,0,1371428,0,0,0); + +-- Algalon +UPDATE creature_template SET ScriptName = 'boss_algalon' WHERE entry = 32871; +UPDATE creature_template SET ScriptName = 'mob_collapsing_star' WHERE entry = 32955; +UPDATE creature_template SET ScriptName = 'mob_living_constellation' WHERE entry = 33052; +UPDATE creature_template SET ScriptName = 'mob_black_hole' WHERE entry = 32953; +UPDATE creature_template SET ScriptName = 'mob_cosmic_smash_target' WHERE entry IN (33105, 33104); +UPDATE creature_template SET minhealth = 39099, maxhealth = 39099 WHERE entry = 33089; +UPDATE gameobject_template SET flags= 6553632, ScriptName='go_celestial_acces' WHERE entry IN (194628, 194752); + +-- Teleporter +UPDATE `gameobject_template` SET `flags` = 0, `ScriptName` = 'go_ulduar_teleporter' WHERE `entry` IN (194569); + +-- Keepers +-- Keepers images +UPDATE creature_template SET `npcflag` = 1, `unit_flags` = 2, ScriptName = 'hodir_image' WHERE entry = 33411; +UPDATE creature_template SET `npcflag` = 1, `unit_flags` = 2, ScriptName = 'freya_image' WHERE entry = 33410; +UPDATE creature_template SET `npcflag` = 1, `unit_flags` = 2, ScriptName = 'thorim_image' WHERE entry = 33413; +UPDATE creature_template SET `npcflag` = 1, `unit_flags` = 2, ScriptName = 'mimiron_image' WHERE entry = 33412; +-- INSERT keepers imagees INTO the db +DELETE FROM creature WHERE guid IN (800001, 800002, 800003, 800004); +INSERT INTO creature VALUES +(800001, 33410, 603, 3, 65535,0,0, 2036.892, 25.621, 411.358, 3.83, 604800,0,0, 5647, 0, 0, 0), -- Freya +(800002, 33412, 603, 3, 65535,0,0, 1939.215, 42.677, 411.355, 5.31, 604800,0,0, 5647, 0, 0, 0), -- Mimiron +(800003, 33411, 603, 3, 65535,0,0, 1939.195, -90.662, 411.357, 1.06, 604800,0,0, 5647, 0, 0, 0), -- Hodir +(800004, 33413, 603, 3, 65535,0,0, 2036.674, -73.814, 411.355, 2.51, 604800,0,0, 5647, 0, 0, 0); -- Thorim + +-- Doors +UPDATE gameobject_template SET faction = 114 WHERE entry IN (194553, 194554, 194556, 194148, 194634, 194635, 194905, 194441, +194442, 194416, 194774, 194775, 194776, 194560, 194557, 194558, 194750, 194910, 194559, 194635, 194636, 194637, 194631, 194255, 194630, 194767); +UPDATE gameobject_template SET faction = 114, `flags` = 4 WHERE entry IN (192075, 194173); -- snowdrifts +-- consoles +UPDATE gameobject_template SET faction = 0 WHERE entry IN (194555, 194628); + +-- loot chests +UPDATE gameobject_template SET faction = 0, data15 = 1 WHERE entry IN (195046, 195047, 194307, 194308, 194200, 194201, 194312, 194313, 194314, 194315, 194821, +194822, 194823, 194324, 194325, 194326, 194327, 194328, 194329, 194330, 194331, 194789, 194956, 194957, 194958); +UPDATE gameobject SET spawntimesecs = -604800 WHERE id IN (195046, 195047, 194307, 194308, 194200, 194201, 194312, 194313, 194314, 194315, 194821, +194822, 194823, 194324, 194325, 194326, 194327, 194328, 194329, 194330, 194331, 194789, 194956); + +-- NOT SURE IF THE TRASH MOBS ARE SCRIPTED BY EVENTAI +-- Mobs +UPDATE creature_template SET ScriptName = 'generic_creature' WHERE entry IN (34086, 34085, 34069, 33237, 34234, 33236, 33264, 34164, 34196, 34199, 34198, +34190, 34197, 33699, 34134, 34135, 34133, 33430, 33528, 33431, 33527, 33526, 33525, 33355, 33354, 34193, 34183, 33110, +32878, 33822, 33818, 33824, 33823, 33772, 33838, 33819, 33820, 32875, 33346, 34057); diff --git a/addition/733_scriptdev2_ulduar.sql b/addition/733_scriptdev2_ulduar.sql new file mode 100644 index 0000000..aedbfd8 --- /dev/null +++ b/addition/733_scriptdev2_ulduar.sql @@ -0,0 +1,313 @@ +/* ULDUAR from Xfurry*/ +-- ids may need to be rewritten +DELETE from `script_texts` where `entry` between -1603500 and -1603000; +-- translate from lanc +REPLACE INTO `script_texts` (entry, content_default, content_loc1, content_loc2, content_loc3, content_loc4, content_loc5, content_loc6, content_loc7, content_loc8, sound, type, language, emote, comment) VALUES +-- Leviathan: needs intro & outro +(-1603201,"Threat assessment routine modified. Current target threat level: zero. Acquiring new target.","","","","","","","","????????? ? ????????? ?????? ??????. ??????? ?????? ??????? ????: ???????. ????? ????? ????.",15521,1,0,0,"Flame Leviathan Slay"), +(-1603202,"Total systems failure. Defense protocols breached. Leviathan Unit shutting down.","","","","","","","","????? ????????? ????. ????? ???????? ??????????. ?????? ??????? ???????? ????????? ???? ??????.",15520,1,0,0,"Flame Leviathan Death"), +(-1603203,"Hostile entities detected. Threat assessment protocol active. Primary target engaged. Time minus thirty seconds to re-evaluation.","","","","","","","","?????????? ??????????. ?????? ????????? ?????? ??????. ??????? ???? ????????. ????????? ?????? ????? ???????? ??????.",15506,1,0,0,"Flame Leviathan Aggro"), +(-1603204,"Threat re-evaluated. Target assessment complete. Changing course.","","","","","","","","????????? ?????? ?????? - ????????. ?????? ???? - ?????????. ????? ?????.",15507,1,0,0,"Flame Leviathan change1"), +(-1603205,"Pursuit objective modified. Changing course.","","","","","","","","????????? ???? ?????????????. ????? ?????.",15508,1,0,0,"Flame Leviathan change2"), +(-1603206,"Hostile entity stratagem predicted. Rerouting battle function. Changing course.","","","","","","","","????????? ?????? ????????????. ?????????? ????????? ?????? ???????. ????? ?????.",15509,1,0,0,"Flame Leviathan change3"), +(-1603207,"Unauthorized entity attempting circuit overload. Activating anti-personnel countermeasures.","","","","","","","","??????????????????? ????????????? ? ??????. ????????? ??????? ?????????? ????? ????.",15516,1,0,0,"Flame Leviathan player on top"), +(-1603208,"System malfunction. Diverting power to support systems.","","","","","","","","?????????????? ????. ????????? ????????? ??????.",15517,1,0,0,"Flame Leviathan overload1"), +(-1603209,"Combat matrix overload. Powering do-o-o-own...","","","","","","","","?????? ??????? ???????????. ???????....",15518,1,0,0,"Flame Leviathan overload2"), +(-1603210,"System restart required. Deactivating weapon systems.","","","","","","","","????????? ??????????. ?????????? ?????? ??????????.",15519,1,0,0,"Flame Leviathan overload3"), +(-1603211,"Orbital countermeasures enabled.","","","","","","","","??????? ???????????? ?????????? - ????????.",15510,1,0,0,"Flame Leviathan hard mode"), +(-1603212,"Alert! Static defense system failure. Orbital countermeasures disabled.","","","","","","","","???????! ???? ???????????? ??????? ??????. ??????? ???????????? ?????????? - ?????????.",15511,1,0,0,"Flame Leviathan towers down"), +(-1603213,"'Hodir's Fury' online. Acquiring target.","","","","","","","","?????? ?????? - ????????????. ????? ????.",15512,1,0,0,"Flame Leviathan frost"), +(-1603214,"'Mimiron's Inferno' online. Acquiring target.","","","","","","","","?????? ????? ???????? - ????????????. ????? ????.",15513,1,0,0,"Flame Leviathan fire"), +(-1603215,"'Thorim's Hammer' online. Acquiring target.","","","","","","","","????? ?????? - ???????????. ????? ????.",15515,1,0,0,"Flame Leviathan energy"), +(-1603216,"'Freya's Ward' online. Acquiring target.","","","","","","","","?????? ???? - ????????????. ????? ????.",15514,1,0,0,"Flame Leviathan nature"), +(-1603352,'PursueWarn' ,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,3,0,0,'EMOTE_pursue'), + +-- Ignis: +(-1603010, "Insolent whelps! Your blood will temper the weapons used to reclaim this world!", "","","","","","","","??????? ??????! ???? ????? ??????? ??????, ??????? ??? ???????? ???? ???!",15564, 1, 0, 0, 'IgnisAggro'), +(-1603011, "Let the inferno consume you!", "","","","","","","","?? ???????? ??? ????? ???????????!",15567, 1, 0, 0, 'Ignis Scorch1'), +(-1603012, "BURN! Burn in the makers fire!", "","","","","","","","??????! ?????? ? ???? ??????!",15568, 1, 0, 0, 'Ignis scroch2'), +(-1603013, "I will burn away your impurities!", "","","","","","","","???????? ???????? ?????!",15566, 1, 0, 0, 'Ignis Slagpot'), +(-1603014, 'Ignis the Furnace Master begins to cast Flame Jets!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,3,0,0,'EMOTE_FLAME_JETS'), +(-1603015, "Arise, soldiers of the Iron Crucible! The Makers\' will be done!", "","","","","","","","??????, ????? ????????? ???????! ?? ?????????? ???? ??????!",15565, 1, 0, 0, 'Ignis summon'), +(-1603016, "More scraps for the scrapheap!", "","","","","","","","???? ????? ? ???????? ????!",15569, 1, 0, 0, 'IgnisSlay1'), +(-1603017, "Your bones will serve as kindling!", "","","","","","","","???? ????? ?????? ?? ????????!",15570, 1, 0, 0, 'IgnisSlay2'), +(-1603018, "Let it be finished!", "","","","","","","","???????? ? ????!",15571, 1, 0, 0, 'IgnisBerserk'), +(-1603019, "I. Have. Failed.", "","","","","","","","?... ????????...",15572, 1, 0, 0, 'Ignis death'), + +-- razorscale +(-1603020,'Welcome, champions! All of our attempts at grounding her have failed. We could use a hand in bring her down with these harpoon guns.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,"??????????? ??? ?????! ??? ???? ??????? ????? ?? ?? ?????????? ???????. ??? ?? ??????????? ???? ??????, ????????? ????? ?? ???? ??????.",15647,0,0,0,'razorscale intro - commander'), +(-1603021,'Give us a moment to prepare to build the turrets.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,1,0,0,'razor aggro 1 - eng'), +(-1603022,'Be on the lookout! Mole machines will be surfacing soon with those nasty Iron dwarves aboard!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,1,0,0,'razor aggro 2 - commander'), +(-1603023,'Ready to move out, keep those dwarves off of our backs!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,1,0,0,'razor aggro 3 - eng'), +(-1603024,'Move! Quickly! She won\'t remain grounded for long.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,"???????! ??? ????? ????? ???????.",0,1,0,0,'razor ground - commander'), +(-1603025,'Razorscale takes a deep breath...',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,3,0,0,'razor deep breath'), +(-1603026,'Fires out! Let\'s rebuild those turrets!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,1,0,0,'razor extinguish fires'), +(-1603353,'Harpoon Turret is ready for use!' ,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,3,0,0,'EMOTE_harpoon'), +(-1603354,'Razorscale grounded permanently!' ,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,3,0,0,'EMOTE_ground'), + +-- Xt002 +(-1603030,"You are bad... Toys... Very... Baaaaad!","","","","","","","","?????? ???????... ?????... ??????!",15731,1,0,0,"XT-002 Death"), +(-1603031,"I'm tired of these toys. I don't want to play anymore!","","","","","","","","????? ??????? ???????. ??????? ??????!",15730,1,0,0,"XT-002 Berserk"), +(-1603032,"Time for a new game! My old toys will fight my new toys!","","","","","","","","????? ???????! ?????? ??????? ?????? ?????!",15732,1,0,0,"XT-002 Adds"), +(-1603033,"I'm ready to play!","","","","","","","","?????????? ????!",15726,1,0,0,"XT-002 Heart Closed"), +(-1603034,"So tired. I will rest for just a moment!","","","","","","","","? ??? ?????. ??????? ?????!",15725,1,0,0,"XT-002 Heart Opened"), +(-1603035,"I guess it doesn't bend that way.","","","","","","","","???????? ? ??? ??????? ?????? ?? ???????.",15729,1,0,0,"XT-002 Slay 2"), +(-1603036,"I... I think I broke it.","","","","","","","","???????... ? ?????? ??? ???????.",15728,1,0,0,"XT-002 Slay 1"), +(-1603037,"NO! NO! NO! NO! NO!","","","","","","","","??????! ???! ???! ???! ???!",15727,1,0,0,"XT-002 Tympanic Tantrum"), +(-1603038,"New toys? For me? I promise I won't break them this time!","","","","","","","","????? ???????? ??? ????? ??????, ? ???? ??? ? ?? ?? ???????!",15724,1,0,0,"XT-002 Aggro"), +(-1603350,'XT-002 Deconstructor\'s heart is exposed and leaking energy!' ,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,3,0,0,'EMOTE_expose_heart'), +(-1603351,'XT-002 Deconstructor consumes a scrapbot to repair himself.' ,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,3,0,0,'EMOTE_repair'), + +-- Iron Council +-- Molgeim +(-1603040,"Nothing short of total decimation will suffice!","","","","","","","","",15657,1,0,0,"MolgeimAggro"), +(-1603041, "The legacy of storms shall not be undone...", "","","","","","","","",15662, 1, 0, 0, "MolgeimDeath1"), +(-1603042, "What have you gained from my defeat? You are no less doomed, mortals...", "","","","","","","","",15663, 1, 0, 0, 'MolgeimDeath2'), +(-1603043, "Decipher this!", "","","","","","","","",15660, 1, 0, 0, 'MolgeimDeathRune'), +(-1603044, "Face the lightning surge!", "","","","","","","","",15661, 1, 0, 0, 'MolgeimSummon'), +(-1603045, "The world on suffers yet another insignificant loss!", "","","","","","","","",15658, 1, 0, 0, 'MolgeimSlay1'), +(-1603046, "Death is the price of your arrogance.", "","","","","","","","",15659, 1, 0, 0, 'MolgeimSlay2'), +(-1603047, "This meeting of the Assembly of Iron is adjourned!", "","","","","","","","",15664, 1, 0, 0, 'MolgeimBerserk'), +-- Steelbreaker +(-1603050, "You will not defeat the Assembly of Iron so easily, invaders!", "","","","","","","","",15674, 1, 0, 0, 'SteelAggro'), +(-1603051, "My death only serves to hasten your demise.", "","","","","","","","",15678, 1, 0, 0, 'SteelDeath1'), +(-1603052, "Impossible!", "","","","","","","","",15679, 1, 0, 0, 'SteelDeath2'), +(-1603053, "So fragile and weak!", "","","","","","","","",15675, 1, 0, 0, 'SteelSlay1'), +(-1603054, "Flesh... such a hindrance.", "","","","","","","","",15676, 1, 0, 0, 'SteelSlay2'), +(-1603055, "You seek the secrets of Ulduar? Then take them!", "","","","","","","","",15677, 1, 0, 0, 'SteelOverwhelming'), +(-1603056, "This meeting of the Assembly of Iron is adjourned!", "","","","","","","","",15680, 1, 0, 0, 'SteelBerserk'), +-- Brudir +(-1603060, "Whether the world\'s greatest gnats or the world\'s greatest heroes, you\'re still only mortal.", "","","","","","","","",15684, 1, 0, 0, 'BrundirAggro'), +(-1603062, "Stand still and stare into the light!", "","","","","","","","",15687, 1, 0, 0, 'BrundirWhirl'), +(-1603063, "The power of the storm lives on...", "","","","","","","","",15689, 1, 0, 0, 'BrundirDeath1'), +(-1603064, "You rush headlong into the maw of madness!", "","","","","","","","",15690, 1, 0, 0, 'BrundirDeath2'), +(-1603065, "A merciful kill!", "","","","","","","","",15685, 1, 0, 0, 'BrundirSlay1'), +(-1603066, "HAH!", "","","","","","","","",15686, 1, 0, 0, 'BrundirSlay2'), +(-1603067, "This meeting of the Assembly of Iron is adjourned!", "","","","","","","","",15691, 1, 0, 0, 'BrundirBerserk'), +(-1603068, "Let the storm clouds rise and rain down death from above!", "","","","","","","","",15688, 1, 0, 0, 'BrundirFly'), + +-- Kologarn: +(-1603150, "None shall pass!", "","","","","","","","??? ?? ??????!",15586, 1, 0, 0, 'KologarnAggro'), +(-1603151, "OBLIVION!", "","","","","","","","????????",15591, 1, 0, 0, 'Kologarn shockweave'), +(-1603152, "I will squeeze the life from you!", "","","","","","","","? ???? ???? ?????!",15592, 1, 0, 0, 'Kologarn grab'), +(-1603153, "Just a scratch!", "","","","","","","","????????!",15589, 1, 0, 0, 'left arm lost'), +(-1603154, "Only a flesh wound!", "","","","","","","","????? ??? ?????!",15590, 1, 0, 0, 'right arm lost'), +(-1603155, "KOL-THARISH!", "","","","","","","","???-??????!",15587, 1, 0, 0, 'KologarnSlay1'), +(-1603156, "YOU FAIL!", "","","","","","","","???? ?????!",15588, 1, 0, 0, 'KologarnSlay2'), +(-1603157, "I am invincible!", "","","","","","","","? ?? ???????!",15594, 1, 0, 0, 'KologarnBerserk'), +(-1603158, "Master, they come...", "","","","","","","","??????????, ??? ????...",15593, 1, 0, 0, 'Kologarndeath'), +(-1603355,'The Right Arm has regrown!' ,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,3,0,0,'EMOTE_right hand'), +(-1603356,'The Left Arm has regrown!' ,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,3,0,0,'EMOTE_left hand'), +(-1603357,'Kologarn casts Stone Grip!' ,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,3,0,0,'EMOTE_stone grip'), + +-- Auriaya: +(-1603070,"Some things are better left alone!","","","","","","","","?? ??? ???? ?????????!",15473,1,0,0,"auriaya aggro"), +(-1603071,"The secret dies with you!","","","","","","","","??? ????? ????? ?????? ? ?????!",15474,1,0,0,"auriaya Slay 1"), +(-1603072,"There is no escape!","","","","","","","","???????? ???!",15475,1,0,0,"auriaya Slay 2"), +(-1603073,"You waste my time!","","","","","","","","?? ??????? ??????? ??? ?????!",15477,1,0,0,"auriaya berserk"), +(-1603074,"Auriaya screams in agony.","","","","","","","","?????????????????????!",15476,2,0,0,"auriaya death"), +(-1603358,'Auriaya begins to cast Terrifying Screech.' ,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,3,0,0,'EMOTE_screech'), +(-1603359,'Auriaya begins to activate the Feral Defender!' ,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,3,0,0,'EMOTE_defender'), + +-- Hodir +(-1603080,"","","","","","","","","",15556,2,0,0,"Hodir Frozen Blows"), +(-1603081,"Winds of the north consume you!","","","","","","","","?? ???????? ??? ???????? ?????!",15555,1,0,0,"Hodir Flash Freeze"), +(-1603082,"Welcome to the endless winter.","","","","","","","","??????????? ????, ??? ?????? ????.",15554,1,0,0,"Hodir Slay 2"), +(-1603083,"Tragic. To come so far, only to fail.","","","","","","","","??? ????????. ????????? ????? ????, ????? ???????.",15553,1,0,0,"Hodir Slay 1"), +(-1603084,"I... I am released from his grasp... at last.","","","","","","","","?????????... ?... ????????... ?? ??? ????.",15557,1,0,0,"Hodir Death"), +(-1603085,"You will suffer for this trespass!","","","","","","","","?? ?????? ???????? ?? ??? ?????????!",15552,1,0,0,"Hodir Aggro"), +(-1603086,"The veil of winter will protect you, champions!","","","","","","","","?????, ??? ??????? ?????? ????!",15559,1,0,0,"Hodir yogg"), +(-1603087,"Enough! This ends now!","","","","","","","","?? ??????! ?????? ??? ?? ????!",15558,1,0,0,"Hodir berserk"), +(-1603360,'Hodir begins to cast Flash Freeze!' ,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,3,0,0,'EMOTE_flash freeze'), +(-1603361,'Hodir gains Frozen Blows!' ,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,3,0,0,'EMOTE_frozen blows'), + +-- Freya: +(-1603000,"The Conservatory must be protected!","","","","","","","","????? ???????? ?????????!",15526,1,0,0,"freya aggro"), +(-1603001,"Elders, grant me your strength!","","","","","","","","???????, ????? ??? ????!",15527,1,0,0,"freya aggro hard"), +(-1603002,"Eonar, your servant requires aid!","","","","","","","","?????, ????? ??????????? ????? ??????!",15528,1,0,0,"summon conservator"), +(-1603003,"Children, assist me!","","","","","","","","???????? ???, ???? ???!",15533,1,0,0,"summon trio"), +(-1603004,"The swarm of the elements shall overtake you!","","","","","","","","??? ?????????? ???? ??????!",15534,1,0,0,"summon lashers"), +(-1603005,"Forgive me.","","","","","","","","?????? ????.",15529,1,0,0,"freya slay1"), +(-1603006,"From your death springs life anew!","","","","","","","","???? ?????? ???? ?????? ????? ?????!",15530,1,0,0,"freya slay2"), +(-1603007,"His hold on me dissipates. I can see clearly once more. Thank you, heroes.","","","","","","","","?? ?????? ?? ??????? ???? ????. ??? ???? ????? ????. ????????? ???, ?????.",15531,1,0,0,"freya Death"), +(-1603008,"You have strayed too far, wasted too much time!","","","","","","","","?? ????????? ???? ???? ????, ???????!",15532,1,0,0,"freya berserk"), +(-1603009,"Eonar, your servant calls for your blessing!","","","","","","","","?????, ????? ???? ????? ???? ?????????????!",15535,1,0,0,"freya yogg"), +(-1603362,'Allies of Nature have appeared!' ,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,3,0,0,'EMOTE_allies'), +(-1603363,'A Lifebinder\'s Gift begins to grow!' ,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,3,0,0,'EMOTE_lifebinders'), +(-1603364,'Freya begins to cast Ground Tremor!' ,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,3,0,0,'EMOTE_ground tremor'), +(-1603365,'Freya casts Strenghtened Iron Roots!' ,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,3,0,0,'EMOTE_iron roots'), +-- Brightleaf +(-1603160,"Matron, the Conservatory has been breached!","","","","","","","","",15483,1,0,0,"brightleaf aggro"), +(-1603161,"Fertilizer.","","","","","","","","",15485,1,0,0,"brightleaf slay1"), +(-1603162,"Your corpse will nourish the soil!","","","","","","","","",15486,1,0,0,"brightleaf slay2"), +(-1603163,"Matron, one has fallen!","","","","","","","","",15487,1,0,0,"brightleaf dead"), +-- Ironbranch +(-1603170,"Mortals have no place here!","","","","","","","","",15493,1,0,0,"ironbranch aggro"), +(-1603171,"I return you whence you came!","","","","","","","","",15494,1,0,0,"ironbranch slay1"), +(-1603172,"BEGONE!","","","","","","","","",15495,1,0,0,"ironbranch slay2"), +(-1603173,"Freya! They come for you.","","","","","","","","",15496,1,0,0,"summon trio"), +-- Stonebark +(-1603180,"This place will serve as your graveyard.","","","","","","","","",15500,1,0,0,"stonebark aggro"), +(-1603181,"","","","","","","","","",15501,1,0,0,"stonebark slay1"), +(-1603182,"Such a waste.","","","","","","","","",15502,1,0,0,"stonebark slay2"), +(-1603183,"Matron, flee! They are ruthless....","","","","","","","","",15503,1,0,0,"stonebark death"), + +-- Thorim: +(-1603221,"Interlopers! You mortals who dare to interfere with my sport will pay... Wait--you...","","","","","","","","",15733,1,0,0,"thorim aggro 1"), +(-1603222,"I remember you... In the mountains... But you... what is this? Where am--","","","","","","","","",15734,1,0,0,"thorim aggro 2"), +(-1603223,"Behold the power of the storms and despair!","","","","","","","","",15735,1,0,0,"thorim special 1"), +(-1603224,"Do not hold back! Destroy them!","","","","","","","","",15736,1,0,0,"thorim special 2"), +(-1603225,"Have you begun to regret your intrusion?","","","","","","","","",15737,1,0,0,"thorim special 3"), +(-1603226,"Impertinent whelps! You dare challenge me atop my pedestal! I will crush you myself!","","","","","","","","",15738,1,0,0,"thorim jump"), +(-1603227,"Can't you at least put up a fight!?","","","","","","","","",15739,1,0,0,"thorim slay1"), +(-1603228,"Pathetic!","","","","","","","","",15740,1,0,0,"thorim slay2"), +(-1603229,"My patience has reached its limit!","","","","","","","","",15741,1,0,0,"Thorim berserk"), +(-1603230,"Failures! Weaklings!","","","","","","","","",15742,1,0,0,"thorim arena wipe"), +(-1603231,"Stay your arms! I yield!","","","","","","","","",15743,1,0,0,"thorim defeat"), +(-1603232,"I feel as though I am awakening from a nightmare, but the shadows in this place yet linger.","","","","","","","","",15744,1,0,0,"thorim outro n1"), +(-1603233,"Sif... was Sif here? Impossible--she died by my brother's hand. A dark nightmare indeed....","","","","","","","","",15745,1,0,0,"thorim outro n2"), +(-1603234,"I need time to reflect.... I will aid your cause if you should require it. I owe you at least that much. Farewell.","","","","","","","","",15746,1,0,0,"thorim outro n3"), +(-1603235,"You! Fiend! You are not my beloved! Be gone!","","","","","","","","",15747,1,0,0,"thorim outro hard1"), +(-1603236,"Behold the hand behind all the evil that has befallen Ulduar! Left my kingdom in ruins, corrupted my brother and slain my wife!","","","","","","","","",15748,1,0,0,"thorim outro hard2"), +(-1603237,"And now it falls to you, champions, to avenge us all! The task before you is great, but I will lend you my aid as I am able. You must prevail!","","","","","","","","",15749,1,0,0,"thorim outro hard3"), +(-1603238,"Golganneth, lend me your strengh! Grant my mortal allies the power of thunder!","","","","","","","","",15750,1,0,0,"thorim yogg"), +-- Sif: +(-1603185,"Thorim, my lord, why else would these invaders have come into your sanctum but to slay you? They must be stopped!","","","","","","","","",15668,1,0,0,"sif start"), +(-1603186,"Impossible! Lord Thorim, I will bring your foes a frigid death!","","","","","","","","",15670,1,0,0,"sif event"), +(-1603187,"These pathetic mortals are harmless, beneath my station. Dispose of them!","","","","","","","","",15669,1,0,0,"sif despawn"), +(-1603369,'Runic Colossus surrounds itself with a crackling Runic Barrier!' ,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,3,0,0,'EMOTE_barrier'), +(-1603370,'Ancient Rune Giant fortifies nearby allies with runic might!' ,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,3,0,0,'EMOTE_barrier'), + +-- Mimiron: +(-1603241,"Oh, my! I wasn't expecting company! The workshop is such a mess! How embarrassing!","","","","","","","","??? ?? ??! ? ?? ???? ??????! ??? ????? ????? ??????????! ??? ?? ?????!",15611,1,0,0,"mimiron aggro"), +(-1603242,"Now why would you go and do something like that? Didn't you see the sign that said 'DO NOT PUSH THIS BUTTON!'? How will we finish testing with the self-destruct mechanism active?","","","","","","","","???, ????? ?? ??? ???????? ????? ?? ?? ?????? ???????? '?? ????????? ??? ??????!'? ?? ??? ?? ?????? ????????? ????????? ??? ?????????? ????????? ??????????????, ????",15629,1,0,0,"mimiron hard mode"), +(-1603243,"Oh, my! It would seem that we are out of time, my friends!","","","","","","","","???! ???????? ???? ????? ???????, ?????? ???!",15628,1,0,0,"mimiron berserk"), +(-1603244,"We haven't much time, friends! You're going to help me test out my latest and greatest creation. Now, before you change your minds, remember, that you kind of owe it to me after the mess you made with the XT-002.","","","","","","","","? ??? ???? ???????, ??????! ?? ???????? ???????? ???????? ? ?????????? ?? ???? ???????????, ? ??????, ????? ???? ??? ?? ????????? ? ??002, ??????????? ?????? ?? ???????.",15612,1,0,0,"tank active"), +(-1603245,"MEDIC!","","","","","","","","???????!",15613,1,0,0,"tank kill1"), +(-1603246,"I can fix that... or, maybe not! Sheesh, what a mess...","","","","","","","","? ???? ???????? ???... ? ????? ? ?? ????! ?? ? ??????...",15614,1,0,0,"tank kill2"), +(-1603247,"WONDERFUL! Positively marvelous results! Hull integrity at 98.9 percent! Barely a dent! Moving right along.","","","","","","","","???????????! ?????? ?????????????? ?????????! ??????????? ??????? 98.9 ????????! ????? ??? ?? ?????????! ??????????.",15615,1,0,0,"tank dead"), +(-1603248,"Behold the VX-001 Anti-personnel Assault Cannon! You might want to take cover.","","","","","","","","??????????? ??? ??????????????? ????????? ????? - VX-001! ??????? ???????? ???????.",15616,1,0,0,"torso active"), +(-1603249,"Fascinating. I think they call that a 'clean kill'.","","","","","","","","??????????. ??????? ??? ?????????? '????? ? ???????'.",15617,1,0,0,"torso kill1"), +(-1603250,"Note to self: Cannon highly effective against flesh.","","","","","","","","???? ?????????: ????? ?????? ?????????? ?????? ???????? ?? ????? ? ?????.",15618,1,0,0,"torso kill2"), +(-1603251,"Thank you, friends! Your efforts have yielded some fantastic data! Now, where did I put-- oh, there it is!","","","","","","","","??????? ??????! ????????? ??? ? ??????? ????????? ????????! ???, ???? ?? ? ???... ??, ??? ????!",15619,1,0,0,"torso dead"), +(-1603252,"Isn't it beautiful? I call it the magnificent aerial command unit!","","","","","","","","??! ??! ??! ??! ??????? ??????? ? ??????? ??? ??????????????? ????????? ?????? ????????!",15620,1,0,0,"head active"), +(-1603253,"Outplayed!","","","","","","","","????????!",15621,1,0,0,"head kill1"), +(-1603254,"You can do better than that!","","","","","","","","????? ?????????!",15622,1,0,0,"head kill2"), +(-1603255,"Preliminary testing phase complete. Now comes the true test!!","","","","","","","","???? ??????????????? ???????? ?????????. ???? ?????? ??????? ????! ??! ??! ??! ??!",15623,1,0,0,"head defeat"), +(-1603256,"Gaze upon its magnificence! Bask in its glorious, um, glory! I present you... V-07-TR-0N!","","","","","","","","??????????? ??? ????????????! ???????? ? ??? ???????, ???, ??????! ????? ???? ??????????? - V-07-??-??",15624,1,0,0,"robot active"), +(-1603257,"Prognosis: Negative!","","","","","","","","???????: ??????????!",15625,1,0,0,"robot kill1"), +(-1603258,"You're not going to get up from that one, friend.","","","","","","","","?? ????? ???? ?? ?????????, ??????.",15626,1,0,0,"robot kill2"), +(-1603259,"It would appear that I've made a slight miscalculation. I allowed my mind to be corrupted by the fiend in the prison, overriding my primary directive. All systems seem to be functional now. Clear.","","","","","","","","???????? ? ???????? ?? ??????? ?????? ? ????????. ??????? ?????? ????????? ??? ????? ? ???????? ???? ??????????? ?? ??????????. ?????? ??? ??????? ? ?????. ????? ?????!",15627,1,0,0,"robot defeat"), +(-1603260,"Combat matrix enhanced. Behold wonderous rapidity!","","","","","","","","?????? ??????? ?????????. ??, ????? ??????????? ????????!",15630,1,0,0,"mimiron yogg"), +(-1603371,"Leviathan Mk II begins to cast Plasma Blast!" ,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,3,0,0,'EMOTE_plasma_blast'), +(-1606241,"Self-destruct sequence initiated.","","","","","","","","?????? ??????? ?? ??????????????? ?????.",15413,1,0,0,"mimiron aggro"), +(-1606242,"This area will self-destruct in ten minutes.","","","","","","","","??????????????? ??????? ????? ?????? ?????.",15415,1,0,0,"mimiron aggro"), +(-1606243,"This area will self-destruct in nine minutes.","","","","","","","","??????????????? ??????? ????? ?????? ?????.",15416,1,0,0,"mimiron aggro"), +(-1606244,"This area will self-destruct in eight minutes.","","","","","","","","??????????????? ??????? ????? ?????? ?????.",15417,1,0,0,"mimiron aggro"), +(-1606245,"This area will self-destruct in seven minutes.","","","","","","","","??????????????? ??????? ????? ???? ?????.",15418,1,0,0,"mimiron aggro"), +(-1606246,"This area will self-destruct in six minutes.","","","","","","","","??????????????? ??????? ????? ????? ?????.",15419,1,0,0,"mimiron aggro"), +(-1606247,"This area will self-destruct in five minutes.","","","","","","","","??????????????? ??????? ????? ???? ?????.",15420,1,0,0,"mimiron aggro"), +(-1606248,"This area will self-destruct in four minutes.","","","","","","","","??????????????? ??????? ????? ?????? ??????.",15421,1,0,0,"mimiron aggro"), +(-1606249,"This area will self-destruct in three minutes.","","","","","","","","??????????????? ??????? ????? ??? ??????.",15422,1,0,0,"mimiron aggro"), +(-1606250,"This area will self-destruct in two minutes.","","","","","","","","??????????????? ??????? ????? ??? ??????.",15423,1,0,0,"mimiron aggro"), +(-1606251,"This area will self-destruct in one minute.","","","","","","","","??????????????? ??????? ????? ???? ??????.",15424,1,0,0,"mimiron aggro"), +(-1606252,"The self-destruction timer is over. Have a nice day.","","","","","","","","?????? ??????? ?? ??????????????? ????????. ????? ????????.",15425,1,0,0,"mimiron aggro"), +(-1606253,"The self-destruction timer canceled. Exit code A905.","","","","","","","","?????? ??????? ?? ??????????????? ???????. ??? ?????? ?905.",15414,1,0,0,"mimiron aggro"), + +-- vezax +(-1603120,'Your destruction will herald a new age of suffering!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,"???? ?????? ????????? ????? ??? ?????????!",15542,1,0,0,'vezax aggro'), +(-1603121,'You thought to stand before the legions of death... and survive?',NULL,NULL,NULL,NULL,NULL,NULL,NULL,"???? ?? ???????? ????? ???????? ??????...",15543,1,0,0,'vezax kill1'), +(-1603122,'Defiance... a flaw of mortality.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,"?????????????... ??, ??, ??, ??, ??? ???????? ????????.",15544,1,0,0,'vezax kill2'), +(-1603123,'The black blood of Yogg-Saron courses through me! I. AM. UNSTOPPABLE!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,"?? ??? ????? ?????? ????? ????-??????! ???? ?? ??????????!",15545,1,0,0,'vezaz surge'), +(-1603124,'Oh, what horrors await....',NULL,NULL,NULL,NULL,NULL,NULL,NULL,"??! ??! ??! ??... ????? ????? ??? ???????...",15546,1,0,0,'vezax death'), +(-1603125,'Your defeat was inevitable!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,"???? ?????????, ???? ?????????!",15547,1,0,0,'vezax enrage'), +(-1603126,'Behold, now! Terror, absolute!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,"????????, ??! ??????????, ????!",15548,1,0,0,'vezax hard'), +(-1603366,'A cloud of saronite vapors coalesces nearby!' ,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,3,0,0,'EMOTE_vapors'), +(-1603367,'General Vezax roars and surges with dark might!' ,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,3,0,0,'EMOTE_might'), +(-1603368,'The saronite vapors mass and swirl violently, merging into a monstrous form!' ,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,3,0,0,'EMOTE_animus'), + +-- Yogg: +-- Sara: +(-1603300,'The time to strike at the head of the beast will soon be upon us! Focus your anger and hatred on his minions!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,"????? ?? ???????? ? ???????? ???? ????????! ???????? ???? ? ????????? ?????? ??? ????????????!",15775,1,0,0,'sara aggro'), +(-1603301,'Yes! YES! Show them no mercy! Give no pause to your attacks!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,"??! ??! ?? ?????? ??! ????? ??? ????????!",15773,1,0,0,'sara help1'), +(-1603302,'Let hatred and rage guide your blows!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,"????? ????????? ? ?????? ?????????? ???? ?????!",15774,1,0,0,'sara help2'), +(-1603303,'Could they have been saved?',NULL,NULL,NULL,NULL,NULL,NULL,NULL,"??? ?? ? ??? ???? ?? ?????????",15779,1,0,0,'sara kill1'), +(-1603304,'Powerless to act...',NULL,NULL,NULL,NULL,NULL,NULL,NULL,"????? ????????...",15778,1,0,0,'sara kill 1'), +(-1603305,'Tremble, mortals, before the coming of the end!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,"?????????, ????????, ????? ??????!",15777,1,0,0,'sara yell2 p2'), +(-1603306,'Suffocate upon your own hate!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,"??????????? ? ??????????? ?????????!",15776,1,0,0,'sara yell1 p1'), +(-1603307,'Aaaaaaaaaaaaaaaaa... Help me!!! Please got to help me!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,"?????????... ?? ??????! ???????? ?????????? ?? ???!",15771,1,0,0,'sara prefight'), +(-1603308,'What do you want from me? Leave me alone!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,"??? ??? ?????? ????? ?? ????!",15772,1,0,0,'sara prefight2'), +(-1603309,'Weak-minded fools!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,"??? ??????!",15780,4,0,0,'sara slay phase1'), + +-- Yogg: +(-1603321,'I am the lucid dream. The monster in your nightmares. The fiend of a thousand faces. Cower before my true form. BOW DOWN BEFORE THE GOD OF DEATH!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,"?... ??? ??? ?? ???. ???????? ?? ????? ????????. ????? ? ??????? ???. ?????????, ??? ? ??????? ???????? ?????. ?????? ???? ????? ????? ??????!",15754,1,0,0,'yogg p2 intro'), +(-1603322,'MADNESS WILL CONSUME YOU!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,"??????? ???????? ???!",15756,1,0,0,'yogg vision'), +(-1603323,'Look upon the true face of death and know that your end comes soon!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,"????????? ? ???????? ???? ?????? ? ??????, ??? ??? ????? ??????!",15755,1,0,0,'yogg phase 3'), +(-1603324,'Hoohehehahahaha... AHAHAHAHAHAHA!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,"???????????????... ????????????????!",15757,1,0,0,'yogg slay1'), +(-1603325,'Eternal suffering awaits!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,"??????? ?????? ?????????!",15758,1,0,0,'yogg slay2'), +(-1603326,'Your fate is sealed. The end of days is finally upon you and ALL who inhabit this miserable little seedling. Uulwi ifis halahs gag erh\'ongg w\'ssh.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,"????????????! ?? ????????. ?? ??, ????? ??????, ?? ? ????? ???????? ??????????? ????? ?????. ????? ??? ????? ???? ???? ???.",15761,1,0,0,'yogg death'), +(-1603327,'Your will is no longer you own...',NULL,NULL,NULL,NULL,NULL,NULL,NULL,"?? ?????? ? ???? ??????...",15759,4,0,0,'yogg insanity1'), +(-1603328,'Destroy them minion, your master commands it!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,"????? ???? ??, ??????? ?????? ???????!",15760,4,0,0,'yogg insanity2'), +(-1603372,'Portals open into Yogg-Saron\'s mind!' ,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,3,0,0,'EMOTE_vision_blast'), +(-1603373,'The illusion shatters and a path to the central chamber opens!' ,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,3,0,0,'EMOTE_shatter_blast'), +-- Visions: +-- lich king v3 +(-1603330,'Your resilience is admirable.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,15598,0,0,0,'v1 lich king1'), +(-1603331,'Arrrrrrgh!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,15470,1,0,0,'v1 champ1'), +(-1603332,'I\'m not afraid of you!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,15471,0,0,0,'v1 champ2'), +(-1603333,'I will break you as I broke him.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,15599,0,0,0,'v1 lich king2'), +(-1603334,'Yrr n\'lyeth... shuul anagg!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,15766,0,0,0,'v1 yogg1'), +(-1603335,'He will learn... no king rules forever; only death is eternal!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,15767,0,0,0,'v1 yogg2'), +-- dragons v2 +(-1603336,'It is done... All have been given that which must be given. I now seal the Dragon Soul forever...',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,15631,0,0,0,'v2 neltharion1'), +(-1603337,'That terrible glow... should that be?',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,15784,0,0,0,'v2 ysera1'), +(-1603338,'For it to be as it must, yes.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,15632,0,0,0,'v2 neltharion2'), +(-1603339,'It is a weapon like no other. It must be like no other.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,15610,0,0,0,'v2 malygos1'), +(-1603340,'His brood learned their lesson before too long, you shall soon learn yours!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,15765,0,0,0,'v2 yogg1'), +-- stormwind v1 +(-1603341,'Bad news sire. The clans are united under Blackhand in this assault. They will stand together until Stormwind has fallen.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,15538,0,0,0,'v3 garona1'), +(-1603342,'Gul\'dan is bringing up his warlocks by nightfall. Until then, the Blackrock clan will be trying to take the Eastern Wall.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,15539,0,0,0,'v3 garona2'), +(-1603343,'A thousand deaths... ',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,15762,0,0,0,'v3 yogg1'), +(-1603344,'or one murder.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,15763,0,0,0,'v3 yogg2'), +(-1603345,'We will hold until the reinforcements come. As long as men with stout hearts are manning the walls and throne Stormwind will hold.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,15340,0,0,0,'v3 king llane1'), +(-1603346,'The orc leaders agree with your assessment.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,15341,0,0,0,'v3 garona3'), +(-1603347,'Your petty quarrels only make me stronger!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,15764,0,0,0,'v3 yogg3'), + +-- Alagon: +(-1603140,'Your actions are illogical. All possible results for this encounter have been calculated. The pantheon will receive the observer\'s message regardless outcome.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,"???? ???????? ?? ???????. ??? ????????? ?????? ???? ??????? ??????????. ??????? ??????? ????????? ?? ??????????? ? ????? ??????.",15386,1,0,0,'Agro_algalon the observer'), +(-1603141,'See your world through my eyes. A universe so vast as to be immeasurable. Incomprehensible even to your greatest minds.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,"????????? ?? ??? ????? ???????. ?????? ?????????? ?????????. ???????????? ???? ??? ?????????? ????.",15390,1,0,0,'Engaged for the first time algalon'), +(-1603142,'Witness the fury of cosmos!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,"?????? ???????? ???!",15396,1,0,0,'BIG BANG 1_Algalon'), +(-1603143,'Behold the tools of creation!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,"?????? ???? ?????????!",15397,1,0,0,'BIG BANG 2_Algalon\r\n'), +(-1603144,'Beware!',NULL,NULL,NULL,NULL,NULL,NULL,NULL,"??????????!",15391,1,0,0,'Phase2_algalon\r\n'), +(-1603145,'Loss of life, unavoidable.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,"?????, ?? ????? ???? ??????.",15387,1,0,0,'Killing a player_alagalon\r\n'), +(-1603146,'I do what I must.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,"? ????? ??, ??? ??????.",15388,1,0,0,'killing a player2_algalon\r\n'), +(-1603147,'You are... out of time.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,"???? ?????... ?????.",15394,1,0,0,'BERSEKER_ALGALON'), +(-1603148,'The stars come to my aid.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,"?????? ??????? ???.",15392,1,0,0,'Summoning Collapsing Stars_Algalon1'), +(-1603149,'I lack the strength to transmit this signal. You must hurry. Find a place of power, close to the skies.',NULL,NULL,NULL,NULL,NULL,NULL,NULL,"? ???? ??? ???, ????? ???????? ??????. ????????????, ??????? ????????? ???????. ????? ? ???????.",15403,1,0,0,'Summoning Collapsing Stars_Algalon2'), +(-1603279,"Do not worry about my fate . If the signal is not transmitted in time re-origination will proceed regardless. Save. Your. World.","","","","","","","","",15404,1,0,0,"algalon outro 5"), +(-1603278,"I've rearranged the reply code. Your planet will be spared. I cannot be certain of my own calculations anymore.","","","","","","","","? ??????? ??? ???????. ???? ??????? ????? ???????. ? ?????? ?? ???? ?????????? ?? ???? ???????.",15402,1,0,0,"algalon outro 3"), +(-1603277,"Perhaps it is your imperfection that which grants you free will. That allows you to persevere against cosmically calculated odds. You prevailed where the Titans' own perfect creations have failed.","","","","","","","","?????? ???? ???? ??????? ?????? ? ??????????????. ?????????? ??? ??????? ???? ????????? ???????????? ???????? ??????? ? ???????? ????????????, ????? ????? ????????? ???????? ??????? ??????????? ???????????.",15401,1,0,0,"algalon outro 2"), +(-1603276,"I have seen worlds bathed in the Makers' flames. Their denizens fading without so much as a whimper. Entire planetary systems born and raised in the time that it takes your mortal hearts to beat once. Yet all throughout, my own heart, devoid of emotion... of empathy. I... have... felt... NOTHING! A million, million lives wasted. Had they all held within them your tenacity? Had they all loved life as you do?","","","","","","","","? ????? ????, ?????????? ???????? ???????. ?? ?????? ????? ?? ????? ?????? ?? ?????. ? ??? ????????? ????, ??? ????????? ????????? ? ??????? ? ????????? ???, ? ??? ????? ? ????????? ????????... ? ????????????... ?... ?? ?????????! ??????! ????????? ??????????? ?????, ??????? ??? ??? ???? ??????? ???? ??????? ??? ??? ??? ?? ?????? ??????",15393,1,0,0,"algalon outro1"), +(-1603275,"Farewell, mortals. Your bravery is admirable, for such flawed creatures.","","","","","","","","????????, ????????. ? ?????????? ????? ???????, ????????????? ????????.",15400,1,0,0,"algalon despwnd 3"), +(-1603274,"Begin uplink: Reply Code: 'Omega'. Planetary re-origination requested.","","","","","","","","????? ?? ?????. ??? ???????: '?????'. ?????? ?? ???????????? ???????.",15399,1,0,0,"algalon despawn 2"), +(-1603273,"Analysis complete. There is partial corruption in the plane's life-support systems as well as complete corruption in most of the planet's defense mechanisms.","","","","","","","","?????? ????????. ??????? ???????????????? ??????? ???????? ????????, ??????????? ???????? ?????????? ???????? ?????????.",15398,1,0,0,"algalon despawn1"), +(-1603272,"It is in the universe's best interest to re-originate this planet should my analysis find systemic corruption. Do not interfere.","","","","","","","","??? ????? ????????? ??? ??????? ?????????? ???????????. ? ???????? ????????? ??????, ????? ??????? ???? ?????????. ?? ????????????.",15407,1,0,0,"algalon intro3"), +(-1603271,"Stand back, mortals. I am not here to fight you.","","","","","","","","????????. ? ????? ?? ??? ????, ????? ????????? ? ????.",15406,1,0,0,"Algalon intro2"), +(-1603270,"Trans-location complete. Commencing planetary analysis of Azeroth.","","","","","","","","??????????? ?????????. ?????? ???????????? ??????? ???????.",15405,1,0,0,"Algalon intro1"); + +-- Archivum dialogue: TODO: +-- Brann +-- Archivum + +-- teleporter from /dev/rsa +DELETE FROM `gossip_texts` WHERE `entry` BETWEEN -3050010 AND -3050000; +INSERT INTO `gossip_texts` (`entry`, `content_default`, `content_loc1`, `content_loc2`, `content_loc3`, `content_loc4`, `content_loc5`, `content_loc6`, `content_loc7`, `content_loc8`, `comment`) VALUES +(-3050001, "Expedition Base Camp", NULL, NULL, NULL, NULL, NULL, NULL, NULL, "Лагерь экспедиции", "Ulduar teleporter text 1"), +(-3050002, "Formation Grounds", NULL, NULL, NULL, NULL, NULL, NULL, NULL, "Железный двор", "Ulduar teleporter text 2"), +(-3050003, "Colossal Forge", NULL, NULL, NULL, NULL, NULL, NULL, NULL, "Колоссальный горн", "Ulduar teleporter text 3"), +(-3050004, "Scrapyard", NULL, NULL, NULL, NULL, NULL, NULL, NULL, "Мусорная свалка", "Ulduar teleporter text 4"), +(-3050005, "Antechamber of Ulduar", NULL, NULL, NULL, NULL, NULL, NULL, NULL, "Вестибюль Ульдуара", "Ulduar teleporter text 5"), +(-3050006, "Shattered Walkway", NULL, NULL, NULL, NULL, NULL, NULL, NULL, "Обвалившаяся галерея", "Ulduar teleporter text 6"), +(-3050007, "Conservatory of Life", NULL, NULL, NULL, NULL, NULL, NULL, NULL, "Круг наблюдения", "Ulduar teleporter text 7"), +(-3050008, "Spark of Imagination", NULL, NULL, NULL, NULL, NULL, NULL, NULL, "Искра воображения", "Ulduar teleporter text 8"), +(-3050009, "Prison of Yogg-Saron", NULL, NULL, NULL, NULL, NULL, NULL, NULL, "Провал безумия", "Ulduar teleporter text 9"); diff --git a/addition/734_serpentshrine_mangos.sql b/addition/734_serpentshrine_mangos.sql new file mode 100644 index 0000000..6f16e2d --- /dev/null +++ b/addition/734_serpentshrine_mangos.sql @@ -0,0 +1,2 @@ +UPDATE `creature_template` SET `ScriptName` = 'boss_the_lurker_below' WHERE `entry` =21217; +UPDATE `gameobject_template` SET `ScriptName` = 'go_strange_pool' WHERE `entry` =184956; diff --git a/addition/735_eye_of_acherus_mangos.sql b/addition/735_eye_of_acherus_mangos.sql new file mode 100644 index 0000000..709ef4e --- /dev/null +++ b/addition/735_eye_of_acherus_mangos.sql @@ -0,0 +1,6 @@ +-- Eye of acherus +UPDATE `creature_template` SET `InhabitType` = 3, `ScriptName` = 'npc_eye_of_acherus' WHERE `entry` = 28511; +REPLACE INTO `creature_template_addon` (`entry`,`moveflags`,`auras`) VALUES (28511,33562624,''),(28525,0,'64328'),(28542,0,'64328'),(28543,0,'64328'),(28544,0,'64328'); +REPLACE INTO `spell_script_target` (`entry`,`type`,`targetEntry`) VALUES (51859,1,28525),(51859,1,28542),(51859,1,28543),(51859,1,28544); +DELETE FROM `creature_addon` WHERE `guid` IN (SELECT guid FROM `creature` WHERE `id` IN (28511,28525,28542,28543,28544)); +UPDATE `npc_spellclick_spells` SET `quest_start` = 0, `quest_start_active` = 0 WHERE `npc_entry` = 29501; diff --git a/addition/735_eye_of_acherus_scriptdev2.sql b/addition/735_eye_of_acherus_scriptdev2.sql new file mode 100644 index 0000000..d35ac7b --- /dev/null +++ b/addition/735_eye_of_acherus_scriptdev2.sql @@ -0,0 +1,5 @@ +-- Say's +DELETE FROM `script_texts` WHERE `entry` BETWEEN -1666453 AND -1666050; +INSERT INTO `script_texts` (`entry`, `content_default`, `content_loc8`, `sound`, `type`, `language`, `emote`, `comment`) VALUES +('-1666451','The Eye of Acherus launches towards its destination','Око Акеруса вылетело в пункт назначения','','3','0','0','EOA_LAUNCH'), +('-1666452','The Eye of Acherus is in your control','Око Акеруса под вашим контролем','','3','0','0','EOA_CONTROL'); diff --git a/addition/736_oculus_mangos.sql b/addition/736_oculus_mangos.sql new file mode 100644 index 0000000..438f69a --- /dev/null +++ b/addition/736_oculus_mangos.sql @@ -0,0 +1,116 @@ +-- Oculus instance + +-- from traponinet +/* Belgaristrasz and his companions give Drake, after completed quest (13124) */ +UPDATE `creature_template` SET `npcflag` = npcflag|1 WHERE `entry` IN (27657, 27658, 27659); +UPDATE `creature_template` SET `gossip_menu_id` = 27657 WHERE `entry` = 27657; +UPDATE `creature_template` SET `gossip_menu_id` = 27658 WHERE `entry` = 27658; +UPDATE `creature_template` SET `gossip_menu_id` = 27659 WHERE `entry` = 27659; + +DELETE FROM `gossip_scripts` WHERE `id` IN (27657, 27658, 27659); +INSERT INTO `gossip_scripts` VALUES (27657,0,17,37815,1,0,0,0,0,0,0,0,0,0,0,0,''),(27658,0,17,37860,1,0,0,0,0,0,0,0,0,0,0,0,''),(27659,0,17,37859,1,0,0,0,0,0,0,0,0,0,0,0,''); + +DELETE FROM `gossip_menu_option` WHERE `menu_id` IN (27657, 27658, 27659); +INSERT INTO `gossip_menu_option` (`menu_id`, `id`, `option_icon`, `option_text`, `option_id`, `npc_option_npcflag`, `action_menu_id`, `action_poi_id`, `action_script_id`, `box_coded`, `box_money`, `box_text`, `cond_1`, `cond_1_val_1`, `cond_1_val_2`, `cond_2`, `cond_2_val_1`, `cond_2_val_2`, `cond_3`, `cond_3_val_1`, `cond_3_val_2`) VALUES +(27657,0,0,'What\'s can Emerald Drake?.',1,1,13259,0,0,0,0,NULL,0,0,0,0,0,0,0,0,0), +(27657,1,2,'Take the Emerald Essence if you want to fly on the wings of the Green Flight.',1,1,-1,0,27657,0,0,NULL,16,37859,1,16,37815,1,16,37860,1), +(27659,0,0,'What\'s can Bronze Drake?.',1,1,13255,0,0,0,0,NULL,0,0,0,0,0,0,0,0,0), +(27659,1,2,'Take the Amber Essence if you want to fly on the wings of the Bronze Flight.',1,1,-1,0,27659,0,0,NULL,16,37859,1,16,37815,1,16,37860,1), +(27658,0,0,'What\'s can Ruby Drake?.',1,1,13257,0,0,0,0,NULL,0,0,0,0,0,0,0,0,0), +(27658,1,2,'Take the Ruby Essence if you want to fly on the wings of the Red Flight.',1,1,-1,0,27658,0,0,NULL,16,37859,1,16,37815,1,16,37860,1); +-- (27658,0,0,'GOSSIP_OPTION_QUESTGIVER',2,2,0,0,0,0,0,NULL,0,0,0,0,0,0,0,0,0); + +DELETE FROM `locales_gossip_menu_option` WHERE `menu_id` IN (27657, 27658, 27659); +INSERT INTO `locales_gossip_menu_option` (`menu_id`, `id`, `option_text_loc1`, `option_text_loc2`, `option_text_loc3`, `option_text_loc4`, `option_text_loc5`, `option_text_loc6`, `option_text_loc7`, `option_text_loc8`, `box_text_loc1`, `box_text_loc2`, `box_text_loc3`, `box_text_loc4`, `box_text_loc5`, `box_text_loc6`, `box_text_loc7`, `box_text_loc8`) VALUES +(27657, 0, 'What\'s can Emerald Drake?', NULL, NULL, NULL, NULL, NULL, NULL, 'Что умеет Изумрудный дракон?', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), +(27657, 1, 'Take the Emerald Essence if you want to fly on the wings of the Green Flight.', NULL, NULL, NULL, NULL, NULL, NULL, 'Возьмите Изумрудную эссенцию, если Вы хотите лететь на зеленом драконе.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), +(27659, 0, 'What\'s can Bronze Drake?', NULL, NULL, NULL, NULL, NULL, NULL, 'Что умеет Бронзовый дракон?', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), +(27659, 1, 'Take the Amber Essence if you want to fly on the wings of the Bronze Flight.', NULL, NULL, NULL, NULL, NULL, NULL, 'Возьмите Янтарную эссенцию, если Вы хотите лететь на бронзовом драконе.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), +(27658, 0, 'What\'s can Red Drake?', NULL, NULL, NULL, NULL, NULL, NULL, 'Что умеет Красный дракон?', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL), +(27658, 1, 'Take the Ruby Essence if you want to fly on the wings of the Red Flight.', NULL, NULL, NULL, NULL, NULL, NULL, 'Возьмите Рубиновую эссенцию, если Вы хотите лететь на красном драконе.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL); + +DELETE FROM `gossip_menu` WHERE `entry` IN (27657, 27658, 27659); +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (27657,13258),(27658,13254),(27659,13256); +DELETE FROM `gossip_menu` WHERE `entry` IN (13259, 13255, 13257); +INSERT INTO `gossip_menu` (`entry`,`text_id`) VALUES (13259,13259),(13255,13255),(13257,13257); + +-- Fix YTDB bug +UPDATE `npc_text` SET `text0_0` = `text0_1` WHERE `text0_0` = '' AND `ID` IN (13258,13259); +UPDATE `locales_npc_text` SET `Text0_0_loc8` = `Text0_1_loc8` WHERE `Text0_0_loc8` = '' AND `entry` IN (13258,13259); + +UPDATE `creature` SET `spawnMask` = 3 WHERE `map` = 578 AND `spawnMask` = 1; + +-- Eregos chests +UPDATE `gameobject` SET `spawnMask` = 2 WHERE `map` = 578 AND `id` = 193603; +UPDATE `gameobject` SET `spawnMask` = 1 WHERE `map` = 578 AND `id` = 191349; + +UPDATE `creature_template` SET `InhabitType` = 3, spell6 = 0 WHERE `entry` IN (27755,27756,27692); +REPLACE INTO `creature_template_addon` VALUES (27755,0,0,0,0,0,0,'57403'); +REPLACE INTO `creature_template_addon` VALUES (27756,0,0,0,0,0,0,'57403'); +REPLACE INTO `creature_template_addon` VALUES (27692,0,0,0,0,0,0,'57403'); + +/* hack for broken Nexus Portal */ +UPDATE `gameobject_template` SET `data0` = 49665 WHERE `entry` = 189985; +UPDATE `spell_target_position` SET `id` = 49665 WHERE `id` = 49305; + +UPDATE `creature_template` SET `spell6` = 57403, `InhabitType` = 3 WHERE `entry` IN (27692,27755,27756); + +DELETE FROM `gameobject_scripts` WHERE `id` IN +(40557,42275); +INSERT INTO `gameobject_scripts` +(`id`, `delay`, `command`, `datalong`, `datalong2`, `dataint`, `x`, `y`, `z`, `o`) +VALUES +(42275, 1, 6, 571, 0, '0', 3878.0, 6984.0, 106.0, 0), +(40557, 1, 6, 578, 0, '0', 1001.61, 1051.13, 359.48, 3.1); + +-- from lanc +UPDATE `creature_template` SET + spell1 = 50232, + spell2 = 50248, + spell3 = 50240, + spell4 = 50253, + spell5 = 0 +WHERE `entry` IN (27756); + +UPDATE `creature_template` SET + spell1 = 49840, + spell2 = 49838, + spell3 = 49592, + spell4 = 0, + spell5 = 0 +WHERE `entry` IN (27755); + +UPDATE `creature_template` SET + spell1 = 50328, + spell2 = 50341, + spell3 = 50344, + spell4 = 0, + spell5 = 0 +WHERE `entry` IN (27692); + +-- from me +UPDATE `creature_template` SET `AIName` = '', `vehicle_id` = 70, `ScriptName` = 'mob_oculus_dragon' WHERE `entry` IN (27692,27756,27755); +DELETE FROM `spell_script_target` WHERE `entry` IN (49460, 49346, 49464); +INSERT INTO `spell_script_target` VALUES (49460, 1, 27755); +INSERT INTO `spell_script_target` VALUES (49346, 1, 27692); +INSERT INTO `spell_script_target` VALUES (49464, 1, 27756); + +-- from MaxX2021 +UPDATE `instance_template` SET `ScriptName` = 'instance_oculus' WHERE `map` = 578; +UPDATE `creature_template` SET `ScriptName` = 'npc_unstable_sphere' WHERE entry = 28166; +UPDATE `creature_template` SET `ScriptName` = 'boss_drakos' WHERE entry = 27654; +UPDATE `creature_template` SET `ScriptName` = 'boss_eregos' WHERE entry = 27656; +UPDATE `creature_template` SET `ScriptName` = 'boss_varos' WHERE entry = 27447; +UPDATE `creature_template` SET `ScriptName` = 'npc_varos_orb' WHERE entry = 28183; +UPDATE `creature_template` SET `ScriptName` = 'npc_varos_beam_target' WHERE entry = 28239; +UPDATE `creature_template` SET `ScriptName` = 'npc_oculus_robot' WHERE entry = 27641; +UPDATE `creature_template` SET `ScriptName` = 'boss_urom' WHERE entry = 27655; +UPDATE `creature_template` SET `ScriptName` = 'npc_planar_anomaly' WHERE entry = 30879; +UPDATE `creature_template` SET `ScriptName` = 'npc_belgar_image' WHERE entry = 28012; + +REPLACE INTO `spell_script_target` (`entry`, `type`, `targetEntry`) values +(61407, 1, 27447), +(51024, 1, 28239), +(51022, 1, 28239), +(57963, 1, 27656); + diff --git a/addition/736_oculus_scriptdev2.sql b/addition/736_oculus_scriptdev2.sql new file mode 100644 index 0000000..e228509 --- /dev/null +++ b/addition/736_oculus_scriptdev2.sql @@ -0,0 +1,46 @@ +-- From Lanc (originally from TC) +-- Drakos the Interrogator +REPLACE into `script_texts` (entry, content_default, content_loc8, sound, type, language, emote, comment) VALUES +(-1578000,'The prisoners shall not go free. The word of Malygos is law!','Узники не вырвутся на волю. Слово Малигоса - закон!',13594,1,0,0,'1578000'), +(-1578001,'A fitting punishment!','Заслуженное наказание!',13602,1,0,0,'1578000'), +(-1578002,'Sentence: executed!','Приговор приведен в исполнение!',13603,1,0,0,'1578000'), +(-1578003,'Another casualty of war!','Еще одна жертва войны!',13604,1,0,0,'1578000'), +(-1578004,'The war... goes on.','Война... продолжается.',13605,1,0,0,'1578000'), +(-1578005,'It is too late to run!','Поздно убегать!',13598,1,0,0,'1578000'), +(-1578006,'Gather \'round!','Станьте в круг!',13599,1,0,0,'1578000'), +(-1578007,'None shall escape!','Не кто не уйдет живым!',13600,1,0,0,'1578000'), +(-1578008,'I condemn you to death!','Я приговариваю вас к смерти!',13601,1,0,0,'1578000'), +(-1578009,'Tremble, worms!','Трепещите, черви!',13595,1,0,0,'1578000'), +(-1578010,'I will crush you!','Я раздавлю вас!',13596,1,0,0,'1578000'), +(-1578011,'Can you fly?','Вы умеете летать?',13597,1,0,0,'1578000'), +-- Varos +(-1578022,'There will be no mercy!','Пощады не будет!',13649,1,0,0,'1578000'), +(-1578023,'Oculus ours!','Окулус наш!',13654,1,0,0,'1578000'), +(-1578024,'I warned you!','Тебя предупреждали!',13653,1,0,0,'1578000'), +(-1578025,'They are... too strong! Underestimated their... fortitude.','Они... слишком сильны! Я недооценил... их мужество.',13655,1,0,0,'1578000'), +(-1578026,'Blast them! Destroy them!','Взорвать их! Изничтожить!',13650,1,0,0,'1578000'), +(-1578027,'Take no prisoners! Attack!','Пленных не брать! В Атаку!',13651,1,0,0,'1578000'), +(-1578028,'Strike now! Obliterate them!','Нанесите удар! Уничтожте их!',13652,1,0,0,'1578000'), +(-1578029,'Intruders, your victory will be short-lived. I am Commander Varos Cloudstrider. My drakes control the skies and protest this conduit. I will see to it personally that the Oculus does not fall into your hands!','Чужаки, ваш триумф будет не долгим. Я командир Варос Заоблачный странник. Мои драконы обозревают небеса и защищают это место. Я позабочусь, чтобы Окулус не достался вам!',13648,1,0,0,'1578000'), +-- Urom +(-1578012,'Poor blind fools!','Несчастные слепые глупцы!',13638,1,0,0,'1578000'), +(-1578013,'If only you understood!','Если бы вы только могли понять!',13641,1,0,0,'1578000'), +(-1578014,'Now do you see? Do you?!','Ну что, теперь тебе понятно? Или нет?!',13642,1,0,0,'1578000'), +(-1578015,'Unfortunate, but necessary.','Сожелею, это было необходимо.',13643,1,0,0,'1578000'), +(-1578016,'Everything I\'ve done... has been for Azeroth...','Все что я делал... было во имя Азерота...',13644,1,0,0,'1578000'), +(-1578017,'A taste... just a small taste... of the Spell-Weaver\'s power!','Тень... лиш бледная тень... подленного могущества Хранителя магии!',13639,1,0,0,'1578000'), +(-1578018,'So much unstable energy... but worth the risk to destroy you!','Много неустойчивой энергии... но чтобы уничтожить вас, я готов рискнуть!',13640,1,0,0,'1578000'), +(-1578019,'What do we have here... those would defy the Spell-Weaver? Those without foresight or understanding. How could I make you see? Malygos is saving the world from itself! Bah! You are hardly worth my time!','Так, что у нас тут... ааа вы пришли сразится с Хранителем магии? Это вы то лишенные предвидиния и понимания. Как мне заставить вас прозреть? Малигос спасает мир от самого мира! Эх! На вас жаль тратить время!',13635,1,0,0,'1578000'), +(-1578020,'Clearly my pets failed. Perhaps another demonstration is in order.','Моих слуг постигла неудача. Возможно потребуется еще одно предупреждение.',13636,1,0,0,'1578000'), +(-1578021,'Still you fight. Still you cling to misguided principles. If you survive, you\'ll find me in the center ring.','Вы все еще сражаетесь. Все еще цепляетесь за свои ложные убеждения. Если выживите, встретимся в центральном кругу.',13637,1,0,0,'1578000'), +-- Eregos +(-1578030,'You brash interlopers are out of your element! I will ground you!','Нахальные невежды, вы все в небесах летаете! Сейчас я вас заземлю!',13623,1,0,0,'1578000'), +(-1578031,'It\'s a long way down...','Как больно падать...',13628,1,0,0,'1578000'), +(-1578032,'Back to the earth with you!','Вернемся на землю!',13629,1,0,0,'1578000'), +(-1578033,'Enjoy the fall!','Наслаждайся полетом!',13630,1,0,0,'1578000'), +(-1578034,'Savor this small victory, foolish little creatures. You and your dragon allies have won this battle. But we will win... the Nexus War.','Празнуйте свой мелкий триумф, призренные глупцы. Вы и ваши союзники драконы победили в этой битве. Но мы одержим верх в войне... Нексуса.',13631,1,0,0,'1578000'), +(-1578035,'We command the arcane! It shall not be used against us.','Мы повелеваем тайной магией! Она не будет использована против нас.',13626,1,0,0,'1578000'), +(-1578036,'It is trivial to extinguish your fire!','Как легко погасить ваш огонь!',13627,1,0,0,'1578000'), +(-1578037,'No magic of nature will help you now!','Никакая магия природы теперь вас не спасет!',13625,1,0,0,'1578000'), +(-1578038,'Such insolence... such arrogance... must be PUNISHED!','Какая заносчивость... какая чандливость... вы заслуживаете КАРЫ!',13624,1,0,0,'1578000'), +(-1578039,'Simpletons! You cannot comprehend the forces you have set in motion. The ley line conduit will not be disrupted! Your defeat shall be absolute!','Простаки! Вам и неведомо какие силы вы привели в действие. Поток энергии не прервется! Вас ждет полный разгром!',13622,1,0,0,'1578000'); diff --git a/addition/737_outdoor_pvp_mangos.sql b/addition/737_outdoor_pvp_mangos.sql new file mode 100644 index 0000000..b6255fc --- /dev/null +++ b/addition/737_outdoor_pvp_mangos.sql @@ -0,0 +1,14 @@ +-- World map scripts (selectors) +DELETE FROM `world_template` WHERE `map` = 0; +INSERT INTO `world_template` VALUES (0,'outdoor_pvp_eastern_kingdoms'); +DELETE FROM `world_template` WHERE `map` = 1; +INSERT INTO `world_template` VALUES (1,'outdoor_pvp_kalimdor'); +DELETE FROM `world_template` WHERE `map` = 530; +INSERT INTO `world_template` VALUES (530,'outdoor_pvp_outland'); +DELETE FROM `world_template` WHERE `map` = 571; +INSERT INTO `world_template` VALUES (571,'outdoor_pvp_northrend'); + +-- from Xfurry +UPDATE gameobject_template SET ScriptName='go_silithyst' WHERE entry IN (181597,181598); +DELETE FROM scripted_areatrigger WHERE entry IN (4162, 4168); +INSERT INTO scripted_areatrigger VALUES (4162,'at_silithus'),(4168,'at_silithus'); diff --git a/addition/boss_spell_table_scriptdev2.sql b/addition/boss_spell_table_scriptdev2.sql new file mode 100644 index 0000000..1544be4 --- /dev/null +++ b/addition/boss_spell_table_scriptdev2.sql @@ -0,0 +1,33 @@ +DROP TABLE IF EXISTS `boss_spell_table`; +CREATE TABLE IF NOT EXISTS `boss_spell_table` ( + `entry` mediumint(8) NOT NULL DEFAULT '0' COMMENT 'Creature entry', + `spellID_N10` mediumint(8) unsigned NOT NULL DEFAULT '0' COMMENT 'Spell ID for 10 normal', + `spellID_N25` mediumint(8) unsigned NOT NULL DEFAULT '0' COMMENT 'Spell ID for 25 normal', + `spellID_H10` mediumint(8) unsigned NOT NULL DEFAULT '0' COMMENT 'Spell ID for 10 heroic', + `spellID_H25` mediumint(8) unsigned NOT NULL DEFAULT '0' COMMENT 'Spell ID for 25 heroic', + `timerMin_N10` mediumint(8) unsigned NOT NULL DEFAULT '15000' COMMENT 'Minimum timer for this spell (in ms.) for 10 normal', + `timerMin_N25` mediumint(8) unsigned NOT NULL DEFAULT '0' COMMENT 'Minimum timer for this spell (in ms.) for 25 normal', + `timerMin_H10` mediumint(8) unsigned NOT NULL DEFAULT '0' COMMENT 'Minimum timer for this spell (in ms.) for 10 heroic', + `timerMin_H25` mediumint(8) unsigned NOT NULL DEFAULT '0' COMMENT 'Minimum timer for this spell (in ms.) for 25 heroic', + `timerMax_N10` mediumint(8) unsigned NOT NULL DEFAULT '30000' COMMENT 'Maximum timer for this spell (in ms.) for 10 normal', + `timerMax_N25` mediumint(8) unsigned NOT NULL DEFAULT '0' COMMENT 'Maximum timer for this spell (in ms.) for 25 normal', + `timerMax_H10` mediumint(8) unsigned NOT NULL DEFAULT '0' COMMENT 'Maximum timer for this spell (in ms.) for 10 heroic', + `timerMax_H25` mediumint(8) unsigned NOT NULL DEFAULT '0' COMMENT 'Maximum timer for this spell (in ms.) for 25 heroic', + `data1` mediumint(8) unsigned NOT NULL DEFAULT '0' COMMENT 'Various INT data for this spell or summon for 10 normal', + `data2` mediumint(8) unsigned NOT NULL DEFAULT '0' COMMENT 'Various INT data for this spell for 25 normal', + `data3` mediumint(8) unsigned NOT NULL DEFAULT '0' COMMENT 'Various INT data for this spell for 10 heroic', + `data4` mediumint(8) unsigned NOT NULL DEFAULT '0' COMMENT 'Various INT data for this spell for 25 heroic', + `locData_x` float NOT NULL DEFAULT '0' COMMENT 'Location X data for this spell', + `locData_y` float NOT NULL DEFAULT '0' COMMENT 'Location Y data for this spell', + `locData_z` float NOT NULL DEFAULT '0' COMMENT 'Location Z data for this spell', + `varData` mediumint(8) NOT NULL DEFAULT '0' COMMENT 'Special data field for this spell (basepoint for Aura, for example)', + `StageMask_N` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'Stage mask for this spell (don\'t used now)', + `StageMask_H` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'Stage mask for this spell - heroic mode (don\'t used now)', + `CastType` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT 'Type of cast (by enum BossSpellTableParameters)', + `isVisualEffect` tinyint(3) unsigned NOT NULL DEFAULT '0' COMMENT 'Is spell is Visual effect only', + `isBugged` tinyint(3) unsigned NOT NULL DEFAULT '0' COMMENT 'Is spell bugged and need override', + `textEntry` mediumint(8) NOT NULL DEFAULT '0' COMMENT 'Text from script_texts for this spell casting', + `comment` text, + PRIMARY KEY (`entry`,`spellID_N10`,`CastType`), + INDEX `idx_entry`(`entry`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=FIXED COMMENT 'Boss spell table by /dev/rsa'; diff --git a/addition/here you can find SQL files from patches.txt b/addition/here you can find SQL files from patches.txt new file mode 100644 index 0000000..e69de29 diff --git a/addition/spell_comment_from_wowd_scriptdev2.sql b/addition/spell_comment_from_wowd_scriptdev2.sql new file mode 100644 index 0000000..5ac0f96 --- /dev/null +++ b/addition/spell_comment_from_wowd_scriptdev2.sql @@ -0,0 +1,19 @@ +-- Insert comments to scriptdev2 boss_spell_table from WOWD database. +-- Change WOWD database name if you use this! + +CREATE ALGORITHM = TEMPTABLE VIEW `commentlist` +(`entry` ,`spell`, `comment`) +AS SELECT `scriptdev2`.`boss_spell_table`.`entry`, +`spellID_N10`, +CONCAT(`mangos`.`creature_template`.`name`, +' : ', +`mangos`.`wowd_spell`.`SpellName`) +FROM `scriptdev2`.`boss_spell_table` +INNER JOIN `mangos`.`creature_template` ON `mangos`.`creature_template`.`entry` = `scriptdev2`.`boss_spell_table`.`entry` +INNER JOIN `mangos`.`wowd_spell` ON `mangos`.`wowd_spell`.`id` = `scriptdev2`.`boss_spell_table`.`spellID_N10`; + +UPDATE `scriptdev2`.`boss_spell_table` SET `comment` = (SELECT DISTINCT `commentlist`.`comment` +FROM `commentlist` WHERE `scriptdev2`.`boss_spell_table`.`entry` = `commentlist`.`entry` +AND `scriptdev2`.`boss_spell_table`.`spellID_N10` = `commentlist`.`spell` +AND `scriptdev2`.`boss_spell_table`.`comment` IS NULL); +DROP VIEW `commentlist`; diff --git a/base/BSW_ai.cpp b/base/BSW_ai.cpp index 12be24f..22a2900 100644 --- a/base/BSW_ai.cpp +++ b/base/BSW_ai.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2009 - 2011 by /dev/rsa for ScriptDev2 +/* Copyright (C) 2009 - 2010 by /dev/rsa for ScriptDev2 * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ #include "precompiled.h" @@ -752,7 +752,7 @@ bool BSWScriptedAI::_doAura(uint32 SpellID, Unit* pTarget, SpellEffectIndex inde else { aura = CreateAura(spell, index, &_basepoint, holder, pTarget); - aura->SetAuraDuration(aura->GetAuraMaxDuration()); + holder->SetAuraDuration(aura->GetAuraMaxDuration()); holder->AddAura(aura, index); } @@ -784,7 +784,7 @@ CanCastResult BSWScriptedAI::_DoCastSpellIfCan(Unit* pTarget, uint32 uiSpell, ui // Not threat-based select random player function -Unit* BSWScriptedAI::_doSelect(uint32 SpellID, bool spellsearchtype, float range) +Unit* BSWScriptedAI::_doSelect(uint32 SpellID, bool spellsearchtype, float range, bool includeVictim) { Map* pMap = m_creature->GetMap(); Map::PlayerList const &pList = pMap->GetPlayers(); @@ -800,6 +800,8 @@ Unit* BSWScriptedAI::_doSelect(uint32 SpellID, bool spellsearchtype, float range if (!player->IsInMap(m_creature)) continue; + if (player == m_creature->getVictim() && !includeVictim) continue; + if (player->isAlive() && player->IsWithinDistInMap(m_creature, range) && (SpellID == 0 || (player->HasAura(SpellID) == spellsearchtype)) diff --git a/base/BSW_ai.h b/base/BSW_ai.h index c2dcee6..4566603 100644 --- a/base/BSW_ai.h +++ b/base/BSW_ai.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2009 - 2011 by /dev/rsa for ScriptDev2 +/* Copyright (C) 2009 - 2010 by /dev/rsa for ScriptDev2 * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ @@ -175,14 +175,14 @@ struct MANGOS_DLL_DECL BSWScriptedAI : public ScriptedAI return queryIndex(_findSpellIDX(SpellID)) ? _doSummon(_findSpellIDX(SpellID), type, delay) : NULL; }; - Unit* doSelectRandomPlayer(uint32 SpellID = 0, bool spellsearchtype = false, float range = 100.0f) + Unit* doSelectRandomPlayer(uint32 SpellID = 0, bool spellsearchtype = false, float range = 100.0f, bool includeVictim = true) { - return _doSelect(SpellID, spellsearchtype, range); + return _doSelect(SpellID, spellsearchtype, range, includeVictim); }; - Unit* doSelectRandomPlayerAtRange(float range) + Unit* doSelectRandomPlayerAtRange(float range, bool includeVictim = true) { - return _doSelect(0, false, range); + return _doSelect(0, false, range, includeVictim); }; Unit* doSummon(uint32 SpellID, float fPosX, float fPosY, float fPosZ, TempSummonType type = TEMPSUMMON_CORPSE_TIMED_DESPAWN, uint32 delay = 60000) @@ -241,7 +241,7 @@ struct MANGOS_DLL_DECL BSWScriptedAI : public ScriptedAI void _resetTimer(uint8 m_uiSpellIdx); - Unit* _doSelect(uint32 SpellID, bool spellsearchtype = false, float range = 100.0f); + Unit* _doSelect(uint32 SpellID, bool spellsearchtype = false, float range = 100.0f, bool includeVictim = true); Unit* _doSummon(uint8 m_uiSpellIdx, TempSummonType type = TEMPSUMMON_CORPSE_TIMED_DESPAWN, uint32 delay = 60000); diff --git a/base/BSW_instance.cpp b/base/BSW_instance.cpp index 466a269..1df76dc 100644 --- a/base/BSW_instance.cpp +++ b/base/BSW_instance.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2009 - 2011 by /dev/rsa for ScriptDev2 +/* Copyright (C) 2009 - 2010 by /dev/rsa for ScriptDev2 * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ @@ -12,7 +12,8 @@ BSWScriptedInstance::BSWScriptedInstance(Map* pMap) : ScriptedInstance(pMap) m_auiEventTimer = 0; m_auiCreatureID = 0; m_auiEventLock = false; - m_pMap = pMap; + m_pMap = pMap; + m_objectGuidMap.clear(); }; BSWScriptedInstance::~BSWScriptedInstance() @@ -101,3 +102,71 @@ bool BSWScriptedInstance::GetEventTimer(uint32 creatureID, const uint32 diff) return false; } } + +void BSWScriptedInstance::SetObject(Object* object) +{ + if (!object) + return; + + m_objectGuidMap.insert(std::make_pair(object->GetEntry(), object->GetObjectGuid())); + +} + +ObjectGuid const& BSWScriptedInstance::GetInstanceObjectGuid(uint32 entry) +{ + std::map::const_iterator itr = m_objectGuidMap.find(entry); + + if (itr != m_objectGuidMap.end()) + return itr->second; + else + return ObjectGuid(); + +} + +uint64 BSWScriptedInstance::GetInstanceObjectGUID(uint32 entry) +{ + ObjectGuid guid = GetInstanceObjectGuid(entry); + if (guid.IsEmpty()) + return 0; + else + return guid.GetRawValue(); +} + +void BSWScriptedInstance::SetCriteriaState(uint32 criteria_id, bool state, Player* player) +{ + if (!criteria_id) + return; + + if (player && state) + m_personalCriteriaMap.insert(std::make_pair(criteria_id, player->GetObjectGuid())); + else + m_groupCriteriaMap.insert(std::make_pair(criteria_id, state)); + +} + +bool BSWScriptedInstance::GetCriteriaState(uint32 criteria_id, Player const* player) +{ + if (!criteria_id) + return false; + + std::map::const_iterator itr = m_groupCriteriaMap.find(criteria_id); + + if (itr != m_groupCriteriaMap.end()) + if (itr->second) + return true; + + if (player) + { + std::pair::const_iterator, std::multimap::const_iterator> bounds = + m_personalCriteriaMap.equal_range(criteria_id); + + for(std::multimap::const_iterator itr = bounds.first; itr != bounds.second; ++itr) + { + if (itr->second == player->GetObjectGuid()) + return true; + } + + } + + return false; +} diff --git a/base/BSW_instance.h b/base/BSW_instance.h index 0777df3..af643d5 100644 --- a/base/BSW_instance.h +++ b/base/BSW_instance.h @@ -1,10 +1,10 @@ -/* Copyright (C) 2009 - 2011 by /dev/rsa for ScriptDev2 +/* Copyright (C) 2009 - 2010 by /dev/rsa for ScriptDev2 * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ #ifndef BSW_INSTANCE_H #define BSW_INSTANCE_H -#define BSW_INSTANCE_VERSION 0.6.14 +#define BSW_INSTANCE_VERSION 0.6.20 #include "sc_instance.h" class MANGOS_DLL_DECL BSWScriptedInstance : public ScriptedInstance @@ -19,6 +19,16 @@ class MANGOS_DLL_DECL BSWScriptedInstance : public ScriptedInstance void DoOpenDoor(uint64 guid); void DoCloseDoor(uint64 guid); + uint64 GetInstanceObjectGUID(uint32 entry); + ObjectGuid const& GetInstanceObjectGuid(uint32 entry); + void SetObject(Object* object); + void SetInstanceObject(GameObject* go) { if (go) SetObject((Object*)go); }; + void SetInstanceUnit(Unit* unit) { if (unit) SetObject((Object*)unit); }; + void SetInstanceCreature(Creature* creature) { if (creature) SetObject((Object*)creature); }; + + void SetCriteriaState(uint32 criteria_id, bool state = true, Player* player = NULL); + bool GetCriteriaState(uint32 criteria_id, Player const* player = NULL); + void SetNextEvent(uint32 EventNum, uint32 creatureID, uint32 timer = 1000); uint32 GetEvent(uint32 creatureID); bool GetEventTimer(uint32 creatureID, const uint32 diff); @@ -29,5 +39,9 @@ class MANGOS_DLL_DECL BSWScriptedInstance : public ScriptedInstance uint32 m_auiEventTimer; bool m_auiEventLock; Map* m_pMap; + std::map m_objectGuidMap; + std::map m_groupCriteriaMap; + std::multimap m_personalCriteriaMap; + }; #endif diff --git a/base/escort_ai.cpp b/base/escort_ai.cpp index 6a22a74..6713413 100644 --- a/base/escort_ai.cpp +++ b/base/escort_ai.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/base/escort_ai.h b/base/escort_ai.h index 79339d6..6f54d7d 100644 --- a/base/escort_ai.h +++ b/base/escort_ai.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/base/follower_ai.cpp b/base/follower_ai.cpp index afc12cb..7237ce0 100644 --- a/base/follower_ai.cpp +++ b/base/follower_ai.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/base/follower_ai.h b/base/follower_ai.h index 9061485..4c3e84a 100644 --- a/base/follower_ai.h +++ b/base/follower_ai.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/base/guard_ai.cpp b/base/guard_ai.cpp index 49c2c53..c8bdb58 100644 --- a/base/guard_ai.cpp +++ b/base/guard_ai.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/base/guard_ai.h b/base/guard_ai.h index 208b722..9438225 100644 --- a/base/guard_ai.h +++ b/base/guard_ai.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/base/pet_ai.cpp b/base/pet_ai.cpp index 743fddd..18ffe28 100644 --- a/base/pet_ai.cpp +++ b/base/pet_ai.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/base/pet_ai.h b/base/pet_ai.h index 077c1fc..394ade3 100644 --- a/base/pet_ai.h +++ b/base/pet_ai.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/config.h b/config.h index d94d95e..8e75e1b 100644 --- a/config.h +++ b/config.h @@ -21,6 +21,7 @@ #include "Platform/CompilerDefs.h" #include "revision.h" +#include "sd2_revision_nr.h" // Format is YYYYMMDDRR where RR is the change in the conf file // for that day. @@ -35,7 +36,7 @@ #endif #ifndef _VERSION - #define _VERSION "Revision [" REVISION_ID "] " REVISION_DATE " " REVISION_TIME + #define _VERSION "Revision [" SD2_REVISION_NR "] (" REVISION_ID ") " REVISION_DATE " " REVISION_TIME " /dev/rsa branch" #endif // The path to config files diff --git a/docs/How to install.txt b/docs/How to install.txt index 08335db..4958813 100644 --- a/docs/How to install.txt +++ b/docs/How to install.txt @@ -2,27 +2,22 @@ --- How to install ScriptDev2 --- 1) Download MaNGOS (using git clone) +See their forum/ wiki for more details 2) Do the source stuff: +- Clone ScriptDev2 "git clone git://github.com/scriptdev2/scriptdev2.git ScriptDev2" - execute from within src/bindings directory MS Windows: -- Create a new folder under "src\bindings\" within the MaNGOS source called "ScriptDev2" -- Checkout the ScriptDev2 trunk from "https://scriptdev2.svn.sourceforge.net/svnroot/scriptdev2" -- Compile MaNGOS - Compile ScriptDev2 using the scriptVC80, scriptVC90 or scriptVC100 Solution within the ScriptDev2 folder (this will overwrite the Mangoscript dll in the output directory) -GNU/Linux: -- Checkout the ScriptDev2 to "src/bindings/ScriptDev2" - "svn co https://scriptdev2.svn.sourceforge.net/svnroot/scriptdev2 src/bindings/ScriptDev2" -SVN: -- Apply MaNGOS-XXXX-ScriptDev2.patch to Mangos, where XXXX is the highest version to that of your MaNGOS revision. -GIT: +GNU/Linux or CMake: - Apply the Git patch to Mangos - "git am src/bindings/ScriptDev2/patches/MaNGOS-XXXX-ScriptDev2.patch" - - Compile MaNGOS (ScriptDev2 will automatically be built when compiling Mangos from here on) + 3) Create the default ScriptDev2 database using -"sql\scriptdev2_create_database.sql", then execute -"sql\scriptdev2_create_structure.sql" on that database. + "sql\scriptdev2_create_database.sql", then execute + "sql\scriptdev2_create_structure.sql" on that database. 4) Execute the following on your ScriptDev2 database. - sql\scriptdev2_script_full.sql @@ -36,17 +31,15 @@ GIT: To update ScriptDev2: +- Enter src/bindings/ScriptDev2 directory (with git-bash) +- Update ScriptDev2 - "git pull" MS Windows: -- All you have to do is open src\bindings\ and right click on the ScriptDev2 folder and click "Update" and then follow steps 4, 6, and 7 again. You must still compile MaNGOS before ScriptDev2 when on the Windows platform. - -GNU/Linux: -- Go to the src/bindings/ScriptDev2 directory - "cd src/bindings/ScriptDev2" -- Update ScriptDev2 - "svn up" +- You must still compile MaNGOS before ScriptDev2 when on the Windows platform. To update your Database with new Scriptdev2 SQL changes you can either: a) apply only the changes that were made during that revision by looking in the sql\update folder or (files named rXXX_scriptdev2.sql should be executed on the scriptdev2 db while rXXX_mangos.sql should be executed on your mangos db) b) reapply "mangos_scriptname_full.sql" to your MaNGOS database. - WARNING this will NOT include removed script names! You can view the ScriptDev2 Change Log at: -http://scriptdev2.svn.sourceforge.net/viewvc/scriptdev2/?view=log +https://github.com/scriptdev/scriptdev2/commits/master diff --git a/docs/Script Layout.txt b/docs/Script Layout.txt index b519352..0ee53cb 100644 --- a/docs/Script Layout.txt +++ b/docs/Script Layout.txt @@ -3,30 +3,20 @@ A quick explanation of the layout I hope everyone will follow for scriptdev2. --- Sub Folders --- -Area - Contains scripts used solely by area triggers +battlegrounds - Contains scripts for npcs in Battlegrounds -Boss - Boss scripts for bosses that are not zone specific +custom - Intentionally empty folder from SVN. If you make a custom script please put it here. -Mob - Generic Creature scripts for creatures that are not zone specific +examples - Contains a couple of example scripts showing the most commonly used functions within SD2 -Custom - Intentionally empty folder from SVN. If you make a custom script please put it here. +eastern_kingdoms, kalimdor, northrend, outland - Contain scripts for anything related to npcs or instances on the corresponding continent. +Instances are grouped to subfolders, the normal continent-maps are divided into zones -GO - Contains scripts used solely by Game Objects (GOs) that do not have a specific zone - -Guard - Scripts for Guard NPCs - -Honor - Honor npcs (currently a blank script as these npcs do nothing special) - -Item - Item scripts - -NPC - Scripts for individual NPCs who do not have a specific zone - -Servers - Generic NPC servers script for things such as flightmasters and guildmasters. - -Zone - ALL zone specific scripts should be written within these folders. This includes creature scripts, boss scripts, go scripts, area scripts, and npc scripts. +world - Contains scripts for anything that is not related to a specified zone. +This includes item_scripts, areatrigger_scripts, some npcs that can be found at many places, go_scripts and spell_scripts --- Naming Conventions --- Please keep file names to "type_objectname.cpp" where type is replaced by the type of object and objectname is replaced by the name of the object, creature, item, or area that this script will be used by. -AddSC functions should follow "void AddSC_creaturename(void);" format. Do not append AI or anything else. +AddSC functions should follow "void AddSC_filename(void);" format. Do not append AI or anything else. diff --git a/include/precompiled.cpp b/include/precompiled.cpp index df4fc1c..d82bfc6 100644 --- a/include/precompiled.cpp +++ b/include/precompiled.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/include/precompiled.h b/include/precompiled.h index ae58004..fbebc1f 100644 --- a/include/precompiled.h +++ b/include/precompiled.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ @@ -10,6 +10,7 @@ #include "sc_gossip.h" #include "sc_grid_searchers.h" #include "sc_instance.h" +#include "sc_outdoor_pvp.h" #ifdef WIN32 # include diff --git a/include/sc_creature.cpp b/include/sc_creature.cpp index f10b5d9..8922359 100644 --- a/include/sc_creature.cpp +++ b/include/sc_creature.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/include/sc_creature.h b/include/sc_creature.h index a3d5667..733895a 100644 --- a/include/sc_creature.h +++ b/include/sc_creature.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/include/sc_gossip.h b/include/sc_gossip.h index 1469db2..1d966cd 100644 --- a/include/sc_gossip.h +++ b/include/sc_gossip.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/include/sc_grid_searchers.cpp b/include/sc_grid_searchers.cpp index 16f5228..b97c117 100644 --- a/include/sc_grid_searchers.cpp +++ b/include/sc_grid_searchers.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/include/sc_grid_searchers.h b/include/sc_grid_searchers.h index 0dfc709..c6f0336 100644 --- a/include/sc_grid_searchers.h +++ b/include/sc_grid_searchers.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/include/sc_instance.cpp b/include/sc_instance.cpp index f95715d..f73d6fe 100644 --- a/include/sc_instance.cpp +++ b/include/sc_instance.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ @@ -86,3 +86,20 @@ Player* ScriptedInstance::GetPlayerInMap(bool bOnlyAlive /*=false*/, bool bCanBe return NULL; } + +void ScriptedInstance::DoStartTimedAchievement(AchievementCriteriaTypes tCriteriaType, uint32 uiTimedCriteriaMiscId) +{ + Map::PlayerList const& lPlayers = instance->GetPlayers(); + + if (!lPlayers.isEmpty()) + { + for(Map::PlayerList::const_iterator itr = lPlayers.begin(); itr != lPlayers.end(); ++itr) + { + if (Player* pPlayer = itr->getSource()) + pPlayer->StartTimedAchievementCriteria(tCriteriaType, uiTimedCriteriaMiscId); + } + } + else + debug_log("SD2: DoStartTimedAchievement attempt start achievements but no players in map."); +} + diff --git a/include/sc_instance.h b/include/sc_instance.h index a1dcd42..5b8ba13 100644 --- a/include/sc_instance.h +++ b/include/sc_instance.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ @@ -44,5 +44,9 @@ class MANGOS_DLL_DECL ScriptedInstance : public InstanceData // Get a Player from map Player* GetPlayerInMap(bool bOnlyAlive = false, bool bCanBeGamemaster = true); + + // starts a timed achievement criteria for all players in instance + void DoStartTimedAchievement(AchievementCriteriaTypes tCriteriaType, uint32 uiTimedCriteriaMiscId); + }; #endif diff --git a/include/sc_outdoor_pvp.cpp b/include/sc_outdoor_pvp.cpp new file mode 100644 index 0000000..fb14a38 --- /dev/null +++ b/include/sc_outdoor_pvp.cpp @@ -0,0 +1,40 @@ +/* Copyright (C) 2006 - 2011 ScriptDev2 + * This program is free software licensed under GPL version 2 + * Please see the included DOCS/LICENSE.TXT for more information */ + +#include "precompiled.h" + +void OutdoorPvP::DoUpdateWorldState(PlayerSet sPlayerSet, uint32 uiStateId, uint32 uiStateData) +{ + for(PlayerSet::const_iterator itr = sPlayerSet.begin(); itr != sPlayerSet.end(); ++itr) + { + if (Player* pPlayer = instance->GetPlayer(*itr)) + pPlayer->SendUpdateWorldState(uiStateId, uiStateData); + } +} + +Player* OutdoorPvP::GetPlayerInMap(bool bOnlyAlive /*=false*/, bool bCanBeGamemaster /*=true*/) +{ + Map::PlayerList const& lPlayers = instance->GetPlayers(); + + for(Map::PlayerList::const_iterator itr = lPlayers.begin(); itr != lPlayers.end(); ++itr) + { + Player* pPlayer = itr->getSource(); + if (pPlayer && (!bOnlyAlive || pPlayer->isAlive()) && (bCanBeGamemaster || !pPlayer->isGameMaster())) + return pPlayer; + } + + return NULL; +} + +void OutdoorPvP::DoApplyTeamBuff(PlayerSet sPlayerSet, Team uiTeamId, uint32 uiSpellId) +{ + for(PlayerSet::const_iterator itr = sPlayerSet.begin(); itr != sPlayerSet.end(); ++itr) + { + if (Player* pPlayer = instance->GetPlayer(*itr)) + { + if (pPlayer->GetTeam() == uiTeamId) + pPlayer->CastSpell(pPlayer, uiSpellId, true); + } + } +} diff --git a/include/sc_outdoor_pvp.h b/include/sc_outdoor_pvp.h new file mode 100644 index 0000000..d6e9e59 --- /dev/null +++ b/include/sc_outdoor_pvp.h @@ -0,0 +1,34 @@ +/* Copyright (C) 2006 - 2011 ScriptDev2 +* This program is free software licensed under GPL version 2 +* Please see the included DOCS/LICENSE.TXT for more information */ + +#ifndef SC_OUTDOOR_PVP_H +#define SC_OUTDOOR_PVP_H + +#include "InstanceData.h" +#include "Map.h" + +#define OUT_SAVE_PVP_DATA debug_log("SD2: Saving OutdoorPvP Data for Instance %s (Map %d, Instance Id %d)", instance->GetMapName(), instance->GetId(), instance->GetInstanceId()) +#define OUT_SAVE_PVP_DATA_COMPLETE debug_log("SD2: Saving OutdoorPvP Data for Instance %s (Map %d, Instance Id %d) completed.", instance->GetMapName(), instance->GetId(), instance->GetInstanceId()) +#define OUT_LOAD_PVP_DATA(a) debug_log("SD2: Loading OutdoorPvP Data for Instance %s (Map %d, Instance Id %d). Input is '%s'", instance->GetMapName(), instance->GetId(), instance->GetInstanceId(), a) +#define OUT_LOAD_PVP_DATA_COMPLETE debug_log("SD2: OutdoorPvP Data Load for Instance %s (Map %d, Instance Id: %d) is complete.",instance->GetMapName(), instance->GetId(), instance->GetInstanceId()) +#define OUT_LOAD_PVP_DATA_FAIL error_log("SD2: Unable to load OutdoorPvP Data for Instance %s (Map %d, Instance Id: %d).",instance->GetMapName(), instance->GetId(), instance->GetInstanceId()) + +class MANGOS_DLL_DECL OutdoorPvP : public InstanceData +{ + public: + OutdoorPvP(Map* pMap) : InstanceData(pMap) {} + ~OutdoorPvP() {} + + typedef std::set PlayerSet; + + // Sends world state update to all players in the current zone; they are stored in a PlayerSet + void DoUpdateWorldState(PlayerSet sPlayerSet, uint32 uiStateId, uint32 uiStateData); + + // Get a Player from map + Player* GetPlayerInMap(bool bOnlyAlive = false, bool bCanBeGamemaster = true); + + // Casts a spell to a specific team in a specific zone; they are stored in a PlayerSet + void DoApplyTeamBuff(PlayerSet sPlayerSet, Team uiTeamId, uint32 uiSpellId); +}; +#endif diff --git a/patches/custom/ScriptDev2_1982_to_MaNGOS_0.12.patch b/patches/custom/ScriptDev2_1982_to_MaNGOS_0.12.patch new file mode 100644 index 0000000..bd93af6 --- /dev/null +++ b/patches/custom/ScriptDev2_1982_to_MaNGOS_0.12.patch @@ -0,0 +1,479 @@ +Index: include/precompiled.h +=================================================================== +--- include/precompiled.h (revision 1982) ++++ include/precompiled.h (working copy) +@@ -11,6 +11,11 @@ + #include "sc_grid_searchers.h" + #include "sc_instance.h" + ++enum backports ++{ ++ UNIT_VIRTUAL_ITEM_SLOT_ID = UNIT_VIRTUAL_ITEM_SLOT_DISPLAY ++}; ++ + #ifdef WIN32 + # include + BOOL APIENTRY DllMain(HANDLE hModule, DWORD ul_reason_for_call, LPVOID lpReserved) +Index: scripts/eastern_kingdoms/shadowfang_keep/shadowfang_keep.cpp +=================================================================== +--- scripts/eastern_kingdoms/shadowfang_keep/shadowfang_keep.cpp (revision 1982) ++++ scripts/eastern_kingdoms/shadowfang_keep/shadowfang_keep.cpp (working copy) +@@ -91,10 +91,10 @@ + else + DoScriptText(EMOTE_UNLOCK_DOOR_AD, m_creature); + break; +- case 12: +- if (m_uiNpcEntry != NPC_ASH) +- m_creature->HandleEmote(EMOTE_ONESHOT_USESTANDING); +- break; ++// case 12: ++// if (m_uiNpcEntry != NPC_ASH) ++// m_creature->HandleEmote(EMOTE_ONESHOT_USESTANDING); ++// break; + case 13: + if (m_uiNpcEntry == NPC_ASH) + DoScriptText(SAY_POST_DOOR_AS, m_creature); +Index: scripts/kalimdor/azuremyst_isle.cpp +=================================================================== +--- scripts/kalimdor/azuremyst_isle.cpp (revision 1982) ++++ scripts/kalimdor/azuremyst_isle.cpp (working copy) +@@ -103,7 +103,7 @@ + + void SpellHit(Unit* pCaster, const SpellEntry* pSpell) + { +- if (pSpell->SpellFamilyFlags2 & 0x080000000) ++ if (pSpell->Id == 28880) + { + m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_PVP_ATTACKABLE); + m_creature->SetStandState(UNIT_STAND_STATE_STAND); +Index: scripts/kalimdor/onyxias_lair/boss_onyxia.cpp +=================================================================== +--- scripts/kalimdor/onyxias_lair/boss_onyxia.cpp (revision 1982) ++++ scripts/kalimdor/onyxias_lair/boss_onyxia.cpp (working copy) +@@ -312,7 +312,7 @@ + DoScriptText(SAY_PHASE_2_TRANS, m_creature); + + // sort of a hack, it is unclear how this really work but the values appear to be valid +- m_creature->SetByteValue(UNIT_FIELD_BYTES_1, 3, UNIT_BYTE1_FLAG_ALWAYS_STAND | UNIT_BYTE1_FLAG_UNK_2); ++ m_creature->SetByteValue(UNIT_FIELD_BYTES_1, 3, UNIT_BYTE1_FLAG_ALWAYS_STAND/* | UNIT_BYTE1_FLAG_UNK_2*/); + m_creature->AddSplineFlag(SPLINEFLAG_FLYING); + + if (m_pPointData) +@@ -438,7 +438,7 @@ + return; + + // All and only the Onyxia Deep Breath Spells have these visuals +- if (pSpell->SpellVisual[0] == SPELL_VISUAL_BREATH_A || pSpell->SpellVisual[0] == SPELL_VISUAL_BREATH_B) ++ if (pSpell->SpellVisual == SPELL_VISUAL_BREATH_A || pSpell->SpellVisual == SPELL_VISUAL_BREATH_B) + m_pInstance->SetData(TYPE_ONYXIA, DATA_PLAYER_TOASTED); + } + }; +Index: scripts/northrend/dragonblight.cpp +=================================================================== +--- scripts/northrend/dragonblight.cpp (revision 1982) ++++ scripts/northrend/dragonblight.cpp (working copy) +@@ -101,7 +101,7 @@ + if (uiAction == GOSSIP_ACTION_INFO_DEF+1) + { + pPlayer->CLOSE_GOSSIP_MENU(); +- pPlayer->SendMovieStart(MOVIE_ID_GATES); ++// pPlayer->SendMovieStart(MOVIE_ID_GATES); + } + + return true; +Index: scripts/outland/auchindoun/auchenai_crypts/boss_exarch_maladaar.cpp +=================================================================== +--- scripts/outland/auchindoun/auchenai_crypts/boss_exarch_maladaar.cpp (revision 1982) ++++ scripts/outland/auchindoun/auchenai_crypts/boss_exarch_maladaar.cpp (working copy) +@@ -107,10 +107,10 @@ + DoCastSpellIfCan(m_creature->getVictim(), SPELL_MOONFIRE); + m_uiSpellTimer = 10000; + break; +- case CLASS_DEATH_KNIGHT: +- DoCastSpellIfCan(m_creature->getVictim(), SPELL_PLAGUE_STRIKE); +- m_uiSpellTimer = 10000; +- break; ++// case CLASS_DEATH_KNIGHT: ++// DoCastSpellIfCan(m_creature->getVictim(), SPELL_PLAGUE_STRIKE); ++// m_uiSpellTimer = 10000; ++// break; + } + } + else +Index: scripts/world/item_scripts.cpp +=================================================================== +--- scripts/world/item_scripts.cpp (revision 1982) ++++ scripts/world/item_scripts.cpp (working copy) +@@ -47,7 +47,7 @@ + pPlayer->SendEquipError(EQUIP_ERR_NONE, pItem, NULL); + + if (const SpellEntry* pSpellInfo = GetSpellStore()->LookupEntry(SPELL_ARCANE_CHARGES)) +- Spell::SendCastResult(pPlayer, pSpellInfo, 1, SPELL_FAILED_NOT_ON_GROUND); ++ Spell::SendCastResult(pPlayer, pSpellInfo, 1, SPELL_FAILED_ERROR); + + return true; + } +Index: system/ScriptLoader.cpp +=================================================================== +--- system/ScriptLoader.cpp (revision 1982) ++++ system/ScriptLoader.cpp (working copy) +@@ -102,7 +102,22 @@ + extern void AddSC_boss_ragnaros(); + extern void AddSC_instance_molten_core(); + extern void AddSC_molten_core(); +-extern void AddSC_ebon_hold(); // scarlet_enclave ++extern void AddSC_boss_anubrekhan(); // naxxramas ++extern void AddSC_boss_four_horsemen(); ++extern void AddSC_boss_faerlina(); ++extern void AddSC_boss_gluth(); ++extern void AddSC_boss_gothik(); ++extern void AddSC_boss_grobbulus(); ++extern void AddSC_boss_kelthuzad(); ++extern void AddSC_boss_loatheb(); ++extern void AddSC_boss_maexxna(); ++extern void AddSC_boss_noth(); ++extern void AddSC_boss_heigan(); ++extern void AddSC_boss_patchwerk(); ++extern void AddSC_boss_razuvious(); ++extern void AddSC_boss_sapphiron(); ++extern void AddSC_boss_thaddius(); ++extern void AddSC_instance_naxxramas(); + extern void AddSC_boss_arcanist_doan(); // scarlet_monastery + extern void AddSC_boss_azshir_the_sleepless(); + extern void AddSC_boss_bloodmage_thalnos(); +@@ -214,8 +229,6 @@ + extern void AddSC_boss_lieutenant_drake(); + extern void AddSC_instance_old_hillsbrad(); + extern void AddSC_old_hillsbrad(); +-extern void AddSC_culling_of_stratholme(); // COT, culling_of_stratholme +-extern void AddSC_instance_culling_of_stratholme(); + extern void AddSC_dire_maul(); // dire_maul + extern void AddSC_instance_dire_maul(); + extern void AddSC_boss_celebras_the_cursed(); // maraudon +@@ -271,145 +284,8 @@ + extern void AddSC_winterspring(); + + // northrend +-extern void AddSC_boss_jedoga(); // azjol-nerub, ahnkahet +-extern void AddSC_boss_nadox(); +-extern void AddSC_boss_taldaram(); +-extern void AddSC_boss_volazj(); +-extern void AddSC_instance_ahnkahet(); +-extern void AddSC_boss_anubarak(); // azjol-nerub, azjol-nerub +-extern void AddSC_boss_hadronox(); +-extern void AddSC_boss_krikthir(); +-extern void AddSC_instance_azjol_nerub(); +-extern void AddSC_trial_of_the_champion(); // CC, trial_of_the_champion +-extern void AddSC_boss_grand_champions(); +-extern void AddSC_instance_trial_of_the_champion(); +-extern void AddSC_boss_anubarak_trial(); // CC, trial_of_the_crusader +-extern void AddSC_boss_faction_champions(); +-extern void AddSC_boss_jaraxxus(); +-extern void AddSC_instance_trial_of_the_crusader(); +-extern void AddSC_northrend_beasts(); +-extern void AddSC_trial_of_the_crusader(); +-extern void AddSC_twin_valkyr(); +-extern void AddSC_boss_novos(); // draktharon_keep +-extern void AddSC_boss_tharonja(); +-extern void AddSC_boss_trollgore(); +-extern void AddSC_instance_draktharon_keep(); +-extern void AddSC_boss_colossus(); // gundrak +-extern void AddSC_boss_eck(); +-extern void AddSC_boss_galdarah(); +-extern void AddSC_boss_moorabi(); +-extern void AddSC_boss_sladran(); +-extern void AddSC_instance_gundrak(); +-extern void AddSC_boss_bronjahm(); // ICC, forge_of_souls +-extern void AddSC_boss_devourer_of_souls(); +-extern void AddSC_instance_forge_of_souls(); +-extern void AddSC_boss_falric(); // ICC, halls_of_reflection +-extern void AddSC_boss_lich_king(); +-extern void AddSC_boss_marwyn(); +-extern void AddSC_halls_of_reflection(); +-extern void AddSC_instance_halls_of_reflection(); +-extern void AddSC_boss_garfrost(); // ICC, pit_of_saron +-extern void AddSC_boss_krick_and_ick(); +-extern void AddSC_boss_tyrannus(); +-extern void AddSC_instance_pit_of_saron(); +-extern void AddSC_pit_of_saron(); +-extern void AddSC_blood_prince_council(); // ICC, icecrown_citadel +-extern void AddSC_boss_blood_queen_lanathel(); +-extern void AddSC_boss_deathbringer_saurfang(); +-extern void AddSC_boss_festergut(); +-extern void AddSC_boss_lady_deathwhisper(); +-extern void AddSC_boss_lord_marrowgar(); +-extern void AddSC_boss_professor_putricide(); +-extern void AddSC_boss_rotface(); +-extern void AddSC_boss_sindragosa(); +-extern void AddSC_boss_the_lich_king(); +-extern void AddSC_boss_valithria_dreamwalker(); +-extern void AddSC_gunship_battle(); +-extern void AddSC_instance_icecrown_citadel(); +-extern void AddSC_boss_anubrekhan(); // naxxramas +-extern void AddSC_boss_four_horsemen(); +-extern void AddSC_boss_faerlina(); +-extern void AddSC_boss_gluth(); +-extern void AddSC_boss_gothik(); +-extern void AddSC_boss_grobbulus(); +-extern void AddSC_boss_kelthuzad(); +-extern void AddSC_boss_loatheb(); +-extern void AddSC_boss_maexxna(); +-extern void AddSC_boss_noth(); +-extern void AddSC_boss_heigan(); +-extern void AddSC_boss_patchwerk(); +-extern void AddSC_boss_razuvious(); +-extern void AddSC_boss_sapphiron(); +-extern void AddSC_boss_thaddius(); +-extern void AddSC_instance_naxxramas(); +-extern void AddSC_boss_malygos(); // nexus, eye_of_eternity +-extern void AddSC_boss_anomalus(); // nexus, nexus +-extern void AddSC_boss_keristrasza(); +-extern void AddSC_boss_ormorok(); +-extern void AddSC_boss_telestra(); +-extern void AddSC_instance_nexus(); +-extern void AddSC_boss_sartharion(); // obsidian_sanctum +-extern void AddSC_instance_obsidian_sanctum(); +-extern void AddSC_boss_baltharus(); // ruby_sanctum +-extern void AddSC_boss_halion(); +-extern void AddSC_boss_saviana(); +-extern void AddSC_boss_zarithrian(); +-extern void AddSC_instance_ruby_sanctum(); +-extern void AddSC_boss_bjarngrim(); // ulduar, halls_of_lightning +-extern void AddSC_boss_ionar(); +-extern void AddSC_boss_loken(); +-extern void AddSC_boss_volkhan(); +-extern void AddSC_instance_halls_of_lightning(); +-extern void AddSC_boss_maiden_of_grief(); // ulduar, halls_of_stone +-extern void AddSC_boss_sjonnir(); +-extern void AddSC_halls_of_stone(); +-extern void AddSC_instance_halls_of_stone(); +-extern void AddSC_boss_assembly_of_iron(); // ulduar, ulduar +-extern void AddSC_boss_algalon(); +-extern void AddSC_boss_auriaya(); +-extern void AddSC_boss_flame_leviathan(); +-extern void AddSC_boss_freya(); +-extern void AddSC_boss_general_vezax(); +-extern void AddSC_boss_hodir(); +-extern void AddSC_boss_ignis(); +-extern void AddSC_boss_kologarn(); +-extern void AddSC_boss_mimiron(); +-extern void AddSC_boss_razorscale(); +-extern void AddSC_boss_thorim(); +-extern void AddSC_boss_xt_002(); +-extern void AddSC_boss_yogg_saron(); +-extern void AddSC_instance_ulduar(); +-extern void AddSC_ulduar(); +-extern void AddSC_boss_ingvar(); // utgarde_keep, utgarde_keep +-extern void AddSC_boss_keleseth(); +-extern void AddSC_boss_skarvald_and_dalronn(); +-extern void AddSC_instance_utgarde_keep(); +-extern void AddSC_utgarde_keep(); +-extern void AddSC_boss_gortok(); // utgarde_keep, utgarde_pinnacle +-extern void AddSC_boss_skadi(); +-extern void AddSC_boss_svala(); +-extern void AddSC_boss_ymiron(); +-extern void AddSC_instance_pinnacle(); +-extern void AddSC_boss_archavon(); // vault_of_archavon +-extern void AddSC_boss_emalon(); +-extern void AddSC_boss_koralon(); +-extern void AddSC_boss_toravon(); +-extern void AddSC_instance_vault_of_archavon(); +-extern void AddSC_boss_erekem(); // violet_hold +-extern void AddSC_boss_ichoron(); +-extern void AddSC_instance_violet_hold(); +-extern void AddSC_violet_hold(); ++// removed + +-extern void AddSC_borean_tundra(); +-extern void AddSC_dalaran(); +-extern void AddSC_dragonblight(); +-extern void AddSC_grizzly_hills(); +-extern void AddSC_howling_fjord(); +-extern void AddSC_icecrown(); +-extern void AddSC_sholazar_basin(); +-extern void AddSC_storm_peaks(); +-extern void AddSC_zuldrak(); +- + // outland + extern void AddSC_boss_exarch_maladaar(); // auchindoun, auchenai_crypts + extern void AddSC_boss_shirrak(); +@@ -592,7 +468,22 @@ + AddSC_boss_ragnaros(); + AddSC_instance_molten_core(); + AddSC_molten_core(); +- AddSC_ebon_hold(); // scarlet_enclave ++ AddSC_boss_anubrekhan(); // naxxramas ++ AddSC_boss_four_horsemen(); ++ AddSC_boss_faerlina(); ++ AddSC_boss_gluth(); ++ AddSC_boss_gothik(); ++ AddSC_boss_grobbulus(); ++ AddSC_boss_kelthuzad(); ++ AddSC_boss_loatheb(); ++ AddSC_boss_maexxna(); ++ AddSC_boss_noth(); ++ AddSC_boss_heigan(); ++ AddSC_boss_patchwerk(); ++ AddSC_boss_razuvious(); ++ AddSC_boss_sapphiron(); ++ AddSC_boss_thaddius(); ++ AddSC_instance_naxxramas(); + AddSC_boss_arcanist_doan(); // scarlet_monastery + AddSC_boss_azshir_the_sleepless(); + AddSC_boss_bloodmage_thalnos(); +@@ -704,8 +595,6 @@ + AddSC_boss_lieutenant_drake(); + AddSC_instance_old_hillsbrad(); + AddSC_old_hillsbrad(); +- AddSC_culling_of_stratholme(); // CoT, culling_of_stratholme +- AddSC_instance_culling_of_stratholme(); + AddSC_dire_maul(); // dire_maul + AddSC_instance_dire_maul(); + AddSC_boss_celebras_the_cursed(); // maraudon +@@ -761,145 +650,8 @@ + AddSC_winterspring(); + + // northrend +- AddSC_boss_jedoga(); // azjol-nerub, ahnkahet +- AddSC_boss_nadox(); +- AddSC_boss_taldaram(); +- AddSC_boss_volazj(); +- AddSC_instance_ahnkahet(); +- AddSC_boss_anubarak(); // azjol-nerub, azjol-nerub +- AddSC_boss_hadronox(); +- AddSC_boss_krikthir(); +- AddSC_instance_azjol_nerub(); +- AddSC_boss_grand_champions(); // CC, trial_of_the_champion +- AddSC_instance_trial_of_the_champion(); +- AddSC_trial_of_the_champion(); +- AddSC_boss_anubarak_trial(); // CC, trial_of_the_crusader +- AddSC_boss_faction_champions(); +- AddSC_boss_jaraxxus(); +- AddSC_instance_trial_of_the_crusader(); +- AddSC_northrend_beasts(); +- AddSC_trial_of_the_crusader(); +- AddSC_twin_valkyr(); +- AddSC_boss_novos(); // draktharon_keep +- AddSC_boss_tharonja(); +- AddSC_boss_trollgore(); +- AddSC_instance_draktharon_keep(); +- AddSC_boss_colossus(); // gundrak +- AddSC_boss_eck(); +- AddSC_boss_galdarah(); +- AddSC_boss_moorabi(); +- AddSC_boss_sladran(); +- AddSC_instance_gundrak(); +- AddSC_boss_bronjahm(); // ICC, FH, forge_of_souls +- AddSC_boss_devourer_of_souls(); +- AddSC_instance_forge_of_souls(); +- AddSC_boss_falric(); // ICC, FH, halls_of_reflection +- AddSC_boss_lich_king(); +- AddSC_boss_marwyn(); +- AddSC_halls_of_reflection(); +- AddSC_instance_halls_of_reflection(); +- AddSC_boss_garfrost(); // ICC, FH, pit_of_saron +- AddSC_boss_krick_and_ick(); +- AddSC_boss_tyrannus(); +- AddSC_instance_pit_of_saron(); +- AddSC_pit_of_saron(); +- AddSC_blood_prince_council(); // ICC, icecrown_citadel +- AddSC_boss_blood_queen_lanathel(); +- AddSC_boss_deathbringer_saurfang(); +- AddSC_boss_festergut(); +- AddSC_boss_lady_deathwhisper(); +- AddSC_boss_lord_marrowgar(); +- AddSC_boss_professor_putricide(); +- AddSC_boss_rotface(); +- AddSC_boss_sindragosa(); +- AddSC_boss_the_lich_king(); +- AddSC_boss_valithria_dreamwalker(); +- AddSC_gunship_battle(); +- AddSC_instance_icecrown_citadel(); +- AddSC_boss_anubrekhan(); // naxxramas +- AddSC_boss_four_horsemen(); +- AddSC_boss_faerlina(); +- AddSC_boss_gluth(); +- AddSC_boss_gothik(); +- AddSC_boss_grobbulus(); +- AddSC_boss_kelthuzad(); +- AddSC_boss_loatheb(); +- AddSC_boss_maexxna(); +- AddSC_boss_noth(); +- AddSC_boss_heigan(); +- AddSC_boss_patchwerk(); +- AddSC_boss_razuvious(); +- AddSC_boss_sapphiron(); +- AddSC_boss_thaddius(); +- AddSC_instance_naxxramas(); +- AddSC_boss_malygos(); // nexus, eye_of_eternity +- AddSC_boss_anomalus(); // nexus, nexus +- AddSC_boss_keristrasza(); +- AddSC_boss_ormorok(); +- AddSC_boss_telestra(); +- AddSC_instance_nexus(); +- AddSC_boss_sartharion(); // obsidian_sanctum +- AddSC_instance_obsidian_sanctum(); +- AddSC_boss_baltharus(); // ruby_sanctum +- AddSC_boss_halion(); +- AddSC_boss_saviana(); +- AddSC_boss_zarithrian(); +- AddSC_instance_ruby_sanctum(); +- AddSC_boss_bjarngrim(); // ulduar, halls_of_lightning +- AddSC_boss_ionar(); +- AddSC_boss_loken(); +- AddSC_boss_volkhan(); +- AddSC_instance_halls_of_lightning(); +- AddSC_boss_maiden_of_grief(); // ulduar, halls_of_stone +- AddSC_boss_sjonnir(); +- AddSC_halls_of_stone(); +- AddSC_instance_halls_of_stone(); +- AddSC_boss_assembly_of_iron(); // ulduar, ulduar +- AddSC_boss_algalon(); +- AddSC_boss_auriaya(); +- AddSC_boss_flame_leviathan(); +- AddSC_boss_freya(); +- AddSC_boss_general_vezax(); +- AddSC_boss_hodir(); +- AddSC_boss_ignis(); +- AddSC_boss_kologarn(); +- AddSC_boss_mimiron(); +- AddSC_boss_razorscale(); +- AddSC_boss_thorim(); +- AddSC_boss_xt_002(); +- AddSC_boss_yogg_saron(); +- AddSC_instance_ulduar(); +- AddSC_ulduar(); +- AddSC_boss_ingvar(); // UK, utgarde_keep +- AddSC_boss_keleseth(); +- AddSC_boss_skarvald_and_dalronn(); +- AddSC_instance_utgarde_keep(); +- AddSC_utgarde_keep(); +- AddSC_boss_gortok(); // UK, utgarde_pinnacle +- AddSC_boss_skadi(); +- AddSC_boss_svala(); +- AddSC_boss_ymiron(); +- AddSC_instance_pinnacle(); +- AddSC_boss_archavon(); // vault_of_archavon +- AddSC_boss_emalon(); +- AddSC_boss_koralon(); +- AddSC_boss_toravon(); +- AddSC_instance_vault_of_archavon(); +- AddSC_boss_erekem(); // violet_hold +- AddSC_boss_ichoron(); +- AddSC_instance_violet_hold(); +- AddSC_violet_hold(); ++ // removed + +- AddSC_borean_tundra(); +- AddSC_dalaran(); +- AddSC_dragonblight(); +- AddSC_grizzly_hills(); +- AddSC_howling_fjord(); +- AddSC_icecrown(); +- AddSC_sholazar_basin(); +- AddSC_storm_peaks(); +- AddSC_zuldrak(); +- + // outland + AddSC_boss_exarch_maladaar(); // auchindoun, auchenai_crypts + AddSC_boss_shirrak(); diff --git a/patches/custom/ScriptDev2_2007_to_MaNGOS_one.patch b/patches/custom/ScriptDev2_2007_to_MaNGOS_one.patch new file mode 100644 index 0000000..bbd9c38 --- /dev/null +++ b/patches/custom/ScriptDev2_2007_to_MaNGOS_one.patch @@ -0,0 +1,497 @@ +From d858813d233e400278d18dff699e17600f104869 Mon Sep 17 00:00:00 2001 +From: ScriptDev2 +Date: Thu, 24 Mar 2011 00:16:38 +0100 +Subject: [PATCH] ScriptDev2 - One Compatibility patch + +Signed-off-by: Schmoozerd +--- + include/precompiled.h | 5 + + .../shadowfang_keep/shadowfang_keep.cpp | 8 +- + scripts/kalimdor/azuremyst_isle.cpp | 2 +- + scripts/kalimdor/onyxias_lair/boss_onyxia.cpp | 4 +- + scripts/northrend/dragonblight.cpp | 2 +- + .../auchenai_crypts/boss_exarch_maladaar.cpp | 8 +- + scripts/world/item_scripts.cpp | 2 +- + system/ScriptLoader.cpp | 316 ++----------------- + 8 files changed, 52 insertions(+), 295 deletions(-) + +diff --git a/include/precompiled.h b/include/precompiled.h +index 11b6b31..2f202a3 100644 +--- a/include/precompiled.h ++++ b/include/precompiled.h +@@ -11,6 +11,11 @@ + #include "sc_grid_searchers.h" + #include "sc_instance.h" + ++enum backports ++{ ++ UNIT_VIRTUAL_ITEM_SLOT_ID = UNIT_VIRTUAL_ITEM_SLOT_DISPLAY ++}; ++ + #ifdef WIN32 + # include + BOOL APIENTRY DllMain(HANDLE hModule, DWORD ul_reason_for_call, LPVOID lpReserved) +diff --git a/scripts/eastern_kingdoms/shadowfang_keep/shadowfang_keep.cpp b/scripts/eastern_kingdoms/shadowfang_keep/shadowfang_keep.cpp +index 2cb6676..d3b1c0c 100644 +--- a/scripts/eastern_kingdoms/shadowfang_keep/shadowfang_keep.cpp ++++ b/scripts/eastern_kingdoms/shadowfang_keep/shadowfang_keep.cpp +@@ -91,10 +91,10 @@ struct MANGOS_DLL_DECL npc_shadowfang_prisonerAI : public npc_escortAI + else + DoScriptText(EMOTE_UNLOCK_DOOR_AD, m_creature); + break; +- case 12: +- if (m_uiNpcEntry != NPC_ASH) +- m_creature->HandleEmote(EMOTE_ONESHOT_USESTANDING); +- break; ++// case 12: ++// if (m_uiNpcEntry != NPC_ASH) ++// m_creature->HandleEmote(EMOTE_ONESHOT_USESTANDING); ++// break; + case 13: + if (m_uiNpcEntry == NPC_ASH) + DoScriptText(SAY_POST_DOOR_AS, m_creature); +diff --git a/scripts/kalimdor/azuremyst_isle.cpp b/scripts/kalimdor/azuremyst_isle.cpp +index 94879c4..8aef16e 100644 +--- a/scripts/kalimdor/azuremyst_isle.cpp ++++ b/scripts/kalimdor/azuremyst_isle.cpp +@@ -103,7 +103,7 @@ struct MANGOS_DLL_DECL npc_draenei_survivorAI : public ScriptedAI + + void SpellHit(Unit* pCaster, const SpellEntry* pSpell) + { +- if (pSpell->SpellFamilyFlags2 & 0x080000000) ++ if (pSpell->Id == 28880) + { + m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_PVP_ATTACKABLE); + m_creature->SetStandState(UNIT_STAND_STATE_STAND); +diff --git a/scripts/kalimdor/onyxias_lair/boss_onyxia.cpp b/scripts/kalimdor/onyxias_lair/boss_onyxia.cpp +index fadb93d..d446e44 100644 +--- a/scripts/kalimdor/onyxias_lair/boss_onyxia.cpp ++++ b/scripts/kalimdor/onyxias_lair/boss_onyxia.cpp +@@ -312,7 +312,7 @@ struct MANGOS_DLL_DECL boss_onyxiaAI : public ScriptedAI + DoScriptText(SAY_PHASE_2_TRANS, m_creature); + + // sort of a hack, it is unclear how this really work but the values appear to be valid +- m_creature->SetByteValue(UNIT_FIELD_BYTES_1, 3, UNIT_BYTE1_FLAG_ALWAYS_STAND | UNIT_BYTE1_FLAG_UNK_2); ++ m_creature->SetByteValue(UNIT_FIELD_BYTES_1, 3, UNIT_BYTE1_FLAG_ALWAYS_STAND/* | UNIT_BYTE1_FLAG_UNK_2*/); + m_creature->AddSplineFlag(SPLINEFLAG_FLYING); + + if (m_pPointData) +@@ -438,7 +438,7 @@ struct MANGOS_DLL_DECL boss_onyxiaAI : public ScriptedAI + return; + + // All and only the Onyxia Deep Breath Spells have these visuals +- if (pSpell->SpellVisual[0] == SPELL_VISUAL_BREATH_A || pSpell->SpellVisual[0] == SPELL_VISUAL_BREATH_B) ++ if (pSpell->SpellVisual == SPELL_VISUAL_BREATH_A || pSpell->SpellVisual == SPELL_VISUAL_BREATH_B) + m_pInstance->SetData(TYPE_ONYXIA, DATA_PLAYER_TOASTED); + } + }; +diff --git a/scripts/northrend/dragonblight.cpp b/scripts/northrend/dragonblight.cpp +index a315b31..3335302 100644 +--- a/scripts/northrend/dragonblight.cpp ++++ b/scripts/northrend/dragonblight.cpp +@@ -101,7 +101,7 @@ bool GossipSelect_npc_alexstrasza_wr_gate(Player* pPlayer, Creature* pCreature, + if (uiAction == GOSSIP_ACTION_INFO_DEF+1) + { + pPlayer->CLOSE_GOSSIP_MENU(); +- pPlayer->SendMovieStart(MOVIE_ID_GATES); ++// pPlayer->SendMovieStart(MOVIE_ID_GATES); + } + + return true; +diff --git a/scripts/outland/auchindoun/auchenai_crypts/boss_exarch_maladaar.cpp b/scripts/outland/auchindoun/auchenai_crypts/boss_exarch_maladaar.cpp +index 621649f..26d6622 100644 +--- a/scripts/outland/auchindoun/auchenai_crypts/boss_exarch_maladaar.cpp ++++ b/scripts/outland/auchindoun/auchenai_crypts/boss_exarch_maladaar.cpp +@@ -107,10 +107,10 @@ struct MANGOS_DLL_DECL mob_stolen_soulAI : public ScriptedAI + DoCastSpellIfCan(m_creature->getVictim(), SPELL_MOONFIRE); + m_uiSpellTimer = 10000; + break; +- case CLASS_DEATH_KNIGHT: +- DoCastSpellIfCan(m_creature->getVictim(), SPELL_PLAGUE_STRIKE); +- m_uiSpellTimer = 10000; +- break; ++// case CLASS_DEATH_KNIGHT: ++// DoCastSpellIfCan(m_creature->getVictim(), SPELL_PLAGUE_STRIKE); ++// m_uiSpellTimer = 10000; ++// break; + } + } + else +diff --git a/scripts/world/item_scripts.cpp b/scripts/world/item_scripts.cpp +index 4474aa7..8a70bbc 100644 +--- a/scripts/world/item_scripts.cpp ++++ b/scripts/world/item_scripts.cpp +@@ -47,7 +47,7 @@ bool ItemUse_item_arcane_charges(Player* pPlayer, Item* pItem, const SpellCastTa + pPlayer->SendEquipError(EQUIP_ERR_NONE, pItem, NULL); + + if (const SpellEntry* pSpellInfo = GetSpellStore()->LookupEntry(SPELL_ARCANE_CHARGES)) +- Spell::SendCastResult(pPlayer, pSpellInfo, 1, SPELL_FAILED_NOT_ON_GROUND); ++ Spell::SendCastResult(pPlayer, pSpellInfo, 1, SPELL_FAILED_ERROR); + + return true; + } +diff --git a/system/ScriptLoader.cpp b/system/ScriptLoader.cpp +index f30904e..6e7650a 100644 +--- a/system/ScriptLoader.cpp ++++ b/system/ScriptLoader.cpp +@@ -102,7 +102,22 @@ extern void AddSC_boss_majordomo(); + extern void AddSC_boss_ragnaros(); + extern void AddSC_instance_molten_core(); + extern void AddSC_molten_core(); +-extern void AddSC_ebon_hold(); // scarlet_enclave ++extern void AddSC_boss_anubrekhan(); // naxxramas ++extern void AddSC_boss_four_horsemen(); ++extern void AddSC_boss_faerlina(); ++extern void AddSC_boss_gluth(); ++extern void AddSC_boss_gothik(); ++extern void AddSC_boss_grobbulus(); ++extern void AddSC_boss_kelthuzad(); ++extern void AddSC_boss_loatheb(); ++extern void AddSC_boss_maexxna(); ++extern void AddSC_boss_noth(); ++extern void AddSC_boss_heigan(); ++extern void AddSC_boss_patchwerk(); ++extern void AddSC_boss_razuvious(); ++extern void AddSC_boss_sapphiron(); ++extern void AddSC_boss_thaddius(); ++extern void AddSC_instance_naxxramas(); + extern void AddSC_boss_arcanist_doan(); // scarlet_monastery + extern void AddSC_boss_azshir_the_sleepless(); + extern void AddSC_boss_bloodmage_thalnos(); +@@ -214,8 +229,6 @@ extern void AddSC_boss_epoch_hunter(); + extern void AddSC_boss_lieutenant_drake(); + extern void AddSC_instance_old_hillsbrad(); + extern void AddSC_old_hillsbrad(); +-extern void AddSC_culling_of_stratholme(); // COT, culling_of_stratholme +-extern void AddSC_instance_culling_of_stratholme(); + extern void AddSC_dire_maul(); // dire_maul + extern void AddSC_instance_dire_maul(); + extern void AddSC_boss_celebras_the_cursed(); // maraudon +@@ -271,144 +284,7 @@ extern void AddSC_ungoro_crater(); + extern void AddSC_winterspring(); + + // northrend +-extern void AddSC_boss_jedoga(); // azjol-nerub, ahnkahet +-extern void AddSC_boss_nadox(); +-extern void AddSC_boss_taldaram(); +-extern void AddSC_boss_volazj(); +-extern void AddSC_instance_ahnkahet(); +-extern void AddSC_boss_anubarak(); // azjol-nerub, azjol-nerub +-extern void AddSC_boss_hadronox(); +-extern void AddSC_boss_krikthir(); +-extern void AddSC_instance_azjol_nerub(); +-extern void AddSC_trial_of_the_champion(); // CC, trial_of_the_champion +-extern void AddSC_boss_grand_champions(); +-extern void AddSC_instance_trial_of_the_champion(); +-extern void AddSC_boss_anubarak_trial(); // CC, trial_of_the_crusader +-extern void AddSC_boss_faction_champions(); +-extern void AddSC_boss_jaraxxus(); +-extern void AddSC_instance_trial_of_the_crusader(); +-extern void AddSC_northrend_beasts(); +-extern void AddSC_trial_of_the_crusader(); +-extern void AddSC_twin_valkyr(); +-extern void AddSC_boss_novos(); // draktharon_keep +-extern void AddSC_boss_tharonja(); +-extern void AddSC_boss_trollgore(); +-extern void AddSC_instance_draktharon_keep(); +-extern void AddSC_boss_colossus(); // gundrak +-extern void AddSC_boss_eck(); +-extern void AddSC_boss_galdarah(); +-extern void AddSC_boss_moorabi(); +-extern void AddSC_boss_sladran(); +-extern void AddSC_instance_gundrak(); +-extern void AddSC_boss_bronjahm(); // ICC, forge_of_souls +-extern void AddSC_boss_devourer_of_souls(); +-extern void AddSC_instance_forge_of_souls(); +-extern void AddSC_boss_falric(); // ICC, halls_of_reflection +-extern void AddSC_boss_lich_king(); +-extern void AddSC_boss_marwyn(); +-extern void AddSC_halls_of_reflection(); +-extern void AddSC_instance_halls_of_reflection(); +-extern void AddSC_boss_garfrost(); // ICC, pit_of_saron +-extern void AddSC_boss_krick_and_ick(); +-extern void AddSC_boss_tyrannus(); +-extern void AddSC_instance_pit_of_saron(); +-extern void AddSC_pit_of_saron(); +-extern void AddSC_blood_prince_council(); // ICC, icecrown_citadel +-extern void AddSC_boss_blood_queen_lanathel(); +-extern void AddSC_boss_deathbringer_saurfang(); +-extern void AddSC_boss_festergut(); +-extern void AddSC_boss_lady_deathwhisper(); +-extern void AddSC_boss_lord_marrowgar(); +-extern void AddSC_boss_professor_putricide(); +-extern void AddSC_boss_rotface(); +-extern void AddSC_boss_sindragosa(); +-extern void AddSC_boss_the_lich_king(); +-extern void AddSC_boss_valithria_dreamwalker(); +-extern void AddSC_gunship_battle(); +-extern void AddSC_instance_icecrown_citadel(); +-extern void AddSC_boss_anubrekhan(); // naxxramas +-extern void AddSC_boss_four_horsemen(); +-extern void AddSC_boss_faerlina(); +-extern void AddSC_boss_gluth(); +-extern void AddSC_boss_gothik(); +-extern void AddSC_boss_grobbulus(); +-extern void AddSC_boss_kelthuzad(); +-extern void AddSC_boss_loatheb(); +-extern void AddSC_boss_maexxna(); +-extern void AddSC_boss_noth(); +-extern void AddSC_boss_heigan(); +-extern void AddSC_boss_patchwerk(); +-extern void AddSC_boss_razuvious(); +-extern void AddSC_boss_sapphiron(); +-extern void AddSC_boss_thaddius(); +-extern void AddSC_instance_naxxramas(); +-extern void AddSC_boss_malygos(); // nexus, eye_of_eternity +-extern void AddSC_boss_anomalus(); // nexus, nexus +-extern void AddSC_boss_keristrasza(); +-extern void AddSC_boss_ormorok(); +-extern void AddSC_boss_telestra(); +-extern void AddSC_instance_nexus(); +-extern void AddSC_boss_sartharion(); // obsidian_sanctum +-extern void AddSC_instance_obsidian_sanctum(); +-extern void AddSC_boss_baltharus(); // ruby_sanctum +-extern void AddSC_boss_halion(); +-extern void AddSC_boss_saviana(); +-extern void AddSC_boss_zarithrian(); +-extern void AddSC_instance_ruby_sanctum(); +-extern void AddSC_boss_bjarngrim(); // ulduar, halls_of_lightning +-extern void AddSC_boss_ionar(); +-extern void AddSC_boss_loken(); +-extern void AddSC_boss_volkhan(); +-extern void AddSC_instance_halls_of_lightning(); +-extern void AddSC_boss_maiden_of_grief(); // ulduar, halls_of_stone +-extern void AddSC_boss_sjonnir(); +-extern void AddSC_halls_of_stone(); +-extern void AddSC_instance_halls_of_stone(); +-extern void AddSC_boss_assembly_of_iron(); // ulduar, ulduar +-extern void AddSC_boss_algalon(); +-extern void AddSC_boss_auriaya(); +-extern void AddSC_boss_flame_leviathan(); +-extern void AddSC_boss_freya(); +-extern void AddSC_boss_general_vezax(); +-extern void AddSC_boss_hodir(); +-extern void AddSC_boss_ignis(); +-extern void AddSC_boss_kologarn(); +-extern void AddSC_boss_mimiron(); +-extern void AddSC_boss_razorscale(); +-extern void AddSC_boss_thorim(); +-extern void AddSC_boss_xt_002(); +-extern void AddSC_boss_yogg_saron(); +-extern void AddSC_instance_ulduar(); +-extern void AddSC_ulduar(); +-extern void AddSC_boss_ingvar(); // utgarde_keep, utgarde_keep +-extern void AddSC_boss_keleseth(); +-extern void AddSC_boss_skarvald_and_dalronn(); +-extern void AddSC_instance_utgarde_keep(); +-extern void AddSC_utgarde_keep(); +-extern void AddSC_boss_gortok(); // utgarde_keep, utgarde_pinnacle +-extern void AddSC_boss_skadi(); +-extern void AddSC_boss_svala(); +-extern void AddSC_boss_ymiron(); +-extern void AddSC_instance_pinnacle(); +-extern void AddSC_boss_archavon(); // vault_of_archavon +-extern void AddSC_boss_emalon(); +-extern void AddSC_boss_koralon(); +-extern void AddSC_boss_toravon(); +-extern void AddSC_instance_vault_of_archavon(); +-extern void AddSC_boss_erekem(); // violet_hold +-extern void AddSC_boss_ichoron(); +-extern void AddSC_instance_violet_hold(); +-extern void AddSC_violet_hold(); +- +-extern void AddSC_borean_tundra(); +-extern void AddSC_dalaran(); +-extern void AddSC_dragonblight(); +-extern void AddSC_grizzly_hills(); +-extern void AddSC_howling_fjord(); +-extern void AddSC_icecrown(); +-extern void AddSC_sholazar_basin(); +-extern void AddSC_storm_peaks(); +-extern void AddSC_zuldrak(); ++// removed + + // outland + extern void AddSC_boss_exarch_maladaar(); // auchindoun, auchenai_crypts +@@ -592,7 +468,22 @@ void AddScripts() + AddSC_boss_ragnaros(); + AddSC_instance_molten_core(); + AddSC_molten_core(); +- AddSC_ebon_hold(); // scarlet_enclave ++ AddSC_boss_anubrekhan(); // naxxramas ++ AddSC_boss_four_horsemen(); ++ AddSC_boss_faerlina(); ++ AddSC_boss_gluth(); ++ AddSC_boss_gothik(); ++ AddSC_boss_grobbulus(); ++ AddSC_boss_kelthuzad(); ++ AddSC_boss_loatheb(); ++ AddSC_boss_maexxna(); ++ AddSC_boss_noth(); ++ AddSC_boss_heigan(); ++ AddSC_boss_patchwerk(); ++ AddSC_boss_razuvious(); ++ AddSC_boss_sapphiron(); ++ AddSC_boss_thaddius(); ++ AddSC_instance_naxxramas(); + AddSC_boss_arcanist_doan(); // scarlet_monastery + AddSC_boss_azshir_the_sleepless(); + AddSC_boss_bloodmage_thalnos(); +@@ -704,8 +595,6 @@ void AddScripts() + AddSC_boss_lieutenant_drake(); + AddSC_instance_old_hillsbrad(); + AddSC_old_hillsbrad(); +- AddSC_culling_of_stratholme(); // CoT, culling_of_stratholme +- AddSC_instance_culling_of_stratholme(); + AddSC_dire_maul(); // dire_maul + AddSC_instance_dire_maul(); + AddSC_boss_celebras_the_cursed(); // maraudon +@@ -761,144 +650,7 @@ void AddScripts() + AddSC_winterspring(); + + // northrend +- AddSC_boss_jedoga(); // azjol-nerub, ahnkahet +- AddSC_boss_nadox(); +- AddSC_boss_taldaram(); +- AddSC_boss_volazj(); +- AddSC_instance_ahnkahet(); +- AddSC_boss_anubarak(); // azjol-nerub, azjol-nerub +- AddSC_boss_hadronox(); +- AddSC_boss_krikthir(); +- AddSC_instance_azjol_nerub(); +- AddSC_boss_grand_champions(); // CC, trial_of_the_champion +- AddSC_instance_trial_of_the_champion(); +- AddSC_trial_of_the_champion(); +- AddSC_boss_anubarak_trial(); // CC, trial_of_the_crusader +- AddSC_boss_faction_champions(); +- AddSC_boss_jaraxxus(); +- AddSC_instance_trial_of_the_crusader(); +- AddSC_northrend_beasts(); +- AddSC_trial_of_the_crusader(); +- AddSC_twin_valkyr(); +- AddSC_boss_novos(); // draktharon_keep +- AddSC_boss_tharonja(); +- AddSC_boss_trollgore(); +- AddSC_instance_draktharon_keep(); +- AddSC_boss_colossus(); // gundrak +- AddSC_boss_eck(); +- AddSC_boss_galdarah(); +- AddSC_boss_moorabi(); +- AddSC_boss_sladran(); +- AddSC_instance_gundrak(); +- AddSC_boss_bronjahm(); // ICC, FH, forge_of_souls +- AddSC_boss_devourer_of_souls(); +- AddSC_instance_forge_of_souls(); +- AddSC_boss_falric(); // ICC, FH, halls_of_reflection +- AddSC_boss_lich_king(); +- AddSC_boss_marwyn(); +- AddSC_halls_of_reflection(); +- AddSC_instance_halls_of_reflection(); +- AddSC_boss_garfrost(); // ICC, FH, pit_of_saron +- AddSC_boss_krick_and_ick(); +- AddSC_boss_tyrannus(); +- AddSC_instance_pit_of_saron(); +- AddSC_pit_of_saron(); +- AddSC_blood_prince_council(); // ICC, icecrown_citadel +- AddSC_boss_blood_queen_lanathel(); +- AddSC_boss_deathbringer_saurfang(); +- AddSC_boss_festergut(); +- AddSC_boss_lady_deathwhisper(); +- AddSC_boss_lord_marrowgar(); +- AddSC_boss_professor_putricide(); +- AddSC_boss_rotface(); +- AddSC_boss_sindragosa(); +- AddSC_boss_the_lich_king(); +- AddSC_boss_valithria_dreamwalker(); +- AddSC_gunship_battle(); +- AddSC_instance_icecrown_citadel(); +- AddSC_boss_anubrekhan(); // naxxramas +- AddSC_boss_four_horsemen(); +- AddSC_boss_faerlina(); +- AddSC_boss_gluth(); +- AddSC_boss_gothik(); +- AddSC_boss_grobbulus(); +- AddSC_boss_kelthuzad(); +- AddSC_boss_loatheb(); +- AddSC_boss_maexxna(); +- AddSC_boss_noth(); +- AddSC_boss_heigan(); +- AddSC_boss_patchwerk(); +- AddSC_boss_razuvious(); +- AddSC_boss_sapphiron(); +- AddSC_boss_thaddius(); +- AddSC_instance_naxxramas(); +- AddSC_boss_malygos(); // nexus, eye_of_eternity +- AddSC_boss_anomalus(); // nexus, nexus +- AddSC_boss_keristrasza(); +- AddSC_boss_ormorok(); +- AddSC_boss_telestra(); +- AddSC_instance_nexus(); +- AddSC_boss_sartharion(); // obsidian_sanctum +- AddSC_instance_obsidian_sanctum(); +- AddSC_boss_baltharus(); // ruby_sanctum +- AddSC_boss_halion(); +- AddSC_boss_saviana(); +- AddSC_boss_zarithrian(); +- AddSC_instance_ruby_sanctum(); +- AddSC_boss_bjarngrim(); // ulduar, halls_of_lightning +- AddSC_boss_ionar(); +- AddSC_boss_loken(); +- AddSC_boss_volkhan(); +- AddSC_instance_halls_of_lightning(); +- AddSC_boss_maiden_of_grief(); // ulduar, halls_of_stone +- AddSC_boss_sjonnir(); +- AddSC_halls_of_stone(); +- AddSC_instance_halls_of_stone(); +- AddSC_boss_assembly_of_iron(); // ulduar, ulduar +- AddSC_boss_algalon(); +- AddSC_boss_auriaya(); +- AddSC_boss_flame_leviathan(); +- AddSC_boss_freya(); +- AddSC_boss_general_vezax(); +- AddSC_boss_hodir(); +- AddSC_boss_ignis(); +- AddSC_boss_kologarn(); +- AddSC_boss_mimiron(); +- AddSC_boss_razorscale(); +- AddSC_boss_thorim(); +- AddSC_boss_xt_002(); +- AddSC_boss_yogg_saron(); +- AddSC_instance_ulduar(); +- AddSC_ulduar(); +- AddSC_boss_ingvar(); // UK, utgarde_keep +- AddSC_boss_keleseth(); +- AddSC_boss_skarvald_and_dalronn(); +- AddSC_instance_utgarde_keep(); +- AddSC_utgarde_keep(); +- AddSC_boss_gortok(); // UK, utgarde_pinnacle +- AddSC_boss_skadi(); +- AddSC_boss_svala(); +- AddSC_boss_ymiron(); +- AddSC_instance_pinnacle(); +- AddSC_boss_archavon(); // vault_of_archavon +- AddSC_boss_emalon(); +- AddSC_boss_koralon(); +- AddSC_boss_toravon(); +- AddSC_instance_vault_of_archavon(); +- AddSC_boss_erekem(); // violet_hold +- AddSC_boss_ichoron(); +- AddSC_instance_violet_hold(); +- AddSC_violet_hold(); +- +- AddSC_borean_tundra(); +- AddSC_dalaran(); +- AddSC_dragonblight(); +- AddSC_grizzly_hills(); +- AddSC_howling_fjord(); +- AddSC_icecrown(); +- AddSC_sholazar_basin(); +- AddSC_storm_peaks(); +- AddSC_zuldrak(); ++ // removed + + // outland + AddSC_boss_exarch_maladaar(); // auchindoun, auchenai_crypts +-- +1.7.3.1.msysgit.0 + diff --git a/scripts/battlegrounds/battleground.cpp b/scripts/battlegrounds/battleground.cpp index 59cb228..42edcba 100644 --- a/scripts/battlegrounds/battleground.cpp +++ b/scripts/battlegrounds/battleground.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/scripts/eastern_kingdoms/alterac_mountains.cpp b/scripts/eastern_kingdoms/alterac_mountains.cpp index 730958f..d6c0f05 100644 --- a/scripts/eastern_kingdoms/alterac_mountains.cpp +++ b/scripts/eastern_kingdoms/alterac_mountains.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/scripts/eastern_kingdoms/arathi_highlands.cpp b/scripts/eastern_kingdoms/arathi_highlands.cpp index 3103119..c631ecf 100644 --- a/scripts/eastern_kingdoms/arathi_highlands.cpp +++ b/scripts/eastern_kingdoms/arathi_highlands.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/scripts/eastern_kingdoms/blackrock_depths/blackrock_depths.cpp b/scripts/eastern_kingdoms/blackrock_depths/blackrock_depths.cpp index 83bc9ab..4380bfd 100644 --- a/scripts/eastern_kingdoms/blackrock_depths/blackrock_depths.cpp +++ b/scripts/eastern_kingdoms/blackrock_depths/blackrock_depths.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/scripts/eastern_kingdoms/blackrock_depths/blackrock_depths.h b/scripts/eastern_kingdoms/blackrock_depths/blackrock_depths.h index db83243..3439293 100644 --- a/scripts/eastern_kingdoms/blackrock_depths/blackrock_depths.h +++ b/scripts/eastern_kingdoms/blackrock_depths/blackrock_depths.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/scripts/eastern_kingdoms/blackrock_depths/boss_ambassador_flamelash.cpp b/scripts/eastern_kingdoms/blackrock_depths/boss_ambassador_flamelash.cpp index e98fc56..92381f8 100644 --- a/scripts/eastern_kingdoms/blackrock_depths/boss_ambassador_flamelash.cpp +++ b/scripts/eastern_kingdoms/blackrock_depths/boss_ambassador_flamelash.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/scripts/eastern_kingdoms/blackrock_depths/boss_anubshiah.cpp b/scripts/eastern_kingdoms/blackrock_depths/boss_anubshiah.cpp index f22fd35..ca48b2e 100644 --- a/scripts/eastern_kingdoms/blackrock_depths/boss_anubshiah.cpp +++ b/scripts/eastern_kingdoms/blackrock_depths/boss_anubshiah.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/scripts/eastern_kingdoms/blackrock_depths/boss_coren_direbrew.cpp b/scripts/eastern_kingdoms/blackrock_depths/boss_coren_direbrew.cpp index d69e899..8b0135d 100644 --- a/scripts/eastern_kingdoms/blackrock_depths/boss_coren_direbrew.cpp +++ b/scripts/eastern_kingdoms/blackrock_depths/boss_coren_direbrew.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/scripts/eastern_kingdoms/blackrock_depths/boss_emperor_dagran_thaurissan.cpp b/scripts/eastern_kingdoms/blackrock_depths/boss_emperor_dagran_thaurissan.cpp index 515fa8f..152bd5f 100644 --- a/scripts/eastern_kingdoms/blackrock_depths/boss_emperor_dagran_thaurissan.cpp +++ b/scripts/eastern_kingdoms/blackrock_depths/boss_emperor_dagran_thaurissan.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/scripts/eastern_kingdoms/blackrock_depths/boss_general_angerforge.cpp b/scripts/eastern_kingdoms/blackrock_depths/boss_general_angerforge.cpp index a083ffb..761b2a3 100644 --- a/scripts/eastern_kingdoms/blackrock_depths/boss_general_angerforge.cpp +++ b/scripts/eastern_kingdoms/blackrock_depths/boss_general_angerforge.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/scripts/eastern_kingdoms/blackrock_depths/boss_gorosh_the_dervish.cpp b/scripts/eastern_kingdoms/blackrock_depths/boss_gorosh_the_dervish.cpp index 77bd9d4..e4b47e1 100644 --- a/scripts/eastern_kingdoms/blackrock_depths/boss_gorosh_the_dervish.cpp +++ b/scripts/eastern_kingdoms/blackrock_depths/boss_gorosh_the_dervish.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/scripts/eastern_kingdoms/blackrock_depths/boss_grizzle.cpp b/scripts/eastern_kingdoms/blackrock_depths/boss_grizzle.cpp index 1185f4f..20dc190 100644 --- a/scripts/eastern_kingdoms/blackrock_depths/boss_grizzle.cpp +++ b/scripts/eastern_kingdoms/blackrock_depths/boss_grizzle.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/scripts/eastern_kingdoms/blackrock_depths/boss_high_interrogator_gerstahn.cpp b/scripts/eastern_kingdoms/blackrock_depths/boss_high_interrogator_gerstahn.cpp index 147f29d..e86f8ec 100644 --- a/scripts/eastern_kingdoms/blackrock_depths/boss_high_interrogator_gerstahn.cpp +++ b/scripts/eastern_kingdoms/blackrock_depths/boss_high_interrogator_gerstahn.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/scripts/eastern_kingdoms/blackrock_depths/boss_magmus.cpp b/scripts/eastern_kingdoms/blackrock_depths/boss_magmus.cpp index ce51582..61438e1 100644 --- a/scripts/eastern_kingdoms/blackrock_depths/boss_magmus.cpp +++ b/scripts/eastern_kingdoms/blackrock_depths/boss_magmus.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/scripts/eastern_kingdoms/blackrock_depths/boss_tomb_of_seven.cpp b/scripts/eastern_kingdoms/blackrock_depths/boss_tomb_of_seven.cpp index c1692e3..3682e47 100644 --- a/scripts/eastern_kingdoms/blackrock_depths/boss_tomb_of_seven.cpp +++ b/scripts/eastern_kingdoms/blackrock_depths/boss_tomb_of_seven.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/scripts/eastern_kingdoms/blackrock_depths/instance_blackrock_depths.cpp b/scripts/eastern_kingdoms/blackrock_depths/instance_blackrock_depths.cpp index cf58b38..db301bf 100644 --- a/scripts/eastern_kingdoms/blackrock_depths/instance_blackrock_depths.cpp +++ b/scripts/eastern_kingdoms/blackrock_depths/instance_blackrock_depths.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/scripts/eastern_kingdoms/blackrock_spire/blackrock_spire.h b/scripts/eastern_kingdoms/blackrock_spire/blackrock_spire.h index a49979c..30f7873 100644 --- a/scripts/eastern_kingdoms/blackrock_spire/blackrock_spire.h +++ b/scripts/eastern_kingdoms/blackrock_spire/blackrock_spire.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/scripts/eastern_kingdoms/blackrock_spire/boss_drakkisath.cpp b/scripts/eastern_kingdoms/blackrock_spire/boss_drakkisath.cpp index 7530daa..8fb2cfa 100644 --- a/scripts/eastern_kingdoms/blackrock_spire/boss_drakkisath.cpp +++ b/scripts/eastern_kingdoms/blackrock_spire/boss_drakkisath.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/scripts/eastern_kingdoms/blackrock_spire/boss_gyth.cpp b/scripts/eastern_kingdoms/blackrock_spire/boss_gyth.cpp index f377ded..813464e 100644 --- a/scripts/eastern_kingdoms/blackrock_spire/boss_gyth.cpp +++ b/scripts/eastern_kingdoms/blackrock_spire/boss_gyth.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/scripts/eastern_kingdoms/blackrock_spire/boss_halycon.cpp b/scripts/eastern_kingdoms/blackrock_spire/boss_halycon.cpp index 221f635..e8702ef 100644 --- a/scripts/eastern_kingdoms/blackrock_spire/boss_halycon.cpp +++ b/scripts/eastern_kingdoms/blackrock_spire/boss_halycon.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/scripts/eastern_kingdoms/blackrock_spire/boss_highlord_omokk.cpp b/scripts/eastern_kingdoms/blackrock_spire/boss_highlord_omokk.cpp index c12f40a..9591601 100644 --- a/scripts/eastern_kingdoms/blackrock_spire/boss_highlord_omokk.cpp +++ b/scripts/eastern_kingdoms/blackrock_spire/boss_highlord_omokk.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/scripts/eastern_kingdoms/blackrock_spire/boss_mother_smolderweb.cpp b/scripts/eastern_kingdoms/blackrock_spire/boss_mother_smolderweb.cpp index f782b7b..3b9e3ac 100644 --- a/scripts/eastern_kingdoms/blackrock_spire/boss_mother_smolderweb.cpp +++ b/scripts/eastern_kingdoms/blackrock_spire/boss_mother_smolderweb.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/scripts/eastern_kingdoms/blackrock_spire/boss_overlord_wyrmthalak.cpp b/scripts/eastern_kingdoms/blackrock_spire/boss_overlord_wyrmthalak.cpp index 7e99861..711fb4c 100644 --- a/scripts/eastern_kingdoms/blackrock_spire/boss_overlord_wyrmthalak.cpp +++ b/scripts/eastern_kingdoms/blackrock_spire/boss_overlord_wyrmthalak.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/scripts/eastern_kingdoms/blackrock_spire/boss_pyroguard_emberseer.cpp b/scripts/eastern_kingdoms/blackrock_spire/boss_pyroguard_emberseer.cpp index 01d3a59..b93ed18 100644 --- a/scripts/eastern_kingdoms/blackrock_spire/boss_pyroguard_emberseer.cpp +++ b/scripts/eastern_kingdoms/blackrock_spire/boss_pyroguard_emberseer.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/scripts/eastern_kingdoms/blackrock_spire/boss_quartermaster_zigris.cpp b/scripts/eastern_kingdoms/blackrock_spire/boss_quartermaster_zigris.cpp index d7378e5..cc1ae6f 100644 --- a/scripts/eastern_kingdoms/blackrock_spire/boss_quartermaster_zigris.cpp +++ b/scripts/eastern_kingdoms/blackrock_spire/boss_quartermaster_zigris.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/scripts/eastern_kingdoms/blackrock_spire/boss_rend_blackhand.cpp b/scripts/eastern_kingdoms/blackrock_spire/boss_rend_blackhand.cpp index 38d1b51..047af04 100644 --- a/scripts/eastern_kingdoms/blackrock_spire/boss_rend_blackhand.cpp +++ b/scripts/eastern_kingdoms/blackrock_spire/boss_rend_blackhand.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/scripts/eastern_kingdoms/blackrock_spire/boss_shadow_hunter_voshgajin.cpp b/scripts/eastern_kingdoms/blackrock_spire/boss_shadow_hunter_voshgajin.cpp index 6ef4a72..76cf112 100644 --- a/scripts/eastern_kingdoms/blackrock_spire/boss_shadow_hunter_voshgajin.cpp +++ b/scripts/eastern_kingdoms/blackrock_spire/boss_shadow_hunter_voshgajin.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/scripts/eastern_kingdoms/blackrock_spire/boss_the_beast.cpp b/scripts/eastern_kingdoms/blackrock_spire/boss_the_beast.cpp index 17a3a47..c8cbf8a 100644 --- a/scripts/eastern_kingdoms/blackrock_spire/boss_the_beast.cpp +++ b/scripts/eastern_kingdoms/blackrock_spire/boss_the_beast.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/scripts/eastern_kingdoms/blackrock_spire/boss_warmaster_voone.cpp b/scripts/eastern_kingdoms/blackrock_spire/boss_warmaster_voone.cpp index dd4c577..ffff040 100644 --- a/scripts/eastern_kingdoms/blackrock_spire/boss_warmaster_voone.cpp +++ b/scripts/eastern_kingdoms/blackrock_spire/boss_warmaster_voone.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/scripts/eastern_kingdoms/blackrock_spire/instance_blackrock_spire.cpp b/scripts/eastern_kingdoms/blackrock_spire/instance_blackrock_spire.cpp index c35a5f3..33d0c74 100644 --- a/scripts/eastern_kingdoms/blackrock_spire/instance_blackrock_spire.cpp +++ b/scripts/eastern_kingdoms/blackrock_spire/instance_blackrock_spire.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or @@ -179,7 +179,7 @@ void instance_blackrock_spire::SetData64(uint32 uiType, uint64 uiData) if (uiType == TYPE_ROOM_EVENT && GetData(TYPE_ROOM_EVENT) == IN_PROGRESS) { uint8 uiNotEmptyRoomsCount = 0; - for (uint8 i = 0; i< MAX_ROOMS; i++) + for (uint8 i = 0; i< MAX_ROOMS; ++i) { if (m_auiRoomRuneGUID[i]) // This check is used, to ensure which runes still need processing { @@ -190,7 +190,7 @@ void instance_blackrock_spire::SetData64(uint32 uiType, uint64 uiData) m_auiRoomRuneGUID[i] = 0; } else - uiNotEmptyRoomsCount++; // found an not empty room + ++uiNotEmptyRoomsCount; // found an not empty room } } if (!uiNotEmptyRoomsCount) @@ -250,12 +250,19 @@ void instance_blackrock_spire::DoSortRoomEventMobs() { if (GetData(TYPE_ROOM_EVENT) != NOT_STARTED) return; - for (uint8 i = 0; i < MAX_ROOMS; i++) + + for (uint8 i = 0; i < MAX_ROOMS; ++i) + { if (GameObject* pRune = instance->GetGameObject(m_auiRoomRuneGUID[i])) - for (std::list::const_iterator itr = m_lRoomEventMobGUIDList.begin(); itr != m_lRoomEventMobGUIDList.end(); itr++) - if (Creature* pCreature = instance->GetCreature(*itr)) - if (pCreature->isAlive() && pCreature->GetDistance(pRune) < 10.0f) - m_alRoomEventMobGUIDSorted[i].push_back(*itr); + { + for (std::list::const_iterator itr = m_lRoomEventMobGUIDList.begin(); itr != m_lRoomEventMobGUIDList.end(); ++itr) + { + Creature* pCreature = instance->GetCreature(*itr); + if (pCreature && pCreature->isAlive() && pCreature->GetDistance(pRune) < 10.0f) + m_alRoomEventMobGUIDSorted[i].push_back(*itr); + } + } + } SetData(TYPE_ROOM_EVENT, IN_PROGRESS); } diff --git a/scripts/eastern_kingdoms/blackwing_lair/blackwing_lair.h b/scripts/eastern_kingdoms/blackwing_lair/blackwing_lair.h index 7d876ed..ede0e53 100644 --- a/scripts/eastern_kingdoms/blackwing_lair/blackwing_lair.h +++ b/scripts/eastern_kingdoms/blackwing_lair/blackwing_lair.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/scripts/eastern_kingdoms/blackwing_lair/boss_broodlord_lashlayer.cpp b/scripts/eastern_kingdoms/blackwing_lair/boss_broodlord_lashlayer.cpp index bad543c..796a6b2 100644 --- a/scripts/eastern_kingdoms/blackwing_lair/boss_broodlord_lashlayer.cpp +++ b/scripts/eastern_kingdoms/blackwing_lair/boss_broodlord_lashlayer.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/scripts/eastern_kingdoms/blackwing_lair/boss_chromaggus.cpp b/scripts/eastern_kingdoms/blackwing_lair/boss_chromaggus.cpp index 1d5fa11..a111953 100644 --- a/scripts/eastern_kingdoms/blackwing_lair/boss_chromaggus.cpp +++ b/scripts/eastern_kingdoms/blackwing_lair/boss_chromaggus.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/scripts/eastern_kingdoms/blackwing_lair/boss_ebonroc.cpp b/scripts/eastern_kingdoms/blackwing_lair/boss_ebonroc.cpp index e322162..e684e0b 100644 --- a/scripts/eastern_kingdoms/blackwing_lair/boss_ebonroc.cpp +++ b/scripts/eastern_kingdoms/blackwing_lair/boss_ebonroc.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/scripts/eastern_kingdoms/blackwing_lair/boss_firemaw.cpp b/scripts/eastern_kingdoms/blackwing_lair/boss_firemaw.cpp index a557236..94ed56a 100644 --- a/scripts/eastern_kingdoms/blackwing_lair/boss_firemaw.cpp +++ b/scripts/eastern_kingdoms/blackwing_lair/boss_firemaw.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/scripts/eastern_kingdoms/blackwing_lair/boss_flamegor.cpp b/scripts/eastern_kingdoms/blackwing_lair/boss_flamegor.cpp index f763e16..42305db 100644 --- a/scripts/eastern_kingdoms/blackwing_lair/boss_flamegor.cpp +++ b/scripts/eastern_kingdoms/blackwing_lair/boss_flamegor.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/scripts/eastern_kingdoms/blackwing_lair/boss_nefarian.cpp b/scripts/eastern_kingdoms/blackwing_lair/boss_nefarian.cpp index 992be2a..473b60c 100644 --- a/scripts/eastern_kingdoms/blackwing_lair/boss_nefarian.cpp +++ b/scripts/eastern_kingdoms/blackwing_lair/boss_nefarian.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or @@ -22,134 +22,184 @@ SDCategory: Blackwing Lair EndScriptData */ #include "precompiled.h" +#include "blackwing_lair.h" +#include "TemporarySummon.h" -#define SAY_AGGRO -1469007 -#define SAY_XHEALTH -1469008 -#define SAY_SHADOWFLAME -1469009 -#define SAY_RAISE_SKELETONS -1469010 -#define SAY_SLAY -1469011 -#define SAY_DEATH -1469012 - -#define SAY_MAGE -1469013 -#define SAY_WARRIOR -1469014 -#define SAY_DRUID -1469015 -#define SAY_PRIEST -1469016 -#define SAY_PALADIN -1469017 -#define SAY_SHAMAN -1469018 -#define SAY_WARLOCK -1469019 -#define SAY_HUNTER -1469020 -#define SAY_ROGUE -1469021 - -#define SPELL_SHADOWFLAME_INITIAL 22972 -#define SPELL_SHADOWFLAME 22539 -#define SPELL_BELLOWINGROAR 22686 -#define SPELL_VEILOFSHADOW 7068 -#define SPELL_CLEAVE 20691 -#define SPELL_TAILLASH 23364 -#define SPELL_BONECONTRUST 23363 //23362, 23361 - -#define SPELL_MAGE 23410 //wild magic -#define SPELL_WARRIOR 23397 //beserk -#define SPELL_DRUID 23398 // cat form -#define SPELL_PRIEST 23401 // corrupted healing -#define SPELL_PALADIN 23418 //syphon blessing -#define SPELL_SHAMAN 23425 //totems -#define SPELL_WARLOCK 23427 //infernals -#define SPELL_HUNTER 23436 //bow broke -#define SPELL_ROGUE 23414 //Paralise +enum +{ + SAY_AGGRO = -1469007, + SAY_XHEALTH = -1469008, // at 5% hp + SAY_SHADOWFLAME = -1469009, + SAY_RAISE_SKELETONS = -1469010, + SAY_SLAY = -1469011, + SAY_DEATH = -1469012, + + SAY_MAGE = -1469013, + SAY_WARRIOR = -1469014, + SAY_DRUID = -1469015, + SAY_PRIEST = -1469016, + SAY_PALADIN = -1469017, + SAY_SHAMAN = -1469018, + SAY_WARLOCK = -1469019, + SAY_HUNTER = -1469020, + SAY_ROGUE = -1469021, + SAY_DEATH_KNIGHT = -1469031, // spell unk for the moment + + SPELL_SHADOWFLAME_INITIAL = 22992, // old spell id 22972 -> wrong + SPELL_SHADOWFLAME = 22539, + SPELL_BELLOWING_ROAR = 22686, + SPELL_VEIL_OF_SHADOW = 22687, // old spell id 7068 -> wrong + SPELL_CLEAVE = 20691, + SPELL_TAIL_LASH = 23364, + SPELL_BONE_CONTRUST = 23363, //23362, 23361 Missing from DBC! + + SPELL_MAGE = 23410, // wild magic + SPELL_WARRIOR = 23397, // beserk + SPELL_DRUID = 23398, // cat form + SPELL_PRIEST = 23401, // corrupted healing + SPELL_PALADIN = 23418, // syphon blessing + SPELL_SHAMAN = 23425, // totems + SPELL_WARLOCK = 23427, // infernals -> should trigger 23426 + SPELL_HUNTER = 23436, // bow broke + SPELL_ROGUE = 23414, // Paralise +}; struct MANGOS_DLL_DECL boss_nefarianAI : public ScriptedAI { - boss_nefarianAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} + boss_nefarianAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + Reset(); + } - uint32 ShadowFlame_Timer; - uint32 BellowingRoar_Timer; - uint32 VeilOfShadow_Timer; - uint32 Cleave_Timer; - uint32 TailLash_Timer; - uint32 ClassCall_Timer; - bool Phase3; + ScriptedInstance* m_pInstance; + + uint32 m_uiShadowFlameTimer; + uint32 m_uiBellowingRoarTimer; + uint32 m_uiVeilOfShadowTimer; + uint32 m_uiCleaveTimer; + uint32 m_uiTailLashTimer; + uint32 m_uiClassCallTimer; + bool m_bPhase3; + bool m_bHasEndYell; void Reset() { - ShadowFlame_Timer = 12000; //These times are probably wrong - BellowingRoar_Timer = 30000; - VeilOfShadow_Timer = 15000; - Cleave_Timer = 7000; - TailLash_Timer = 10000; - ClassCall_Timer = 35000; //35-40 seconds - Phase3 = false; + m_uiShadowFlameTimer = 12000; // These times are probably wrong + m_uiBellowingRoarTimer = 30000; + m_uiVeilOfShadowTimer = 15000; + m_uiCleaveTimer = 7000; + m_uiTailLashTimer = 10000; + m_uiClassCallTimer = 35000; // 35-40 seconds + m_bPhase3 = false; + m_bHasEndYell = false; } - void KilledUnit(Unit* Victim) + void KilledUnit(Unit* pVictim) { if (urand(0, 4)) return; - DoScriptText(SAY_SLAY, m_creature, Victim); + DoScriptText(SAY_SLAY, m_creature, pVictim); } - void JustDied(Unit* Killer) + void JustDied(Unit* pKiller) { DoScriptText(SAY_DEATH, m_creature); + + if (m_pInstance) + m_pInstance->SetData(TYPE_NEFARIAN, DONE); + } + + void JustReachedHome() + { + if (m_pInstance) + { + m_pInstance->SetData(TYPE_NEFARIAN, FAIL); + + // Cleanup encounter + if (m_creature->IsTemporarySummon()) + { + TemporarySummon* pTemporary = (TemporarySummon*)m_creature; + + if (Creature* pNefarius = m_creature->GetMap()->GetCreature(pTemporary->GetSummonerGuid())) + pNefarius->AI()->EnterEvadeMode(); + } + + m_creature->ForcedDespawn(); + } } void Aggro(Unit* pWho) { - switch(urand(0, 3)) + DoScriptText(SAY_AGGRO, m_creature); + + // Remove flying in case Nefarian aggroes before his combat point was reached + if (m_creature->HasSplineFlag(SPLINEFLAG_FLYING)) { - case 0: DoScriptText(SAY_XHEALTH, m_creature); break; - case 1: DoScriptText(SAY_AGGRO, m_creature); break; - case 2: DoScriptText(SAY_SHADOWFLAME, m_creature); break; + m_creature->SetByteValue(UNIT_FIELD_BYTES_1, 3, 0); + m_creature->RemoveSplineFlag(SPLINEFLAG_FLYING); } - DoCastSpellIfCan(pWho,SPELL_SHADOWFLAME_INITIAL); + DoCastSpellIfCan(m_creature, SPELL_SHADOWFLAME_INITIAL); } - void UpdateAI(const uint32 diff) + void UpdateAI(const uint32 uiDiff) { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; - //ShadowFlame_Timer - if (ShadowFlame_Timer < diff) + // ShadowFlame_Timer + if (m_uiShadowFlameTimer < uiDiff) { - DoCastSpellIfCan(m_creature->getVictim(),SPELL_SHADOWFLAME); - ShadowFlame_Timer = 12000; - }else ShadowFlame_Timer -= diff; + if (DoCastSpellIfCan(m_creature, SPELL_SHADOWFLAME) == CAST_OK) + { + // ToDo: check if he yells at every cast + DoScriptText(SAY_SHADOWFLAME, m_creature); + m_uiShadowFlameTimer = 12000; + } + } + else + m_uiShadowFlameTimer -= uiDiff; - //BellowingRoar_Timer - if (BellowingRoar_Timer < diff) + // BellowingRoar_Timer + if (m_uiBellowingRoarTimer < uiDiff) { - DoCastSpellIfCan(m_creature->getVictim(),SPELL_BELLOWINGROAR); - BellowingRoar_Timer = 30000; - }else BellowingRoar_Timer -= diff; + if (DoCastSpellIfCan(m_creature, SPELL_BELLOWING_ROAR) == CAST_OK) + m_uiBellowingRoarTimer = 30000; + } + else + m_uiBellowingRoarTimer -= uiDiff; - //VeilOfShadow_Timer - if (VeilOfShadow_Timer < diff) + // VeilOfShadow_Timer + if (m_uiVeilOfShadowTimer < uiDiff) { - DoCastSpellIfCan(m_creature->getVictim(),SPELL_VEILOFSHADOW); - VeilOfShadow_Timer = 15000; - }else VeilOfShadow_Timer -= diff; + if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_VEIL_OF_SHADOW) == CAST_OK) + m_uiVeilOfShadowTimer = 15000; + } + else + m_uiVeilOfShadowTimer -= uiDiff; - //Cleave_Timer - if (Cleave_Timer < diff) + // Cleave_Timer + if (m_uiCleaveTimer < uiDiff) { - DoCastSpellIfCan(m_creature->getVictim(),SPELL_CLEAVE); - Cleave_Timer = 7000; - }else Cleave_Timer -= diff; + if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_CLEAVE) == CAST_OK) + m_uiCleaveTimer = 7000; + } + else + m_uiCleaveTimer -= uiDiff; - //TailLash_Timer - if (TailLash_Timer < diff) + // TailLash_Timer + if (m_uiTailLashTimer < uiDiff) { - //Cast NYI since we need a better check for behind target - //DoCastSpellIfCan(m_creature->getVictim(),SPELL_TAILLASH); - - TailLash_Timer = 10000; - }else TailLash_Timer -= diff; + if (DoCastSpellIfCan(m_creature, SPELL_TAIL_LASH) == CAST_OK) + m_uiTailLashTimer = 10000; + } + else + m_uiTailLashTimer -= uiDiff; - //ClassCall_Timer - if (ClassCall_Timer < diff) + // ClassCall_Timer + if (m_uiClassCallTimer < uiDiff) { //Cast a random class call //On official it is based on what classes are currently on the hostil list @@ -159,55 +209,66 @@ struct MANGOS_DLL_DECL boss_nefarianAI : public ScriptedAI { case 0: DoScriptText(SAY_MAGE, m_creature); - DoCastSpellIfCan(m_creature,SPELL_MAGE); + DoCastSpellIfCan(m_creature, SPELL_MAGE); break; case 1: DoScriptText(SAY_WARRIOR, m_creature); - DoCastSpellIfCan(m_creature,SPELL_WARRIOR); + DoCastSpellIfCan(m_creature, SPELL_WARRIOR); break; case 2: DoScriptText(SAY_DRUID, m_creature); - DoCastSpellIfCan(m_creature,SPELL_DRUID); + DoCastSpellIfCan(m_creature, SPELL_DRUID); break; case 3: DoScriptText(SAY_PRIEST, m_creature); - DoCastSpellIfCan(m_creature,SPELL_PRIEST); + DoCastSpellIfCan(m_creature, SPELL_PRIEST); break; case 4: DoScriptText(SAY_PALADIN, m_creature); - DoCastSpellIfCan(m_creature,SPELL_PALADIN); + DoCastSpellIfCan(m_creature, SPELL_PALADIN); break; case 5: DoScriptText(SAY_SHAMAN, m_creature); - DoCastSpellIfCan(m_creature,SPELL_SHAMAN); + DoCastSpellIfCan(m_creature, SPELL_SHAMAN); break; case 6: DoScriptText(SAY_WARLOCK, m_creature); - DoCastSpellIfCan(m_creature,SPELL_WARLOCK); + DoCastSpellIfCan(m_creature, SPELL_WARLOCK); break; case 7: DoScriptText(SAY_HUNTER, m_creature); - DoCastSpellIfCan(m_creature,SPELL_HUNTER); + DoCastSpellIfCan(m_creature, SPELL_HUNTER); break; case 8: DoScriptText(SAY_ROGUE, m_creature); - DoCastSpellIfCan(m_creature,SPELL_ROGUE); + DoCastSpellIfCan(m_creature, SPELL_ROGUE); break; } - ClassCall_Timer = urand(35000, 40000); - }else ClassCall_Timer -= diff; + m_uiClassCallTimer = urand(35000, 40000); + } + else + m_uiClassCallTimer -= uiDiff; - //Phase3 begins when we are below X health - if (!Phase3 && m_creature->GetHealthPercent() < 20.0f) + // Phase3 begins when we are below X health + if (!m_bPhase3 && m_creature->GetHealthPercent() < 20.0f) { - Phase3 = true; + // todo revive all dead dragos as 14605 + m_bPhase3 = true; DoScriptText(SAY_RAISE_SKELETONS, m_creature); } + // 5% hp yell + if (!m_bHasEndYell && m_creature->GetHealthPercent() < 5.0f) + { + m_bHasEndYell = true; + DoScriptText(SAY_XHEALTH, m_creature); + } + DoMeleeAttackIfReady(); } }; + CreatureAI* GetAI_boss_nefarian(Creature* pCreature) { return new boss_nefarianAI(pCreature); @@ -215,9 +276,10 @@ CreatureAI* GetAI_boss_nefarian(Creature* pCreature) void AddSC_boss_nefarian() { - Script *newscript; - newscript = new Script; - newscript->Name = "boss_nefarian"; - newscript->GetAI = &GetAI_boss_nefarian; - newscript->RegisterSelf(); + Script* pNewScript; + + pNewScript = new Script; + pNewScript->Name = "boss_nefarian"; + pNewScript->GetAI = &GetAI_boss_nefarian; + pNewScript->RegisterSelf(); } diff --git a/scripts/eastern_kingdoms/blackwing_lair/boss_razorgore.cpp b/scripts/eastern_kingdoms/blackwing_lair/boss_razorgore.cpp index e5143c1..9fae727 100644 --- a/scripts/eastern_kingdoms/blackwing_lair/boss_razorgore.cpp +++ b/scripts/eastern_kingdoms/blackwing_lair/boss_razorgore.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/scripts/eastern_kingdoms/blackwing_lair/boss_vaelastrasz.cpp b/scripts/eastern_kingdoms/blackwing_lair/boss_vaelastrasz.cpp index cfdddfe..9eb4292 100644 --- a/scripts/eastern_kingdoms/blackwing_lair/boss_vaelastrasz.cpp +++ b/scripts/eastern_kingdoms/blackwing_lair/boss_vaelastrasz.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or @@ -31,6 +31,7 @@ enum SAY_LINE_3 = -1469028, SAY_HALFLIFE = -1469029, SAY_KILLTARGET = -1469030, + SAY_NEFARIUS_CORRUPT = -1469006, //when he corrupts Vaelastrasz; possible to start the event by arrea trigger id = 3626 SPELL_ESSENCE_OF_THE_RED = 23513, SPELL_FLAME_BREATH = 23461, diff --git a/scripts/eastern_kingdoms/blackwing_lair/boss_victor_nefarius.cpp b/scripts/eastern_kingdoms/blackwing_lair/boss_victor_nefarius.cpp index c95585d..15c4750 100644 --- a/scripts/eastern_kingdoms/blackwing_lair/boss_victor_nefarius.cpp +++ b/scripts/eastern_kingdoms/blackwing_lair/boss_victor_nefarius.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or @@ -22,272 +22,215 @@ SDCategory: Blackwing Lair EndScriptData */ #include "precompiled.h" +#include "blackwing_lair.h" -#define SAY_GAMESBEGIN_1 -1469004 -#define SAY_GAMESBEGIN_2 -1469005 -#define SAY_VAEL_INTRO -1469006 //when he corrupts Vaelastrasz - -#define GOSSIP_ITEM_1 "I've made no mistakes." -#define GOSSIP_ITEM_2 "You have lost your mind, Nefarius. You speak in riddles." -#define GOSSIP_ITEM_3 "Please do." - -#define CREATURE_BRONZE_DRAKANOID 14263 -#define CREATURE_BLUE_DRAKANOID 14261 -#define CREATURE_RED_DRAKANOID 14264 -#define CREATURE_GREEN_DRAKANOID 14262 -#define CREATURE_BLACK_DRAKANOID 14265 - -#define CREATURE_CHROMATIC_DRAKANOID 14302 -#define CREATURE_NEFARIAN 11583 - -#define ADD_X1 -7591.151855f -#define ADD_X2 -7514.598633f -#define ADD_Y1 -1204.051880f -#define ADD_Y2 -1150.448853f -#define ADD_Z1 476.800476f -#define ADD_Z2 476.796570f +enum +{ + SAY_GAMESBEGIN_1 = -1469004, + SAY_GAMESBEGIN_2 = -1469005, + + GOSSIP_ITEM_NEFARIUS_1 = -3469000, + GOSSIP_ITEM_NEFARIUS_2 = -3469001, + GOSSIP_ITEM_NEFARIUS_3 = -3469002, + GOSSIP_TEXT_NEFARIUS_1 = 7134, + GOSSIP_TEXT_NEFARIUS_2 = 7198, + GOSSIP_TEXT_NEFARIUS_3 = 7199, + + MAX_DRAKES = 5, + MAX_DRAKE_SUMMONS = 42, + NPC_BRONZE_DRAKANOID = 14263, + NPC_BLUE_DRAKANOID = 14261, + NPC_RED_DRAKANOID = 14264, + NPC_GREEN_DRAKANOID = 14262, + NPC_BLACK_DRAKANOID = 14265, + NPC_CHROMATIC_DRAKANOID = 14302, + + SPELL_NEFARIUS_BARRIER = 22663, // immunity in phase 1 + SPELL_SHADOWBOLT = 21077, + SPELL_FEAR = 26070, // shouldn't this be 22678? + // shadowbolt vollye = 22665 + // silence = 22666 -> silence a player + // shadow command = 22667 -> charm a player + // shadowblink = 22664, 22681 -> teleport around the room, possibly random + + FACTION_BLACK_DRAGON = 103, + FACTION_FRIENDLY = 35 +}; -#define NEF_X -7445.0f -#define NEF_Y -1332.0f -#define NEF_Z 536.0f +struct SpawnLocation +{ + float m_fX, m_fY, m_fZ; +}; -#define HIDE_X -7592.0f -#define HIDE_Y -1264.0f -#define HIDE_Z 481.0f +static const SpawnLocation aNefarianLocs[5] = +{ + {-7591.151f, -1204.051f, 476.800f}, // adds 1 & 2 + {-7514.598f, -1150.448f, 476.796f}, + {-7445.0f, -1332.0f, 536.0f}, // nefarian + {-7592.0f, -1264.0f, 481.0f}, // hide pos + {-7493.377f, -1258.85f, 478.30f}, // nefarian fly pos +}; -#define SPELL_SHADOWBOLT 21077 -#define SPELL_FEAR 26070 +static const uint32 aPossibleDrake[MAX_DRAKES] = {NPC_BRONZE_DRAKANOID, NPC_BLUE_DRAKANOID, NPC_RED_DRAKANOID, NPC_GREEN_DRAKANOID, NPC_BLACK_DRAKANOID}; //This script is complicated //Instead of morphing Victor Nefarius we will have him control phase 1 //And then have him spawn "Nefarian" for phase 2 -//When phase 2 starts Victor Nefarius will go into hiding and stop attacking -//If Nefarian despawns because he killed the players then this guy will EnterEvadeMode +//When phase 2 starts Victor Nefarius will go invisible and stop attacking +//If Nefarian reched home because nef killed the players then nef will trigger this guy to EnterEvadeMode //and allow players to start the event over -//If nefarian dies then he will kill himself then he will kill himself in his hiding place +//If nefarian dies then he will kill himself then he will be despawned in Nefarian script //To prevent players from doing the event twice struct MANGOS_DLL_DECL boss_victor_nefariusAI : public ScriptedAI { boss_victor_nefariusAI(Creature* pCreature) : ScriptedAI(pCreature) { - NefarianGUID = 0; + // Select the 2 different drakes that we are going to use until despawned + // 5 possiblities for the first drake, 4 for the second, 20 total possiblites + + // select two different numbers between 0..MAX_DRAKES-1 + uint8 uiPos1 = urand(0, MAX_DRAKES - 1); + uint8 uiPos2 = (uiPos1 + urand(1, MAX_DRAKES - 1)) % MAX_DRAKES; + + m_uiDrakeTypeOne = aPossibleDrake[uiPos1]; + m_uiDrakeTypeTwo = aPossibleDrake[uiPos2]; + + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); Reset(); - srand(time(NULL)); - switch(urand(0, 19)) - { - case 0: - DrakType1 = CREATURE_BRONZE_DRAKANOID; - DrakType2 = CREATURE_BLUE_DRAKANOID; - break; - case 1: - DrakType1 = CREATURE_BRONZE_DRAKANOID; - DrakType2 = CREATURE_RED_DRAKANOID; - break; - case 2: - DrakType1 = CREATURE_BRONZE_DRAKANOID; - DrakType2 = CREATURE_GREEN_DRAKANOID; - break; - case 3: - DrakType1 = CREATURE_BRONZE_DRAKANOID; - DrakType2 = CREATURE_BLACK_DRAKANOID; - break; - case 4: - DrakType1 = CREATURE_BLUE_DRAKANOID; - DrakType2 = CREATURE_BRONZE_DRAKANOID; - break; - case 5: - DrakType1 = CREATURE_BLUE_DRAKANOID; - DrakType2 = CREATURE_RED_DRAKANOID; - break; - case 6: - DrakType1 = CREATURE_BLUE_DRAKANOID; - DrakType2 = CREATURE_GREEN_DRAKANOID; - break; - case 7: - DrakType1 = CREATURE_BLUE_DRAKANOID; - DrakType2 = CREATURE_BLACK_DRAKANOID; - break; - case 8: - DrakType1 = CREATURE_RED_DRAKANOID; - DrakType2 = CREATURE_BRONZE_DRAKANOID; - break; - case 9: - DrakType1 = CREATURE_RED_DRAKANOID; - DrakType2 = CREATURE_BLUE_DRAKANOID; - break; - case 10: - DrakType1 = CREATURE_RED_DRAKANOID; - DrakType2 = CREATURE_GREEN_DRAKANOID; - break; - case 11: - DrakType1 = CREATURE_RED_DRAKANOID; - DrakType2 = CREATURE_BLACK_DRAKANOID; - break; - case 12: - DrakType1 = CREATURE_GREEN_DRAKANOID; - DrakType2 = CREATURE_BRONZE_DRAKANOID; - break; - case 13: - DrakType1 = CREATURE_GREEN_DRAKANOID; - DrakType2 = CREATURE_BLUE_DRAKANOID; - break; - case 14: - DrakType1 = CREATURE_GREEN_DRAKANOID; - DrakType2 = CREATURE_RED_DRAKANOID; - break; - case 15: - DrakType1 = CREATURE_GREEN_DRAKANOID; - DrakType2 = CREATURE_BLACK_DRAKANOID; - break; - case 16: - DrakType1 = CREATURE_BLACK_DRAKANOID; - DrakType2 = CREATURE_BRONZE_DRAKANOID; - break; - case 17: - DrakType1 = CREATURE_BLACK_DRAKANOID; - DrakType2 = CREATURE_BLUE_DRAKANOID; - break; - case 18: - DrakType1 = CREATURE_BLACK_DRAKANOID; - DrakType2 = CREATURE_GREEN_DRAKANOID; - break; - case 19: - DrakType1 = CREATURE_BLACK_DRAKANOID; - DrakType2 = CREATURE_RED_DRAKANOID; - break; - } } - uint32 SpawnedAdds; - uint32 AddSpawnTimer; - uint32 ShadowBoltTimer; - uint32 FearTimer; - uint32 MindControlTimer; - uint32 ResetTimer; - uint32 DrakType1; - uint32 DrakType2; - uint64 NefarianGUID; - uint32 NefCheckTime; + ScriptedInstance* m_pInstance; + + uint32 m_uiSpawnedAdds; + uint32 m_uiAddSpawnTimer; + uint32 m_uiShadowBoltTimer; + uint32 m_uiFearTimer; + uint32 m_uiMindControlTimer; + uint32 m_uiResetTimer; + uint32 m_uiDrakeTypeOne; + uint32 m_uiDrakeTypeTwo; void Reset() { - SpawnedAdds = 0; - AddSpawnTimer = 10000; - ShadowBoltTimer = 5000; - FearTimer = 8000; - ResetTimer = 900000; //On official it takes him 15 minutes(900 seconds) to reset. We are only doing 1 minute to make testing easier - NefarianGUID = 0; - NefCheckTime = 2000; - - m_creature->SetUInt32Value(UNIT_NPC_FLAGS,1); - m_creature->setFaction(35); + m_uiSpawnedAdds = 0; + m_uiAddSpawnTimer = 10000; + m_uiShadowBoltTimer = 5000; + m_uiFearTimer = 8000; + m_uiResetTimer = 15 * MINUTE * IN_MILLISECONDS; + + // set gossip flag to begin the event + m_creature->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP); + + // Make visible if needed + if (m_creature->GetVisibility() != VISIBILITY_ON) + m_creature->SetVisibility(VISIBILITY_ON); + } + + void Aggro(Unit* pWho) + { + if (m_pInstance) + m_pInstance->SetData(TYPE_NEFARIAN, IN_PROGRESS); + } + + void JustReachedHome() + { + m_creature->setFaction(FACTION_FRIENDLY); m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + + if (m_pInstance) + m_pInstance->SetData(TYPE_NEFARIAN, FAIL); } - void BeginEvent(Player* target) + void JustSummoned(Creature* pSummoned) { - DoScriptText(SAY_GAMESBEGIN_2, m_creature); + if (pSummoned->GetEntry() == NPC_NEFARIAN) + { + pSummoned->RemoveSplineFlag(SPLINEFLAG_WALKMODE); - //MaNGOS::Singleton::Instance().GetMap(m_creature->GetMapId(), m_creature)->GetPlayers().begin(); - /* - list ::iterator i = MapManager::Instance().GetMap(m_creature->GetMapId(), m_creature)->GetPlayers().begin(); + // see boss_onyxia (also note the removal of this in boss_nefarian) + pSummoned->SetByteValue(UNIT_FIELD_BYTES_1, 3, UNIT_BYTE1_FLAG_ALWAYS_STAND | UNIT_BYTE1_FLAG_UNK_2); + pSummoned->AddSplineFlag(SPLINEFLAG_FLYING); - for (i = MapManager::Instance().GetMap(m_creature->GetMapId(), m_creature)->GetPlayers().begin(); i != MapManager::Instance().GetMap(m_creature->GetMapId(), m_creature)->GetPlayers().end(); ++i) + // Let Nefarian fly towards combat area + pSummoned->GetMotionMaster()->MovePoint(1, aNefarianLocs[4].m_fX, aNefarianLocs[4].m_fY, aNefarianLocs[4].m_fZ); + } + else { - AttackStart((*i)); + ++m_uiSpawnedAdds; + + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) + pSummoned->AI()->AttackStart(pTarget); } - */ - m_creature->SetUInt32Value(UNIT_NPC_FLAGS,0); - m_creature->setFaction(103); - m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); - AttackStart(target); + + pSummoned->SetRespawnDelay(7*DAY); } - void MoveInLineOfSight(Unit *who) + void SummonedMovementInform(Creature* pSummoned, uint32 uiMotionType, uint32 uiPointId) { - //We simply use this function to find players until we can use Map->GetPlayers() - - if (who && who->GetTypeId() == TYPEID_PLAYER && m_creature->IsHostileTo(who)) + // If Nefarian has reached combat area, let him attack + if (pSummoned->GetEntry() == NPC_NEFARIAN && uiMotionType == POINT_MOTION_TYPE && uiPointId == 1) { - //Add them to our threat list - m_creature->AddThreat(who); + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) + pSummoned->AI()->AttackStart(pTarget); } } - void UpdateAI(const uint32 diff) + void SummonedCreatureJustDied(Creature* pSummoned) + { + // Despawn self when Nefarian is killed + if (pSummoned->GetEntry() == NPC_NEFARIAN) + m_creature->ForcedDespawn(); + } + + void UpdateAI(const uint32 uiDiff) { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; - //Only do this if we haven't spawned nef yet - if (SpawnedAdds < 42) + // Only do this if we haven't spawned nef yet + if (m_uiSpawnedAdds < MAX_DRAKE_SUMMONS) { - //ShadowBoltTimer - if (ShadowBoltTimer < diff) - { - Unit* target = NULL; - target = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM,0); - if (target) - DoCastSpellIfCan(target,SPELL_SHADOWBOLT); - - ShadowBoltTimer = urand(3000, 10000); - }else ShadowBoltTimer -= diff; - - //FearTimer - if (FearTimer < diff) + // Shadowbolt Timer + if (m_uiShadowBoltTimer < uiDiff) { - Unit* target = NULL; - target = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM,0); - if (target) - DoCastSpellIfCan(target,SPELL_FEAR); - - FearTimer = urand(10000, 20000); - }else FearTimer -= diff; + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) + { + if (DoCastSpellIfCan(pTarget, SPELL_SHADOWBOLT) == CAST_OK) + m_uiShadowBoltTimer = urand(3000, 10000); + } + } + else + m_uiShadowBoltTimer -= uiDiff; - //Add spawning mechanism - if (AddSpawnTimer < diff) + // Fear Timer + if (m_uiFearTimer < uiDiff) { - //Spawn 2 random types of creatures at the 2 locations - uint32 CreatureID; - Creature* Spawned = NULL; - Unit* target = NULL; - - //1 in 3 chance it will be a chromatic - if (!urand(0, 2)) - CreatureID = CREATURE_CHROMATIC_DRAKANOID; - else CreatureID = DrakType1; - - ++SpawnedAdds; - - //Spawn creature and force it to start attacking a random target - Spawned = m_creature->SummonCreature(CreatureID,ADD_X1,ADD_Y1,ADD_Z1,5.000f,TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT,5000); - target = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM,0); - if (target && Spawned) + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) { - Spawned->AI()->AttackStart(target); - Spawned->setFaction(103); + if (DoCastSpellIfCan(pTarget, SPELL_FEAR) == CAST_OK) + m_uiFearTimer = urand(10000, 20000); } + } + else + m_uiFearTimer -= uiDiff; - //1 in 3 chance it will be a chromatic - if (!urand(0, 2)) - CreatureID = CREATURE_CHROMATIC_DRAKANOID; - else CreatureID = DrakType2; + // Add spawning mechanism + if (m_uiAddSpawnTimer < uiDiff) + { + //Spawn 2 random types of creatures at the 2 locations + uint32 uiCreatureId = 0; - ++SpawnedAdds; + // 1 in 3 chance it will be a chromatic + uiCreatureId = urand(0, 2) ? m_uiDrakeTypeOne : NPC_CHROMATIC_DRAKANOID; + m_creature->SummonCreature(uiCreatureId, aNefarianLocs[0].m_fX, aNefarianLocs[0].m_fY, aNefarianLocs[0].m_fZ, 5.000f, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 30*MINUTE*IN_MILLISECONDS); - target = NULL; - Spawned = NULL; - Spawned = m_creature->SummonCreature(CreatureID,ADD_X2,ADD_Y2,ADD_Z2,5.000,TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT,5000); - target = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM,0); - if (target && Spawned) - { - Spawned->AI()->AttackStart(target); - Spawned->setFaction(103); - } + // 1 in 3 chance it will be a chromatic + uiCreatureId = urand(0, 2) ? m_uiDrakeTypeTwo : NPC_CHROMATIC_DRAKANOID; + m_creature->SummonCreature(uiCreatureId, aNefarianLocs[1].m_fX, aNefarianLocs[1].m_fY, aNefarianLocs[1].m_fZ, 5.000, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 30*MINUTE*IN_MILLISECONDS); - //Begin phase 2 by spawning Nefarian and what not - if (SpawnedAdds >= 42) + //Begin phase 2 by spawning Nefarian + if (m_uiSpawnedAdds >= MAX_DRAKE_SUMMONS) { //Teleport Victor Nefarius way out of the map //MapManager::Instance().GetMap(m_creature->GetMapId(), m_creature)->CreatureRelocation(m_creature,0,0,-5000,0); @@ -296,46 +239,25 @@ struct MANGOS_DLL_DECL boss_victor_nefariusAI : public ScriptedAI m_creature->InterruptNonMeleeSpells(false); //Root self - DoCastSpellIfCan(m_creature,33356); + DoCastSpellIfCan(m_creature, 33356, CAST_TRIGGERED); //Make super invis - DoCastSpellIfCan(m_creature,8149); + if (m_creature->GetVisibility() != VISIBILITY_OFF) + m_creature->SetVisibility(VISIBILITY_OFF); + // Do not teleport him away, this is not needed (invisible and rooted) //Teleport self to a hiding spot - m_creature->NearTeleportTo(HIDE_X, HIDE_Y, HIDE_Z, 0.0f); - - //Spawn nef and have him attack a random target - Creature* Nefarian = m_creature->SummonCreature(CREATURE_NEFARIAN,NEF_X,NEF_Y,NEF_Z,0,TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT,120000); - target = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM,0); - - if (target && Nefarian) - { - Nefarian->AI()->AttackStart(target); - Nefarian->setFaction(103); - NefarianGUID = Nefarian->GetGUID(); - } - else error_log("SD2: Blackwing Lair: Unable to spawn nefarian properly."); - } + //m_creature->NearTeleportTo(aNefarianLocs[3].m_fX, aNefarianLocs[3].m_fY, aNefarianLocs[3].m_fZ, 0.0f); - AddSpawnTimer = 4000; - }else AddSpawnTimer -= diff; - } - else if (NefarianGUID) - { - if (NefCheckTime < diff) - { - Creature* pNefarian = m_creature->GetMap()->GetCreature(NefarianGUID); - - //If nef is dead then we die to so the players get out of combat - //and cannot repeat the event - if (!pNefarian || !pNefarian->isAlive()) - { - NefarianGUID = 0; - m_creature->ForcedDespawn(); + // Spawn Nefarian + // Summon as active, to be able to work proper! + m_creature->SummonCreature(NPC_NEFARIAN, aNefarianLocs[2].m_fX, aNefarianLocs[2].m_fY, aNefarianLocs[2].m_fZ, 0, TEMPSUMMON_DEAD_DESPAWN, 0, true); } - NefCheckTime = 2000; - }else NefCheckTime -= diff; + m_uiAddSpawnTimer = 4000; + } + else + m_uiAddSpawnTimer -= uiDiff; } } }; @@ -347,8 +269,8 @@ CreatureAI* GetAI_boss_victor_nefarius(Creature* pCreature) bool GossipHello_boss_victor_nefarius(Player* pPlayer, Creature* pCreature) { - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_1 , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); - pPlayer->SEND_GOSSIP_MENU(7134, pCreature->GetGUID()); + pPlayer->ADD_GOSSIP_ITEM_ID(GOSSIP_ICON_CHAT, GOSSIP_ITEM_NEFARIUS_1 , GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); + pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXT_NEFARIUS_1, pCreature->GetGUID()); return true; } @@ -357,18 +279,23 @@ bool GossipSelect_boss_victor_nefarius(Player* pPlayer, Creature* pCreature, uin switch(uiAction) { case GOSSIP_ACTION_INFO_DEF+1: - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+2); - pPlayer->SEND_GOSSIP_MENU(7198, pCreature->GetGUID()); + pPlayer->ADD_GOSSIP_ITEM_ID(GOSSIP_ICON_CHAT, GOSSIP_ITEM_NEFARIUS_2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+2); + pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXT_NEFARIUS_2, pCreature->GetGUID()); break; case GOSSIP_ACTION_INFO_DEF+2: - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_3, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+3); - pPlayer->SEND_GOSSIP_MENU(7199, pCreature->GetGUID()); + pPlayer->ADD_GOSSIP_ITEM_ID(GOSSIP_ICON_CHAT, GOSSIP_ITEM_NEFARIUS_3, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+3); + pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXT_NEFARIUS_3, pCreature->GetGUID()); + DoScriptText(SAY_GAMESBEGIN_1, pCreature); break; case GOSSIP_ACTION_INFO_DEF+3: pPlayer->CLOSE_GOSSIP_MENU(); - DoScriptText(SAY_GAMESBEGIN_1, pCreature); - if (boss_victor_nefariusAI* pNefAI = dynamic_cast(pCreature->AI())) - pNefAI->BeginEvent(pPlayer); + DoScriptText(SAY_GAMESBEGIN_2, pCreature); + // remove gossip, set hostile and attack + pCreature->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP); + pCreature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + pCreature->setFaction(FACTION_BLACK_DRAGON); + pCreature->CastSpell(pCreature, SPELL_NEFARIUS_BARRIER, false); + pCreature->AI()->AttackStart(pPlayer); break; } return true; @@ -376,12 +303,12 @@ bool GossipSelect_boss_victor_nefarius(Player* pPlayer, Creature* pCreature, uin void AddSC_boss_victor_nefarius() { - Script *newscript; - - newscript = new Script; - newscript->Name = "boss_victor_nefarius"; - newscript->GetAI = &GetAI_boss_victor_nefarius; - newscript->pGossipHello = &GossipHello_boss_victor_nefarius; - newscript->pGossipSelect = &GossipSelect_boss_victor_nefarius; - newscript->RegisterSelf(); + Script* pNewScript; + + pNewScript = new Script; + pNewScript->Name = "boss_victor_nefarius"; + pNewScript->GetAI = &GetAI_boss_victor_nefarius; + pNewScript->pGossipHello = &GossipHello_boss_victor_nefarius; + pNewScript->pGossipSelect = &GossipSelect_boss_victor_nefarius; + pNewScript->RegisterSelf(); } diff --git a/scripts/eastern_kingdoms/blackwing_lair/instance_blackwing_lair.cpp b/scripts/eastern_kingdoms/blackwing_lair/instance_blackwing_lair.cpp index 08c66e1..a5d1232 100644 --- a/scripts/eastern_kingdoms/blackwing_lair/instance_blackwing_lair.cpp +++ b/scripts/eastern_kingdoms/blackwing_lair/instance_blackwing_lair.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or @@ -99,19 +99,19 @@ void instance_blackwing_lair::SetData(uint32 uiType, uint32 uiData) case TYPE_RAZORGORE: m_auiEncounter[uiType] = uiData; DoUseDoorOrButton(m_uiRazorgoreEnterDoorGUID); - if(uiData == DONE) + if (uiData == DONE) DoUseDoorOrButton(m_uiRazorgoreExitDoorGUID); break; case TYPE_VAELASTRASZ: m_auiEncounter[uiType] = uiData; // Prevent the players from running back to the first room DoUseDoorOrButton(m_uiRazorgoreExitDoorGUID); - if(uiData == DONE) + if (uiData == DONE) DoUseDoorOrButton(m_uiVaelastraszDoorGUID); break; case TYPE_LASHLAYER: m_auiEncounter[uiType] = uiData; - if(uiData == DONE) + if (uiData == DONE) DoUseDoorOrButton(m_uiLashlayerDoorGUID); break; case TYPE_FIREMAW: diff --git a/scripts/eastern_kingdoms/blasted_lands.cpp b/scripts/eastern_kingdoms/blasted_lands.cpp index 732630d..9949ca0 100644 --- a/scripts/eastern_kingdoms/blasted_lands.cpp +++ b/scripts/eastern_kingdoms/blasted_lands.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/scripts/eastern_kingdoms/boss_kruul.cpp b/scripts/eastern_kingdoms/boss_kruul.cpp index b933fb6..d8ec170 100644 --- a/scripts/eastern_kingdoms/boss_kruul.cpp +++ b/scripts/eastern_kingdoms/boss_kruul.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/scripts/eastern_kingdoms/burning_steppes.cpp b/scripts/eastern_kingdoms/burning_steppes.cpp index ab69101..d5c2a83 100644 --- a/scripts/eastern_kingdoms/burning_steppes.cpp +++ b/scripts/eastern_kingdoms/burning_steppes.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/scripts/eastern_kingdoms/deadmines/deadmines.cpp b/scripts/eastern_kingdoms/deadmines/deadmines.cpp index bf0844b..046dd35 100644 --- a/scripts/eastern_kingdoms/deadmines/deadmines.cpp +++ b/scripts/eastern_kingdoms/deadmines/deadmines.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or @@ -16,14 +16,268 @@ /* ScriptData SDName: Deadmines -SD%Complete: 90 -SDComment: Contains GO for event at end door +SD%Complete: 75 +SDComment: Contains boss_mr_smite and GO for event at end door SDCategory: Deadmines EndScriptData */ #include "precompiled.h" #include "deadmines.h" +/*###### +## boss_mr_smite +######*/ + +enum +{ + SAY_PHASE_2 = -1036002, + SAY_PHASE_3 = -1036003, + + // EQUIP_ID_SWORD = 2179, // default equipment, not used in code + EQUIP_ID_AXE = 2183, + EQUIP_ID_HAMMER = 10756, + + SPELL_NIBLE_REFLEXES = 6433, // removed after phase 1 + SPELL_SMITE_SLAM = 6435, + SPELL_SMITE_STOMP = 6432, + SPELL_SMITE_HAMMER = 6436, + SPELL_THRASH = 12787, // unclear, possible 3417 (only 10% proc chance) + + PHASE_1 = 1, + PHASE_2 = 2, + PHASE_3 = 3, + PHASE_EQUIP_NULL = 4, + PHASE_EQUIP_START = 5, + PHASE_EQUIP_PROCESS = 6, + PHASE_EQUIP_END = 7, +}; + +struct MANGOS_DLL_DECL boss_mr_smiteAI : public ScriptedAI +{ + boss_mr_smiteAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset(); } + + uint32 m_uiPhase; + uint32 m_uiEquipTimer; + uint32 m_uiSlamTimer; + + void Reset() + { + m_uiPhase = PHASE_1; + m_uiEquipTimer = 0; + m_uiSlamTimer = 9000; + + DoCastSpellIfCan(m_creature, SPELL_NIBLE_REFLEXES, CAST_TRIGGERED); + + // must assume database has the default equipment set + SetEquipmentSlots(true); + } + + void AttackedBy(Unit* pAttacker) + { + if (m_creature->getVictim()) + return; + + if (m_uiPhase > PHASE_3) + return; + + AttackStart(pAttacker); + } + + void AttackStart(Unit* pWho) + { + if (m_uiPhase > PHASE_3) + return; + + if (m_creature->Attack(pWho, true)) + { + m_creature->AddThreat(pWho); + m_creature->SetInCombatWith(pWho); + pWho->SetInCombatWith(m_creature); + + m_creature->GetMotionMaster()->MoveChase(pWho); + } + } + + void MovementInform(uint32 uiMotionType, uint32 uiPointId) + { + if (uiMotionType != POINT_MOTION_TYPE) + return; + + m_creature->SetSheath(SHEATH_STATE_UNARMED); + m_creature->SetStandState(UNIT_STAND_STATE_KNEEL); + + m_uiEquipTimer = 3000; + m_uiPhase = PHASE_EQUIP_PROCESS; + } + + void PhaseEquipStart() + { + ScriptedInstance* pInstance = (ScriptedInstance*)m_creature->GetInstanceData(); + + if (!pInstance) + return; + + GameObject* pChest = pInstance->instance->GetGameObject(pInstance->GetData64(GO_SMITE_CHEST)); + + if (!pChest) + return; + + m_uiPhase = PHASE_EQUIP_NULL; + + float fX, fY, fZ; + pChest->GetContactPoint(m_creature, fX, fY, fZ, CONTACT_DISTANCE); + + m_creature->GetMotionMaster()->Clear(); + m_creature->SetFacingToObject(pChest); + m_creature->GetMotionMaster()->MovePoint(0, fX, fY, fZ); + } + + void PhaseEquipProcess() + { + if (m_creature->GetHealthPercent() < 33.0f) + { + // It's Hammer, go Hammer! + SetEquipmentSlots(false, EQUIP_ID_HAMMER, EQUIP_UNEQUIP); + DoCastSpellIfCan(m_creature, SPELL_SMITE_HAMMER); + } + else + SetEquipmentSlots(false, EQUIP_ID_AXE, EQUIP_ID_AXE); + + m_creature->SetStandState(UNIT_STAND_STATE_STAND); + m_uiPhase = PHASE_EQUIP_END; + m_uiEquipTimer = 5000; + + Unit* pVictim = m_creature->SelectAttackingTarget(ATTACKING_TARGET_TOPAGGRO, 0); + + if (!pVictim) + { + EnterEvadeMode(); + return; + } + + // Takes longer to run further distance. Not accurate, but will probably be sufficient for most cases + if (m_creature->IsWithinDistInMap(pVictim, ATTACK_DISTANCE)) + m_uiEquipTimer -= 1000; + else if (m_creature->IsWithinDistInMap(pVictim, 2*ATTACK_DISTANCE)) + m_uiEquipTimer -= 2000; + else + m_uiEquipTimer -= 3000; + } + + void PhaseEquipEnd() + { + // We don't have getVictim, so select from threat list + Unit* pVictim = m_creature->SelectAttackingTarget(ATTACKING_TARGET_TOPAGGRO, 0); + + if (!pVictim) + { + EnterEvadeMode(); + return; + } + + m_creature->SetSheath(SHEATH_STATE_MELEE); + + m_uiPhase = m_creature->GetHealthPercent() < 33.0f ? PHASE_3 : PHASE_2; + + if (m_uiPhase == PHASE_2) + DoCastSpellIfCan(m_creature, SPELL_THRASH, CAST_TRIGGERED); + + AttackStart(pVictim); + } + + void UpdateAI(const uint32 uiDiff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + { + if (m_uiEquipTimer) + { + // decrease the cooldown in between equipment change phases + if (m_uiEquipTimer > uiDiff) + { + m_uiEquipTimer -= uiDiff; + return; + } + else + m_uiEquipTimer = 0; + } + + switch(m_uiPhase) + { + case PHASE_EQUIP_START: + PhaseEquipStart(); + break; + case PHASE_EQUIP_PROCESS: + PhaseEquipProcess(); + break; + case PHASE_EQUIP_END: + PhaseEquipEnd(); + break; + } + + return; + } + + // the normal combat phases + switch(m_uiPhase) + { + case PHASE_1: + { + if (m_creature->GetHealthPercent() < 66.0f) + { + if (DoCastSpellIfCan(m_creature, SPELL_SMITE_STOMP) == CAST_OK) + { + DoScriptText(SAY_PHASE_2, m_creature); + m_uiPhase = PHASE_EQUIP_START; + m_uiEquipTimer = 2500; + + // will clear getVictim (m_attacking) + m_creature->AttackStop(true); + m_creature->RemoveAurasDueToSpell(SPELL_NIBLE_REFLEXES); + } + return; + } + break; + } + case PHASE_2: + { + if (m_creature->GetHealthPercent() < 33.0f) + { + if (DoCastSpellIfCan(m_creature, SPELL_SMITE_STOMP) == CAST_OK) + { + DoScriptText(SAY_PHASE_3, m_creature); + m_uiPhase = PHASE_EQUIP_START; + m_uiEquipTimer = 2500; + + m_creature->AttackStop(true); + m_creature->RemoveAurasDueToSpell(SPELL_THRASH); + } + return; + } + break; + } + case PHASE_3: + { + if (m_uiSlamTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_SMITE_SLAM) == CAST_OK) + m_uiSlamTimer = 11000; + } + else + m_uiSlamTimer -= uiDiff; + + break; + } + } + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_boss_mr_smite(Creature* pCreature) +{ + return new boss_mr_smiteAI(pCreature); +} + bool GOUse_go_door_lever_dm(Player* pPlayer, GameObject* pGo) { ScriptedInstance* pInstance = (ScriptedInstance*)pGo->GetInstanceData(); @@ -31,9 +285,9 @@ bool GOUse_go_door_lever_dm(Player* pPlayer, GameObject* pGo) if (!pInstance) return false; - GameObject* pGoDoor = pInstance->instance->GetGameObject(pInstance->GetData64(DATA_DEFIAS_DOOR)); + GameObject* pGoDoor = pInstance->instance->GetGameObject(pInstance->GetData64(GO_IRON_CLAD_DOOR)); - if (pGoDoor && pGoDoor->GetGoState() == 1) + if (pGoDoor && pGoDoor->GetGoState() == GO_STATE_READY) return false; return true; @@ -57,6 +311,11 @@ void AddSC_deadmines() { Script *newscript; + newscript = new Script; + newscript->Name = "boss_mr_smite"; + newscript->GetAI = &GetAI_boss_mr_smite; + newscript->RegisterSelf(); + newscript = new Script; newscript->Name = "go_door_lever_dm"; newscript->pGOUse = &GOUse_go_door_lever_dm; diff --git a/scripts/eastern_kingdoms/deadmines/deadmines.h b/scripts/eastern_kingdoms/deadmines/deadmines.h index cb220a5..53aeffa 100644 --- a/scripts/eastern_kingdoms/deadmines/deadmines.h +++ b/scripts/eastern_kingdoms/deadmines/deadmines.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ @@ -7,19 +7,32 @@ enum { - MAX_ENCOUNTER = 1, + MAX_ENCOUNTER = 4, TYPE_DEFIAS_ENDDOOR = 1, - DATA_DEFIAS_DOOR = 2, + TYPE_RHAHKZOR = 2, + TYPE_SNEED = 3, + TYPE_GILNID = 4, INST_SAY_ALARM1 = -1036000, INST_SAY_ALARM2 = -1036001, + GO_FACTORY_DOOR = 13965, // rhahk'zor + GO_FOUNDRY_DOOR = 16399, // gilnid + GO_MAST_ROOM_DOOR = 16400, // sneed + GO_HEAVY_DOOR_1 = 17153, // to sneed + GO_HEAVY_DOOR_2 = 17154, // to gilnid GO_DOOR_LEVER = 101833, - GO_IRON_CLAD = 16397, + GO_IRON_CLAD_DOOR = 16397, GO_DEFIAS_CANNON = 16398, + GO_SMITE_CHEST = 144111, // use to get correct location of mr.smites equipment changes + + NPC_RHAHKZOR = 644, + NPC_SNEED = 643, + NPC_GILNID = 1763, NPC_MR_SMITE = 646, - NPC_PIRATE = 657 + NPC_PIRATE = 657, + NPC_SQUALLSHAPER = 1732, }; #endif diff --git a/scripts/eastern_kingdoms/deadmines/instance_deadmines.cpp b/scripts/eastern_kingdoms/deadmines/instance_deadmines.cpp index 642d558..a23ca90 100644 --- a/scripts/eastern_kingdoms/deadmines/instance_deadmines.cpp +++ b/scripts/eastern_kingdoms/deadmines/instance_deadmines.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or @@ -30,8 +30,12 @@ struct MANGOS_DLL_DECL instance_deadmines : public ScriptedInstance uint32 m_auiEncounter[MAX_ENCOUNTER]; + uint64 m_uiFactoryDoorGUID; + uint64 m_uiMastRoomDoorGUID; + uint64 m_uiFoundryDoorGUID; uint64 m_uiIronCladGUID; uint64 m_uiCannonGUID; + uint64 m_uiSmiteChestGUID; uint64 m_uiSmiteGUID; uint32 m_uiIronDoor_Timer; @@ -41,8 +45,12 @@ struct MANGOS_DLL_DECL instance_deadmines : public ScriptedInstance { memset(&m_auiEncounter, 0, sizeof(m_auiEncounter)); + m_uiFactoryDoorGUID = 0; + m_uiMastRoomDoorGUID = 0; + m_uiFoundryDoorGUID = 0; m_uiIronCladGUID = 0; m_uiCannonGUID = 0; + m_uiSmiteChestGUID = 0; m_uiSmiteGUID = 0; m_uiIronDoor_Timer = 0; @@ -57,41 +65,127 @@ struct MANGOS_DLL_DECL instance_deadmines : public ScriptedInstance void OnObjectCreate(GameObject* pGo) { - if (pGo->GetEntry() == GO_IRON_CLAD) - m_uiIronCladGUID = pGo->GetGUID(); + switch(pGo->GetEntry()) + { + case GO_FACTORY_DOOR: + m_uiFactoryDoorGUID = pGo->GetGUID(); + + if (GetData(TYPE_RHAHKZOR) == DONE) + pGo->SetGoState(GO_STATE_ACTIVE); + + break; + case GO_MAST_ROOM_DOOR: + m_uiMastRoomDoorGUID = pGo->GetGUID(); + + if (GetData(TYPE_SNEED) == DONE) + pGo->SetGoState(GO_STATE_ACTIVE); - if (pGo->GetEntry() == GO_DEFIAS_CANNON) - m_uiCannonGUID = pGo->GetGUID(); + break; + case GO_FOUNDRY_DOOR: + m_uiFoundryDoorGUID = pGo->GetGUID(); + + if (GetData(TYPE_GILNID) == DONE) + pGo->SetGoState(GO_STATE_ACTIVE); + + break; + case GO_IRON_CLAD_DOOR: + m_uiIronCladGUID = pGo->GetGUID(); + break; + case GO_DEFIAS_CANNON: + m_uiCannonGUID = pGo->GetGUID(); + break; + case GO_SMITE_CHEST: + m_uiSmiteChestGUID = pGo->GetGUID(); + break; + } + } + + void OnCreatureDeath(Creature* pCreature) + { + switch(pCreature->GetEntry()) + { + case NPC_RHAHKZOR: + SetData(TYPE_RHAHKZOR, DONE); + break; + case NPC_SNEED: + SetData(TYPE_SNEED, DONE); + break; + case NPC_GILNID: + SetData(TYPE_GILNID, DONE); + break; + } } void SetData(uint32 uiType, uint32 uiData) { - if (uiType == TYPE_DEFIAS_ENDDOOR) + switch(uiType) { - if (uiData == IN_PROGRESS) + case TYPE_RHAHKZOR: + { + if (uiData == DONE) + DoUseDoorOrButton(m_uiFactoryDoorGUID); + + m_auiEncounter[1] = uiData; + break; + } + case TYPE_SNEED: { - if (GameObject* pGo = instance->GetGameObject(m_uiIronCladGUID)) + if (uiData == DONE) + DoUseDoorOrButton(m_uiMastRoomDoorGUID); + + m_auiEncounter[2] = uiData; + break; + } + case TYPE_GILNID: + { + if (uiData == DONE) + DoUseDoorOrButton(m_uiFoundryDoorGUID); + + m_auiEncounter[3] = uiData; + break; + } + case TYPE_DEFIAS_ENDDOOR: + { + if (uiData == IN_PROGRESS) { - pGo->SetGoState(GO_STATE_ACTIVE_ALTERNATIVE); - m_uiIronDoor_Timer = 3000; + if (GameObject* pGo = instance->GetGameObject(m_uiIronCladGUID)) + { + pGo->SetGoState(GO_STATE_ACTIVE_ALTERNATIVE); + m_uiIronDoor_Timer = 3000; + } } + m_auiEncounter[0] = uiData; + break; } - m_auiEncounter[0] = uiData; } } uint32 GetData(uint32 uiType) { - if (uiType == TYPE_DEFIAS_ENDDOOR) - return m_auiEncounter[0]; + switch(uiType) + { + case TYPE_DEFIAS_ENDDOOR: + return m_auiEncounter[0]; + case TYPE_RHAHKZOR: + return m_auiEncounter[1]; + case TYPE_SNEED: + return m_auiEncounter[2]; + case TYPE_GILNID: + return m_auiEncounter[3]; + } return 0; } uint64 GetData64(uint32 uiData) { - if (uiData == DATA_DEFIAS_DOOR) - return m_uiIronCladGUID; + switch(uiData) + { + case GO_IRON_CLAD_DOOR: + return m_uiIronCladGUID; + case GO_SMITE_CHEST: + return m_uiSmiteChestGUID; + } return 0; } @@ -112,13 +206,27 @@ struct MANGOS_DLL_DECL instance_deadmines : public ScriptedInstance ++m_uiDoor_Step; break; case 1: - if (Creature* pi1 = pMrSmite->SummonCreature(NPC_PIRATE, 93.68f, -678.63f, 7.71f, 2.09f, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 1800000)) - pi1->GetMotionMaster()->MovePoint(0, 100.11f, -670.65f, 7.42f); - if (Creature* pi2 = pMrSmite->SummonCreature(NPC_PIRATE, 102.63f, -685.07f, 7.42f, 1.28f, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 1800000)) - pi2->GetMotionMaster()->MovePoint(0, 100.11f, -670.65f, 7.42f); + { + if (GameObject* pDoor = instance->GetGameObject(m_uiIronCladGUID)) + { + // should be static spawns, fetch the closest ones at the pier + if (Creature* pi1 = GetClosestCreatureWithEntry(pDoor, NPC_PIRATE, 40.0f)) + { + pi1->RemoveSplineFlag(SPLINEFLAG_WALKMODE); + pi1->GetMotionMaster()->MovePoint(0, pDoor->GetPositionX(), pDoor->GetPositionY(), pDoor->GetPositionZ()); + } + + if (Creature* pi2 = GetClosestCreatureWithEntry(pDoor, NPC_SQUALLSHAPER, 40.0f)) + { + pi2->RemoveSplineFlag(SPLINEFLAG_WALKMODE); + pi2->GetMotionMaster()->MovePoint(0, pDoor->GetPositionX(), pDoor->GetPositionY(), pDoor->GetPositionZ()); + } + } + ++m_uiDoor_Step; m_uiIronDoor_Timer = 10000; break; + } case 2: DoScriptText(INST_SAY_ALARM2,pMrSmite); m_uiDoor_Step = 0; diff --git a/scripts/eastern_kingdoms/dun_morogh.cpp b/scripts/eastern_kingdoms/dun_morogh.cpp index 5d46add..7c5eb46 100644 --- a/scripts/eastern_kingdoms/dun_morogh.cpp +++ b/scripts/eastern_kingdoms/dun_morogh.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/scripts/eastern_kingdoms/eastern_plaguelands.cpp b/scripts/eastern_kingdoms/eastern_plaguelands.cpp index 0d5e77c..cce894a 100644 --- a/scripts/eastern_kingdoms/eastern_plaguelands.cpp +++ b/scripts/eastern_kingdoms/eastern_plaguelands.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/scripts/eastern_kingdoms/elwynn_forest.cpp b/scripts/eastern_kingdoms/elwynn_forest.cpp index eb74843..08daa14 100644 --- a/scripts/eastern_kingdoms/elwynn_forest.cpp +++ b/scripts/eastern_kingdoms/elwynn_forest.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/scripts/eastern_kingdoms/eversong_woods.cpp b/scripts/eastern_kingdoms/eversong_woods.cpp index 69e69f9..16d0c61 100644 --- a/scripts/eastern_kingdoms/eversong_woods.cpp +++ b/scripts/eastern_kingdoms/eversong_woods.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/scripts/eastern_kingdoms/ghostlands.cpp b/scripts/eastern_kingdoms/ghostlands.cpp index fac45a4..fed7e6e 100644 --- a/scripts/eastern_kingdoms/ghostlands.cpp +++ b/scripts/eastern_kingdoms/ghostlands.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/scripts/eastern_kingdoms/gnomeregan/boss_thermaplugg.cpp b/scripts/eastern_kingdoms/gnomeregan/boss_thermaplugg.cpp index a2ff2ac..d39675f 100644 --- a/scripts/eastern_kingdoms/gnomeregan/boss_thermaplugg.cpp +++ b/scripts/eastern_kingdoms/gnomeregan/boss_thermaplugg.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or @@ -107,7 +107,7 @@ struct MANGOS_DLL_DECL boss_thermapluggAI : public ScriptedAI m_pInstance->SetData(TYPE_THERMAPLUGG, FAIL); // Remove remaining bombs - for (std::list::const_iterator itr = m_lSummonedBombGUIDs.begin(); itr != m_lSummonedBombGUIDs.end(); itr++) + for (std::list::const_iterator itr = m_lSummonedBombGUIDs.begin(); itr != m_lSummonedBombGUIDs.end(); ++itr) { if (Creature* pBomb = m_creature->GetMap()->GetCreature(*itr)) pBomb->ForcedDespawn(); @@ -147,7 +147,7 @@ struct MANGOS_DLL_DECL boss_thermapluggAI : public ScriptedAI // Movement of Summoned mobs if (!m_lLandedBombGUIDs.empty()) { - for (std::list::const_iterator itr = m_lLandedBombGUIDs.begin(); itr != m_lLandedBombGUIDs.end(); itr++) + for (std::list::const_iterator itr = m_lLandedBombGUIDs.begin(); itr != m_lLandedBombGUIDs.end(); ++itr) { if (Creature* pBomb = m_creature->GetMap()->GetCreature(*itr)) pBomb->GetMotionMaster()->MoveFollow(m_creature, 0.0f, 0.0f); @@ -192,7 +192,7 @@ struct MANGOS_DLL_DECL boss_thermapluggAI : public ScriptedAI // Spawn bombs if (m_asBombFaces) { - for (uint8 i = 0; i < MAX_GNOME_FACES; i++) + for (uint8 i = 0; i < MAX_GNOME_FACES; ++i) { if (m_asBombFaces[i].m_bActivated) { diff --git a/scripts/eastern_kingdoms/gnomeregan/gnomeregan.cpp b/scripts/eastern_kingdoms/gnomeregan/gnomeregan.cpp index 73065a6..deda0d6 100644 --- a/scripts/eastern_kingdoms/gnomeregan/gnomeregan.cpp +++ b/scripts/eastern_kingdoms/gnomeregan/gnomeregan.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/scripts/eastern_kingdoms/gnomeregan/gnomeregan.h b/scripts/eastern_kingdoms/gnomeregan/gnomeregan.h index f39997d..53b66fb 100644 --- a/scripts/eastern_kingdoms/gnomeregan/gnomeregan.h +++ b/scripts/eastern_kingdoms/gnomeregan/gnomeregan.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/scripts/eastern_kingdoms/gnomeregan/instance_gnomeregan.cpp b/scripts/eastern_kingdoms/gnomeregan/instance_gnomeregan.cpp index e6002a9..f01a4ed 100644 --- a/scripts/eastern_kingdoms/gnomeregan/instance_gnomeregan.cpp +++ b/scripts/eastern_kingdoms/gnomeregan/instance_gnomeregan.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or @@ -84,7 +84,7 @@ void instance_gnomeregan::SetData(uint32 uiType, uint32 uiData) if (!m_luiExplosiveChargeGUIDs.empty()) { std::list lExplosiveCharges; - for (std::list::const_iterator itr = m_luiExplosiveChargeGUIDs.begin(); itr != m_luiExplosiveChargeGUIDs.end(); itr++) + for (std::list::const_iterator itr = m_luiExplosiveChargeGUIDs.begin(); itr != m_luiExplosiveChargeGUIDs.end(); ++itr) { if (GameObject* pCharge = instance->GetGameObject(*itr)) lExplosiveCharges.push_back(pCharge); @@ -101,17 +101,17 @@ void instance_gnomeregan::SetData(uint32 uiType, uint32 uiData) GameObject* pCaveInNorth = instance->GetGameObject(m_uiCaveInNorthGUID); if (pCaveInSouth && pCaveInNorth) { - for (std::list::iterator itr = lExplosiveCharges.begin(); itr != lExplosiveCharges.end(); itr++) + for (std::list::iterator itr = lExplosiveCharges.begin(); itr != lExplosiveCharges.end(); ++itr) { if ((*itr)->GetDistanceOrder(pCaveInSouth, pCaveInNorth) && uiCounterSouth < MAX_EXPLOSIVES_PER_SIDE) { m_auiExplosiveSortedGUIDs[0][uiCounterSouth] = (*itr)->GetGUID(); - uiCounterSouth++; + ++uiCounterSouth; } else if (uiCounterNorth < MAX_EXPLOSIVES_PER_SIDE) { m_auiExplosiveSortedGUIDs[1][uiCounterNorth] = (*itr)->GetGUID(); - uiCounterNorth++; + ++uiCounterNorth; } } } @@ -124,7 +124,7 @@ void instance_gnomeregan::SetData(uint32 uiType, uint32 uiData) } if (uiData == DONE) { - for (std::list::const_iterator itr = m_lRedRocketGUIDs.begin(); itr != m_lRedRocketGUIDs.end(); itr++) + for (std::list::const_iterator itr = m_lRedRocketGUIDs.begin(); itr != m_lRedRocketGUIDs.end(); ++itr) DoRespawnGameObject(*itr, HOUR); } break; @@ -151,7 +151,7 @@ void instance_gnomeregan::SetData(uint32 uiType, uint32 uiData) Creature* pBlastmaster = instance->GetCreature(m_uiBlastmasterShortfuseGUID); if (!pBlastmaster) break; - for (std::list::const_iterator itr = m_luiSpawnedExplosiveChargeGUIDs.begin(); itr != m_luiSpawnedExplosiveChargeGUIDs.end(); itr++) + for (std::list::const_iterator itr = m_luiSpawnedExplosiveChargeGUIDs.begin(); itr != m_luiSpawnedExplosiveChargeGUIDs.end(); ++itr) { if (GameObject* pExplosive = instance->GetGameObject(*itr)) pExplosive->Use(pBlastmaster); @@ -188,7 +188,7 @@ void instance_gnomeregan::SetData(uint32 uiType, uint32 uiData) } // Deactivate all remaining BombFaces - for (uint8 i = 0; i < MAX_GNOME_FACES; i++) + for (uint8 i = 0; i < MAX_GNOME_FACES; ++i) DoDeactivateBombFace(i); } break; diff --git a/scripts/eastern_kingdoms/hinterlands.cpp b/scripts/eastern_kingdoms/hinterlands.cpp index 627cccc..8cc2341 100644 --- a/scripts/eastern_kingdoms/hinterlands.cpp +++ b/scripts/eastern_kingdoms/hinterlands.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/scripts/eastern_kingdoms/ironforge.cpp b/scripts/eastern_kingdoms/ironforge.cpp index f6e2fa3..8159d60 100644 --- a/scripts/eastern_kingdoms/ironforge.cpp +++ b/scripts/eastern_kingdoms/ironforge.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/scripts/eastern_kingdoms/isle_of_queldanas.cpp b/scripts/eastern_kingdoms/isle_of_queldanas.cpp index a055209..78dbe84 100644 --- a/scripts/eastern_kingdoms/isle_of_queldanas.cpp +++ b/scripts/eastern_kingdoms/isle_of_queldanas.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/scripts/eastern_kingdoms/karazhan/boss_curator.cpp b/scripts/eastern_kingdoms/karazhan/boss_curator.cpp index 995818b..9ab1b76 100644 --- a/scripts/eastern_kingdoms/karazhan/boss_curator.cpp +++ b/scripts/eastern_kingdoms/karazhan/boss_curator.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/scripts/eastern_kingdoms/karazhan/boss_maiden_of_virtue.cpp b/scripts/eastern_kingdoms/karazhan/boss_maiden_of_virtue.cpp index fc5a4ba..79eb084 100644 --- a/scripts/eastern_kingdoms/karazhan/boss_maiden_of_virtue.cpp +++ b/scripts/eastern_kingdoms/karazhan/boss_maiden_of_virtue.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/scripts/eastern_kingdoms/karazhan/boss_midnight.cpp b/scripts/eastern_kingdoms/karazhan/boss_midnight.cpp index b8e580d..19e377b 100644 --- a/scripts/eastern_kingdoms/karazhan/boss_midnight.cpp +++ b/scripts/eastern_kingdoms/karazhan/boss_midnight.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/scripts/eastern_kingdoms/karazhan/boss_moroes.cpp b/scripts/eastern_kingdoms/karazhan/boss_moroes.cpp index db805a4..7533b1e 100644 --- a/scripts/eastern_kingdoms/karazhan/boss_moroes.cpp +++ b/scripts/eastern_kingdoms/karazhan/boss_moroes.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/scripts/eastern_kingdoms/karazhan/boss_netherspite.cpp b/scripts/eastern_kingdoms/karazhan/boss_netherspite.cpp index 1deb61b..8cac07a 100644 --- a/scripts/eastern_kingdoms/karazhan/boss_netherspite.cpp +++ b/scripts/eastern_kingdoms/karazhan/boss_netherspite.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/scripts/eastern_kingdoms/karazhan/boss_nightbane.cpp b/scripts/eastern_kingdoms/karazhan/boss_nightbane.cpp index 8ac3b2c..c1aa608 100644 --- a/scripts/eastern_kingdoms/karazhan/boss_nightbane.cpp +++ b/scripts/eastern_kingdoms/karazhan/boss_nightbane.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/scripts/eastern_kingdoms/karazhan/boss_prince_malchezaar.cpp b/scripts/eastern_kingdoms/karazhan/boss_prince_malchezaar.cpp index 60952fb..ecc9ed9 100644 --- a/scripts/eastern_kingdoms/karazhan/boss_prince_malchezaar.cpp +++ b/scripts/eastern_kingdoms/karazhan/boss_prince_malchezaar.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/scripts/eastern_kingdoms/karazhan/boss_shade_of_aran.cpp b/scripts/eastern_kingdoms/karazhan/boss_shade_of_aran.cpp index f7c5d91..9ca0079 100644 --- a/scripts/eastern_kingdoms/karazhan/boss_shade_of_aran.cpp +++ b/scripts/eastern_kingdoms/karazhan/boss_shade_of_aran.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/scripts/eastern_kingdoms/karazhan/boss_terestian_illhoof.cpp b/scripts/eastern_kingdoms/karazhan/boss_terestian_illhoof.cpp index dff0f1b..a61c8d0 100644 --- a/scripts/eastern_kingdoms/karazhan/boss_terestian_illhoof.cpp +++ b/scripts/eastern_kingdoms/karazhan/boss_terestian_illhoof.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/scripts/eastern_kingdoms/karazhan/bosses_opera.cpp b/scripts/eastern_kingdoms/karazhan/bosses_opera.cpp index 17f2754..083d2ac 100644 --- a/scripts/eastern_kingdoms/karazhan/bosses_opera.cpp +++ b/scripts/eastern_kingdoms/karazhan/bosses_opera.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/scripts/eastern_kingdoms/karazhan/chess_event.cpp b/scripts/eastern_kingdoms/karazhan/chess_event.cpp index 464a822..0b80c9e 100644 --- a/scripts/eastern_kingdoms/karazhan/chess_event.cpp +++ b/scripts/eastern_kingdoms/karazhan/chess_event.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/scripts/eastern_kingdoms/karazhan/instance_karazhan.cpp b/scripts/eastern_kingdoms/karazhan/instance_karazhan.cpp index 28b19cf..4922858 100644 --- a/scripts/eastern_kingdoms/karazhan/instance_karazhan.cpp +++ b/scripts/eastern_kingdoms/karazhan/instance_karazhan.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/scripts/eastern_kingdoms/karazhan/karazhan.cpp b/scripts/eastern_kingdoms/karazhan/karazhan.cpp index be61cec..d725c4f 100644 --- a/scripts/eastern_kingdoms/karazhan/karazhan.cpp +++ b/scripts/eastern_kingdoms/karazhan/karazhan.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/scripts/eastern_kingdoms/karazhan/karazhan.h b/scripts/eastern_kingdoms/karazhan/karazhan.h index 7610a2a..ce3179d 100644 --- a/scripts/eastern_kingdoms/karazhan/karazhan.h +++ b/scripts/eastern_kingdoms/karazhan/karazhan.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/scripts/eastern_kingdoms/loch_modan.cpp b/scripts/eastern_kingdoms/loch_modan.cpp index 723e70b..7b1ccc9 100644 --- a/scripts/eastern_kingdoms/loch_modan.cpp +++ b/scripts/eastern_kingdoms/loch_modan.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/scripts/eastern_kingdoms/magisters_terrace/boss_felblood_kaelthas.cpp b/scripts/eastern_kingdoms/magisters_terrace/boss_felblood_kaelthas.cpp index cb38157..bad2d93 100644 --- a/scripts/eastern_kingdoms/magisters_terrace/boss_felblood_kaelthas.cpp +++ b/scripts/eastern_kingdoms/magisters_terrace/boss_felblood_kaelthas.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/scripts/eastern_kingdoms/magisters_terrace/boss_priestess_delrissa.cpp b/scripts/eastern_kingdoms/magisters_terrace/boss_priestess_delrissa.cpp index 9628c53..ecf0583 100644 --- a/scripts/eastern_kingdoms/magisters_terrace/boss_priestess_delrissa.cpp +++ b/scripts/eastern_kingdoms/magisters_terrace/boss_priestess_delrissa.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/scripts/eastern_kingdoms/magisters_terrace/boss_selin_fireheart.cpp b/scripts/eastern_kingdoms/magisters_terrace/boss_selin_fireheart.cpp index 09629a8..ad1a9a6 100644 --- a/scripts/eastern_kingdoms/magisters_terrace/boss_selin_fireheart.cpp +++ b/scripts/eastern_kingdoms/magisters_terrace/boss_selin_fireheart.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/scripts/eastern_kingdoms/magisters_terrace/boss_vexallus.cpp b/scripts/eastern_kingdoms/magisters_terrace/boss_vexallus.cpp index 04e064e..d7efd32 100644 --- a/scripts/eastern_kingdoms/magisters_terrace/boss_vexallus.cpp +++ b/scripts/eastern_kingdoms/magisters_terrace/boss_vexallus.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/scripts/eastern_kingdoms/magisters_terrace/instance_magisters_terrace.cpp b/scripts/eastern_kingdoms/magisters_terrace/instance_magisters_terrace.cpp index fc4f5b0..b4e5d58 100644 --- a/scripts/eastern_kingdoms/magisters_terrace/instance_magisters_terrace.cpp +++ b/scripts/eastern_kingdoms/magisters_terrace/instance_magisters_terrace.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/scripts/eastern_kingdoms/magisters_terrace/magisters_terrace.cpp b/scripts/eastern_kingdoms/magisters_terrace/magisters_terrace.cpp index a080595..a641811 100644 --- a/scripts/eastern_kingdoms/magisters_terrace/magisters_terrace.cpp +++ b/scripts/eastern_kingdoms/magisters_terrace/magisters_terrace.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/scripts/eastern_kingdoms/magisters_terrace/magisters_terrace.h b/scripts/eastern_kingdoms/magisters_terrace/magisters_terrace.h index 10ed14b..495f516 100644 --- a/scripts/eastern_kingdoms/magisters_terrace/magisters_terrace.h +++ b/scripts/eastern_kingdoms/magisters_terrace/magisters_terrace.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/scripts/eastern_kingdoms/molten_core/boss_baron_geddon.cpp b/scripts/eastern_kingdoms/molten_core/boss_baron_geddon.cpp index 48ed917..385f874 100644 --- a/scripts/eastern_kingdoms/molten_core/boss_baron_geddon.cpp +++ b/scripts/eastern_kingdoms/molten_core/boss_baron_geddon.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/scripts/eastern_kingdoms/molten_core/boss_garr.cpp b/scripts/eastern_kingdoms/molten_core/boss_garr.cpp index 297f611..6b740fb 100644 --- a/scripts/eastern_kingdoms/molten_core/boss_garr.cpp +++ b/scripts/eastern_kingdoms/molten_core/boss_garr.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/scripts/eastern_kingdoms/molten_core/boss_gehennas.cpp b/scripts/eastern_kingdoms/molten_core/boss_gehennas.cpp index c335550..0194f7b 100644 --- a/scripts/eastern_kingdoms/molten_core/boss_gehennas.cpp +++ b/scripts/eastern_kingdoms/molten_core/boss_gehennas.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/scripts/eastern_kingdoms/molten_core/boss_golemagg.cpp b/scripts/eastern_kingdoms/molten_core/boss_golemagg.cpp index eac5a65..2094f9e 100644 --- a/scripts/eastern_kingdoms/molten_core/boss_golemagg.cpp +++ b/scripts/eastern_kingdoms/molten_core/boss_golemagg.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/scripts/eastern_kingdoms/molten_core/boss_lucifron.cpp b/scripts/eastern_kingdoms/molten_core/boss_lucifron.cpp index 5412620..648e131 100644 --- a/scripts/eastern_kingdoms/molten_core/boss_lucifron.cpp +++ b/scripts/eastern_kingdoms/molten_core/boss_lucifron.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/scripts/eastern_kingdoms/molten_core/boss_magmadar.cpp b/scripts/eastern_kingdoms/molten_core/boss_magmadar.cpp index 6f1543d..4212efd 100644 --- a/scripts/eastern_kingdoms/molten_core/boss_magmadar.cpp +++ b/scripts/eastern_kingdoms/molten_core/boss_magmadar.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/scripts/eastern_kingdoms/molten_core/boss_majordomo_executus.cpp b/scripts/eastern_kingdoms/molten_core/boss_majordomo_executus.cpp index 7b852d1..140764f 100644 --- a/scripts/eastern_kingdoms/molten_core/boss_majordomo_executus.cpp +++ b/scripts/eastern_kingdoms/molten_core/boss_majordomo_executus.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or @@ -16,8 +16,8 @@ /* ScriptData SDName: Boss_Majordomo_Executus -SD%Complete: 90 -SDComment: Ragnaros summon missing +SD%Complete: 95 +SDComment: Minor weaknesses SDCategory: Molten Core EndScriptData */ @@ -35,12 +35,21 @@ enum SAY_DEFEAT_2 = -1409020, SAY_DEFEAT_3 = -1409021, + SAY_SUMMON_0 = -1409023, + SAY_SUMMON_1 = -1409024, SAY_SUMMON_MAJ = -1409008, SAY_ARRIVAL1_RAG = -1409009, SAY_ARRIVAL2_MAJ = -1409010, SAY_ARRIVAL3_RAG = -1409011, SAY_ARRIVAL4_MAJ = -1409022, - SAY_ARRIVAL5_RAG = -1409012, + + GOSSIP_ITEM_SUMMON_1 = -3409000, + GOSSIP_ITEM_SUMMON_2 = -3409001, + GOSSIP_ITEM_SUMMON_3 = -3409002, + + TEXT_ID_SUMMON_1 = 4995, + TEXT_ID_SUMMON_2 = 5011, + TEXT_ID_SUMMON_3 = 5012, SPELL_MAGIC_REFLECTION = 20619, SPELL_DAMAGE_REFLECTION = 21075, @@ -50,6 +59,8 @@ enum SPELL_TELEPORT_SELF = 19484, SPELL_SUMMON_RAGNAROS = 19774, + SPELL_ELEMENTAL_FIRE = 19773, + SPELL_RAGNA_EMERGE = 20568, }; struct MANGOS_DLL_DECL boss_majordomoAI : public ScriptedAI @@ -57,6 +68,7 @@ struct MANGOS_DLL_DECL boss_majordomoAI : public ScriptedAI boss_majordomoAI(Creature* pCreature) : ScriptedAI(pCreature) { m_pInstance = (instance_molten_core*)pCreature->GetInstanceData(); + m_bHasEncounterFinished = false; Reset(); } @@ -69,6 +81,7 @@ struct MANGOS_DLL_DECL boss_majordomoAI : public ScriptedAI uint32 m_uiAegisTimer; uint32 m_uiSpeechTimer; + uint64 m_uiRagnarosGUID; bool m_bHasEncounterFinished; uint8 m_uiAddsKilled; uint8 m_uiSpeech; @@ -83,7 +96,7 @@ struct MANGOS_DLL_DECL boss_majordomoAI : public ScriptedAI m_uiAegisTimer = 5000; m_uiSpeechTimer = 1000; - m_bHasEncounterFinished = false; + m_uiRagnarosGUID = 0; m_uiAddsKilled = 0; m_uiSpeech = 0; } @@ -98,8 +111,10 @@ struct MANGOS_DLL_DECL boss_majordomoAI : public ScriptedAI void Aggro(Unit* pWho) { + if (pWho->GetTypeId() == TYPEID_UNIT && pWho->GetEntry() == NPC_RAGNAROS) + return; + DoScriptText(SAY_AGGRO, m_creature); - m_bHasEncounterFinished = false; if (m_pInstance) m_pInstance->SetData(TYPE_MAJORDOMO, IN_PROGRESS); @@ -128,6 +143,9 @@ struct MANGOS_DLL_DECL boss_majordomoAI : public ScriptedAI m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_OOC_NOT_ATTACKABLE); m_creature->setFaction(FACTION_MAJORDOMO_FRIENDLY); + // Reset orientation + m_creature->SetFacingTo(m_aMajordomoLocations[0].m_fO); + // Start his speech m_uiSpeechTimer = 1; // At next tick m_uiSpeech = 1; @@ -136,26 +154,83 @@ struct MANGOS_DLL_DECL boss_majordomoAI : public ScriptedAI } } + void StartSummonEvent(Player* pPlayer) + { + m_creature->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP); + + // Prevent possible exploits with double summoning + if (Creature* pRagnaros = m_creature->GetMap()->GetCreature(m_uiRagnarosGUID)) + return; + + DoScriptText(SAY_SUMMON_0, m_creature, pPlayer); + + m_uiSpeechTimer = 5000; + m_uiSpeech = 10; + } + + void JustRespawned() + { + // Encounter finished, need special treatment + if (m_bHasEncounterFinished) + { + // This needs to be set to be able to resummon Ragnaros + m_creature->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP); + + // Relocate here + debug_log("SD2: boss_majordomo_executus: Relocate to Ragnaros' Lair on respawn"); + m_creature->GetMap()->CreatureRelocation(m_creature, m_aMajordomoLocations[1].m_fX, m_aMajordomoLocations[1].m_fY, m_aMajordomoLocations[1].m_fZ, m_aMajordomoLocations[1].m_fO); + m_creature->SetActiveObjectState(false); + } + } + void JustSummoned(Creature* pSummoned) { if (pSummoned->GetEntry() == NPC_FLAMEWAKER_HEALER || pSummoned->GetEntry() == NPC_FLAMEWAKER_ELITE) + { m_luiMajordomoAddsGUIDs.push_back(pSummoned->GetGUID()); + pSummoned->SetRespawnDelay(2*HOUR); + } + else if (pSummoned->GetEntry() == NPC_RAGNAROS) + { + m_uiRagnarosGUID = pSummoned->GetGUID(); + pSummoned->CastSpell(pSummoned, SPELL_RAGNA_EMERGE, false); + } + } + + void JustDied(Unit* pKiller) + { + if (pKiller->GetTypeId() == TYPEID_UNIT && pKiller->GetEntry() == NPC_RAGNAROS) + DoScriptText(SAY_ARRIVAL4_MAJ, m_creature); + } + + void CorpseRemoved(uint32 &uiRespawnDelay) + { + uiRespawnDelay = urand(2 * HOUR, 3 * HOUR); + + if (m_bHasEncounterFinished) + { + // Needed for proper respawn handling + debug_log("SD2: boss_majordomo_executus: Set active"); + m_creature->SetActiveObjectState(true); + } } void SummonedCreatureJustDied(Creature* pSummoned) { if (pSummoned->GetEntry() == NPC_FLAMEWAKER_HEALER || pSummoned->GetEntry() == NPC_FLAMEWAKER_ELITE) + { m_uiAddsKilled += 1; - // Yell if only one Add alive - if (m_uiAddsKilled == m_luiMajordomoAddsGUIDs.size() - 1) - DoScriptText(SAY_LAST_ADD, m_creature); + // Yell if only one Add alive + if (m_uiAddsKilled == m_luiMajordomoAddsGUIDs.size() - 1) + DoScriptText(SAY_LAST_ADD, m_creature); - // All adds are killed, retreat - else if (m_uiAddsKilled == m_luiMajordomoAddsGUIDs.size()) - { - m_bHasEncounterFinished = true; - m_creature->GetMotionMaster()->MoveTargetedHome(); + // All adds are killed, retreat + else if (m_uiAddsKilled == m_luiMajordomoAddsGUIDs.size()) + { + m_bHasEncounterFinished = true; + m_creature->GetMotionMaster()->MoveTargetedHome(); + } } } @@ -190,6 +265,7 @@ struct MANGOS_DLL_DECL boss_majordomoAI : public ScriptedAI { switch (m_uiSpeech) { + // Majordomo retreat event case 1: DoScriptText(SAY_DEFEAT_1, m_creature); m_uiSpeechTimer = 7500; @@ -207,15 +283,73 @@ struct MANGOS_DLL_DECL boss_majordomoAI : public ScriptedAI break; case 4: DoCastSpellIfCan(m_creature, SPELL_TELEPORT_SELF); - m_uiSpeechTimer = 1100; + // TODO - when should they be unsummoned? + // TODO - also unclear how this should be handled, as of range issues + m_uiSpeechTimer = 900; ++m_uiSpeech; break; case 5: - // Majordomo is away now, remove his adds (TODO: perhaps handle them in a different way, unclear) + // Majordomo is away now, remove his adds UnsummonMajordomoAdds(); m_uiSpeech = 0; break; - // TODO: teleport to ragnaros, implement ragnaros speech here, teleport might be to handled as part of the tele-self spell + + // Ragnaros Summon Event + case 10: + DoScriptText(SAY_SUMMON_1, m_creature); + ++m_uiSpeech; + m_uiSpeechTimer = 1000; + break; + case 11: + DoCastSpellIfCan(m_creature, SPELL_SUMMON_RAGNAROS); + // TODO - Move along, this expects to be handled with mmaps + m_creature->GetMotionMaster()->MovePoint(1, 831.079590f, -816.023193f, -229.023270f); + ++m_uiSpeech; + m_uiSpeechTimer = 7000; + break; + case 12: + // Reset orientation + if (GameObject* pLavaSteam = m_pInstance->instance->GetGameObject(m_pInstance->GetData64(GO_LAVA_STEAM))) + m_creature->SetFacingToObject(pLavaSteam); + m_uiSpeechTimer = 4500; + ++m_uiSpeech; + break; + case 13: + DoScriptText(SAY_SUMMON_MAJ, m_creature); + ++m_uiSpeech; + m_uiSpeechTimer = 8000; + break; + case 14: + // Summon Ragnaros + if (m_pInstance) + if (GameObject* pGo = m_pInstance->instance->GetGameObject(m_pInstance->GetData64(GO_LAVA_STEAM))) + m_creature->SummonCreature(NPC_RAGNAROS, pGo->GetPositionX(), pGo->GetPositionY(), pGo->GetPositionZ(), fmod(m_creature->GetOrientation() + M_PI, 2*M_PI), TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 2*HOUR*IN_MILLISECONDS); + ++m_uiSpeech; + m_uiSpeechTimer = 8700; + break; + case 15: + if (Creature* pRagnaros = m_creature->GetMap()->GetCreature(m_uiRagnarosGUID)) + DoScriptText(SAY_ARRIVAL1_RAG, pRagnaros); + ++m_uiSpeech; + m_uiSpeechTimer = 11700; + break; + case 16: + DoScriptText(SAY_ARRIVAL2_MAJ, m_creature); + ++m_uiSpeech; + m_uiSpeechTimer = 8700; + break; + case 17: + if (Creature* pRagnaros = m_creature->GetMap()->GetCreature(m_uiRagnarosGUID)) + DoScriptText(SAY_ARRIVAL3_RAG, pRagnaros); + ++m_uiSpeech; + m_uiSpeechTimer = 16500; + break; + case 18: + if (Creature* pRagnaros = m_creature->GetMap()->GetCreature(m_uiRagnarosGUID)) + pRagnaros->CastSpell(m_creature, SPELL_ELEMENTAL_FIRE, false); + // Rest of summoning speech is handled by Ragnaros, as Majordomo will be dead + m_uiSpeech = 0; + break; } } else @@ -289,12 +423,61 @@ CreatureAI* GetAI_boss_majordomo(Creature* pCreature) return new boss_majordomoAI(pCreature); } +bool GossipHello_boss_majordomo(Player* pPlayer, Creature* pCreature) +{ + if (instance_molten_core* pInstance = (instance_molten_core*)pCreature->GetInstanceData()) + { + if (pInstance->GetData(TYPE_RAGNAROS) == NOT_STARTED || pInstance->GetData(TYPE_RAGNAROS) == FAIL) + { + pPlayer->ADD_GOSSIP_ITEM_ID(GOSSIP_ICON_CHAT, GOSSIP_ITEM_SUMMON_1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); + pPlayer->SEND_GOSSIP_MENU(TEXT_ID_SUMMON_1, pCreature->GetGUID()); + } + } + return true; +} + +bool GossipSelect_boss_majordomo(Player* pPlayer, Creature* pCreature, uint32 sender, uint32 uiAction) +{ + switch (uiAction) + { + case GOSSIP_ACTION_INFO_DEF + 1: + pPlayer->ADD_GOSSIP_ITEM_ID(GOSSIP_ICON_CHAT, GOSSIP_ITEM_SUMMON_2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 2); + pPlayer->SEND_GOSSIP_MENU(TEXT_ID_SUMMON_2, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 2: + pPlayer->ADD_GOSSIP_ITEM_ID(GOSSIP_ICON_CHAT, GOSSIP_ITEM_SUMMON_3, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF + 3); + pPlayer->SEND_GOSSIP_MENU(TEXT_ID_SUMMON_3, pCreature->GetGUID()); + break; + case GOSSIP_ACTION_INFO_DEF + 3: + pPlayer->CLOSE_GOSSIP_MENU(); + if (boss_majordomoAI* pMajoAI = dynamic_cast(pCreature->AI())) + pMajoAI->StartSummonEvent(pPlayer); + break; + } + + return true; +} + +bool EffectDummyCreature_spell_boss_majordomo(Unit* pCaster, uint32 uiSpellId, SpellEffectIndex uiEffIndex, Creature* pCreatureTarget) +{ + if (uiSpellId != SPELL_TELEPORT_SELF || uiEffIndex != EFFECT_INDEX_0) + return false; + + pCreatureTarget->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP); + pCreatureTarget->NearTeleportTo(m_aMajordomoLocations[1].m_fX, m_aMajordomoLocations[1].m_fY, m_aMajordomoLocations[1].m_fZ, m_aMajordomoLocations[1].m_fO, true); + // TODO - some visibility update? + return true; +} + void AddSC_boss_majordomo() { Script* pNewScript; pNewScript = new Script; pNewScript->Name = "boss_majordomo"; + pNewScript->pEffectDummyNPC = &EffectDummyCreature_spell_boss_majordomo; + pNewScript->pGossipHello = &GossipHello_boss_majordomo; + pNewScript->pGossipSelect = &GossipSelect_boss_majordomo; pNewScript->GetAI = &GetAI_boss_majordomo; pNewScript->RegisterSelf(); } diff --git a/scripts/eastern_kingdoms/molten_core/boss_ragnaros.cpp b/scripts/eastern_kingdoms/molten_core/boss_ragnaros.cpp index 8528b1f..f3a9023 100644 --- a/scripts/eastern_kingdoms/molten_core/boss_ragnaros.cpp +++ b/scripts/eastern_kingdoms/molten_core/boss_ragnaros.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or @@ -17,7 +17,7 @@ /* ScriptData SDName: Boss_Ragnaros SD%Complete: 60 -SDComment: Intro Dialogue and event NYI, Melee/ Range Combat behavior is not correct, Some abilities are missing +SDComment: Melee/ Range Combat behavior is not correct(any enemy in melee range, not only getVictim), Some abilities are missing SDCategory: Molten Core EndScriptData */ @@ -25,25 +25,17 @@ EndScriptData */ #include "molten_core.h" /* There have been quite some bugs about his spells, keep this as reference untill all finished - * From original version, spells - * SPELL_HAND_OF_RAGNAROS = 19780 // Is not linked to Ragnaros, and also not mentioned on wowwiki, timer was 25s - * SPELL_ERRUPTION = 17731 // Is a spell from Onyxia-Encounter - * SPELL_SONSOFFLAME_DUMMY = 21108 // Does not exist anymore, and was also unused - * have been removed - * * Missing features (based on wowwiki) - * Hammer of Ragnaros - Ranged Knockback and Damage * Lava Splash - Localized Damage - * - * A few interesting spells - * Might of Ragnaros: Summons a trigger npc (Flame of Ragnaros), visual fits to Hammer, possible knockback spell in spell range: 21155 + * Melt Weapon - Proc Aura missing in DBC, or hack missing */ enum { + SAY_ARRIVAL5_RAG = -1409012, SAY_REINFORCEMENTS_1 = -1409013, SAY_REINFORCEMENTS_2 = -1409014, - SAY_HAMMER = -1409015, // TODO Hammer of Ragnaros + SAY_HAMMER = -1409015, SAY_WRATH = -1409016, SAY_KILL = -1409017, SAY_MAGMABURST = -1409018, @@ -51,12 +43,16 @@ enum SPELL_WRATH_OF_RAGNAROS = 20566, SPELL_ELEMENTAL_FIRE = 20564, SPELL_MAGMA_BLAST = 20565, // Ranged attack if nobody is in melee range - SPELL_MELT_WEAPON = 21388, // Passive aura + SPELL_MELT_WEAPON = 21388, // Passive aura was spell 21387, TODO need some hack.. SPELL_RAGNA_SUBMERGE = 21107, // Stealth aura SPELL_RAGNA_EMERGE = 20568, // Emerge from lava + SPELL_ELEMENTAL_FIRE_KILL = 19773, + SPELL_MIGHT_OF_RAGNAROS = 21154, + SPELL_INTENSE_HEAT = 21155, MAX_ADDS_IN_SUBMERGE = 8, - NPC_SON_OF_FLAME = 12143 + NPC_SON_OF_FLAME = 12143, + NPC_FLAME_OF_RAGNAROS = 13148, }; struct MANGOS_DLL_DECL boss_ragnarosAI : public Scripted_NoMovementAI @@ -64,25 +60,31 @@ struct MANGOS_DLL_DECL boss_ragnarosAI : public Scripted_NoMovementAI boss_ragnarosAI(Creature* pCreature) : Scripted_NoMovementAI(pCreature) { m_pInstance = (instance_molten_core*)pCreature->GetInstanceData(); + m_uiEnterCombatTimer = 0; + m_bHasAggroYelled = false; Reset(); } instance_molten_core* m_pInstance; + uint32 m_uiEnterCombatTimer; uint32 m_uiWrathOfRagnarosTimer; + uint32 m_uiHammerTimer; uint32 m_uiMagmaBlastTimer; uint32 m_uiElementalFireTimer; uint32 m_uiSubmergeTimer; uint32 m_uiAttackTimer; uint32 m_uiAddCount; + bool m_bHasAggroYelled; bool m_bHasYelledMagmaBurst; bool m_bHasSubmergedOnce; bool m_bIsSubmerged; void Reset() { - m_uiWrathOfRagnarosTimer = 30000; + m_uiWrathOfRagnarosTimer = 30000; // TODO Research more, according to wowwiki 25s, but timers up to 34s confirmed + m_uiHammerTimer = 11000; // TODO wowwiki states 20-30s timer, but ~11s confirmed m_uiMagmaBlastTimer = 2000; m_uiElementalFireTimer = 3000; m_uiSubmergeTimer = 3*MINUTE*IN_MILLISECONDS; @@ -96,7 +98,10 @@ struct MANGOS_DLL_DECL boss_ragnarosAI : public Scripted_NoMovementAI void KilledUnit(Unit* pVictim) { - if (urand(0, 4)) + if (pVictim->GetTypeId() != TYPEID_PLAYER) + return; + + if (urand(0, 3)) return; DoScriptText(SAY_KILL, m_creature); @@ -110,14 +115,14 @@ struct MANGOS_DLL_DECL boss_ragnarosAI : public Scripted_NoMovementAI void Aggro(Unit* pWho) { + if (pWho->GetTypeId() == TYPEID_UNIT && pWho->GetEntry() == NPC_MAJORDOMO) + return; + if (m_pInstance) m_pInstance->SetData(TYPE_RAGNAROS, IN_PROGRESS); - - // Passive aura - DoCastSpellIfCan(m_creature, SPELL_MELT_WEAPON, CAST_TRIGGERED); } - void JustReachedHome() + void EnterEvadeMode() { if (m_pInstance) m_pInstance->SetData(TYPE_RAGNAROS, FAIL); @@ -125,6 +130,8 @@ struct MANGOS_DLL_DECL boss_ragnarosAI : public Scripted_NoMovementAI // Reset flag if had been submerged if (m_creature->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE)) m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + + ScriptedAI::EnterEvadeMode(); } void SummonedCreatureJustDied(Creature* pSummmoned) @@ -149,10 +156,47 @@ struct MANGOS_DLL_DECL boss_ragnarosAI : public Scripted_NoMovementAI ++m_uiAddCount; } + else if (pSummoned->GetEntry() == NPC_FLAME_OF_RAGNAROS) + pSummoned->CastSpell(pSummoned, SPELL_INTENSE_HEAT, true, NULL, NULL, m_creature->GetObjectGuid()); + } + + void SpellHitTarget(Unit* pTarget, const SpellEntry* pSpell) + { + // As Majordomo is now killed, the last timer (until attacking) must be handled with ragnaros script + if (pSpell->Id == SPELL_ELEMENTAL_FIRE_KILL && pTarget->GetTypeId() == TYPEID_UNIT && pTarget->GetEntry() == NPC_MAJORDOMO) + m_uiEnterCombatTimer = 10000; } void UpdateAI(const uint32 uiDiff) { + if (m_uiEnterCombatTimer) + { + if (m_uiEnterCombatTimer <= uiDiff) + { + if (!m_bHasAggroYelled) + { + m_uiEnterCombatTimer = 3000; + m_bHasAggroYelled = true; + DoScriptText(SAY_ARRIVAL5_RAG, m_creature); + } + else + { + m_uiEnterCombatTimer = 0; + // If we don't remove this passive flag, he will be unattackable after evading, this way he will enter combat + m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_PASSIVE); + if (m_pInstance) + { + if (Player* pPlayer = m_pInstance->GetPlayerInMap(true, false)) + { + m_creature->AI()->AttackStart(pPlayer); + return; + } + } + } + } + else + m_uiEnterCombatTimer -= uiDiff; + } // Return since we have no target if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; @@ -181,16 +225,14 @@ struct MANGOS_DLL_DECL boss_ragnarosAI : public Scripted_NoMovementAI { if (DoCastSpellIfCan(m_creature, SPELL_WRATH_OF_RAGNAROS) == CAST_OK) { - if (urand(0, 1)) - DoScriptText(SAY_WRATH, m_creature); - + DoScriptText(SAY_WRATH, m_creature); m_uiWrathOfRagnarosTimer = 30000; } } else m_uiWrathOfRagnarosTimer -= uiDiff; - // Elemental FireTimer + // Elemental Fire Timer if (m_uiElementalFireTimer < uiDiff) { if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_ELEMENTAL_FIRE) == CAST_OK) @@ -199,10 +241,38 @@ struct MANGOS_DLL_DECL boss_ragnarosAI : public Scripted_NoMovementAI else m_uiElementalFireTimer -= uiDiff; + // Hammer of Ragnaros + if (m_uiHammerTimer < uiDiff) + { + // Select a target with mana-bar + std::list lValidTargets; + ThreatList const& tList = m_creature->getThreatManager().getThreatList(); + for (ThreatList::const_iterator iter = tList.begin(); iter != tList.end(); ++iter) + { + Unit* pTempTarget = m_creature->GetMap()->GetUnit((*iter)->getUnitGuid()); + if (pTempTarget && pTempTarget->getPowerType() == POWER_MANA) + lValidTargets.push_back(pTempTarget); + } + + if (!lValidTargets.empty()) + { + std::list::const_iterator itr = lValidTargets.begin(); + advance(itr, urand(0, lValidTargets.size() - 1)); + if (DoCastSpellIfCan(*itr, SPELL_MIGHT_OF_RAGNAROS) == CAST_OK) + { + DoScriptText(SAY_HAMMER, m_creature); + m_uiHammerTimer = 11000; + } + } + else + m_uiHammerTimer = 11000; + } + else + m_uiHammerTimer -= uiDiff; + // Submerge Timer if (m_uiSubmergeTimer < uiDiff) { - // Submerge and attack again after 90 secs DoCastSpellIfCan(m_creature, SPELL_RAGNA_SUBMERGE, CAST_INTERRUPT_PREVIOUS); m_creature->HandleEmote(EMOTE_ONESHOT_SUBMERGE); diff --git a/scripts/eastern_kingdoms/molten_core/boss_shazzrah.cpp b/scripts/eastern_kingdoms/molten_core/boss_shazzrah.cpp index fe47e15..014f263 100644 --- a/scripts/eastern_kingdoms/molten_core/boss_shazzrah.cpp +++ b/scripts/eastern_kingdoms/molten_core/boss_shazzrah.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/scripts/eastern_kingdoms/molten_core/boss_sulfuron_harbinger.cpp b/scripts/eastern_kingdoms/molten_core/boss_sulfuron_harbinger.cpp index 7ab70e0..a600cf5 100644 --- a/scripts/eastern_kingdoms/molten_core/boss_sulfuron_harbinger.cpp +++ b/scripts/eastern_kingdoms/molten_core/boss_sulfuron_harbinger.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or @@ -65,7 +65,7 @@ struct MANGOS_DLL_DECL boss_sulfuronAI : public ScriptedAI void Aggro(Unit* pWho) { - if(m_pInstance) + if (m_pInstance) m_pInstance->SetData(TYPE_SULFURON, IN_PROGRESS); m_creature->CallForHelp(RANGE_CALL_FOR_HELP); diff --git a/scripts/eastern_kingdoms/molten_core/instance_molten_core.cpp b/scripts/eastern_kingdoms/molten_core/instance_molten_core.cpp index 9fd9fb6..0068edf 100644 --- a/scripts/eastern_kingdoms/molten_core/instance_molten_core.cpp +++ b/scripts/eastern_kingdoms/molten_core/instance_molten_core.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or @@ -28,7 +28,6 @@ instance_molten_core::instance_molten_core(Map* pMap) : ScriptedInstance(pMap), m_uiGarrGUID(0), m_uiSulfuronGUID(0), m_uiMajordomoGUID(0), - m_uiRagnarosGUID(0), m_uiRuneKoroGUID(0), m_uiRuneZethGUID(0), m_uiRuneMazjGUID(0), @@ -36,6 +35,8 @@ instance_molten_core::instance_molten_core(Map* pMap) : ScriptedInstance(pMap), m_uiRuneBlazGUID(0), m_uiRuneKressGUID(0), m_uiRuneMohnGUID(0), + m_uiLavaSteamGUID(0), + m_uiLavaSplashGUID(0), m_uiFirelordCacheGUID(0) { Initialize(); @@ -71,7 +72,6 @@ void instance_molten_core::OnCreatureCreate(Creature* pCreature) case NPC_GARR: m_uiGarrGUID = pCreature->GetGUID(); break; case NPC_SULFURON: m_uiSulfuronGUID = pCreature->GetGUID(); break; case NPC_MAJORDOMO: m_uiMajordomoGUID = pCreature->GetGUID(); break; - case NPC_RAGNAROS: m_uiRagnarosGUID = pCreature->GetGUID(); break; // Push adds to lists in order to handle respawn case NPC_FLAMEWAKER_PROTECTOR: m_luiProtectorGUIDs.push_back(pCreature->GetGUID()); break; @@ -97,6 +97,9 @@ void instance_molten_core::OnObjectCreate(GameObject* pGo) // Majordomo event chest case GO_CACHE_OF_THE_FIRE_LORD: m_uiFirelordCacheGUID = pGo->GetGUID(); break; + // Ragnaros GOs + case GO_LAVA_STEAM: m_uiLavaSteamGUID = pGo->GetGUID(); break; + case GO_LAVA_SPLASH: m_uiLavaSplashGUID = pGo->GetGUID(); break; } } @@ -216,7 +219,7 @@ void instance_molten_core::DoSpawnMajordomoIfCan(bool bByPlayerEnter) return; // Check if all rune bosses are done - for(uint8 i = TYPE_MAGMADAR; i < TYPE_MAJORDOMO; i++) + for(uint8 i = TYPE_MAGMADAR; i < TYPE_MAJORDOMO; ++i) { if (m_auiEncounter[i] != DONE) return; @@ -274,7 +277,9 @@ uint64 instance_molten_core::GetData64(uint32 uiData) case NPC_GARR: return m_uiGarrGUID; case NPC_SULFURON: return m_uiSulfuronGUID; case NPC_MAJORDOMO: return m_uiMajordomoGUID; - case NPC_RAGNAROS: return m_uiRagnarosGUID; + + case GO_LAVA_STEAM: return m_uiLavaSteamGUID; + case GO_LAVA_SPLASH: return m_uiLavaSplashGUID; default: return 0; diff --git a/scripts/eastern_kingdoms/molten_core/molten_core.cpp b/scripts/eastern_kingdoms/molten_core/molten_core.cpp index 351c42d..2c49fe6 100644 --- a/scripts/eastern_kingdoms/molten_core/molten_core.cpp +++ b/scripts/eastern_kingdoms/molten_core/molten_core.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/scripts/eastern_kingdoms/molten_core/molten_core.h b/scripts/eastern_kingdoms/molten_core/molten_core.h index c78caf4..de7d50e 100644 --- a/scripts/eastern_kingdoms/molten_core/molten_core.h +++ b/scripts/eastern_kingdoms/molten_core/molten_core.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ @@ -41,6 +41,8 @@ enum NPC_FLAMEWAKER_HEALER = 11663, // Majordomo NPC_FLAMEWAKER_ELITE = 11664, // Majordomo + GO_LAVA_STEAM = 178107, + GO_LAVA_SPLASH = 178108, GO_CACHE_OF_THE_FIRE_LORD = 179703, GO_RUNE_KRESS = 176956, // Magmadar GO_RUNE_MOHN = 176957, // Gehennas @@ -116,7 +118,6 @@ class MANGOS_DLL_DECL instance_molten_core : public ScriptedInstance uint64 m_uiGarrGUID; uint64 m_uiSulfuronGUID; uint64 m_uiMajordomoGUID; - uint64 m_uiRagnarosGUID; // Runes uint64 m_uiRuneKoroGUID; @@ -127,6 +128,9 @@ class MANGOS_DLL_DECL instance_molten_core : public ScriptedInstance uint64 m_uiRuneKressGUID; uint64 m_uiRuneMohnGUID; + // Ragnaros related GOs + uint64 m_uiLavaSteamGUID; + uint64 m_uiLavaSplashGUID; // Chests uint64 m_uiFirelordCacheGUID; diff --git a/scripts/eastern_kingdoms/redridge_mountains.cpp b/scripts/eastern_kingdoms/redridge_mountains.cpp index 640990c..3b2aa11 100644 --- a/scripts/eastern_kingdoms/redridge_mountains.cpp +++ b/scripts/eastern_kingdoms/redridge_mountains.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/scripts/eastern_kingdoms/scarlet_monastery/boss_arcanist_doan.cpp b/scripts/eastern_kingdoms/scarlet_monastery/boss_arcanist_doan.cpp index d421ce0..a25099a 100644 --- a/scripts/eastern_kingdoms/scarlet_monastery/boss_arcanist_doan.cpp +++ b/scripts/eastern_kingdoms/scarlet_monastery/boss_arcanist_doan.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/scripts/eastern_kingdoms/scarlet_monastery/boss_azshir_the_sleepless.cpp b/scripts/eastern_kingdoms/scarlet_monastery/boss_azshir_the_sleepless.cpp index d8798da..8e1698b 100644 --- a/scripts/eastern_kingdoms/scarlet_monastery/boss_azshir_the_sleepless.cpp +++ b/scripts/eastern_kingdoms/scarlet_monastery/boss_azshir_the_sleepless.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/scripts/eastern_kingdoms/scarlet_monastery/boss_bloodmage_thalnos.cpp b/scripts/eastern_kingdoms/scarlet_monastery/boss_bloodmage_thalnos.cpp index ac6c9ae..155ecdb 100644 --- a/scripts/eastern_kingdoms/scarlet_monastery/boss_bloodmage_thalnos.cpp +++ b/scripts/eastern_kingdoms/scarlet_monastery/boss_bloodmage_thalnos.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/scripts/eastern_kingdoms/scarlet_monastery/boss_headless_horseman.cpp b/scripts/eastern_kingdoms/scarlet_monastery/boss_headless_horseman.cpp index 9f97d32..b57a452 100644 --- a/scripts/eastern_kingdoms/scarlet_monastery/boss_headless_horseman.cpp +++ b/scripts/eastern_kingdoms/scarlet_monastery/boss_headless_horseman.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/scripts/eastern_kingdoms/scarlet_monastery/boss_herod.cpp b/scripts/eastern_kingdoms/scarlet_monastery/boss_herod.cpp index 2beb406..f18bd7b 100644 --- a/scripts/eastern_kingdoms/scarlet_monastery/boss_herod.cpp +++ b/scripts/eastern_kingdoms/scarlet_monastery/boss_herod.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/scripts/eastern_kingdoms/scarlet_monastery/boss_high_inquisitor_fairbanks.cpp b/scripts/eastern_kingdoms/scarlet_monastery/boss_high_inquisitor_fairbanks.cpp index ad9f114..607c4a6 100644 --- a/scripts/eastern_kingdoms/scarlet_monastery/boss_high_inquisitor_fairbanks.cpp +++ b/scripts/eastern_kingdoms/scarlet_monastery/boss_high_inquisitor_fairbanks.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/scripts/eastern_kingdoms/scarlet_monastery/boss_houndmaster_loksey.cpp b/scripts/eastern_kingdoms/scarlet_monastery/boss_houndmaster_loksey.cpp index ffd9e91..b5d3253 100644 --- a/scripts/eastern_kingdoms/scarlet_monastery/boss_houndmaster_loksey.cpp +++ b/scripts/eastern_kingdoms/scarlet_monastery/boss_houndmaster_loksey.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/scripts/eastern_kingdoms/scarlet_monastery/boss_interrogator_vishas.cpp b/scripts/eastern_kingdoms/scarlet_monastery/boss_interrogator_vishas.cpp index d9656de..5f4b1e9 100644 --- a/scripts/eastern_kingdoms/scarlet_monastery/boss_interrogator_vishas.cpp +++ b/scripts/eastern_kingdoms/scarlet_monastery/boss_interrogator_vishas.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/scripts/eastern_kingdoms/scarlet_monastery/boss_mograine_and_whitemane.cpp b/scripts/eastern_kingdoms/scarlet_monastery/boss_mograine_and_whitemane.cpp index dfc234b..efcc529 100644 --- a/scripts/eastern_kingdoms/scarlet_monastery/boss_mograine_and_whitemane.cpp +++ b/scripts/eastern_kingdoms/scarlet_monastery/boss_mograine_and_whitemane.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/scripts/eastern_kingdoms/scarlet_monastery/boss_scorn.cpp b/scripts/eastern_kingdoms/scarlet_monastery/boss_scorn.cpp index 155b673..8e7efcf 100644 --- a/scripts/eastern_kingdoms/scarlet_monastery/boss_scorn.cpp +++ b/scripts/eastern_kingdoms/scarlet_monastery/boss_scorn.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/scripts/eastern_kingdoms/scarlet_monastery/instance_scarlet_monastery.cpp b/scripts/eastern_kingdoms/scarlet_monastery/instance_scarlet_monastery.cpp index cf41e4e..864b756 100644 --- a/scripts/eastern_kingdoms/scarlet_monastery/instance_scarlet_monastery.cpp +++ b/scripts/eastern_kingdoms/scarlet_monastery/instance_scarlet_monastery.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/scripts/eastern_kingdoms/scarlet_monastery/scarlet_monastery.h b/scripts/eastern_kingdoms/scarlet_monastery/scarlet_monastery.h index 2842cdd..25a7735 100644 --- a/scripts/eastern_kingdoms/scarlet_monastery/scarlet_monastery.h +++ b/scripts/eastern_kingdoms/scarlet_monastery/scarlet_monastery.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/scripts/eastern_kingdoms/scholomance/boss_darkmaster_gandling.cpp b/scripts/eastern_kingdoms/scholomance/boss_darkmaster_gandling.cpp index ac6d505..243d092 100644 --- a/scripts/eastern_kingdoms/scholomance/boss_darkmaster_gandling.cpp +++ b/scripts/eastern_kingdoms/scholomance/boss_darkmaster_gandling.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or @@ -16,8 +16,8 @@ /* ScriptData SDName: Boss_Darkmaster_Gandling -SD%Complete: 75 -SDComment: TODO: Implement teleport spells in MaNGOS and WorldDB +SD%Complete: 100 +SDComment: SDCategory: Scholomance EndScriptData */ @@ -29,7 +29,7 @@ enum SPELL_ARCANE_MISSILES = 15790, // SpellId not sure, original was 22272 SPELL_SHADOW_SHIELD = 12040, // SpellID not sure, original was 22417 stated as "wrong, but 12040 is wrong either." SPELL_CURSE = 18702, - SPELL_SHADOW_PORTAL = 17950 // TODO implement this spell(and other related port spells) in DB and MaNGOS + SPELL_SHADOW_PORTAL = 17950 }; struct MANGOS_DLL_DECL boss_darkmaster_gandlingAI : public ScriptedAI @@ -47,8 +47,6 @@ struct MANGOS_DLL_DECL boss_darkmaster_gandlingAI : public ScriptedAI uint32 m_uiCurseTimer; uint32 m_uiTeleportTimer; - Creature *Summoned; - void Reset() { m_uiArcaneMissilesTimer = 4500; @@ -95,96 +93,20 @@ struct MANGOS_DLL_DECL boss_darkmaster_gandlingAI : public ScriptedAI { if (m_uiTeleportTimer < uiDiff) { - Unit* target = NULL; - target = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM,0); - if (target && target->GetTypeId() == TYPEID_PLAYER) + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) { - if (m_creature->getThreatManager().getThreat(target)) - m_creature->getThreatManager().modifyThreatPercent(target, -100); + if (pTarget->GetTypeId() != TYPEID_PLAYER) + return; - switch(urand(0, 5)) + if (DoCastSpellIfCan(pTarget, SPELL_SHADOW_PORTAL) == CAST_OK) { - case 0: - DoTeleportPlayer(target, 250.0696f, 0.3921f, 84.8408f, 3.149f); - Summoned = m_creature->SummonCreature(16119, 254.2325f, 0.3417f, 84.8407f, 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT,10000); - if (Summoned) - Summoned->AI()->AttackStart(target); - Summoned = m_creature->SummonCreature(16119, 257.7133f, 4.0226f, 84.8407f, 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT,10000); - if (Summoned) - Summoned->AI()->AttackStart(target); - Summoned = m_creature->SummonCreature(16119, 258.6702f, -2.60656f, 84.8407f, 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT,10000); - if (Summoned) - Summoned->AI()->AttackStart(target); - break; - case 1: - DoTeleportPlayer(target, 181.4220f, -91.9481f, 84.8410f, 1.608f); - Summoned = m_creature->SummonCreature(16119, 184.0519f, -73.5649f, 84.8407f, 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT,10000); - if (Summoned) - Summoned->AI()->AttackStart(target); - Summoned = m_creature->SummonCreature(16119, 179.5951f, -73.7045f, 84.8407f, 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT,10000); - if (Summoned) - Summoned->AI()->AttackStart(target); - Summoned = m_creature->SummonCreature(16119, 180.6452f, -78.2143f, 84.8407f, 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT,10000); - if (Summoned) - Summoned->AI()->AttackStart(target); - Summoned = m_creature->SummonCreature(16119, 283.2274f, -78.1518f, 84.8407f, 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT,10000); - if (Summoned) - Summoned->AI()->AttackStart(target); - break; - case 2: - DoTeleportPlayer(target, 95.1547f, -1.8173f, 85.2289f, 0.043f); - Summoned = m_creature->SummonCreature(16119, 100.9404f, -1.8016f, 85.2289f, 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT,10000); - if (Summoned) - Summoned->AI()->AttackStart(target); - Summoned = m_creature->SummonCreature(16119, 101.3729f, 0.4882f, 85.2289f, 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT,10000); - if (Summoned) - Summoned->AI()->AttackStart(target); - Summoned = m_creature->SummonCreature(16119, 101.4596f, -4.4740f, 85.2289f, 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT,10000); - if (Summoned) - Summoned->AI()->AttackStart(target); - break; - case 3: - DoTeleportPlayer(target, 250.0696f, 0.3921f, 72.6722f, 3.149f); - Summoned = m_creature->SummonCreature(16119, 240.34481f, 0.7368f, 72.6722f, 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT,10000); - if (Summoned) - Summoned->AI()->AttackStart(target); - Summoned = m_creature->SummonCreature(16119, 240.3633f, -2.9520f, 72.6722f, 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT,10000); - if (Summoned) - Summoned->AI()->AttackStart(target); - Summoned = m_creature->SummonCreature(16119, 240.6702f, 3.34949f, 72.6722f, 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT,10000); - if (Summoned) - Summoned->AI()->AttackStart(target); - break; - case 4: - DoTeleportPlayer(target, 181.4220f, -91.9481f, 70.7734f, 1.608f); - Summoned = m_creature->SummonCreature(16119, 184.0519f, -73.5649f, 70.7734f, 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT,10000); - if (Summoned) - Summoned->AI()->AttackStart(target); - Summoned = m_creature->SummonCreature(16119, 179.5951f, -73.7045f, 70.7734f, 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT,10000); - if (Summoned) - Summoned->AI()->AttackStart(target); - Summoned = m_creature->SummonCreature(16119, 180.6452f, -78.2143f, 70.7734f, 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT,10000); - if (Summoned) - Summoned->AI()->AttackStart(target); - Summoned = m_creature->SummonCreature(16119, 283.2274f, -78.1518f, 70.7734f, 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT,10000); - if (Summoned) - Summoned->AI()->AttackStart(target); - break; - case 5: - DoTeleportPlayer(target, 106.1541f, -1.8994f, 75.3663f, 0.043f); - Summoned = m_creature->SummonCreature(16119, 115.3945f, -1.5555f, 75.3663f, 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT,10000); - if (Summoned) - Summoned->AI()->AttackStart(target); - Summoned = m_creature->SummonCreature(16119, 257.7133f, 1.8066f, 75.3663f, 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT,10000); - if (Summoned) - Summoned->AI()->AttackStart(target); - Summoned = m_creature->SummonCreature(16119, 258.6702f, -5.1001f, 75.3663f, 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT,10000); - if (Summoned) - Summoned->AI()->AttackStart(target); - break; + // remove threat + if (m_creature->getThreatManager().getThreat(pTarget)) + m_creature->getThreatManager().modifyThreatPercent(pTarget, -100); + + m_uiTeleportTimer = urand(20000, 35000); } } - m_uiTeleportTimer = urand(20000, 35000); } else m_uiTeleportTimer -= uiDiff; diff --git a/scripts/eastern_kingdoms/scholomance/boss_death_knight_darkreaver.cpp b/scripts/eastern_kingdoms/scholomance/boss_death_knight_darkreaver.cpp index 7f5d16f..c5fec1b 100644 --- a/scripts/eastern_kingdoms/scholomance/boss_death_knight_darkreaver.cpp +++ b/scripts/eastern_kingdoms/scholomance/boss_death_knight_darkreaver.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/scripts/eastern_kingdoms/scholomance/boss_jandice_barov.cpp b/scripts/eastern_kingdoms/scholomance/boss_jandice_barov.cpp index b61f90b..a75871c 100644 --- a/scripts/eastern_kingdoms/scholomance/boss_jandice_barov.cpp +++ b/scripts/eastern_kingdoms/scholomance/boss_jandice_barov.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/scripts/eastern_kingdoms/scholomance/boss_kormok.cpp b/scripts/eastern_kingdoms/scholomance/boss_kormok.cpp index 3a5cd6b..90bb65e 100644 --- a/scripts/eastern_kingdoms/scholomance/boss_kormok.cpp +++ b/scripts/eastern_kingdoms/scholomance/boss_kormok.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/scripts/eastern_kingdoms/scholomance/boss_vectus.cpp b/scripts/eastern_kingdoms/scholomance/boss_vectus.cpp index 7d567af..e9d145c 100644 --- a/scripts/eastern_kingdoms/scholomance/boss_vectus.cpp +++ b/scripts/eastern_kingdoms/scholomance/boss_vectus.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/scripts/eastern_kingdoms/scholomance/instance_scholomance.cpp b/scripts/eastern_kingdoms/scholomance/instance_scholomance.cpp index 2690be4..02d7ed2 100644 --- a/scripts/eastern_kingdoms/scholomance/instance_scholomance.cpp +++ b/scripts/eastern_kingdoms/scholomance/instance_scholomance.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or @@ -16,33 +16,20 @@ /* ScriptData SDName: Instance_Scholomance -SD%Complete: 80 -SDComment: Door handling for Gandling rooms after player-teleporting (close on Add Aggro, open when all Adds dead) missing +SD%Complete: 99 +SDComment: Possible some D2 or other exotic missing SDCategory: Scholomance EndScriptData */ #include "precompiled.h" #include "scholomance.h" -/* Darkmaster Gandling Encounter - Adds handling (MISSING) - * When a player is teleported to another room, there are 3 (perhaps sometimes 4) Adds spawned. - * When the first add Aggroes, the door to the room is closed - * When the last add dies, the door to the room is opened - * - * Also possible that this is better handled within the boss-script, depends on details of implementation of teleport spells - */ - instance_scholomance::instance_scholomance(Map* pMap) : ScriptedInstance(pMap), m_uiDarkmasterGandlingGUID(0), m_uiGateKirtonosGUID(0), m_uiGateRasGUID(0), - m_uiGateMiliciaGUID(0), - m_uiGateTheolenGUID(0), - m_uiGatePolkeltGUID(0), - m_uiGateRavenianGUID(0), - m_uiGateBarovGUID(0), - m_uiGateIlluciaGUID(0), - m_uiGateGandlingGUID(0) + m_uiGateGandlingGUID(0), + m_uiGandlingEvent(0) { Initialize(); } @@ -50,6 +37,9 @@ instance_scholomance::instance_scholomance(Map* pMap) : ScriptedInstance(pMap), void instance_scholomance::Initialize() { memset(&m_auiEncounter, 0, sizeof(m_auiEncounter)); + + for (uint8 i = 0; i < MAX_EVENTS; ++i) + m_mGandlingData[aGandlingEvents[i]] = GandlingEventData(); } void instance_scholomance::OnPlayerEnter(Player* pPlayer) @@ -62,7 +52,14 @@ void instance_scholomance::OnCreatureCreate(Creature* pCreature) { switch (pCreature->GetEntry()) { - case NPC_DARKMASTER_GANDLING: m_uiDarkmasterGandlingGUID = pCreature->GetGUID(); break; + case NPC_DARKMASTER_GANDLING: + m_uiDarkmasterGandlingGUID = pCreature->GetGUID(); + break; + case NPC_BONE_MINION: + GandlingEventMap::iterator find = m_mGandlingData.find(m_uiGandlingEvent); + if (find != m_mGandlingData.end()) + find->second.m_sAddGuids.insert(pCreature->GetGUIDLow()); + break; } } @@ -72,14 +69,15 @@ void instance_scholomance::OnObjectCreate(GameObject* pGo) { case GO_GATE_KIRTONOS: m_uiGateKirtonosGUID = pGo->GetGUID(); break; case GO_GATE_RAS: m_uiGateRasGUID = pGo->GetGUID(); break; - case GO_GATE_MALICIA: m_uiGateMiliciaGUID = pGo->GetGUID(); break; - case GO_GATE_THEOLEN: m_uiGateTheolenGUID = pGo->GetGUID(); break; - case GO_GATE_POLKELT: m_uiGatePolkeltGUID = pGo->GetGUID(); break; - case GO_GATE_RAVENIAN: m_uiGateRavenianGUID = pGo->GetGUID(); break; - case GO_GATE_BAROV: m_uiGateBarovGUID = pGo->GetGUID(); break; - case GO_GATE_ILLUCIA: m_uiGateIlluciaGUID = pGo->GetGUID(); break; case GO_GATE_GANDLING: m_uiGateGandlingGUID = pGo->GetGUID(); break; + case GO_GATE_MALICIA: m_mGandlingData[EVENT_ID_MALICIA].m_uiDoorGUID = pGo->GetGUID(); break; + case GO_GATE_THEOLEN: m_mGandlingData[EVENT_ID_THEOLEN].m_uiDoorGUID = pGo->GetGUID(); break; + case GO_GATE_POLKELT: m_mGandlingData[EVENT_ID_POLKELT].m_uiDoorGUID = pGo->GetGUID(); break; + case GO_GATE_RAVENIAN: m_mGandlingData[EVENT_ID_RAVENIAN].m_uiDoorGUID = pGo->GetGUID(); break; + case GO_GATE_BAROV: m_mGandlingData[EVENT_ID_BAROV].m_uiDoorGUID = pGo->GetGUID(); break; + case GO_GATE_ILLUCIA: m_mGandlingData[EVENT_ID_ILLUCIA].m_uiDoorGUID = pGo->GetGUID(); break; + case GO_VIEWING_ROOM_DOOR: // In normal flow of the instance, this door is opened by a dropped key if (m_auiEncounter[TYPE_RATTLEGORE] == DONE) @@ -106,34 +104,33 @@ void instance_scholomance::SetData(uint32 uiType, uint32 uiData) m_auiEncounter[uiType] = uiData; DoUseDoorOrButton(m_uiGateRasGUID); break; - case TYPE_MALICIA: + case TYPE_MALICIA: // TODO this code can be simplified, when it is known which event-ids correspond to which room m_auiEncounter[uiType] = uiData; - DoUseDoorOrButton(m_uiGateMiliciaGUID); + DoUseDoorOrButton(m_mGandlingData[EVENT_ID_MALICIA].m_uiDoorGUID); break; case TYPE_THEOLEN: m_auiEncounter[uiType] = uiData; - DoUseDoorOrButton(m_uiGateTheolenGUID); + DoUseDoorOrButton(m_mGandlingData[EVENT_ID_THEOLEN].m_uiDoorGUID); break; case TYPE_POLKELT: m_auiEncounter[uiType] = uiData; - DoUseDoorOrButton(m_uiGatePolkeltGUID); + DoUseDoorOrButton(m_mGandlingData[EVENT_ID_POLKELT].m_uiDoorGUID); break; case TYPE_RAVENIAN: m_auiEncounter[uiType] = uiData; - DoUseDoorOrButton(m_uiGateRavenianGUID); + DoUseDoorOrButton(m_mGandlingData[EVENT_ID_RAVENIAN].m_uiDoorGUID); break; case TYPE_ALEXEI_BAROV: m_auiEncounter[uiType] = uiData; - DoUseDoorOrButton(m_uiGateBarovGUID); + DoUseDoorOrButton(m_mGandlingData[EVENT_ID_BAROV].m_uiDoorGUID); break; case TYPE_ILLUCIA_BAROV: m_auiEncounter[uiType] = uiData; - DoUseDoorOrButton(m_uiGateIlluciaGUID); + DoUseDoorOrButton(m_mGandlingData[EVENT_ID_ILLUCIA].m_uiDoorGUID); break; case TYPE_GANDLING: m_auiEncounter[uiType] = uiData; // Close the door to main room, because the encounter will take place only in the main hall and random around all the 6 rooms - // The door to each of the room needs to be controlled by checking the summoned adds DoUseDoorOrButton(m_uiGateGandlingGUID); break; } @@ -149,7 +146,7 @@ void instance_scholomance::SetData(uint32 uiType, uint32 uiData) std::ostringstream saveStream; saveStream << m_auiEncounter[0] << " " << m_auiEncounter[1] << " " << m_auiEncounter[2] << " " << m_auiEncounter[3] << " " << m_auiEncounter[4] << " " << m_auiEncounter[5] << " " - << m_auiEncounter[6] << " " << m_auiEncounter[7] << " " << m_auiEncounter[8] << m_auiEncounter[9]; + << m_auiEncounter[6] << " " << m_auiEncounter[7] << " " << m_auiEncounter[8] << " " << m_auiEncounter[9]; m_strInstData = saveStream.str(); @@ -176,9 +173,42 @@ void instance_scholomance::DoSpawnGandlingIfCan(bool bByPlayerEnter) if (m_auiEncounter[TYPE_MALICIA] == DONE && m_auiEncounter[TYPE_THEOLEN] == DONE && m_auiEncounter[TYPE_POLKELT] == DONE && m_auiEncounter[TYPE_RAVENIAN] == DONE && m_auiEncounter[TYPE_ALEXEI_BAROV] == DONE && m_auiEncounter[TYPE_ILLUCIA_BAROV] == DONE) { - if (Creature* pGandling = pPlayer->SummonCreature(NPC_DARKMASTER_GANDLING, m_aGandlingSpawnLocs[0].m_fX, m_aGandlingSpawnLocs[0].m_fY, m_aGandlingSpawnLocs[0].m_fZ, m_aGandlingSpawnLocs[0].m_fO, TEMPSUMMON_DEAD_DESPAWN, 0)) + if (Creature* pGandling = pPlayer->SummonCreature(NPC_DARKMASTER_GANDLING, aGandlingSpawnLocs[0].m_fX, aGandlingSpawnLocs[0].m_fY, aGandlingSpawnLocs[0].m_fZ, aGandlingSpawnLocs[0].m_fO, TEMPSUMMON_DEAD_DESPAWN, 0)) + { if (!bByPlayerEnter) DoScriptText(SAY_GANDLING_SPAWN, pGandling); + } + } +} + +void instance_scholomance::HandlePortalEvent(uint32 uiEventId, uint32 uiData) +{ + GandlingEventMap::iterator find = m_mGandlingData.find(uiEventId); + if (find == m_mGandlingData.end()) + return; + + if (uiData == SPECIAL) + { + // Set current Event index + m_uiGandlingEvent = uiEventId; + + // Close door if needed + if (!find->second.m_bIsActive) + { + find->second.m_bIsActive = true; + DoUseDoorOrButton(find->second.m_uiDoorGUID); + } + } + // Toggle door and event state in case of state-switch + else + { + if (uiData == IN_PROGRESS && !find->second.m_bIsActive || + uiData == FAIL && find->second.m_bIsActive || + uiData == DONE && find->second.m_bIsActive) + { + find->second.m_bIsActive = !find->second.m_bIsActive; + DoUseDoorOrButton(find->second.m_uiDoorGUID); + } } } @@ -225,6 +255,22 @@ void instance_scholomance::OnCreatureEnterCombat(Creature* pCreature) case NPC_ALEXEI_BAROV: SetData(TYPE_ALEXEI_BAROV, IN_PROGRESS); break; case NPC_INSTRUCTOR_MALICIA: SetData(TYPE_MALICIA, IN_PROGRESS); break; case NPC_DARKMASTER_GANDLING: SetData(TYPE_GANDLING, IN_PROGRESS); break; + + case NPC_BONE_MINION: + for (GandlingEventMap::iterator itr = m_mGandlingData.begin(); itr != m_mGandlingData.end(); ++itr) + { + // if there are no minions for a room, skip it + if (!itr->second.m_sAddGuids.empty()) + { + // set data to fail in case of player death + if (itr->second.m_sAddGuids.find(pCreature->GetGUIDLow()) != itr->second.m_sAddGuids.end()) + { + HandlePortalEvent(itr->first, IN_PROGRESS); + break; + } + } + } + break; } } @@ -242,6 +288,22 @@ void instance_scholomance::OnCreatureEvade(Creature* pCreature) case NPC_ALEXEI_BAROV: SetData(TYPE_ALEXEI_BAROV, FAIL); break; case NPC_INSTRUCTOR_MALICIA: SetData(TYPE_MALICIA, FAIL); break; case NPC_DARKMASTER_GANDLING: SetData(TYPE_GANDLING, FAIL); break; + + case NPC_BONE_MINION: + for (GandlingEventMap::iterator itr = m_mGandlingData.begin(); itr != m_mGandlingData.end(); ++itr) + { + // if there are no minions for a room, skip it + if (!itr->second.m_sAddGuids.empty()) + { + // set data to fail in case of player death + if (itr->second.m_sAddGuids.find(pCreature->GetGUIDLow()) != itr->second.m_sAddGuids.end()) + { + HandlePortalEvent(itr->first, FAIL); + break; + } + } + } + break; } } @@ -259,6 +321,28 @@ void instance_scholomance::OnCreatureDeath(Creature* pCreature) case NPC_ALEXEI_BAROV: SetData(TYPE_ALEXEI_BAROV, DONE); break; case NPC_INSTRUCTOR_MALICIA: SetData(TYPE_MALICIA, DONE); break; case NPC_DARKMASTER_GANDLING: SetData(TYPE_GANDLING, DONE); break; + + case NPC_BONE_MINION: + for (GandlingEventMap::iterator itr = m_mGandlingData.begin(); itr != m_mGandlingData.end(); ++itr) + { + // if there are no minions for a room, skip it + if (!itr->second.m_sAddGuids.empty()) + { + // search for the dead minion and erase it + if (itr->second.m_sAddGuids.find(pCreature->GetGUIDLow()) != itr->second.m_sAddGuids.end()) + { + itr->second.m_sAddGuids.erase(pCreature->GetGUIDLow()); + + // if the current list is empty; set event id as done + if (itr->second.m_sAddGuids.empty()) + { + HandlePortalEvent(itr->first, DONE); + break; + } + } + } + } + break; } } @@ -267,6 +351,28 @@ InstanceData* GetInstanceData_instance_scholomance(Map* pMap) return new instance_scholomance(pMap); } +bool ProcessEventId_event_spell_gandling_shadow_portal(uint32 uiEventId, Object* pSource, Object* pTarget, bool bIsStart) +{ + if (pSource->GetTypeId() == TYPEID_UNIT) + { + if (instance_scholomance* pInstance = (instance_scholomance*)((Creature*)pSource)->GetInstanceData()) + { + // Check if we are handling an event associated with the room events of gandling + for (uint8 i = 0; i < MAX_EVENTS; ++i) + { + if (uiEventId == aGandlingEvents[i]) + { + // Set data in progress for the current event and store current event + pInstance->HandlePortalEvent(uiEventId, SPECIAL); + // return false, to allow the DB-scripts to summon some NPCSs + return false; + } + } + } + } + return false; +} + void AddSC_instance_scholomance() { Script* pNewScript; @@ -275,4 +381,9 @@ void AddSC_instance_scholomance() pNewScript->Name = "instance_scholomance"; pNewScript->GetInstanceData = &GetInstanceData_instance_scholomance; pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "event_spell_gandling_shadow_portal"; + pNewScript->pProcessEventId = &ProcessEventId_event_spell_gandling_shadow_portal; + pNewScript->RegisterSelf(); } diff --git a/scripts/eastern_kingdoms/scholomance/scholomance.h b/scripts/eastern_kingdoms/scholomance/scholomance.h index 4217ce1..d0fe4c7 100644 --- a/scripts/eastern_kingdoms/scholomance/scholomance.h +++ b/scripts/eastern_kingdoms/scholomance/scholomance.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ @@ -8,6 +8,7 @@ enum { MAX_ENCOUNTER = 10, + MAX_EVENTS = 6, TYPE_KIRTONOS = 0, TYPE_RATTLEGORE = 1, @@ -30,6 +31,7 @@ enum NPC_ALEXEI_BAROV = 10504, NPC_INSTRUCTOR_MALICIA = 10505, NPC_DARKMASTER_GANDLING = 1853, + NPC_BONE_MINION = 16119, // summoned in random rooms by gandling GO_GATE_KIRTONOS = 175570, GO_VIEWING_ROOM_DOOR = 175167, // Must be opened in reload case @@ -42,19 +44,40 @@ enum GO_GATE_ILLUCIA = 177371, GO_GATE_GANDLING = 177374, + // Because the shadow portal teleport coordinates are guesswork (taken from old script) these IDs might be randomized + // TODO Syncronise with correct DB coordinates when they will be known + EVENT_ID_POLKELT = 5618, + EVENT_ID_THEOLEN = 5619, + EVENT_ID_MALICIA = 5620, + EVENT_ID_ILLUCIA = 5621, + EVENT_ID_BAROV = 5622, + EVENT_ID_RAVENIAN = 5623, + SAY_GANDLING_SPAWN = -1289000, }; -struct sSpawnLocation +struct SpawnLocation { float m_fX, m_fY, m_fZ, m_fO; }; -static const sSpawnLocation m_aGandlingSpawnLocs[1] = +static const SpawnLocation aGandlingSpawnLocs[1] = { {180.73f, -9.43856f, 75.507f, 1.61399f} }; +struct GandlingEventData +{ + GandlingEventData() : m_bIsActive(false), m_uiDoorGUID(0) {} + bool m_bIsActive; + uint64 m_uiDoorGUID; + std::set m_sAddGuids; +}; + +static const uint32 aGandlingEvents[MAX_EVENTS] = {EVENT_ID_POLKELT, EVENT_ID_THEOLEN, EVENT_ID_MALICIA, EVENT_ID_ILLUCIA, EVENT_ID_BAROV, EVENT_ID_RAVENIAN}; + +typedef std::map GandlingEventMap; + class MANGOS_DLL_DECL instance_scholomance : public ScriptedInstance { public: @@ -71,6 +94,8 @@ class MANGOS_DLL_DECL instance_scholomance : public ScriptedInstance void OnObjectCreate(GameObject* pGo); void OnPlayerEnter(Player* pPlayer); + void HandlePortalEvent(uint32 uiEventId, uint32 uiData); + void SetData(uint32 uiType, uint32 uiData); uint32 GetData(uint32 uiType); @@ -87,13 +112,10 @@ class MANGOS_DLL_DECL instance_scholomance : public ScriptedInstance uint64 m_uiGateKirtonosGUID; uint64 m_uiGateRasGUID; - uint64 m_uiGateMiliciaGUID; - uint64 m_uiGateTheolenGUID; - uint64 m_uiGatePolkeltGUID; - uint64 m_uiGateRavenianGUID; - uint64 m_uiGateBarovGUID; - uint64 m_uiGateIlluciaGUID; uint64 m_uiGateGandlingGUID; + + uint32 m_uiGandlingEvent; + GandlingEventMap m_mGandlingData; }; #endif diff --git a/scripts/eastern_kingdoms/searing_gorge.cpp b/scripts/eastern_kingdoms/searing_gorge.cpp index 338a88b..427da62 100644 --- a/scripts/eastern_kingdoms/searing_gorge.cpp +++ b/scripts/eastern_kingdoms/searing_gorge.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/scripts/eastern_kingdoms/shadowfang_keep/boss_hummel.cpp b/scripts/eastern_kingdoms/shadowfang_keep/boss_hummel.cpp index c05da40..38c2dd3 100644 --- a/scripts/eastern_kingdoms/shadowfang_keep/boss_hummel.cpp +++ b/scripts/eastern_kingdoms/shadowfang_keep/boss_hummel.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/scripts/eastern_kingdoms/shadowfang_keep/instance_shadowfang_keep.cpp b/scripts/eastern_kingdoms/shadowfang_keep/instance_shadowfang_keep.cpp index 0b15784..a3a4990 100644 --- a/scripts/eastern_kingdoms/shadowfang_keep/instance_shadowfang_keep.cpp +++ b/scripts/eastern_kingdoms/shadowfang_keep/instance_shadowfang_keep.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/scripts/eastern_kingdoms/shadowfang_keep/shadowfang_keep.cpp b/scripts/eastern_kingdoms/shadowfang_keep/shadowfang_keep.cpp index c0f3ed5..8096cf2 100644 --- a/scripts/eastern_kingdoms/shadowfang_keep/shadowfang_keep.cpp +++ b/scripts/eastern_kingdoms/shadowfang_keep/shadowfang_keep.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or @@ -515,7 +515,7 @@ struct MANGOS_DLL_DECL boss_arugalAI : public ScriptedAI Creature *pVoidwalker, *pLeader; pVoidwalker = pLeader = NULL; - for(uint8 i = 0; i < 4; i++) + for(uint8 i = 0; i < 4; ++i) { pVoidwalker = m_creature->SummonCreature(NPC_VOIDWALKER,VWSpawns[i].fX, VWSpawns[i].fY, VWSpawns[i].fZ, VWSpawns[i].fO, TEMPSUMMON_DEAD_DESPAWN, 1); @@ -527,7 +527,7 @@ struct MANGOS_DLL_DECL boss_arugalAI : public ScriptedAI pLeader = pVoidwalker; if (mob_arugal_voidwalkerAI* pVoidwalkerAI = dynamic_cast(pVoidwalker->AI())) - pVoidwalkerAI->SetPosition(i,pLeader); + pVoidwalkerAI->SetPosition(i, pLeader); pVoidwalker = NULL; } diff --git a/scripts/eastern_kingdoms/shadowfang_keep/shadowfang_keep.h b/scripts/eastern_kingdoms/shadowfang_keep/shadowfang_keep.h index bf1e98e..8f3b175 100644 --- a/scripts/eastern_kingdoms/shadowfang_keep/shadowfang_keep.h +++ b/scripts/eastern_kingdoms/shadowfang_keep/shadowfang_keep.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/scripts/eastern_kingdoms/silvermoon_city.cpp b/scripts/eastern_kingdoms/silvermoon_city.cpp index 05cfad9..3d34625 100644 --- a/scripts/eastern_kingdoms/silvermoon_city.cpp +++ b/scripts/eastern_kingdoms/silvermoon_city.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/scripts/eastern_kingdoms/stormwind_city.cpp b/scripts/eastern_kingdoms/stormwind_city.cpp index 3aa4689..943bc1d 100644 --- a/scripts/eastern_kingdoms/stormwind_city.cpp +++ b/scripts/eastern_kingdoms/stormwind_city.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/scripts/eastern_kingdoms/stranglethorn_vale.cpp b/scripts/eastern_kingdoms/stranglethorn_vale.cpp index fd8248a..de71947 100644 --- a/scripts/eastern_kingdoms/stranglethorn_vale.cpp +++ b/scripts/eastern_kingdoms/stranglethorn_vale.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or @@ -55,7 +55,7 @@ struct MANGOS_DLL_DECL mob_yennikuAI : public ScriptedAI void Reset() { Reset_Timer = 0; - m_creature->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_STATE_NONE); + m_creature->HandleEmote(EMOTE_STATE_NONE); } void SpellHit(Unit *caster, const SpellEntry *spell) @@ -65,7 +65,7 @@ struct MANGOS_DLL_DECL mob_yennikuAI : public ScriptedAI //Yenniku's Release if (!bReset && ((Player*)caster)->GetQuestStatus(592) == QUEST_STATUS_INCOMPLETE && spell->Id == 3607) { - m_creature->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_STATE_STUN); + m_creature->HandleEmote(EMOTE_STATE_STUN); m_creature->CombatStop(); //stop combat m_creature->DeleteThreatList(); //unsure of this m_creature->setFaction(83); //horde generic @@ -91,7 +91,7 @@ struct MANGOS_DLL_DECL mob_yennikuAI : public ScriptedAI else Reset_Timer -= diff; //Return since we have no target - if (!m_creature->SelectHostileTarget() || !m_creature->getVictim() ) + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; DoMeleeAttackIfReady(); diff --git a/scripts/eastern_kingdoms/stratholme/boss_baron_rivendare.cpp b/scripts/eastern_kingdoms/stratholme/boss_baron_rivendare.cpp index 88069b1..12e3d5b 100644 --- a/scripts/eastern_kingdoms/stratholme/boss_baron_rivendare.cpp +++ b/scripts/eastern_kingdoms/stratholme/boss_baron_rivendare.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or @@ -24,56 +24,21 @@ EndScriptData */ #include "precompiled.h" #include "stratholme.h" -#define SAY_0 "Intruders! More pawns of the Argent Dawn, no doubt. I already count one of their number among my prisoners. Withdraw from my domain before she is executed!" -#define SAY_1 "You're still here? Your foolishness is amusing! The Argent Dawn wench needn't suffer in vain. Leave at once and she shall be spared!" -#define SAY_2 "I shall take great pleasure in taking this poor wretch's life! It's not too late, she needn't suffer in vain. Turn back and her death shall be merciful!" -#define SAY_3 "May this prisoner's death serve as a warning. None shall defy the Scourge and live!" -#define SAY_4 "So you see fit to toy with the Lich King's creations? Ramstein, be sure to give the intruders a proper greeting." -#define SAY_5 "Time to take matters into my own hands. Come. Enter my domain and challenge the might of the Scourge!" - -#define ADD_1X 4017.403809f -#define ADD_1Y -3339.703369f -#define ADD_1Z 115.057655f -#define ADD_1O 5.487860f - -#define ADD_2X 4013.189209f -#define ADD_2Y -3351.808350f -#define ADD_2Z 115.052254f -#define ADD_2O 0.134280f - -#define ADD_3X 4017.738037f -#define ADD_3Y -3363.478016f -#define ADD_3Z 115.057274f -#define ADD_3O 0.723313f - -#define ADD_4X 4048.877197f -#define ADD_4Y -3363.223633f -#define ADD_4Z 115.054253f -#define ADD_4O 3.627735f - -#define ADD_5X 4051.777588f -#define ADD_5Y -3350.893311f -#define ADD_5Z 115.055351f -#define ADD_5O 3.066176f - -#define ADD_6X 4048.375977f -#define ADD_6Y -3339.966309f -#define ADD_6Z 115.055222f -#define ADD_6O 2.457497f - -#define SPELL_SHADOWBOLT 17393 -#define SPELL_CLEAVE 15284 -#define SPELL_MORTALSTRIKE 15708 - -#define SPELL_UNHOLY_AURA 17467 -#define SPELL_RAISEDEAD 17473 //triggers death pact (17471) - -#define SPELL_RAISE_DEAD1 17475 -#define SPELL_RAISE_DEAD2 17476 -#define SPELL_RAISE_DEAD3 17477 -#define SPELL_RAISE_DEAD4 17478 -#define SPELL_RAISE_DEAD5 17479 -#define SPELL_RAISE_DEAD6 17480 +enum +{ + SPELL_SHADOW_BOLT = 17393, + SPELL_CLEAVE = 15284, + SPELL_MORTAL_STRIKE = 15708, + + SPELL_RAISE_DEAD = 17473, //triggers death pact (17471) + + SPELL_RAISE_DEAD_1 = 17475, + SPELL_RAISE_DEAD_2 = 17476, + SPELL_RAISE_DEAD_3 = 17477, + SPELL_RAISE_DEAD_4 = 17478, + SPELL_RAISE_DEAD_5 = 17479, + SPELL_RAISE_DEAD_6 = 17480 +}; struct MANGOS_DLL_DECL boss_baron_rivendareAI : public ScriptedAI { @@ -85,86 +50,81 @@ struct MANGOS_DLL_DECL boss_baron_rivendareAI : public ScriptedAI ScriptedInstance* m_pInstance; - uint32 ShadowBolt_Timer; - uint32 Cleave_Timer; - uint32 MortalStrike_Timer; - //uint32 RaiseDead_Timer; - uint32 SummonSkeletons_Timer; - Creature *Summoned; + uint32 m_uiShadowBoltTimer; + uint32 m_uiCleaveTimer; + uint32 m_uiMortalStrikeTimer; + uint32 m_uiRaiseDeadTimer; void Reset() { - ShadowBolt_Timer = 5000; - Cleave_Timer = 8000; - MortalStrike_Timer = 12000; - //RaiseDead_Timer = 30000; - SummonSkeletons_Timer = 34000; - } - - void Aggro(Unit *who) - { - if (m_pInstance) - m_pInstance->SetData(TYPE_BARON,IN_PROGRESS); + m_uiShadowBoltTimer = 5000; + m_uiCleaveTimer = 8000; + m_uiMortalStrikeTimer = 12000; + m_uiRaiseDeadTimer = 30000; } - void JustSummoned(Creature* summoned) + void JustSummoned(Creature* pSummoned) { - if (Unit* target = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM,0)) - summoned->AI()->AttackStart(target); + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) + pSummoned->AI()->AttackStart(pTarget); } - void JustDied(Unit* Killer) + void SpellHit(Unit* pWho, const SpellEntry* pSpell) { - if (m_pInstance) - m_pInstance->SetData(TYPE_BARON,DONE); + if (pSpell->Id == SPELL_RAISE_DEAD) + { + DoCastSpellIfCan(m_creature, SPELL_RAISE_DEAD_1, CAST_TRIGGERED); + DoCastSpellIfCan(m_creature, SPELL_RAISE_DEAD_2, CAST_TRIGGERED); + DoCastSpellIfCan(m_creature, SPELL_RAISE_DEAD_3, CAST_TRIGGERED); + DoCastSpellIfCan(m_creature, SPELL_RAISE_DEAD_4, CAST_TRIGGERED); + DoCastSpellIfCan(m_creature, SPELL_RAISE_DEAD_5, CAST_TRIGGERED); + DoCastSpellIfCan(m_creature, SPELL_RAISE_DEAD_6, CAST_TRIGGERED); + } } - void UpdateAI(const uint32 diff) + void UpdateAI(const uint32 uiDiff) { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; - //ShadowBolt - if (ShadowBolt_Timer < diff) + // ShadowBolt + if (m_uiShadowBoltTimer < uiDiff) { - if (Unit* target = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) - DoCastSpellIfCan(m_creature->getVictim(),SPELL_SHADOWBOLT); - ShadowBolt_Timer = 10000; - }else ShadowBolt_Timer -= diff; - - //Cleave - if (Cleave_Timer < diff) + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) + { + if (DoCastSpellIfCan(pTarget, SPELL_SHADOW_BOLT) == CAST_OK) + m_uiShadowBoltTimer = 10000; + } + } + else + m_uiShadowBoltTimer -= uiDiff; + + // Cleave + if (m_uiCleaveTimer < uiDiff) { - DoCastSpellIfCan(m_creature->getVictim(),SPELL_CLEAVE); - Cleave_Timer = urand(7000, 17000); - }else Cleave_Timer -= diff; - - //MortalStrike - if (MortalStrike_Timer < diff) + if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_CLEAVE) == CAST_OK) + m_uiCleaveTimer = urand(7000, 17000); + } + else + m_uiCleaveTimer -= uiDiff; + + // MortalStrike + if (m_uiMortalStrikeTimer < uiDiff) { - DoCastSpellIfCan(m_creature->getVictim(),SPELL_MORTALSTRIKE); - MortalStrike_Timer = urand(10000, 25000); - }else MortalStrike_Timer -= diff; - - //RaiseDead - //if (RaiseDead_Timer < diff) - //{ - // DoCastSpellIfCan(m_creature,SPELL_RAISEDEAD); - // RaiseDead_Timer = 45000; - //}else RaiseDead_Timer -= diff; - - //SummonSkeletons - if (SummonSkeletons_Timer < diff) + if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_MORTAL_STRIKE) == CAST_OK) + m_uiMortalStrikeTimer = urand(10000, 25000); + } + else + m_uiMortalStrikeTimer -= uiDiff; + + // RaiseDead + if (m_uiRaiseDeadTimer < uiDiff) { - m_creature->SummonCreature(11197,ADD_1X,ADD_1Y,ADD_1Z,ADD_1O,TEMPSUMMON_TIMED_DESPAWN,29000); - m_creature->SummonCreature(11197,ADD_2X,ADD_2Y,ADD_2Z,ADD_2O,TEMPSUMMON_TIMED_DESPAWN,29000); - m_creature->SummonCreature(11197,ADD_3X,ADD_3Y,ADD_3Z,ADD_3O,TEMPSUMMON_TIMED_DESPAWN,29000); - m_creature->SummonCreature(11197,ADD_4X,ADD_4Y,ADD_4Z,ADD_4O,TEMPSUMMON_TIMED_DESPAWN,29000); - m_creature->SummonCreature(11197,ADD_5X,ADD_5Y,ADD_5Z,ADD_5O,TEMPSUMMON_TIMED_DESPAWN,29000); - m_creature->SummonCreature(11197,ADD_6X,ADD_6Y,ADD_6Z,ADD_6O,TEMPSUMMON_TIMED_DESPAWN,29000); - - SummonSkeletons_Timer = 40000; - }else SummonSkeletons_Timer -= diff; + if (DoCastSpellIfCan(m_creature, SPELL_RAISE_DEAD) == CAST_OK) + m_uiRaiseDeadTimer = 45000; + } + else + m_uiRaiseDeadTimer -= uiDiff; DoMeleeAttackIfReady(); } @@ -177,9 +137,10 @@ CreatureAI* GetAI_boss_baron_rivendare(Creature* pCreature) void AddSC_boss_baron_rivendare() { - Script *newscript; - newscript = new Script; - newscript->Name = "boss_baron_rivendare"; - newscript->GetAI = &GetAI_boss_baron_rivendare; - newscript->RegisterSelf(); + Script* pNewScript; + + pNewScript = new Script; + pNewScript->Name = "boss_baron_rivendare"; + pNewScript->GetAI = &GetAI_boss_baron_rivendare; + pNewScript->RegisterSelf(); } diff --git a/scripts/eastern_kingdoms/stratholme/boss_baroness_anastari.cpp b/scripts/eastern_kingdoms/stratholme/boss_baroness_anastari.cpp index 4153c2d..3a8c900 100644 --- a/scripts/eastern_kingdoms/stratholme/boss_baroness_anastari.cpp +++ b/scripts/eastern_kingdoms/stratholme/boss_baroness_anastari.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or @@ -52,12 +52,6 @@ struct MANGOS_DLL_DECL boss_baroness_anastariAI : public ScriptedAI //Possess_Timer = 35000; } - void JustDied(Unit* Killer) - { - if (m_pInstance) - m_pInstance->SetData(TYPE_BARONESS, DONE); - } - void UpdateAI(const uint32 diff) { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) diff --git a/scripts/eastern_kingdoms/stratholme/boss_cannon_master_willey.cpp b/scripts/eastern_kingdoms/stratholme/boss_cannon_master_willey.cpp index c01d046..1440f77 100644 --- a/scripts/eastern_kingdoms/stratholme/boss_cannon_master_willey.cpp +++ b/scripts/eastern_kingdoms/stratholme/boss_cannon_master_willey.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/scripts/eastern_kingdoms/stratholme/boss_dathrohan_balnazzar.cpp b/scripts/eastern_kingdoms/stratholme/boss_dathrohan_balnazzar.cpp index 034723a..cf035a7 100644 --- a/scripts/eastern_kingdoms/stratholme/boss_dathrohan_balnazzar.cpp +++ b/scripts/eastern_kingdoms/stratholme/boss_dathrohan_balnazzar.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or @@ -25,6 +25,10 @@ EndScriptData */ enum { + SAY_AGGRO = -1329016, + SAY_TRANSFORM = -1329017, + SAY_DEATH = -1329018, + //Dathrohan spells SPELL_CRUSADERSHAMMER = 17286, //AOE stun SPELL_CRUSADERSTRIKE = 17281, @@ -42,25 +46,31 @@ enum NPC_DATHROHAN = 10812, NPC_BALNAZZAR = 10813, - NPC_ZOMBIE = 10698 //probably incorrect + NPC_SKELETAL_GUARDIAN = 10390, + NPC_SKELETAL_BERSERKER = 10391 }; struct SummonDef { + uint32 m_uiEntry; float m_fX, m_fY, m_fZ, m_fOrient; }; SummonDef m_aSummonPoint[]= { - {3444.156f, -3090.626f, 135.002f, 2.240f}, //G1 front, left - {3449.123f, -3087.009f, 135.002f, 2.240f}, //G1 front, right - {3446.246f, -3093.466f, 135.002f, 2.240f}, //G1 back left - {3451.160f, -3089.904f, 135.002f, 2.240f}, //G1 back, right - - {3457.995f, -3080.916f, 135.002f, 3.784f}, //G2 front, left - {3454.302f, -3076.330f, 135.002f, 3.784f}, //G2 front, right - {3460.975f, -3078.901f, 135.002f, 3.784f}, //G2 back left - {3457.338f, -3073.979f, 135.002f, 3.784f} //G2 back, right + {NPC_SKELETAL_BERSERKER, 3460.356f, -3070.572f, 135.086f, 0.332f}, + {NPC_SKELETAL_BERSERKER, 3465.289f, -3069.987f, 135.086f, 5.480f}, + {NPC_SKELETAL_BERSERKER, 3463.616f, -3074.912f, 135.086f, 5.009f}, + + {NPC_SKELETAL_GUARDIAN, 3460.012f, -3076.041f, 135.086f, 1.187f}, + {NPC_SKELETAL_GUARDIAN, 3467.909f, -3076.401f, 135.086f, 3.770f}, + + {NPC_SKELETAL_BERSERKER, 3509.269f, -3066.474f, 135.080f, 4.817f}, + {NPC_SKELETAL_BERSERKER, 3510.966f, -3069.011f, 135.080f, 3.491f}, + + {NPC_SKELETAL_GUARDIAN, 3516.042f, -3066.873f, 135.080f, 3.997f}, + {NPC_SKELETAL_GUARDIAN, 3513.561f, -3063.027f, 135.080f, 2.356f}, + {NPC_SKELETAL_GUARDIAN, 3518.825f, -3060.926f, 135.080f, 3.944f} }; struct MANGOS_DLL_DECL boss_dathrohan_balnazzarAI : public ScriptedAI @@ -94,12 +104,19 @@ struct MANGOS_DLL_DECL boss_dathrohan_balnazzarAI : public ScriptedAI } + void Aggro(Unit* pWho) + { + DoScriptText(SAY_AGGRO, m_creature); + } + void JustDied(Unit* Victim) { + DoScriptText(SAY_DEATH, m_creature); + static uint32 uiCount = sizeof(m_aSummonPoint)/sizeof(SummonDef); - for (uint8 i=0; iSummonCreature(NPC_ZOMBIE, + for (uint32 i = 0; i < uiCount; ++i) + m_creature->SummonCreature(m_aSummonPoint[i].m_uiEntry, m_aSummonPoint[i].m_fX, m_aSummonPoint[i].m_fY, m_aSummonPoint[i].m_fZ, m_aSummonPoint[i].m_fOrient, TEMPSUMMON_TIMED_DESPAWN, HOUR*IN_MILLISECONDS); } @@ -143,13 +160,13 @@ struct MANGOS_DLL_DECL boss_dathrohan_balnazzarAI : public ScriptedAI //BalnazzarTransform if (m_creature->GetHealthPercent() < 40.0f) { - if (m_creature->IsNonMeleeSpellCasted(false)) - m_creature->InterruptNonMeleeSpells(false); - //restore hp, mana and stun - DoCastSpellIfCan(m_creature,SPELL_BALNAZZARTRANSFORM); - m_creature->UpdateEntry(NPC_BALNAZZAR); - m_bTransformed = true; + if (DoCastSpellIfCan(m_creature, SPELL_BALNAZZARTRANSFORM) == CAST_OK) + { + m_creature->UpdateEntry(NPC_BALNAZZAR); + DoScriptText(SAY_TRANSFORM, m_creature); + m_bTransformed = true; + } } } else diff --git a/scripts/eastern_kingdoms/stratholme/boss_magistrate_barthilas.cpp b/scripts/eastern_kingdoms/stratholme/boss_magistrate_barthilas.cpp index d7d2017..084eec3 100644 --- a/scripts/eastern_kingdoms/stratholme/boss_magistrate_barthilas.cpp +++ b/scripts/eastern_kingdoms/stratholme/boss_magistrate_barthilas.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/scripts/eastern_kingdoms/stratholme/boss_maleki_the_pallid.cpp b/scripts/eastern_kingdoms/stratholme/boss_maleki_the_pallid.cpp index 4c7030a..570a608 100644 --- a/scripts/eastern_kingdoms/stratholme/boss_maleki_the_pallid.cpp +++ b/scripts/eastern_kingdoms/stratholme/boss_maleki_the_pallid.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or @@ -52,12 +52,6 @@ struct MANGOS_DLL_DECL boss_maleki_the_pallidAI : public ScriptedAI DrainLife_Timer = 31000; } - void JustDied(Unit* Killer) - { - if (m_pInstance) - m_pInstance->SetData(TYPE_PALLID, DONE); - } - void UpdateAI(const uint32 diff) { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) diff --git a/scripts/eastern_kingdoms/stratholme/boss_nerubenkan.cpp b/scripts/eastern_kingdoms/stratholme/boss_nerubenkan.cpp index d649b7f..8866af0 100644 --- a/scripts/eastern_kingdoms/stratholme/boss_nerubenkan.cpp +++ b/scripts/eastern_kingdoms/stratholme/boss_nerubenkan.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or @@ -78,12 +78,6 @@ struct MANGOS_DLL_DECL boss_nerubenkanAI : public ScriptedAI Summoned->AI()->AttackStart(victim); } - void JustDied(Unit* Killer) - { - if (m_pInstance) - m_pInstance->SetData(TYPE_NERUB, DONE); - } - void UpdateAI(const uint32 diff) { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) diff --git a/scripts/eastern_kingdoms/stratholme/boss_order_of_silver_hand.cpp b/scripts/eastern_kingdoms/stratholme/boss_order_of_silver_hand.cpp index 3efa595..2d10906 100644 --- a/scripts/eastern_kingdoms/stratholme/boss_order_of_silver_hand.cpp +++ b/scripts/eastern_kingdoms/stratholme/boss_order_of_silver_hand.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or @@ -105,7 +105,7 @@ struct MANGOS_DLL_DECL boss_silver_hand_bossesAI : public ScriptedAI break; } if (m_pInstance->GetData(TYPE_SH_QUEST) && Killer->GetTypeId() == TYPEID_PLAYER) - ((Player*)Killer)->KilledMonsterCredit(SH_QUEST_CREDIT,m_creature->GetGUID()); + ((Player*)Killer)->KilledMonsterCredit(SH_QUEST_CREDIT, m_creature->GetObjectGuid()); } } diff --git a/scripts/eastern_kingdoms/stratholme/boss_postmaster_malown.cpp b/scripts/eastern_kingdoms/stratholme/boss_postmaster_malown.cpp index 489334d..1fa2153 100644 --- a/scripts/eastern_kingdoms/stratholme/boss_postmaster_malown.cpp +++ b/scripts/eastern_kingdoms/stratholme/boss_postmaster_malown.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/scripts/eastern_kingdoms/stratholme/boss_ramstein_the_gorger.cpp b/scripts/eastern_kingdoms/stratholme/boss_ramstein_the_gorger.cpp index 9d95bf2..916eff2 100644 --- a/scripts/eastern_kingdoms/stratholme/boss_ramstein_the_gorger.cpp +++ b/scripts/eastern_kingdoms/stratholme/boss_ramstein_the_gorger.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or @@ -27,8 +27,6 @@ EndScriptData */ #define SPELL_TRAMPLE 5568 #define SPELL_KNOCKOUT 17307 -#define C_MINDLESS_UNDEAD 11030 - struct MANGOS_DLL_DECL boss_ramstein_the_gorgerAI : public ScriptedAI { boss_ramstein_the_gorgerAI(Creature* pCreature) : ScriptedAI(pCreature) @@ -48,15 +46,6 @@ struct MANGOS_DLL_DECL boss_ramstein_the_gorgerAI : public ScriptedAI Knockout_Timer = 12000; } - void JustDied(Unit* Killer) - { - for(uint8 i = 0; i < 30; ++i) - m_creature->SummonCreature(C_MINDLESS_UNDEAD, 3969.35f, -3391.87f, 119.11f, 5.91f, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN,1800000); - - if (m_pInstance) - m_pInstance->SetData(TYPE_RAMSTEIN,DONE); - } - void UpdateAI(const uint32 diff) { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) diff --git a/scripts/eastern_kingdoms/stratholme/boss_timmy_the_cruel.cpp b/scripts/eastern_kingdoms/stratholme/boss_timmy_the_cruel.cpp index fd95078..60be051 100644 --- a/scripts/eastern_kingdoms/stratholme/boss_timmy_the_cruel.cpp +++ b/scripts/eastern_kingdoms/stratholme/boss_timmy_the_cruel.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/scripts/eastern_kingdoms/stratholme/instance_stratholme.cpp b/scripts/eastern_kingdoms/stratholme/instance_stratholme.cpp index d10bf47..6e93a80 100644 --- a/scripts/eastern_kingdoms/stratholme/instance_stratholme.cpp +++ b/scripts/eastern_kingdoms/stratholme/instance_stratholme.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or @@ -16,8 +16,8 @@ /* ScriptData SDName: Instance_Stratholme -SD%Complete: 50 -SDComment: In progress. Undead side 80% implemented, wipe support for doors at slaughterhouse needed, event needs better implementation +SD%Complete: 70 +SDComment: Undead side 90% implemented, event needs better implementation, Barthildas relocation for reload case is missing, Baron Combat handling is buggy. SDCategory: Stratholme EndScriptData */ @@ -26,15 +26,21 @@ EndScriptData */ instance_stratholme::instance_stratholme(Map* pMap) : ScriptedInstance(pMap), m_uiBaronRunTimer(0), + m_uiBarthilasRunTimer(0), + m_uiMindlessSummonTimer(0), m_uiSlaugtherSquareTimer(0), + m_uiYellCounter(0), + m_uiMindlessCount(0), m_uiServiceEntranceGUID(0), m_uiGauntletGate1GUID(0), m_uiPortGauntletGUID(0), m_uiPortSlaugtherGUID(0), m_uiPortElderGUID(0), + m_uiPortSlaughterGateGUID(0), m_auiRamsteinDoorGUID(0), m_auiRivendareDoorGUID(0), + m_uiYsidaCageGUID(0), m_uiBaronGUID(0), m_uiYsidaTriggerGUID(0), @@ -44,7 +50,6 @@ instance_stratholme::instance_stratholme(Map* pMap) : ScriptedInstance(pMap), Initialize(); } - void instance_stratholme::Initialize() { memset(&m_auiEncounter, 0, sizeof(m_auiEncounter)); @@ -59,17 +64,19 @@ void instance_stratholme::Initialize() bool instance_stratholme::StartSlaugtherSquare() { - if (m_auiEncounter[1] == SPECIAL && m_auiEncounter[2] == SPECIAL && m_auiEncounter[3] == SPECIAL) + if (m_auiEncounter[TYPE_BARONESS] == SPECIAL && m_auiEncounter[TYPE_NERUB] == SPECIAL && m_auiEncounter[TYPE_PALLID] == SPECIAL) { if (Creature* pBaron = instance->GetCreature(m_uiBaronGUID)) DoScriptText(SAY_ANNOUNCE_RIVENDARE, pBaron); DoUseDoorOrButton(m_uiPortGauntletGUID); DoUseDoorOrButton(m_uiPortSlaugtherGUID); + + debug_log("SD2: Instance Stratholme: Open slaugther square."); + return true; } - debug_log("SD2: Instance Stratholme: Cannot open slaugther square yet."); return false; } @@ -83,6 +90,7 @@ void instance_stratholme::OnCreatureCreate(Creature* pCreature) case NPC_ABOM_BILE: case NPC_ABOM_VENOM: m_sAbomnationGUID.insert(pCreature->GetGUID()); break; case NPC_THUZADIN_ACOLYTE: m_luiAcolyteGUIDs.push_back(pCreature->GetGUID()); break; + case NPC_BARTHILAS: m_uiBarthilasGUID = pCreature->GetGUID(); break; } } @@ -101,55 +109,68 @@ void instance_stratholme::OnObjectCreate(GameObject* pGo) break; case GO_ZIGGURAT_DOOR_1: m_auiZigguratGUID[0] = pGo->GetGUID(); - if (m_auiEncounter[1] == DONE || m_auiEncounter[1] == SPECIAL) + if (m_auiEncounter[TYPE_BARONESS] == DONE || m_auiEncounter[TYPE_BARONESS] == SPECIAL) pGo->SetGoState(GO_STATE_ACTIVE); break; case GO_ZIGGURAT_DOOR_2: m_auiZigguratGUID[1] = pGo->GetGUID(); - if (m_auiEncounter[2] == DONE || m_auiEncounter[2] == SPECIAL) + if (m_auiEncounter[TYPE_NERUB] == DONE || m_auiEncounter[TYPE_NERUB] == SPECIAL) pGo->SetGoState(GO_STATE_ACTIVE); break; case GO_ZIGGURAT_DOOR_3: m_auiZigguratGUID[2] = pGo->GetGUID(); - if (m_auiEncounter[3] == DONE || m_auiEncounter[3] == SPECIAL) + if (m_auiEncounter[TYPE_PALLID] == DONE || m_auiEncounter[TYPE_PALLID] == SPECIAL) pGo->SetGoState(GO_STATE_ACTIVE); break; case GO_ZIGGURAT_DOOR_4: m_auiRamsteinDoorGUID = pGo->GetGUID(); - if (m_auiEncounter[4] == DONE) + if (m_auiEncounter[TYPE_RAMSTEIN] == DONE) pGo->SetGoState(GO_STATE_ACTIVE); break; case GO_ZIGGURAT_DOOR_5: m_auiRivendareDoorGUID = pGo->GetGUID(); - if (m_auiEncounter[4] == DONE) + if (m_auiEncounter[TYPE_RAMSTEIN] == DONE) pGo->SetGoState(GO_STATE_ACTIVE); break; case GO_PORT_GAUNTLET: m_uiPortGauntletGUID = pGo->GetGUID(); - if (m_auiEncounter[1] == SPECIAL && m_auiEncounter[2] == SPECIAL && m_auiEncounter[3] == SPECIAL) + if (m_auiEncounter[TYPE_BARONESS] == SPECIAL && m_auiEncounter[TYPE_NERUB] == SPECIAL && m_auiEncounter[TYPE_PALLID] == SPECIAL) pGo->SetGoState(GO_STATE_ACTIVE); break; case GO_PORT_SLAUGTHER: m_uiPortSlaugtherGUID = pGo->GetGUID(); - if (m_auiEncounter[1] == SPECIAL && m_auiEncounter[2] == SPECIAL && m_auiEncounter[3] == SPECIAL) + if (m_auiEncounter[TYPE_BARONESS] == SPECIAL && m_auiEncounter[TYPE_NERUB] == SPECIAL && m_auiEncounter[TYPE_PALLID] == SPECIAL) + pGo->SetGoState(GO_STATE_ACTIVE); + break; + case GO_PORT_SLAUGHTER_GATE: + m_uiPortSlaughterGateGUID = pGo->GetGUID(); + if (m_auiEncounter[TYPE_RAMSTEIN] == DONE) // Might actually be uneeded pGo->SetGoState(GO_STATE_ACTIVE); break; case GO_PORT_ELDERS: m_uiPortElderGUID = pGo->GetGUID(); break; + case GO_YSIDA_CAGE: + m_uiYsidaCageGUID = pGo->GetGUID(); + break; } } void instance_stratholme::SetData(uint32 uiType, uint32 uiData) { + // TODO: Remove the hard-coded indexes from array accessing switch(uiType) { case TYPE_BARON_RUN: switch(uiData) { case IN_PROGRESS: - if (m_auiEncounter[0] == IN_PROGRESS || m_auiEncounter[0] == FAIL) + if (m_auiEncounter[uiType] == IN_PROGRESS || m_auiEncounter[uiType] == FAIL) break; + + if (Creature* pBaron = instance->GetCreature(m_uiBaronGUID)) + DoScriptText(SAY_ANNOUNCE_RUN_START, pBaron); + m_uiBaronRunTimer = 45*MINUTE*IN_MILLISECONDS; debug_log("SD2: Instance Stratholme: Baron run in progress."); break; @@ -157,112 +178,200 @@ void instance_stratholme::SetData(uint32 uiType, uint32 uiData) //may add code to remove aura from players, but in theory the time should be up already and removed. break; case DONE: - if (Creature* pYsidaT = instance->GetCreature(m_uiYsidaTriggerGUID)) - pYsidaT->SummonCreature(NPC_YSIDA, pYsidaT->GetPositionX(), pYsidaT->GetPositionY(), pYsidaT->GetPositionZ(), pYsidaT->GetOrientation(), TEMPSUMMON_TIMED_DESPAWN, 1800000); - m_uiBaronRunTimer = 0; break; } - m_auiEncounter[0] = uiData; + m_auiEncounter[uiType] = uiData; break; case TYPE_BARONESS: - m_auiEncounter[1] = uiData; - if (uiData == DONE) - { - DoSortZiggurats(); - DoUseDoorOrButton(m_auiZigguratGUID[0]); - } - if (uiData == SPECIAL) - StartSlaugtherSquare(); - break; case TYPE_NERUB: - m_auiEncounter[2] = uiData; - if (uiData == DONE) - { - DoSortZiggurats(); - DoUseDoorOrButton(m_auiZigguratGUID[1]); - } - if (uiData == SPECIAL) - StartSlaugtherSquare(); - break; case TYPE_PALLID: - m_auiEncounter[3] = uiData; + m_auiEncounter[uiType] = uiData; if (uiData == DONE) { DoSortZiggurats(); - DoUseDoorOrButton(m_auiZigguratGUID[2]); + DoUseDoorOrButton(m_auiZigguratGUID[uiType - TYPE_BARONESS]); } if (uiData == SPECIAL) StartSlaugtherSquare(); break; case TYPE_RAMSTEIN: - if (uiData == IN_PROGRESS) + if (uiData == SPECIAL) { - if (m_auiEncounter[4] != IN_PROGRESS) + if (m_auiEncounter[uiType] != SPECIAL && m_auiEncounter[uiType] != DONE) + { + m_uiSlaugtherSquareTimer = 20000; // TODO - unknown, also possible that this is not the very correct place.. DoUseDoorOrButton(m_uiPortGauntletGUID); + } uint32 uiCount = m_sAbomnationGUID.size(); - for(std::set::iterator i = m_sAbomnationGUID.begin(); i != m_sAbomnationGUID.end(); ++i) + for(std::set::iterator itr = m_sAbomnationGUID.begin(); itr != m_sAbomnationGUID.end();) { - if (Creature* pAbom = instance->GetCreature(*i)) + if (Creature* pAbom = instance->GetCreature(*itr)) { + ++itr; if (!pAbom->isAlive()) --uiCount; } + else + { + // Remove obsolete guid from set and decrement count + m_sAbomnationGUID.erase(itr++); + --uiCount; + } } if (!uiCount) { - //a bit itchy, it should close the door after 10 secs, but it doesn't. skipping it for now. - // TODO - not working correctly! - //DoUseDoorOrButton(m_auiRamsteinDoorGUID, 10); + // Old Comment: a bit itchy, it should close m_auiRamsteinDoorGUID door after 10 secs, but it doesn't. skipping it for now. + // However looks like that this door is no more closed + DoUseDoorOrButton(m_auiRamsteinDoorGUID); + + // No more handlng of Abomnations + m_uiSlaugtherSquareTimer = 0; if (Creature* pBaron = instance->GetCreature(m_uiBaronGUID)) - pBaron->SummonCreature(NPC_RAMSTEIN, 4032.84f, -3390.24f, 119.73f, 4.71f, TEMPSUMMON_DEAD_DESPAWN, 0); + { + DoScriptText(SAY_ANNOUNCE_RAMSTEIN, pBaron); + if (Creature* pRamstein = pBaron->SummonCreature(NPC_RAMSTEIN, sStratholmeLocation[2].m_fX, sStratholmeLocation[2].m_fY, sStratholmeLocation[2].m_fZ, sStratholmeLocation[2].m_fO, TEMPSUMMON_DEAD_DESPAWN, 0)) + pRamstein->GetMotionMaster()->MovePoint(0, sStratholmeLocation[3].m_fX, sStratholmeLocation[3].m_fY, sStratholmeLocation[3].m_fZ); - debug_log("SD2: Instance Stratholme: Ramstein spawned."); + debug_log("SD2: Instance Stratholme - Slaugther event: Ramstein spawned."); + } } else - debug_log("SD2: Instance Stratholme: %u Abomnation left to kill.", uiCount); + debug_log("SD2: Instance Stratholme - Slaugther event: %u Abomnation left to kill.", uiCount); } + // After fail aggroing Ramstein means wipe on Ramstein, so close door again + if (uiData == IN_PROGRESS && m_auiEncounter[uiType] == FAIL) + DoUseDoorOrButton(m_uiPortGauntletGUID); if (uiData == DONE) { - m_uiSlaugtherSquareTimer = 5*MINUTE*IN_MILLISECONDS; - debug_log("SD2: Instance Stratholme: Slaugther event will continue in 5 minutes."); + // Open side gate and start summoning skeletons + DoUseDoorOrButton(m_uiPortSlaughterGateGUID); + // use this timer as a bool just to start summoning + m_uiMindlessSummonTimer = 500; + m_uiMindlessCount = 0; + m_luiUndeadGUIDs.clear(); + + // Summon 5 guards + if (Creature* pBaron = instance->GetCreature(m_uiBaronGUID)) + { + for(uint8 i = 0; i < 5; ++i) + { + float fX, fY, fZ; + pBaron->GetRandomPoint(sStratholmeLocation[6].m_fX, sStratholmeLocation[6].m_fY, sStratholmeLocation[6].m_fZ, 5.0f, fX, fY, fZ); + if (Creature* pTemp = pBaron->SummonCreature(NPC_BLACK_GUARD, sStratholmeLocation[6].m_fX, sStratholmeLocation[6].m_fY, sStratholmeLocation[6].m_fZ, sStratholmeLocation[6].m_fO, TEMPSUMMON_DEAD_DESPAWN, 0)) + m_luiGuardGUIDs.push_back(pTemp->GetGUID()); + } + + debug_log("SD2: Instance Stratholme - Slaugther event: Summoned 5 guards."); + } + } + // Open Door again and stop Abomnation + if (uiData == FAIL && m_auiEncounter[uiType] != FAIL) + { + DoUseDoorOrButton(m_uiPortGauntletGUID); + m_uiSlaugtherSquareTimer = 0; + + // Let already moving Abomnations stop + for (std::set::iterator itr = m_sAbomnationGUID.begin(); itr != m_sAbomnationGUID.end(); ++itr) + { + Creature* pAbom = instance->GetCreature(*itr); + if (pAbom && pAbom->GetMotionMaster()->GetCurrentMovementGeneratorType() == POINT_MOTION_TYPE) + pAbom->GetMotionMaster()->MovementExpired(); + } } - m_auiEncounter[4] = uiData; + + m_auiEncounter[uiType] = uiData; break; case TYPE_BARON: if (uiData == IN_PROGRESS) { - if (GetData(TYPE_BARON_RUN) == IN_PROGRESS) + // Reached the Baron within time-limit + if (m_auiEncounter[TYPE_BARON_RUN] == IN_PROGRESS) + SetData(TYPE_BARON_RUN, DONE); + + // Close Slaughterhouse door if needed + if (m_auiEncounter[5] == FAIL) // TODO + DoUseDoorOrButton(m_uiPortGauntletGUID); + } + if (uiData == DONE) + { + if (m_auiEncounter[TYPE_BARON_RUN] == DONE) { Map::PlayerList const& players = instance->GetPlayers(); - if (!players.isEmpty()) + for(Map::PlayerList::const_iterator itr = players.begin(); itr != players.end(); ++itr) { - for(Map::PlayerList::const_iterator itr = players.begin(); itr != players.end(); ++itr) + if (Player* pPlayer = itr->getSource()) { - if (Player* pPlayer = itr->getSource()) - { - if (pPlayer->HasAura(SPELL_BARON_ULTIMATUM)) - pPlayer->RemoveAurasDueToSpell(SPELL_BARON_ULTIMATUM); - - if (pPlayer->GetQuestStatus(QUEST_DEAD_MAN_PLEA) == QUEST_STATUS_INCOMPLETE) - pPlayer->AreaExploredOrEventHappens(QUEST_DEAD_MAN_PLEA); - } + if (pPlayer->HasAura(SPELL_BARON_ULTIMATUM)) + pPlayer->RemoveAurasDueToSpell(SPELL_BARON_ULTIMATUM); + + if (pPlayer->GetQuestStatus(QUEST_DEAD_MAN_PLEA) == QUEST_STATUS_INCOMPLETE) + pPlayer->AreaExploredOrEventHappens(QUEST_DEAD_MAN_PLEA); } } - SetData(TYPE_BARON_RUN,DONE); + // Open cage and finish rescue event + if (Creature* pYsidaT = instance->GetCreature(m_uiYsidaTriggerGUID)) + { + if (Creature* pYsida = pYsidaT->SummonCreature(NPC_YSIDA, pYsidaT->GetPositionX(), pYsidaT->GetPositionY(), pYsidaT->GetPositionZ(), pYsidaT->GetOrientation(), TEMPSUMMON_TIMED_DESPAWN, 1800000)) + { + DoScriptText(SAY_EPILOGUE, pYsida); + pYsida->GetMotionMaster()->MovePoint(0, sStratholmeLocation[7].m_fX, sStratholmeLocation[7].m_fY, sStratholmeLocation[7].m_fZ); + } + DoUseDoorOrButton(m_uiYsidaCageGUID); + } } + + // Open Slaughterhouse door again + DoUseDoorOrButton(m_uiPortGauntletGUID); } - if (uiData == DONE) - // Open a few doors again // TODO: needs research, how to handle wipes in this area! + if (uiData == FAIL) DoUseDoorOrButton(m_uiPortGauntletGUID); - m_auiEncounter[5] = uiData; + // combat door + DoUseDoorOrButton(m_auiRivendareDoorGUID); + m_auiEncounter[5] = uiData; // TODO break; + case TYPE_BARTHILAS_RUN: + if (uiData == IN_PROGRESS) + { + Creature* pBarthilas = instance->GetCreature(m_uiBarthilasGUID); + if (pBarthilas && pBarthilas->isAlive() && !pBarthilas->isInCombat()) + { + DoScriptText(SAY_WARN_BARON, pBarthilas); + pBarthilas->RemoveSplineFlag(SPLINEFLAG_WALKMODE); + pBarthilas->GetMotionMaster()->MovePoint(0, sStratholmeLocation[0].m_fX, sStratholmeLocation[0].m_fY, sStratholmeLocation[0].m_fZ); + + m_uiBarthilasRunTimer = 8000; + } + } + m_auiEncounter[6] = uiData; // TODO + break; + case TYPE_BLACK_GUARDS: + // Prevent double action + if (m_auiEncounter[7] == uiData) // TODO + return; + + // Restart after failure, close Gauntlet + if (uiData == IN_PROGRESS && m_auiEncounter[7] == FAIL) + DoUseDoorOrButton(m_uiPortGauntletGUID); + // Wipe case - open gauntlet + if (uiData == FAIL) + DoUseDoorOrButton(m_uiPortGauntletGUID); + if (uiData == DONE) + { + if (Creature* pBaron = instance->GetCreature(m_uiBaronGUID)) + DoScriptText(SAY_UNDEAD_DEFEAT, pBaron); + DoUseDoorOrButton(m_auiRivendareDoorGUID); + } + m_auiEncounter[7] = uiData; // TODO + + // No need to save anything here, so return + return; case TYPE_SH_AELMAR: m_bIsSilverHandDead[0] = (uiData) ? true : false; @@ -287,7 +396,7 @@ void instance_stratholme::SetData(uint32 uiType, uint32 uiData) std::ostringstream saveStream; saveStream << m_auiEncounter[0] << " " << m_auiEncounter[1] << " " << m_auiEncounter[2] << " " - << m_auiEncounter[3] << " " << m_auiEncounter[4] << " " << m_auiEncounter[5]; + << m_auiEncounter[3] << " " << m_auiEncounter[4] << " " << m_auiEncounter[5] << " " << m_auiEncounter[6]; strInstData = saveStream.str(); @@ -308,7 +417,7 @@ void instance_stratholme::Load(const char* chrIn) std::istringstream loadStream(chrIn); loadStream >> m_auiEncounter[0] >> m_auiEncounter[1] >> m_auiEncounter[2] >> m_auiEncounter[3] - >> m_auiEncounter[4] >> m_auiEncounter[5]; + >> m_auiEncounter[4] >> m_auiEncounter[5] >> m_auiEncounter[6]; for (uint8 i = 0; i < MAX_ENCOUNTER; ++i) { @@ -347,6 +456,8 @@ uint32 instance_stratholme::GetData(uint32 uiType) return m_auiEncounter[4]; case TYPE_BARON: return m_auiEncounter[5]; + case TYPE_BARTHILAS_RUN: + return m_auiEncounter[6]; default: return 0; } @@ -376,7 +487,7 @@ void instance_stratholme::DoSortZiggurats() return; std::list lAcolytes; // Valid pointers, only used locally - for (std::list::const_iterator itr = m_luiAcolyteGUIDs.begin(); itr != m_luiAcolyteGUIDs.end(); itr++) + for (std::list::const_iterator itr = m_luiAcolyteGUIDs.begin(); itr != m_luiAcolyteGUIDs.end(); ++itr) { if (Creature* pAcolyte = instance->GetCreature(*itr)) lAcolytes.push_back(pAcolyte); @@ -417,7 +528,7 @@ void instance_stratholme::DoSortZiggurats() } // In case some mobs have not been able to be sorted, store their GUIDs again - for (std::list::const_iterator itr = lAcolytes.begin(); itr != lAcolytes.end(); itr++) + for (std::list::const_iterator itr = lAcolytes.begin(); itr != lAcolytes.end(); ++itr) m_luiAcolyteGUIDs.push_back((*itr)->GetGUID()); // Sort Crystal @@ -450,69 +561,223 @@ void instance_stratholme::DoSortZiggurats() } } -void instance_stratholme::OnCreatureDeath(Creature* pCreature) +void instance_stratholme::OnCreatureEnterCombat(Creature* pCreature) { - if (pCreature->GetEntry() == NPC_THUZADIN_ACOLYTE) + switch (pCreature->GetEntry()) { - for (uint8 i = 0; i < MAX_ZIGGURATS; ++i) - { - if (m_alZigguratAcolyteGUID[i].empty()) - continue; // nothing to do anymore for this ziggurat + case NPC_BARONESS_ANASTARI: SetData(TYPE_BARONESS, IN_PROGRESS); break; + case NPC_MALEKI_THE_PALLID: SetData(TYPE_PALLID, IN_PROGRESS); break; + case NPC_NERUBENKAN: SetData(TYPE_NERUB, IN_PROGRESS); break; + case NPC_RAMSTEIN: SetData(TYPE_RAMSTEIN, IN_PROGRESS); break; + // TODO - uncomment when proper working within core! case NPC_BARON: SetData(TYPE_BARON, IN_PROGRESS); break; + + case NPC_ABOM_BILE: + case NPC_ABOM_VENOM: + // Start Slaughterhouse Event + SetData(TYPE_RAMSTEIN, SPECIAL); + break; + + case NPC_MINDLESS_UNDEAD: + case NPC_BLACK_GUARD: + // Aggro in Slaughterhouse after Ramstein + SetData(TYPE_BLACK_GUARDS, IN_PROGRESS); + break; + } +} + +void instance_stratholme::OnCreatureEvade(Creature* pCreature) +{ + switch (pCreature->GetEntry()) + { + case NPC_BARONESS_ANASTARI: SetData(TYPE_BARONESS, FAIL); break; + case NPC_MALEKI_THE_PALLID: SetData(TYPE_PALLID, FAIL); break; + case NPC_NERUBENKAN: SetData(TYPE_NERUB, FAIL); break; + case NPC_RAMSTEIN: SetData(TYPE_RAMSTEIN, FAIL); break; + // TODO - uncomment when proper working within core! case NPC_BARON: SetData(TYPE_BARON, FAIL); break; + + case NPC_ABOM_BILE: + case NPC_ABOM_VENOM: + // Fail in Slaughterhouse Event before Ramstein + SetData(TYPE_RAMSTEIN, FAIL); + break; + case NPC_MINDLESS_UNDEAD: + case NPC_BLACK_GUARD: + // Fail in Slaughterhouse after Ramstein + SetData(TYPE_BLACK_GUARDS, FAIL); + break; + } +} - m_alZigguratAcolyteGUID[i].remove(pCreature->GetGUID()); - if (m_alZigguratAcolyteGUID[i].empty()) +void instance_stratholme::OnCreatureDeath(Creature* pCreature) +{ + switch (pCreature->GetEntry()) + { + case NPC_BARONESS_ANASTARI: SetData(TYPE_BARONESS, DONE); break; + case NPC_MALEKI_THE_PALLID: SetData(TYPE_PALLID, DONE); break; + case NPC_NERUBENKAN: SetData(TYPE_NERUB, DONE); break; + case NPC_RAMSTEIN: SetData(TYPE_RAMSTEIN, DONE); break; + case NPC_BARON: SetData(TYPE_BARON, DONE); break; + + case NPC_THUZADIN_ACOLYTE: + for (uint8 i = 0; i < MAX_ZIGGURATS; ++i) { - // A random zone yell after one is cleared - int32 aAnnounceSay[MAX_ZIGGURATS] = {SAY_ANNOUNCE_ZIGGURAT_1, SAY_ANNOUNCE_ZIGGURAT_2, SAY_ANNOUNCE_ZIGGURAT_3}; - if (Creature* pAnnouncer = instance->GetCreature(m_uiAcolyteAnnouncerGUID)) - DoScriptText(aAnnounceSay[i], pAnnouncer); + if (m_alZigguratAcolyteGUID[i].empty()) + continue; // nothing to do anymore for this ziggurat + + m_alZigguratAcolyteGUID[i].remove(pCreature->GetGUID()); + if (m_alZigguratAcolyteGUID[i].empty()) + { + // A random zone yell after one is cleared + int32 aAnnounceSay[MAX_ZIGGURATS] = {SAY_ANNOUNCE_ZIGGURAT_1, SAY_ANNOUNCE_ZIGGURAT_2, SAY_ANNOUNCE_ZIGGURAT_3}; + if (Creature* pAnnouncer = instance->GetCreature(m_uiAcolyteAnnouncerGUID)) + DoScriptText(aAnnounceSay[i], pAnnouncer); - // Kill Crystal - if (Creature* pCrystal = instance->GetCreature(m_auiCrystalSortedGUID[i])) - pCrystal->DealDamage(pCrystal, pCrystal->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false); + // Kill Crystal + if (Creature* pCrystal = instance->GetCreature(m_auiCrystalSortedGUID[i])) + pCrystal->DealDamage(pCrystal, pCrystal->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false); - switch (i) + switch (i) + { + case 0: SetData(TYPE_BARONESS, SPECIAL); break; + case 1: SetData(TYPE_NERUB, SPECIAL); break; + case 2: SetData(TYPE_PALLID, SPECIAL); break; + } + } + } + break; + + case NPC_ABOM_BILE: + case NPC_ABOM_VENOM: + // Start Slaughterhouse Event + SetData(TYPE_RAMSTEIN, SPECIAL); + break; + + case NPC_MINDLESS_UNDEAD: + m_luiUndeadGUIDs.remove(pCreature->GetGUID()); + if (m_luiUndeadGUIDs.empty()) + { + // Let the black Guards move out of the citadel + for (std::list::const_iterator itr = m_luiGuardGUIDs.begin(); itr != m_luiGuardGUIDs.end(); ++itr) { - case 0: SetData(TYPE_BARONESS, SPECIAL); break; - case 1: SetData(TYPE_NERUB, SPECIAL); break; - case 2: SetData(TYPE_PALLID, SPECIAL); break; + Creature* pGuard = instance->GetCreature(*itr); + if (pGuard && pGuard->isAlive() && !pGuard->isInCombat()) + { + float fX, fY, fZ; + pGuard->GetRandomPoint(sStratholmeLocation[5].m_fX, sStratholmeLocation[5].m_fY, sStratholmeLocation[5].m_fZ, 10.0f, fX, fY, fZ); + pGuard->GetMotionMaster()->MovePoint(0, fX, fY, fZ); + } } } - } + break; + case NPC_BLACK_GUARD: + m_luiGuardGUIDs.remove(pCreature->GetGUID()); + if (m_luiGuardGUIDs.empty()) + SetData(TYPE_BLACK_GUARDS, DONE); + + break; } } void instance_stratholme::Update(uint32 uiDiff) { + if (m_uiBarthilasRunTimer) + { + if (m_uiBarthilasRunTimer <= uiDiff) + { + Creature* pBarthilas = instance->GetCreature(m_uiBarthilasGUID); + if (pBarthilas && pBarthilas->isAlive() && !pBarthilas->isInCombat()) + pBarthilas->NearTeleportTo(sStratholmeLocation[1].m_fX, sStratholmeLocation[1].m_fY, sStratholmeLocation[1].m_fZ, sStratholmeLocation[1].m_fO); + + SetData(TYPE_BARTHILAS_RUN, DONE); + m_uiBarthilasRunTimer = 0; + } + else + m_uiBarthilasRunTimer -= uiDiff; + } + if (m_uiBaronRunTimer) { + if (m_uiYellCounter == 0 && m_uiBaronRunTimer <= 10*MINUTE*IN_MILLISECONDS) + { + if (Creature* pBaron = instance->GetCreature(m_uiBaronGUID)) + DoScriptText(SAY_ANNOUNCE_RUN_10_MIN, pBaron); + ++m_uiYellCounter; + } + else if (m_uiYellCounter == 1 && m_uiBaronRunTimer <= 5*MINUTE*IN_MILLISECONDS) + { + if (Creature* pBaron = instance->GetCreature(m_uiBaronGUID)) + DoScriptText(SAY_ANNOUNCE_RUN_5_MIN, pBaron); + ++m_uiYellCounter; + } + if (m_uiBaronRunTimer <= uiDiff) { - if (GetData(TYPE_BARON_RUN) != DONE) - SetData(TYPE_BARON_RUN, FAIL); + SetData(TYPE_BARON_RUN, FAIL); + + if (Creature* pBaron = instance->GetCreature(m_uiBaronGUID)) + DoScriptText(SAY_ANNOUNCE_RUN_FAIL, pBaron); m_uiBaronRunTimer = 0; - debug_log("SD2: Instance Stratholme: Baron run event reached end. Event has state %u.",GetData(TYPE_BARON_RUN)); + debug_log("SD2: Instance Stratholme: Baron run event reached end. Event has state %u.", GetData(TYPE_BARON_RUN)); } else m_uiBaronRunTimer -= uiDiff; } + if (m_uiMindlessSummonTimer) + { + if (m_uiMindlessCount < 30) + { + if (m_uiMindlessSummonTimer <= uiDiff) + { + if (Creature* pBaron = instance->GetCreature(m_uiBaronGUID)) + { + // Summon mindless skeletons and move them to random point in the center of the square + if (Creature* pTemp = pBaron->SummonCreature(NPC_MINDLESS_UNDEAD, sStratholmeLocation[4].m_fX, sStratholmeLocation[4].m_fY, sStratholmeLocation[4].m_fZ, sStratholmeLocation[4].m_fO, TEMPSUMMON_DEAD_DESPAWN, 0)) + { + float fX, fY, fZ; + pBaron->GetRandomPoint(sStratholmeLocation[5].m_fX, sStratholmeLocation[5].m_fY, sStratholmeLocation[5].m_fZ, 20.0f, fX, fY, fZ); + pTemp->GetMotionMaster()->MovePoint(0, fX, fY, fZ); + m_luiUndeadGUIDs.push_back(pTemp->GetGUID()); + ++m_uiMindlessCount; + } + } + m_uiMindlessSummonTimer = 400; + } + else + m_uiMindlessSummonTimer -= uiDiff; + } + else + m_uiMindlessSummonTimer = 0; + } + if (m_uiSlaugtherSquareTimer) { if (m_uiSlaugtherSquareTimer <= uiDiff) { - if (Creature* pBaron = instance->GetCreature(m_uiBaronGUID)) + // Call next Abomnations + for (std::set::iterator itr = m_sAbomnationGUID.begin(); itr != m_sAbomnationGUID.end(); ++itr) { - for(uint8 i = 0; i < 4; ++i) - pBaron->SummonCreature(NPC_BLACK_GUARD, 4032.84f, -3390.24f, 119.73f, 4.71f, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 1800000); + Creature* pAbom = instance->GetCreature(*itr); + // Skip killed and already walking Abomnations + if (!pAbom || !pAbom->isAlive() || pAbom->GetMotionMaster()->GetCurrentMovementGeneratorType() == POINT_MOTION_TYPE) + continue; - DoUseDoorOrButton(m_auiRamsteinDoorGUID); - DoUseDoorOrButton(m_auiRivendareDoorGUID); - - debug_log("SD2: Instance Stratholme: Black guard sentries spawned. Opening gates to baron."); + // Let Move to somewhere in the middle + if (!pAbom->isInCombat()) + { + if (GameObject* pDoor = instance->GetGameObject(m_uiPortSlaugtherGUID)) + { + float fX, fY, fZ; + pAbom->GetRandomPoint(pDoor->GetPositionX(), pDoor->GetPositionY(), pDoor->GetPositionZ(), 10.0f, fX, fY, fZ); + pAbom->GetMotionMaster()->MovePoint(0, fX, fY, fZ); + } + } + break; } - m_uiSlaugtherSquareTimer = 0; + + // TODO - how fast are they called? + m_uiSlaugtherSquareTimer = urand(15000, 30000); } else m_uiSlaugtherSquareTimer -= uiDiff; diff --git a/scripts/eastern_kingdoms/stratholme/stratholme.cpp b/scripts/eastern_kingdoms/stratholme/stratholme.cpp index fbb07ff..4e8f8db 100644 --- a/scripts/eastern_kingdoms/stratholme/stratholme.cpp +++ b/scripts/eastern_kingdoms/stratholme/stratholme.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or @@ -31,6 +31,25 @@ EndContentData */ #include "precompiled.h" #include "stratholme.h" +/*###### +## go_service_gate +######*/ + +bool GOUse_go_service_gate(Player* pPlayer, GameObject* pGo) +{ + ScriptedInstance* pInstance = (ScriptedInstance*)pGo->GetInstanceData(); + + if (!pInstance) + return false; + + if (pInstance->GetData(TYPE_BARTHILAS_RUN) != NOT_STARTED) + return false; + + // if the service gate is used make Barthilas flee + pInstance->SetData(TYPE_BARTHILAS_RUN, IN_PROGRESS); + return false; +} + /*###### ## go_gauntlet_gate (this is the _first_ of the gauntlet gates, two exist) ######*/ @@ -53,21 +72,17 @@ bool GOUse_go_gauntlet_gate(Player* pPlayer, GameObject* pGo) if (!pGroupie) continue; - if (pGroupie->GetQuestStatus(QUEST_DEAD_MAN_PLEA) == QUEST_STATUS_INCOMPLETE && - !pGroupie->HasAura(SPELL_BARON_ULTIMATUM, EFFECT_INDEX_0) && - pGroupie->GetMap() == pGo->GetMap()) - pGroupie->CastSpell(pGroupie,SPELL_BARON_ULTIMATUM,true); + if (!pGroupie->HasAura(SPELL_BARON_ULTIMATUM)) + pGroupie->CastSpell(pGroupie, SPELL_BARON_ULTIMATUM, true); } } else { - if (pPlayer->GetQuestStatus(QUEST_DEAD_MAN_PLEA) == QUEST_STATUS_INCOMPLETE && - !pPlayer->HasAura(SPELL_BARON_ULTIMATUM, EFFECT_INDEX_0) && - pPlayer->GetMap() == pGo->GetMap()) + if (!pPlayer->HasAura(SPELL_BARON_ULTIMATUM)) pPlayer->CastSpell(pPlayer, SPELL_BARON_ULTIMATUM, true); } - pInstance->SetData(TYPE_BARON_RUN,IN_PROGRESS); + pInstance->SetData(TYPE_BARON_RUN, IN_PROGRESS); return false; } @@ -75,15 +90,18 @@ bool GOUse_go_gauntlet_gate(Player* pPlayer, GameObject* pGo) ## mob_freed_soul ######*/ -//Possibly more of these quotes around. -#define SAY_ZAPPED0 -1329000 -#define SAY_ZAPPED1 -1329001 -#define SAY_ZAPPED2 -1329002 -#define SAY_ZAPPED3 -1329003 +// Possibly more of these quotes around. +enum +{ + SAY_ZAPPED0 = -1329000, + SAY_ZAPPED1 = -1329001, + SAY_ZAPPED2 = -1329002, + SAY_ZAPPED3 = -1329003, +}; struct MANGOS_DLL_DECL mob_freed_soulAI : public ScriptedAI { - mob_freed_soulAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} + mob_freed_soulAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset(); } void Reset() { @@ -106,61 +124,66 @@ CreatureAI* GetAI_mob_freed_soul(Creature* pCreature) ## mob_restless_soul ######*/ -#define SPELL_EGAN_BLASTER 17368 -#define SPELL_SOUL_FREED 17370 -#define QUEST_RESTLESS_SOUL 5282 -#define ENTRY_RESTLESS 11122 -#define ENTRY_FREED 11136 +enum +{ + QUEST_RESTLESS_SOUL = 5282, + + SPELL_EGAN_BLASTER = 17368, + SPELL_SOUL_FREED = 17370, + + NPC_RESTLESS_SOUL = 11122, + NPC_FREED_SOUL = 11136, +}; struct MANGOS_DLL_DECL mob_restless_soulAI : public ScriptedAI { - mob_restless_soulAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} + mob_restless_soulAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset(); } - uint64 Tagger; - uint32 Die_Timer; - bool Tagged; + uint64 m_uiTaggerGUID; + uint32 m_uiDieTimer; + bool m_bIsTagged; void Reset() { - Tagger = 0; - Die_Timer = 5000; - Tagged = false; + m_uiTaggerGUID = 0; + m_uiDieTimer = 5000; + m_bIsTagged = false; } - void SpellHit(Unit *caster, const SpellEntry *spell) + void SpellHit(Unit* pCaster, const SpellEntry* pSpell) { - if (caster->GetTypeId() == TYPEID_PLAYER) + if (pCaster->GetTypeId() == TYPEID_PLAYER) { - if (!Tagged && spell->Id == SPELL_EGAN_BLASTER && ((Player*)caster)->GetQuestStatus(QUEST_RESTLESS_SOUL) == QUEST_STATUS_INCOMPLETE) + if (!m_bIsTagged && pSpell->Id == SPELL_EGAN_BLASTER && ((Player*)pCaster)->GetQuestStatus(QUEST_RESTLESS_SOUL) == QUEST_STATUS_INCOMPLETE) { - Tagged = true; - Tagger = caster->GetGUID(); + m_bIsTagged = true; + m_uiTaggerGUID = pCaster->GetGUID(); } } } - void JustSummoned(Creature *summoned) + void JustSummoned(Creature* pSummoned) { - summoned->CastSpell(summoned,SPELL_SOUL_FREED,false); + pSummoned->CastSpell(pSummoned, SPELL_SOUL_FREED, false); } void JustDied(Unit* Killer) { - if (Tagged) - m_creature->SummonCreature(ENTRY_FREED, 0.0f, 0.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_DESPAWN, 300000); + if (m_bIsTagged) + m_creature->SummonCreature(NPC_FREED_SOUL, 0.0f, 0.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_DESPAWN, 300000); } - void UpdateAI(const uint32 diff) + void UpdateAI(const uint32 uiDiff) { - if (Tagged) + if (m_bIsTagged) { - if (Die_Timer < diff) + if (m_uiDieTimer < uiDiff) { - if (Player* pPlayer = m_creature->GetMap()->GetPlayer(Tagger)) + if (Player* pPlayer = m_creature->GetMap()->GetPlayer(m_uiTaggerGUID)) pPlayer->DealDamage(m_creature, m_creature->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false); } else - Die_Timer -= diff; + m_uiDieTimer -= uiDiff; } } }; @@ -184,48 +207,48 @@ struct MANGOS_DLL_DECL mobs_spectral_ghostly_citizenAI : public ScriptedAI { mobs_spectral_ghostly_citizenAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} - uint32 Die_Timer; - bool Tagged; + uint32 m_uiDieTimer; + bool m_bIsTagged; void Reset() { - Die_Timer = 5000; - Tagged = false; + m_uiDieTimer = 5000; + m_bIsTagged = false; } - void SpellHit(Unit *caster, const SpellEntry *spell) + void SpellHit(Unit* pCaster, const SpellEntry* pSpell) { - if (!Tagged && spell->Id == SPELL_EGAN_BLASTER) - Tagged = true; + if (!m_bIsTagged && pSpell->Id == SPELL_EGAN_BLASTER) + m_bIsTagged = true; } void JustDied(Unit* Killer) { - if (Tagged) + if (m_bIsTagged) { - for(uint32 i = 1; i <= 4; ++i) + for(uint32 i = 0; i < 4; ++i) { - float x,y,z; - m_creature->GetRandomPoint(m_creature->GetPositionX(),m_creature->GetPositionY(),m_creature->GetPositionZ(),20.0f,x,y,z); + float x, y, z; + m_creature->GetRandomPoint(m_creature->GetPositionX(), m_creature->GetPositionY(), m_creature->GetPositionZ(), 20.0f, x, y, z); - //100%, 50%, 33%, 25% chance to spawn - uint32 j = urand(1,i); - if (j==1) - m_creature->SummonCreature(ENTRY_RESTLESS,x,y,z,0,TEMPSUMMON_CORPSE_DESPAWN,600000); + // 100%, 50%, 33%, 25% chance to spawn + uint32 j = urand(0, i); + if (j == 0) + m_creature->SummonCreature(NPC_RESTLESS_SOUL, x, y, z, 0, TEMPSUMMON_DEAD_DESPAWN, 0); } } } - void UpdateAI(const uint32 diff) + void UpdateAI(const uint32 uiDiff) { - if (Tagged) + if (m_bIsTagged) { - if (Die_Timer < diff) + if (m_uiDieTimer < uiDiff) { m_creature->DealDamage(m_creature, m_creature->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false); } else - Die_Timer -= diff; + m_uiDieTimer -= uiDiff; } if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) @@ -234,16 +257,16 @@ struct MANGOS_DLL_DECL mobs_spectral_ghostly_citizenAI : public ScriptedAI DoMeleeAttackIfReady(); } - void ReceiveEmote(Player* pPlayer, uint32 emote) + void ReceiveEmote(Player* pPlayer, uint32 uiEmote) { - switch(emote) + switch(uiEmote) { case TEXTEMOTE_DANCE: EnterEvadeMode(); break; case TEXTEMOTE_RUDE: if (m_creature->IsWithinDistInMap(pPlayer, INTERACTION_DISTANCE)) - m_creature->CastSpell(pPlayer,SPELL_SLAP,false); + m_creature->CastSpell(pPlayer, SPELL_SLAP, false); else m_creature->HandleEmote(EMOTE_ONESHOT_RUDE); break; @@ -269,6 +292,11 @@ void AddSC_stratholme() { Script* pNewScript; + pNewScript = new Script; + pNewScript->Name = "go_service_gate"; + pNewScript->pGOUse = &GOUse_go_service_gate; + pNewScript->RegisterSelf(); + pNewScript = new Script; pNewScript->Name = "go_gauntlet_gate"; pNewScript->pGOUse = &GOUse_go_gauntlet_gate; diff --git a/scripts/eastern_kingdoms/stratholme/stratholme.h b/scripts/eastern_kingdoms/stratholme/stratholme.h index 4e3e450..64e6d0a 100644 --- a/scripts/eastern_kingdoms/stratholme/stratholme.h +++ b/scripts/eastern_kingdoms/stratholme/stratholme.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ @@ -7,19 +7,19 @@ enum { - MAX_ENCOUNTER = 6, + MAX_ENCOUNTER = 8, MAX_SILVERHAND = 5, MAX_ZIGGURATS = 3, - TYPE_BARON_RUN = 1, - TYPE_BARONESS = 2, - TYPE_NERUB = 3, - TYPE_PALLID = 4, - TYPE_RAMSTEIN = 5, - TYPE_BARON = 6, - - //DATA_BARON = 10, // Wasn't used, verify that it really was never used! - //DATA_YSIDA_TRIGGER = 11, + TYPE_BARON_RUN = 0, + TYPE_BARONESS = 1, + TYPE_NERUB = TYPE_BARONESS + 1, // Assert that these three TYPEs are in correct order. + TYPE_PALLID = TYPE_BARONESS + 2, + TYPE_RAMSTEIN = 4, + TYPE_RAMSTEIN_OBSOLETE = 5, // Still set in Acid, remove when removed from Acid :) + TYPE_BARON = 6, // Adapt then + TYPE_BARTHILAS_RUN = 7, + TYPE_BLACK_GUARDS = 8, TYPE_SH_QUEST = 20, TYPE_SH_CATHELA = 21, @@ -28,18 +28,24 @@ enum TYPE_SH_VICAR = 24, TYPE_SH_AELMAR = 25, - NPC_CRYSTAL = 10415, //three ziggurat crystals - NPC_BARON = 10440, - NPC_YSIDA_TRIGGER = 16100, - NPC_THUZADIN_ACOLYTE = 10399, //acolytes in ziggurats + NPC_BARTHILAS = 10435, + NPC_BARONESS_ANASTARI = 10436, + NPC_NERUBENKAN = 10437, + NPC_MALEKI_THE_PALLID = 10438, NPC_RAMSTEIN = 10439, + NPC_BARON = 10440, + NPC_CRYSTAL = 10415, // three ziggurat crystals + NPC_THUZADIN_ACOLYTE = 10399, // acolytes in ziggurats NPC_ABOM_BILE = 10416, NPC_ABOM_VENOM = 10417, - NPC_BLACK_GUARD = 10394, + NPC_MINDLESS_UNDEAD = 11030, // zombies summoned after ramstein + NPC_BLACK_GUARD = 10394, // zombies summoned after ramstein NPC_YSIDA = 16031, + NPC_YSIDA_TRIGGER = 16100, GO_SERVICE_ENTRANCE = 175368, GO_GAUNTLET_GATE1 = 175357, + GO_PORT_SLAUGHTER_GATE = 175358, //port used at the undeads event GO_ZIGGURAT_DOOR_1 = 175380, //baroness GO_ZIGGURAT_DOOR_2 = 175379, //nerub'enkan GO_ZIGGURAT_DOOR_3 = 175381, //maleki @@ -48,6 +54,7 @@ enum GO_PORT_GAUNTLET = 175374, //port from gauntlet to slaugther GO_PORT_SLAUGTHER = 175373, //port at slaugther GO_PORT_ELDERS = 175377, //port at elders square + GO_YSIDA_CAGE = 181071, // cage to open after baron event is done QUEST_DEAD_MAN_PLEA = 8945, SPELL_BARON_ULTIMATUM = 27861, @@ -55,7 +62,33 @@ enum SAY_ANNOUNCE_ZIGGURAT_1 = -1329004, SAY_ANNOUNCE_ZIGGURAT_2 = -1329005, SAY_ANNOUNCE_ZIGGURAT_3 = -1329006, - SAY_ANNOUNCE_RIVENDARE = -1329007 + SAY_ANNOUNCE_RIVENDARE = -1329007, + + SAY_WARN_BARON = -1329008, + SAY_ANNOUNCE_RUN_START = -1329009, + SAY_ANNOUNCE_RUN_10_MIN = -1329010, + SAY_ANNOUNCE_RUN_5_MIN = -1329011, + SAY_ANNOUNCE_RUN_FAIL = -1329012, + SAY_ANNOUNCE_RAMSTEIN = -1329013, + SAY_UNDEAD_DEFEAT = -1329014, + SAY_EPILOGUE = -1329015, +}; + +struct sEventLocation +{ + float m_fX, m_fY, m_fZ, m_fO; +}; + +static sEventLocation sStratholmeLocation[] = +{ + {3725.577f, -3599.484f, 142.367f}, // barthilas door run + {4068.284f, -3535.678f, 122.771f, 2.50f}, // barthilas tele + {4032.643f, -3378.546f, 119.752f, 4.74f}, // ramstein summon loc + {4032.843f, -3390.246f, 119.732f}, // ramstein move loc + {3969.357f, -3391.871f, 119.116f, 5.91f}, // skeletons summon loc + {4033.044f, -3431.031f, 119.055f}, // skeletons move loc + {4032.602f, -3378.506f, 119.752f, 4.74f}, // guards summon loc + {4042.575f, -3337.929f, 115.059f} // ysida move loc }; struct MANGOS_DLL_DECL instance_stratholme : public ScriptedInstance @@ -76,6 +109,8 @@ struct MANGOS_DLL_DECL instance_stratholme : public ScriptedInstance const char* Save() { return strInstData.c_str(); } void Load(const char* chrIn); + void OnCreatureEnterCombat(Creature* pCreature); + void OnCreatureEvade(Creature* pCreature); void OnCreatureDeath(Creature* pCreature); void Update(uint32 uiDiff); @@ -89,8 +124,13 @@ struct MANGOS_DLL_DECL instance_stratholme : public ScriptedInstance std::string strInstData; uint32 m_uiBaronRunTimer; + uint32 m_uiBarthilasRunTimer; + uint32 m_uiMindlessSummonTimer; uint32 m_uiSlaugtherSquareTimer; + uint32 m_uiYellCounter; + uint32 m_uiMindlessCount; + uint64 m_uiServiceEntranceGUID; uint64 m_uiGauntletGate1GUID; uint64 m_auiZigguratGUID[MAX_ZIGGURATS]; @@ -99,9 +139,12 @@ struct MANGOS_DLL_DECL instance_stratholme : public ScriptedInstance uint64 m_uiPortGauntletGUID; uint64 m_uiPortSlaugtherGUID; uint64 m_uiPortElderGUID; + uint64 m_uiPortSlaughterGateGUID; + uint64 m_uiYsidaCageGUID; uint64 m_uiBaronGUID; uint64 m_uiYsidaTriggerGUID; + uint64 m_uiBarthilasGUID; uint64 m_uiAcolyteAnnouncerGUID; uint64 m_auiCrystalSortedGUID[MAX_ZIGGURATS]; @@ -109,6 +152,8 @@ struct MANGOS_DLL_DECL instance_stratholme : public ScriptedInstance std::set m_sAbomnationGUID; std::list m_luiAcolyteGUIDs; std::list m_alZigguratAcolyteGUID[MAX_ZIGGURATS]; + std::list m_luiUndeadGUIDs; + std::list m_luiGuardGUIDs; }; #endif diff --git a/scripts/eastern_kingdoms/sunken_temple/instance_sunken_temple.cpp b/scripts/eastern_kingdoms/sunken_temple/instance_sunken_temple.cpp index 78c55fd..89bccf1 100644 --- a/scripts/eastern_kingdoms/sunken_temple/instance_sunken_temple.cpp +++ b/scripts/eastern_kingdoms/sunken_temple/instance_sunken_temple.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or @@ -16,8 +16,8 @@ /* ScriptData SDName: instance_sunken_temple -SD%Complete: 30 -SDComment: +SD%Complete: 50 +SDComment: Hakkar Summon Event missing SDCategory: Sunken Temple EndScriptData */ @@ -25,7 +25,11 @@ EndScriptData */ #include "sunken_temple.h" instance_sunken_temple::instance_sunken_temple(Map* pMap) : ScriptedInstance(pMap), - m_uiJammalainBarrierGUID(0), + m_uiAtalarionGUID(0), + m_uiJammalanGUID(0), + m_uiJammalanBarrierGUID(0), + m_uiIdolOfHakkarGUID(0), + m_uiStatueCounter(0), m_uiProtectorsRemaining(0) { Initialize(); @@ -40,13 +44,18 @@ void instance_sunken_temple::OnObjectCreate(GameObject* pGo) { switch(pGo->GetEntry()) { - case GO_JAMMALAIN_BARRIER: - m_uiJammalainBarrierGUID = pGo->GetGUID(); + case GO_JAMMALAN_BARRIER: + m_uiJammalanBarrierGUID = pGo->GetGUID(); if (m_auiEncounter[1] == DONE) - DoUseDoorOrButton(m_uiJammalainBarrierGUID); + DoUseDoorOrButton(m_uiJammalanBarrierGUID); + break; + case GO_IDOL_OF_HAKKAR: + m_uiIdolOfHakkarGUID = pGo->GetGUID(); + break; + case GO_ATALAI_LIGHT_BIG: + m_luiBigLightGUIDs.push_back(pGo->GetGUID()); break; } - } void instance_sunken_temple::OnCreatureCreate(Creature* pCreature) @@ -61,29 +70,58 @@ void instance_sunken_temple::OnCreatureCreate(Creature* pCreature) case NPC_MIJAN: ++m_uiProtectorsRemaining; break; + case NPC_JAMMALAN: + m_uiJammalanGUID = pCreature->GetGUID(); + break; + case NPC_ATALARION: + m_uiAtalarionGUID = pCreature->GetGUID(); + break; } } +void instance_sunken_temple::OnCreatureDeath(Creature* pCreature) +{ + switch (pCreature->GetEntry()) + { + case NPC_ATALARION: SetData(TYPE_ATALARION, DONE); break; + case NPC_JAMMALAN: SetData(TYPE_JAMMALAN, DONE); break; + // Jammalain mini-bosses + case NPC_ZOLO: + case NPC_GASHER: + case NPC_LORO: + case NPC_HUKKU: + case NPC_ZULLOR: + case NPC_MIJAN: + SetData(TYPE_PROTECTORS, DONE); + break; + } +} + + void instance_sunken_temple::SetData(uint32 uiType, uint32 uiData) { switch(uiType) { case TYPE_ATALARION: + if (uiData == SPECIAL) + DoSpawnAtalarionIfCan(); m_auiEncounter[0] = uiData; break; case TYPE_PROTECTORS: if (uiData == DONE) { - //Jammalain should yell here about barrier being destroyed --m_uiProtectorsRemaining; if (!m_uiProtectorsRemaining) { m_auiEncounter[1] = uiData; - DoUseDoorOrButton(m_uiJammalainBarrierGUID); + DoUseDoorOrButton(m_uiJammalanBarrierGUID); + // Intro yell + if (Creature* pJammalan = instance->GetCreature(m_uiJammalanGUID)) + DoScriptText(SAY_JAMMALAN_INTRO, pJammalan); } } break; - case TYPE_JAMMALAIN: + case TYPE_JAMMALAN: m_auiEncounter[2] = uiData; break; case TYPE_MALFURION: @@ -105,6 +143,53 @@ void instance_sunken_temple::SetData(uint32 uiType, uint32 uiData) } } +void instance_sunken_temple::DoSpawnAtalarionIfCan() +{ + // return if already summoned + if (m_uiAtalarionGUID) + return; + + Player* pPlayer = GetPlayerInMap(); + if (!pPlayer) + return; + + pPlayer->SummonCreature(NPC_ATALARION, aSunkenTempleLocation[0].m_fX, aSunkenTempleLocation[0].m_fY, aSunkenTempleLocation[0].m_fZ, aSunkenTempleLocation[0].m_fO, TEMPSUMMON_DEAD_DESPAWN, 0); + + // Spawn the idol of Hakkar + DoRespawnGameObject(m_uiIdolOfHakkarGUID, 30 * MINUTE); + + // Spawn the big green lights + for (std::list::const_iterator itr = m_luiBigLightGUIDs.begin(); itr != m_luiBigLightGUIDs.end(); ++itr) + DoRespawnGameObject(*itr, 30*MINUTE*IN_MILLISECONDS); +} + +bool instance_sunken_temple::ProcessStatueEvent(uint32 uiEventId) +{ + bool bEventStatus = false; + + // Check if the statues are activated correctly + // Increase the counter when the correct statue is activated + for (uint8 i = 0; i < MAX_STATUES; ++i) + { + if (uiEventId == m_aAtalaiStatueEvents[i] && m_uiStatueCounter == i) + { + // Right Statue activated + ++m_uiStatueCounter; + bEventStatus = true; + break; + } + } + + if (!bEventStatus) + return false; + + // Check if all statues are active + if (m_uiStatueCounter == MAX_STATUES) + SetData(TYPE_ATALARION, SPECIAL); + + return true; +} + void instance_sunken_temple::Load(const char* chrIn) { if (!chrIn) @@ -120,7 +205,8 @@ void instance_sunken_temple::Load(const char* chrIn) for(uint8 i = 0; i < MAX_ENCOUNTER; ++i) { - if (m_auiEncounter[i] == IN_PROGRESS) + // Here a bit custom, to have proper mechanics for the statue events + if (m_auiEncounter[i] != DONE) m_auiEncounter[i] = NOT_STARTED; } @@ -135,7 +221,7 @@ uint32 instance_sunken_temple::GetData(uint32 uiType) return m_auiEncounter[0]; case TYPE_PROTECTORS: return m_auiEncounter[1]; - case TYPE_JAMMALAIN: + case TYPE_JAMMALAN: return m_auiEncounter[2]; case TYPE_MALFURION: return m_auiEncounter[3]; @@ -150,9 +236,10 @@ InstanceData* GetInstanceData_instance_sunken_temple(Map* pMap) void AddSC_instance_sunken_temple() { - Script* newscript; - newscript = new Script; - newscript->Name = "instance_sunken_temple"; - newscript->GetInstanceData = &GetInstanceData_instance_sunken_temple; - newscript->RegisterSelf(); + Script* pNewScript; + + pNewScript = new Script; + pNewScript->Name = "instance_sunken_temple"; + pNewScript->GetInstanceData = &GetInstanceData_instance_sunken_temple; + pNewScript->RegisterSelf(); } diff --git a/scripts/eastern_kingdoms/sunken_temple/sunken_temple.cpp b/scripts/eastern_kingdoms/sunken_temple/sunken_temple.cpp index baf91ec..ab8afee 100644 --- a/scripts/eastern_kingdoms/sunken_temple/sunken_temple.cpp +++ b/scripts/eastern_kingdoms/sunken_temple/sunken_temple.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or @@ -24,6 +24,7 @@ EndScriptData */ /* ContentData at_shade_of_eranikus npc_malfurion_stormrage +event_antalarion_statue_activation EndContentData */ #include "precompiled.h" @@ -39,14 +40,14 @@ bool AreaTrigger_at_shade_of_eranikus(Player* pPlayer, AreaTriggerEntry const* p { if (ScriptedInstance* pInstance = (ScriptedInstance*)pPlayer->GetInstanceData()) { - //Only do stuff, if the player has finished the PreQuest + // Only do stuff, if the player has finished the PreQuest if (pPlayer->GetQuestRewardStatus(QUEST_THE_CHARGE_OF_DRAGONFLIGHTS) && !pPlayer->GetQuestRewardStatus(QUEST_ERANIKUS_TYRANT_OF_DREAMS) && pPlayer->GetQuestStatus(QUEST_ERANIKUS_TYRANT_OF_DREAMS) != QUEST_STATUS_COMPLETE) { if (pInstance->GetData(TYPE_MALFURION) != DONE) { - pPlayer->SummonCreature(NPC_MALFURION, -639.378723f, -4.238533f, -90.835098f, 2.724664f, TEMPSUMMON_DEAD_DESPAWN, 0); + pPlayer->SummonCreature(NPC_MALFURION, aSunkenTempleLocation[2].m_fX, aSunkenTempleLocation[2].m_fY, aSunkenTempleLocation[2].m_fZ, aSunkenTempleLocation[2].m_fO, TEMPSUMMON_DEAD_DESPAWN, 0); pInstance->SetData(TYPE_MALFURION, DONE); } } @@ -57,6 +58,7 @@ bool AreaTrigger_at_shade_of_eranikus(Player* pPlayer, AreaTriggerEntry const* p /*###### ## npc_malfurion_stormrage ######*/ + enum { EMOTE_MALFURION1 = -1109000, @@ -72,8 +74,9 @@ struct MANGOS_DLL_DECL npc_malfurionAI : public ScriptedAI { npc_malfurionAI(Creature* pCreature) : ScriptedAI(pCreature) { + DoScriptText(EMOTE_MALFURION1, m_creature); m_uiSpeech = 0; - m_uiSayTimer = 0; + m_uiSayTimer = 3000; m_creature->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_QUESTGIVER); } @@ -83,7 +86,7 @@ struct MANGOS_DLL_DECL npc_malfurionAI : public ScriptedAI void Reset() {} void UpdateAI(const uint32 uiDiff) { - // we are in Sunken Temple + // We are in Sunken Temple if (m_creature->GetMap()->IsDungeon()) { if (m_uiSpeech < MAX_MALFURION_TEMPLE_SPEECHES) @@ -93,28 +96,29 @@ struct MANGOS_DLL_DECL npc_malfurionAI : public ScriptedAI switch (m_uiSpeech) { case 0: - DoScriptText(EMOTE_MALFURION1, m_creature); - m_uiSayTimer = 1500; - break; - case 1: m_creature->HandleEmote(EMOTE_ONESHOT_BOW); m_uiSayTimer = 2000; break; - case 2: + case 1: DoScriptText(SAY_MALFURION1, m_creature); - m_uiSayTimer = 1000; + m_creature->HandleEmote(EMOTE_STATE_TALK); + m_uiSayTimer = 12000; break; - case 3: + case 2: DoScriptText(SAY_MALFURION2, m_creature); - m_uiSayTimer = 1000; + m_uiSayTimer = 12000; break; - case 4: + case 3: DoScriptText(SAY_MALFURION3, m_creature); - m_uiSayTimer = 2000; + m_uiSayTimer = 11000; break; - case 5: + case 4: DoScriptText(SAY_MALFURION4, m_creature); + m_uiSayTimer = 4000; + break; + case 5: m_creature->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_QUESTGIVER); + m_creature->HandleEmote(EMOTE_STATE_NONE); break; } @@ -132,17 +136,61 @@ CreatureAI* GetAI_npc_malfurion(Creature* pCreature) return new npc_malfurionAI(pCreature); } +/*###### +## event_antalarion_statues +######*/ + +bool ProcessEventId_event_antalarion_statue_activation(uint32 uiEventId, Object* pSource, Object* pTarget, bool bIsStart) +{ + if (pSource->GetTypeId() == TYPEID_PLAYER && pTarget->GetTypeId() == TYPEID_GAMEOBJECT) + { + if (instance_sunken_temple* pInstance = (instance_sunken_temple*)((Player*)pSource)->GetInstanceData()) + { + // return if event completed + if (pInstance->GetData(TYPE_ATALARION) != NOT_STARTED) + return true; + + // Send the event id to process + if (pInstance->ProcessStatueEvent(uiEventId)) + { + // Activate the green light if the correct statue is activated + if (GameObject* pLight = GetClosestGameObjectWithEntry((GameObject*)pTarget, GO_ATALAI_LIGHT, INTERACTION_DISTANCE)) + pInstance->DoRespawnGameObject(pLight->GetGUID(), 30 * MINUTE); + } + else + { + // If the wrong statue was activated, then trigger trap + // We don't know actually which trap goes to which statue so we need to search for each + if (GameObject* pTrap = GetClosestGameObjectWithEntry((GameObject*)pTarget, GO_ATALAI_TRAP_1, INTERACTION_DISTANCE)) + pTrap->Use((Unit*)pSource); + else if (GameObject* pTrap = GetClosestGameObjectWithEntry((GameObject*)pTarget, GO_ATALAI_TRAP_2, INTERACTION_DISTANCE)) + pTrap->Use((Unit*)pSource); + else if (GameObject* pTrap = GetClosestGameObjectWithEntry((GameObject*)pTarget, GO_ATALAI_TRAP_3, INTERACTION_DISTANCE)) + pTrap->Use((Unit*)pSource); + } + + return true; + } + } + return false; +} + void AddSC_sunken_temple() { - Script* newscript; + Script* pNewScript; + + pNewScript = new Script; + pNewScript->Name = "at_shade_of_eranikus"; + pNewScript->pAreaTrigger = &AreaTrigger_at_shade_of_eranikus; + pNewScript->RegisterSelf(); - newscript = new Script; - newscript->Name = "at_shade_of_eranikus"; - newscript->pAreaTrigger = &AreaTrigger_at_shade_of_eranikus; - newscript->RegisterSelf(); + pNewScript = new Script; + pNewScript->Name = "npc_malfurion_stormrage"; + pNewScript->GetAI = &GetAI_npc_malfurion; + pNewScript->RegisterSelf(); - newscript = new Script; - newscript->Name = "npc_malfurion_stormrage"; - newscript->GetAI = &GetAI_npc_malfurion; - newscript->RegisterSelf(); + pNewScript = new Script; + pNewScript->Name = "event_antalarion_statue_activation"; + pNewScript->pProcessEventId = &ProcessEventId_event_antalarion_statue_activation; + pNewScript->RegisterSelf(); } diff --git a/scripts/eastern_kingdoms/sunken_temple/sunken_temple.h b/scripts/eastern_kingdoms/sunken_temple/sunken_temple.h index 3ab9c5b..5af17c2 100644 --- a/scripts/eastern_kingdoms/sunken_temple/sunken_temple.h +++ b/scripts/eastern_kingdoms/sunken_temple/sunken_temple.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ @@ -8,19 +8,26 @@ enum { MAX_ENCOUNTER = 4, + MAX_STATUES = 6, - TYPE_ATALARION = 1, - TYPE_PROTECTORS = 2, - TYPE_JAMMALAIN = 3, - TYPE_MALFURION = 4, + // Don't change types 1,2 and 3 (handled in ACID) + TYPE_ATALARION_OBSOLET= 1, + TYPE_PROTECTORS_OBS = 2, + TYPE_JAMMALAN_OBS = 3, + + TYPE_ATALARION = 4, + TYPE_PROTECTORS = 5, + TYPE_JAMMALAN = 6, + TYPE_MALFURION = 7, NPC_ATALARION = 8580, NPC_DREAMSCYTH = 5721, NPC_WEAVER = 5720, + NPC_JAMMALAN = 5710, NPC_AVATAR_OF_HAKKAR = 8443, NPC_SHADE_OF_ERANIKUS = 5709, - // Jammalain min-bosses + // Jammalain mini-bosses NPC_ZOLO = 5712, NPC_GASHER = 5713, NPC_LORO = 5714, @@ -30,21 +37,47 @@ enum NPC_MALFURION = 15362, - GO_ALTAR_OF_HAKKAR = 148836, + GO_ALTAR_OF_HAKKAR = 148836, // Used in order to show the player the order of the statue activation + GO_IDOL_OF_HAKKAR = 148838, // Appears when atalarion is summoned; this was removed in 4.0.1 + + GO_ATALAI_LIGHT = 148883, // Green light, activates when the correct statue is chosen + GO_ATALAI_LIGHT_BIG = 148937, // Big light, used at the altar event - GO_ATALAI_STATUE_1 = 148830, - GO_ATALAI_STATUE_2 = 148831, - GO_ATALAI_STATUE_3 = 148832, - GO_ATALAI_STATUE_4 = 148833, - GO_ATALAI_STATUE_5 = 148834, - GO_ATALAI_STATUE_6 = 148835, + GO_ATALAI_TRAP_1 = 177484, // Trapps triggered if the wrong statue is activated + GO_ATALAI_TRAP_2 = 177485, // The traps are spawned in DB randomly around the statues (we don't know exactly which statue has which trap) + GO_ATALAI_TRAP_3 = 148837, GO_ETERNAL_FLAME_1 = 148418, GO_ETERNAL_FLAME_2 = 148419, GO_ETERNAL_FLAME_3 = 148420, GO_ETERNAL_FLAME_4 = 148421, - GO_JAMMALAIN_BARRIER = 149431 + GO_JAMMALAN_BARRIER = 149431, + + // Event ids related to the statue activation + EVENT_ID_STATUE_1 = 3094, + EVENT_ID_STATUE_2 = 3095, + EVENT_ID_STATUE_3 = 3097, + EVENT_ID_STATUE_4 = 3098, + EVENT_ID_STATUE_5 = 3099, + EVENT_ID_STATUE_6 = 3100, + + SAY_JAMMALAN_INTRO = -1109005, +}; + +// This is also the needed order for activation: S, N, SW, SE, NW, NE +static const uint32 m_aAtalaiStatueEvents[MAX_STATUES] = {EVENT_ID_STATUE_1, EVENT_ID_STATUE_2, EVENT_ID_STATUE_3, EVENT_ID_STATUE_4, EVENT_ID_STATUE_5, EVENT_ID_STATUE_6}; + +struct SummonLocations +{ + float m_fX, m_fY, m_fZ, m_fO; +}; + +static const SummonLocations aSunkenTempleLocation[] = +{ + {-480.3991f, 96.5668f, -189.7297f, 6.1947f}, // Atalarion summon loc + {-466.7165f, 273.0253f, -90.4509f, 3.1338f}, // Avatar and shade of hakkar summon + {-660.5277f, -16.7117f, -90.8357f, 1.6055f} // Malfurion summon loc }; class MANGOS_DLL_DECL instance_sunken_temple : public ScriptedInstance @@ -58,17 +91,31 @@ class MANGOS_DLL_DECL instance_sunken_temple : public ScriptedInstance void OnObjectCreate(GameObject* pGo); void OnCreatureCreate(Creature* pCreature); + // No need currently to use OnEnterCombat or OnEvade + void OnCreatureDeath(Creature* pCreature); + void SetData(uint32 uiType, uint32 uiData); uint32 GetData(uint32 uiType); + bool ProcessStatueEvent(uint32 uiEventId); + const char* Save() { return strInstData.c_str(); } void Load(const char* chrIn); protected: + void DoSpawnAtalarionIfCan(); + uint32 m_auiEncounter[MAX_ENCOUNTER]; std::string strInstData; - uint64 m_uiJammalainBarrierGUID; + uint64 m_uiAtalarionGUID; + uint64 m_uiJammalanGUID; + uint64 m_uiJammalanBarrierGUID; + uint64 m_uiIdolOfHakkarGUID; + uint8 m_uiStatueCounter; uint8 m_uiProtectorsRemaining; + + std::list m_luiBigLightGUIDs; }; + #endif diff --git a/scripts/eastern_kingdoms/sunwell_plateau/boss_muru.cpp b/scripts/eastern_kingdoms/sunwell_plateau/boss_muru.cpp index 8656637..005c424 100644 --- a/scripts/eastern_kingdoms/sunwell_plateau/boss_muru.cpp +++ b/scripts/eastern_kingdoms/sunwell_plateau/boss_muru.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/scripts/eastern_kingdoms/swamp_of_sorrows.cpp b/scripts/eastern_kingdoms/swamp_of_sorrows.cpp index 6c41d28..38660b2 100644 --- a/scripts/eastern_kingdoms/swamp_of_sorrows.cpp +++ b/scripts/eastern_kingdoms/swamp_of_sorrows.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/scripts/eastern_kingdoms/tirisfal_glades.cpp b/scripts/eastern_kingdoms/tirisfal_glades.cpp index 9e0fe88..354dbc6 100644 --- a/scripts/eastern_kingdoms/tirisfal_glades.cpp +++ b/scripts/eastern_kingdoms/tirisfal_glades.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/scripts/eastern_kingdoms/uldaman/boss_archaedas.cpp b/scripts/eastern_kingdoms/uldaman/boss_archaedas.cpp index fcfaf29..41d20ea 100644 --- a/scripts/eastern_kingdoms/uldaman/boss_archaedas.cpp +++ b/scripts/eastern_kingdoms/uldaman/boss_archaedas.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/scripts/eastern_kingdoms/uldaman/instance_uldaman.cpp b/scripts/eastern_kingdoms/uldaman/instance_uldaman.cpp index 1c9b3af..517dbed 100644 --- a/scripts/eastern_kingdoms/uldaman/instance_uldaman.cpp +++ b/scripts/eastern_kingdoms/uldaman/instance_uldaman.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/scripts/eastern_kingdoms/uldaman/uldaman.h b/scripts/eastern_kingdoms/uldaman/uldaman.h index 86435c2..25ab7d5 100644 --- a/scripts/eastern_kingdoms/uldaman/uldaman.h +++ b/scripts/eastern_kingdoms/uldaman/uldaman.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/scripts/eastern_kingdoms/undercity.cpp b/scripts/eastern_kingdoms/undercity.cpp index 12906e9..6acf7a6 100644 --- a/scripts/eastern_kingdoms/undercity.cpp +++ b/scripts/eastern_kingdoms/undercity.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/scripts/eastern_kingdoms/western_plaguelands.cpp b/scripts/eastern_kingdoms/western_plaguelands.cpp index 075c26c..44fcedb 100644 --- a/scripts/eastern_kingdoms/western_plaguelands.cpp +++ b/scripts/eastern_kingdoms/western_plaguelands.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/scripts/eastern_kingdoms/westfall.cpp b/scripts/eastern_kingdoms/westfall.cpp index de175f4..14ce988 100644 --- a/scripts/eastern_kingdoms/westfall.cpp +++ b/scripts/eastern_kingdoms/westfall.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/scripts/eastern_kingdoms/wetlands.cpp b/scripts/eastern_kingdoms/wetlands.cpp index 31b82e2..523792d 100644 --- a/scripts/eastern_kingdoms/wetlands.cpp +++ b/scripts/eastern_kingdoms/wetlands.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/scripts/eastern_kingdoms/zulaman/boss_akilzon.cpp b/scripts/eastern_kingdoms/zulaman/boss_akilzon.cpp index 6ed19b6..2ff6fd6 100644 --- a/scripts/eastern_kingdoms/zulaman/boss_akilzon.cpp +++ b/scripts/eastern_kingdoms/zulaman/boss_akilzon.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/scripts/eastern_kingdoms/zulaman/boss_halazzi.cpp b/scripts/eastern_kingdoms/zulaman/boss_halazzi.cpp index 721975e..3773246 100644 --- a/scripts/eastern_kingdoms/zulaman/boss_halazzi.cpp +++ b/scripts/eastern_kingdoms/zulaman/boss_halazzi.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/scripts/eastern_kingdoms/zulaman/boss_janalai.cpp b/scripts/eastern_kingdoms/zulaman/boss_janalai.cpp index d461fd6..05ef5bf 100644 --- a/scripts/eastern_kingdoms/zulaman/boss_janalai.cpp +++ b/scripts/eastern_kingdoms/zulaman/boss_janalai.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or @@ -317,10 +317,11 @@ struct MANGOS_DLL_DECL boss_janalaiAI : public ScriptedAI //Teleport every player into the middle if more than 20 yards away (possibly what spell 43096 should do) void TeleportPlayersOutOfRange() { - ThreatList const& tList = m_creature->getThreatManager().getThreatList(); - for (ThreatList::const_iterator i = tList.begin();i != tList.end(); ++i) + std::vector vGuids; + m_creature->FillGuidsListFromThreatList(vGuids); + for (std::vector::const_iterator i = vGuids.begin();i != vGuids.end(); ++i) { - Unit* pTemp = m_creature->GetMap()->GetUnit((*i)->getUnitGuid()); + Unit* pTemp = m_creature->GetMap()->GetUnit(*i); if (pTemp && pTemp->GetTypeId() == TYPEID_PLAYER && !m_creature->IsWithinDist(pTemp, 20.0f)) m_creature->CastSpell(pTemp, SPELL_SUMMONALL, true); diff --git a/scripts/eastern_kingdoms/zulaman/boss_nalorakk.cpp b/scripts/eastern_kingdoms/zulaman/boss_nalorakk.cpp index 694249a..1ef77c2 100644 --- a/scripts/eastern_kingdoms/zulaman/boss_nalorakk.cpp +++ b/scripts/eastern_kingdoms/zulaman/boss_nalorakk.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/scripts/eastern_kingdoms/zulaman/zulaman.cpp b/scripts/eastern_kingdoms/zulaman/zulaman.cpp index e83c200..4a52b15 100644 --- a/scripts/eastern_kingdoms/zulaman/zulaman.cpp +++ b/scripts/eastern_kingdoms/zulaman/zulaman.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/scripts/eastern_kingdoms/zulaman/zulaman.h b/scripts/eastern_kingdoms/zulaman/zulaman.h index dff80c0..1996052 100644 --- a/scripts/eastern_kingdoms/zulaman/zulaman.h +++ b/scripts/eastern_kingdoms/zulaman/zulaman.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/scripts/eastern_kingdoms/zulgurub/boss_arlokk.cpp b/scripts/eastern_kingdoms/zulgurub/boss_arlokk.cpp index dc2c573..e9b2077 100644 --- a/scripts/eastern_kingdoms/zulgurub/boss_arlokk.cpp +++ b/scripts/eastern_kingdoms/zulgurub/boss_arlokk.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/scripts/eastern_kingdoms/zulgurub/boss_gahzranka.cpp b/scripts/eastern_kingdoms/zulgurub/boss_gahzranka.cpp index 8b836a6..ce35bf3 100644 --- a/scripts/eastern_kingdoms/zulgurub/boss_gahzranka.cpp +++ b/scripts/eastern_kingdoms/zulgurub/boss_gahzranka.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/scripts/eastern_kingdoms/zulgurub/boss_grilek.cpp b/scripts/eastern_kingdoms/zulgurub/boss_grilek.cpp index 0948dd8..3ec20b0 100644 --- a/scripts/eastern_kingdoms/zulgurub/boss_grilek.cpp +++ b/scripts/eastern_kingdoms/zulgurub/boss_grilek.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/scripts/eastern_kingdoms/zulgurub/boss_hakkar.cpp b/scripts/eastern_kingdoms/zulgurub/boss_hakkar.cpp index 05ad055..1b1b0be 100644 --- a/scripts/eastern_kingdoms/zulgurub/boss_hakkar.cpp +++ b/scripts/eastern_kingdoms/zulgurub/boss_hakkar.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or @@ -24,23 +24,24 @@ EndScriptData */ #include "precompiled.h" #include "zulgurub.h" -#define SAY_AGGRO -1309020 -#define SAY_FLEEING -1309021 -#define SAY_MINION_DESTROY -1309022 //where does it belong? -#define SAY_PROTECT_ALTAR -1309023 //where does it belong? - -#define SPELL_BLOODSIPHON 24322 -#define SPELL_CORRUPTEDBLOOD 24328 -#define SPELL_CAUSEINSANITY 24327 //Not working disabled. -#define SPELL_WILLOFHAKKAR 24178 -#define SPELL_ENRAGE 24318 - -// The Aspects of all High Priests -#define SPELL_ASPECT_OF_JEKLIK 24687 -#define SPELL_ASPECT_OF_VENOXIS 24688 -#define SPELL_ASPECT_OF_MARLI 24686 -#define SPELL_ASPECT_OF_THEKAL 24689 -#define SPELL_ASPECT_OF_ARLOKK 24690 +enum +{ + SAY_AGGRO = -1309020, + SAY_FLEEING = -1309021, + + SPELL_BLOOD_SIPHON = 24324, // Related Spells 24322, 24323, 24324, likely starting spell is 24324 (disabled until proper fixed) + SPELL_CORRUPTED_BLOOD = 24328, + SPELL_CAUSE_INSANITY = 24327, + SPELL_WILL_OF_HAKKAR = 24178, + SPELL_ENRAGE = 24318, + + // The Aspects of all High Priests + SPELL_ASPECT_OF_JEKLIK = 24687, + SPELL_ASPECT_OF_VENOXIS = 24688, + SPELL_ASPECT_OF_MARLI = 24686, + SPELL_ASPECT_OF_THEKAL = 24689, + SPELL_ASPECT_OF_ARLOKK = 24690 +}; struct MANGOS_DLL_DECL boss_hakkarAI : public ScriptedAI { @@ -52,185 +53,178 @@ struct MANGOS_DLL_DECL boss_hakkarAI : public ScriptedAI ScriptedInstance* m_pInstance; - uint32 BloodSiphon_Timer; - uint32 CorruptedBlood_Timer; - uint32 CauseInsanity_Timer; - uint32 WillOfHakkar_Timer; - uint32 Enrage_Timer; + uint32 m_uiBloodSiphonTimer; + uint32 m_uiCorruptedBloodTimer; + uint32 m_uiCauseInsanityTimer; + uint32 m_uiWillOfHakkarTimer; + uint32 m_uiEnrageTimer; - uint32 CheckJeklik_Timer; - uint32 CheckVenoxis_Timer; - uint32 CheckMarli_Timer; - uint32 CheckThekal_Timer; - uint32 CheckArlokk_Timer; - - uint32 AspectOfJeklik_Timer; - uint32 AspectOfVenoxis_Timer; - uint32 AspectOfMarli_Timer; - uint32 AspectOfThekal_Timer; - uint32 AspectOfArlokk_Timer; - - bool Enraged; + uint32 m_uiAspectOfJeklikTimer; + uint32 m_uiAspectOfVenoxisTimer; + uint32 m_uiAspectOfMarliTimer; + uint32 m_uiAspectOfThekalTimer; + uint32 m_uiAspectOfArlokkTimer; void Reset() { - BloodSiphon_Timer = 90000; - CorruptedBlood_Timer = 25000; - CauseInsanity_Timer = 17000; - WillOfHakkar_Timer = 17000; - Enrage_Timer = 600000; - - CheckJeklik_Timer = 1000; - CheckVenoxis_Timer = 2000; - CheckMarli_Timer = 3000; - CheckThekal_Timer = 4000; - CheckArlokk_Timer = 5000; - - AspectOfJeklik_Timer = 4000; - AspectOfVenoxis_Timer = 7000; - AspectOfMarli_Timer = 12000; - AspectOfThekal_Timer = 8000; - AspectOfArlokk_Timer = 18000; - - Enraged = false; + m_uiBloodSiphonTimer = 90000; + m_uiCorruptedBloodTimer = 25000; + m_uiCauseInsanityTimer = 17000; + m_uiWillOfHakkarTimer = 17000; + m_uiEnrageTimer = 10*MINUTE*IN_MILLISECONDS; + + m_uiAspectOfJeklikTimer = 4000; + m_uiAspectOfVenoxisTimer = 7000; + m_uiAspectOfMarliTimer = 12000; + m_uiAspectOfThekalTimer = 8000; + m_uiAspectOfArlokkTimer = 18000; } void Aggro(Unit *who) { DoScriptText(SAY_AGGRO, m_creature); + + // check if the priest encounters are done + if (m_pInstance) + { + if (m_pInstance->GetData(TYPE_JEKLIK) == DONE) + m_uiAspectOfJeklikTimer = 0; + if (m_pInstance->GetData(TYPE_VENOXIS) == DONE) + m_uiAspectOfVenoxisTimer = 0; + if (m_pInstance->GetData(TYPE_MARLI) == DONE) + m_uiAspectOfMarliTimer = 0; + if (m_pInstance->GetData(TYPE_THEKAL) == DONE) + m_uiAspectOfThekalTimer = 0; + if (m_pInstance->GetData(TYPE_ARLOKK) == DONE) + m_uiAspectOfArlokkTimer = 0; + } } - void UpdateAI(const uint32 diff) + void UpdateAI(const uint32 uiDiff) { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; - //BloodSiphon_Timer - if (BloodSiphon_Timer < diff) + /* Disabled as needs core fix// Blood Siphon Timer + * This also will requre spells 24320 24321 to be implemented (and used by the "Son of Hakkar" npcs) + if (m_uiBloodSiphonTimer < uiDiff) { - DoCastSpellIfCan(m_creature->getVictim(),SPELL_BLOODSIPHON); - BloodSiphon_Timer = 90000; - }else BloodSiphon_Timer -= diff; - - //CorruptedBlood_Timer - if (CorruptedBlood_Timer < diff) + if (DoCastSpellIfCan(m_creature, SPELL_BLOOD_SIPHON) == CAST_OK) + m_uiBloodSiphonTimer = 90000; + } + else + m_uiBloodSiphonTimer -= uiDiff; */ + + // Corrupted Blood Timer + if (m_uiCorruptedBloodTimer < uiDiff) { - DoCastSpellIfCan(m_creature->getVictim(),SPELL_CORRUPTEDBLOOD); - CorruptedBlood_Timer = urand(30000, 45000); - }else CorruptedBlood_Timer -= diff; + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) + { + if (DoCastSpellIfCan(pTarget, SPELL_CORRUPTED_BLOOD) == CAST_OK) + m_uiCorruptedBloodTimer = urand(30000, 45000); + } + } + else + m_uiCorruptedBloodTimer -= uiDiff; - //CauseInsanity_Timer - /*if (CauseInsanity_Timer < diff) + // Cause Insanity Timer + if (m_uiCauseInsanityTimer < uiDiff) { - if (Unit* target = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM,0)) - DoCastSpellIfCan(target,SPELL_CAUSEINSANITY); - - CauseInsanity_Timer = urand(35000, 43000); - }else CauseInsanity_Timer -= diff;*/ - - //WillOfHakkar_Timer - if (WillOfHakkar_Timer < diff) + if (m_creature->getThreatManager().getThreatList().size() > 1) + { + if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_CAUSE_INSANITY) == CAST_OK) + m_uiCauseInsanityTimer = urand(10000, 15000); + } + else // Solo case, check again later + m_uiCauseInsanityTimer = urand(35000, 43000); + } + else + m_uiCauseInsanityTimer -= uiDiff; + + // Will Of Hakkar Timer + if (m_uiWillOfHakkarTimer < uiDiff) { + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 1)) + { + if (DoCastSpellIfCan(pTarget, SPELL_WILL_OF_HAKKAR) == CAST_OK) + m_uiWillOfHakkarTimer = urand(25000, 35000); + } + else // solo attempt, try again later + m_uiWillOfHakkarTimer = 25000; + } + else + m_uiWillOfHakkarTimer -= uiDiff; - if (Unit* target = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM,0)) - DoCastSpellIfCan(target,SPELL_WILLOFHAKKAR); - - WillOfHakkar_Timer = urand(25000, 35000); - }else WillOfHakkar_Timer -= diff; - - if (!Enraged && Enrage_Timer < diff) + if (m_uiEnrageTimer < uiDiff) { - DoCastSpellIfCan(m_creature, SPELL_ENRAGE); - Enraged = true; - }else Enrage_Timer -= diff; - - //Checking if Jeklik is dead. If not we cast her Aspect - if (CheckJeklik_Timer < diff) + if (DoCastSpellIfCan(m_creature, SPELL_ENRAGE) == CAST_OK) + m_uiEnrageTimer = 10*MINUTE*IN_MILLISECONDS; + } + else + m_uiEnrageTimer -= uiDiff; + + // Checking if Jeklik is dead. If not we cast her Aspect + if (m_uiAspectOfJeklikTimer) { - if (m_pInstance) + if (m_uiAspectOfJeklikTimer <= uiDiff) { - if (m_pInstance->GetData(TYPE_JEKLIK) != DONE) - { - if (AspectOfJeklik_Timer < diff) - { - DoCastSpellIfCan(m_creature->getVictim(),SPELL_ASPECT_OF_JEKLIK); - AspectOfJeklik_Timer = urand(10000, 14000); - }else AspectOfJeklik_Timer -= diff; - } + if (DoCastSpellIfCan(m_creature, SPELL_ASPECT_OF_JEKLIK) == CAST_OK) + m_uiAspectOfJeklikTimer = urand(10000, 14000); } - CheckJeklik_Timer = 1000; - }else CheckJeklik_Timer -= diff; + else + m_uiAspectOfJeklikTimer -= uiDiff; + } - //Checking if Venoxis is dead. If not we cast his Aspect - if (CheckVenoxis_Timer < diff) + // Checking if Venoxis is dead. If not we cast his Aspect + if (m_uiAspectOfVenoxisTimer) { - if (m_pInstance) + if (m_uiAspectOfVenoxisTimer <= uiDiff) { - if (m_pInstance->GetData(TYPE_VENOXIS) != DONE) - { - if (AspectOfVenoxis_Timer < diff) - { - DoCastSpellIfCan(m_creature->getVictim(),SPELL_ASPECT_OF_VENOXIS); - AspectOfVenoxis_Timer = 8000; - }else AspectOfVenoxis_Timer -= diff; - } + if (DoCastSpellIfCan(m_creature, SPELL_ASPECT_OF_VENOXIS) == CAST_OK) + m_uiAspectOfVenoxisTimer = 8000; } - CheckVenoxis_Timer = 1000; - }else CheckVenoxis_Timer -= diff; + else + m_uiAspectOfVenoxisTimer -= uiDiff; + } - //Checking if Marli is dead. If not we cast her Aspect - if (CheckMarli_Timer < diff) + // Checking if Marli is dead. If not we cast her Aspect + if (m_uiAspectOfMarliTimer) { - if (m_pInstance) + if (m_uiAspectOfMarliTimer <= uiDiff) { - if (m_pInstance->GetData(TYPE_MARLI) != DONE) - { - if (AspectOfMarli_Timer < diff) - { - DoCastSpellIfCan(m_creature->getVictim(),SPELL_ASPECT_OF_MARLI); - AspectOfMarli_Timer = 10000; - }else AspectOfMarli_Timer -= diff; - - } + if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_ASPECT_OF_MARLI) == CAST_OK) + m_uiAspectOfMarliTimer = 10000; } - CheckMarli_Timer = 1000; - }else CheckMarli_Timer -= diff; + else + m_uiAspectOfMarliTimer -= uiDiff; + } - //Checking if Thekal is dead. If not we cast his Aspect - if (CheckThekal_Timer < diff) + // Checking if Thekal is dead. If not we cast his Aspect + if (m_uiAspectOfThekalTimer) { - if (m_pInstance) + if (m_uiAspectOfThekalTimer <= uiDiff) { - if (m_pInstance->GetData(TYPE_THEKAL) != DONE) - { - if (AspectOfThekal_Timer < diff) - { - DoCastSpellIfCan(m_creature,SPELL_ASPECT_OF_THEKAL); - AspectOfThekal_Timer = 15000; - }else AspectOfThekal_Timer -= diff; - } + if (DoCastSpellIfCan(m_creature, SPELL_ASPECT_OF_THEKAL) == CAST_OK) + m_uiAspectOfThekalTimer = 15000; } - CheckThekal_Timer = 1000; - }else CheckThekal_Timer -= diff; + else + m_uiAspectOfThekalTimer -= uiDiff; + } - //Checking if Arlokk is dead. If yes we cast her Aspect - if (CheckArlokk_Timer < diff) + // Checking if Arlokk is dead. If yes we cast her Aspect + if (m_uiAspectOfArlokkTimer) { - if (m_pInstance) + if (m_uiAspectOfArlokkTimer <= uiDiff) { - if (m_pInstance->GetData(TYPE_ARLOKK) != DONE) + if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_ASPECT_OF_ARLOKK) == CAST_OK) { - if (AspectOfArlokk_Timer < diff) - { - DoCastSpellIfCan(m_creature,SPELL_ASPECT_OF_ARLOKK); - DoResetThreat(); - - AspectOfArlokk_Timer = urand(10000, 15000); - }else AspectOfArlokk_Timer -= diff; + DoResetThreat(); + m_uiAspectOfArlokkTimer = urand(10000, 15000); } } - CheckArlokk_Timer = 1000; - }else CheckArlokk_Timer -= diff; + else + m_uiAspectOfArlokkTimer -= uiDiff; + } DoMeleeAttackIfReady(); } @@ -243,9 +237,10 @@ CreatureAI* GetAI_boss_hakkar(Creature* pCreature) void AddSC_boss_hakkar() { - Script *newscript; - newscript = new Script; - newscript->Name = "boss_hakkar"; - newscript->GetAI = &GetAI_boss_hakkar; - newscript->RegisterSelf(); + Script* pNewScript; + + pNewScript = new Script; + pNewScript->Name = "boss_hakkar"; + pNewScript->GetAI = &GetAI_boss_hakkar; + pNewScript->RegisterSelf(); } diff --git a/scripts/eastern_kingdoms/zulgurub/boss_hazzarah.cpp b/scripts/eastern_kingdoms/zulgurub/boss_hazzarah.cpp index d6d85b7..75a9c86 100644 --- a/scripts/eastern_kingdoms/zulgurub/boss_hazzarah.cpp +++ b/scripts/eastern_kingdoms/zulgurub/boss_hazzarah.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/scripts/eastern_kingdoms/zulgurub/boss_jeklik.cpp b/scripts/eastern_kingdoms/zulgurub/boss_jeklik.cpp index 331eb4c..cabbb2e 100644 --- a/scripts/eastern_kingdoms/zulgurub/boss_jeklik.cpp +++ b/scripts/eastern_kingdoms/zulgurub/boss_jeklik.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/scripts/eastern_kingdoms/zulgurub/boss_jindo.cpp b/scripts/eastern_kingdoms/zulgurub/boss_jindo.cpp index 4554c3c..b43d2ab 100644 --- a/scripts/eastern_kingdoms/zulgurub/boss_jindo.cpp +++ b/scripts/eastern_kingdoms/zulgurub/boss_jindo.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or @@ -17,27 +17,41 @@ /* ScriptData SDName: Boss_Jin'do the Hexxer SD%Complete: 85 -SDComment: Mind Control not working because of core bug. Shades visible for all. +SDComment: Mind Control not working because of core bug. Shades invisible is removed as of Attacking (core bug) - MANY HACKZ!! SDCategory: Zul'Gurub EndScriptData */ #include "precompiled.h" #include "zulgurub.h" -#define SAY_AGGRO -1309014 +enum +{ + SAY_AGGRO = -1309014, + + SPELL_BRAINWASH_TOTEM = 24262, + SPELL_POWERFULL_HEALING_WARD = 24309, + SPELL_HEX = 24053, + SPELL_DELUSIONS_OF_JINDO = 24306, + SPELL_SHADE_OF_JINDO = 24308, // Spell was removed from DBC around TBC; will summon npcs manually! + + SPELL_HEALING_WARD_HEAL = 24311, -#define SPELL_BRAINWASHTOTEM 24262 -#define SPELL_POWERFULLHEALINGWARD 24309 //We will not use this spell. We will summon a totem by script cause the spell totems will not cast. -#define SPELL_HEX 24053 -#define SPELL_DELUSIONSOFJINDO 24306 -#define SPELL_SHADEOFJINDO 24308 //We will not use this spell. We will summon a shade by script. + // Shade of Jindo Spell + SPELL_SHADOWSHOCK = 19460, + SPELL_SHADE_OF_JINDO_PASSIVE = 24307, // shade invisibility, needs core support to prevent removing when attacking -//Healing Ward Spell -#define SPELL_HEAL 38588 //Totems are not working right. Right heal spell ID is 24311 but this spell is not casting... + // npcs + NPC_SHADE_OF_JINDO = 14986, + NPC_SACRIFICED_TROLL = 14826, + NPC_POWERFULL_HEALING_WARD = 14987, + + MAX_SKELETONS = 9, +}; -//Shade of Jindo Spell -#define SPELL_SHADOWSHOCK 19460 -#define SPELL_INVISIBLE 24699 +static const float aPitTeleportLocs[4] = +{ + -11583.7783f, -1249.4278f, 77.5471f, 4.745f +}; struct MANGOS_DLL_DECL boss_jindoAI : public ScriptedAI { @@ -49,163 +63,143 @@ struct MANGOS_DLL_DECL boss_jindoAI : public ScriptedAI ScriptedInstance* m_pInstance; - uint32 BrainWashTotem_Timer; - uint32 HealingWard_Timer; - uint32 Hex_Timer; - uint32 Delusions_Timer; - uint32 Teleport_Timer; + uint32 m_uiBrainWashTotemTimer; + uint32 m_uiHealingWardTimer; + uint32 m_uiHexTimer; + uint32 m_uiDelusionsTimer; + uint32 m_uiTeleportTimer; void Reset() { - BrainWashTotem_Timer = 20000; - HealingWard_Timer = 16000; - Hex_Timer = 8000; - Delusions_Timer = 10000; - Teleport_Timer = 5000; + m_uiBrainWashTotemTimer = 20000; + m_uiHealingWardTimer = 16000; + m_uiHexTimer = 8000; + m_uiDelusionsTimer = 10000; + m_uiTeleportTimer = 5000; } - void Aggro(Unit *who) + void Aggro(Unit* pWho) { DoScriptText(SAY_AGGRO, m_creature); } - void UpdateAI(const uint32 diff) + void SummonedCreatureJustDied(Creature* pSummoned) + { + if (pSummoned->GetEntry() == NPC_POWERFULL_HEALING_WARD) + m_uiHealingWardTimer = 15000; // how long delay? + } + + void UpdateAI(const uint32 uiDiff) { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; - //BrainWashTotem_Timer - if (BrainWashTotem_Timer < diff) + // Brain Wash Totem Timer + if (m_uiBrainWashTotemTimer < uiDiff) { - DoCastSpellIfCan(m_creature, SPELL_BRAINWASHTOTEM); - BrainWashTotem_Timer = urand(18000, 26000); - }else BrainWashTotem_Timer -= diff; - - //HealingWard_Timer - if (HealingWard_Timer < diff) + if (DoCastSpellIfCan(m_creature, SPELL_BRAINWASH_TOTEM) == CAST_OK) + m_uiBrainWashTotemTimer = urand(18000, 26000); + } + else + m_uiBrainWashTotemTimer -= uiDiff; + + // Healing Ward Timer + if (m_uiHealingWardTimer) { - //DoCastSpellIfCan(m_creature, SPELL_POWERFULLHEALINGWARD); - m_creature->SummonCreature(14987, m_creature->GetPositionX()+3, m_creature->GetPositionY()-2, m_creature->GetPositionZ(), 0, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN,30000); - HealingWard_Timer = urand(14000, 20000); - }else HealingWard_Timer -= diff; + if (m_uiHealingWardTimer <= uiDiff) + { + if (DoCastSpellIfCan(m_creature, SPELL_POWERFULL_HEALING_WARD) == CAST_OK) + m_uiHealingWardTimer = 0; + } + else + m_uiHealingWardTimer -= uiDiff; + } - //Hex_Timer - if (Hex_Timer < diff) + // Hex Timer + if (m_uiHexTimer < uiDiff) { - DoCastSpellIfCan(m_creature->getVictim(), SPELL_HEX); - - if (m_creature->getThreatManager().getThreat(m_creature->getVictim())) - m_creature->getThreatManager().modifyThreatPercent(m_creature->getVictim(),-80); - - Hex_Timer = urand(12000, 20000); - }else Hex_Timer -= diff; - - //Casting the delusion curse with a shade. So shade will attack the same target with the curse. - if (Delusions_Timer < diff) + if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_HEX) == CAST_OK) + m_uiHexTimer = urand(12000, 20000); + } + else + m_uiHexTimer -= uiDiff; + + // Casting the delusion curse with a shade. So shade will attack the same target with the curse. + if (m_uiDelusionsTimer < uiDiff) { - if (Unit* target = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM,0)) + // random target except the tank + Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 1); + if (!pTarget) + pTarget = m_creature->getVictim(); + + if (DoCastSpellIfCan(pTarget, SPELL_DELUSIONS_OF_JINDO) == CAST_OK) { - DoCastSpellIfCan(target, SPELL_DELUSIONSOFJINDO); + float fX, fY, fZ; + m_creature->GetRandomPoint(pTarget->GetPositionX(), pTarget->GetPositionY(), pTarget->GetPositionZ(), 5.0f, fX, fY, fZ); + if (Creature* pSummoned = m_creature->SummonCreature(NPC_SHADE_OF_JINDO, fX, fY, fZ, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000)) + pSummoned->AI()->AttackStart(pTarget); - Creature *Shade = m_creature->SummonCreature(14986, target->GetPositionX(), target->GetPositionY(), target->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000); - if (Shade) - Shade->AI()->AttackStart(target); + m_uiDelusionsTimer = urand(4000, 12000); } + } + else + m_uiDelusionsTimer -= uiDiff; - Delusions_Timer = urand(4000, 12000); - }else Delusions_Timer -= diff; - - //Teleporting a random gamer and spawning 9 skeletons that will attack this gamer - if (Teleport_Timer < diff) + // Teleporting a random player and spawning 9 skeletons that will attack this player + if (m_uiTeleportTimer < uiDiff) { - Unit* target = NULL; - target = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM,0); - if (target && target->GetTypeId() == TYPEID_PLAYER) + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) { - DoTeleportPlayer(target, -11583.7783f, -1249.4278f, 77.5471f, 4.745f); - - if (m_creature->getThreatManager().getThreat(m_creature->getVictim())) - m_creature->getThreatManager().modifyThreatPercent(target,-100); - - Creature *Skeletons; - Skeletons = m_creature->SummonCreature(14826, target->GetPositionX()+2, target->GetPositionY(), target->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000); - if (Skeletons) - Skeletons->AI()->AttackStart(target); - Skeletons = m_creature->SummonCreature(14826, target->GetPositionX()-2, target->GetPositionY(), target->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000); - if (Skeletons) - Skeletons->AI()->AttackStart(target); - Skeletons = m_creature->SummonCreature(14826, target->GetPositionX()+4, target->GetPositionY(), target->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000); - if (Skeletons) - Skeletons->AI()->AttackStart(target); - Skeletons = m_creature->SummonCreature(14826, target->GetPositionX()-4, target->GetPositionY(), target->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000); - if (Skeletons) - Skeletons->AI()->AttackStart(target); - Skeletons = m_creature->SummonCreature(14826, target->GetPositionX(), target->GetPositionY()+2, target->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000); - if (Skeletons) - Skeletons->AI()->AttackStart(target); - Skeletons = m_creature->SummonCreature(14826, target->GetPositionX(), target->GetPositionY()-2, target->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000); - if (Skeletons) - Skeletons->AI()->AttackStart(target); - Skeletons = m_creature->SummonCreature(14826, target->GetPositionX(), target->GetPositionY()+4, target->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000); - if (Skeletons) - Skeletons->AI()->AttackStart(target); - Skeletons = m_creature->SummonCreature(14826, target->GetPositionX(), target->GetPositionY()-4, target->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000); - if (Skeletons) - Skeletons->AI()->AttackStart(target); - Skeletons = m_creature->SummonCreature(14826, target->GetPositionX()+3, target->GetPositionY(), target->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000); - if (Skeletons) - Skeletons->AI()->AttackStart(target); - } + DoTeleportPlayer(pTarget, aPitTeleportLocs[0], aPitTeleportLocs[1], aPitTeleportLocs[2], aPitTeleportLocs[3]); - Teleport_Timer = urand(15000, 23000); - }else Teleport_Timer -= diff; + // summon 9 skeletons in the pit at random points + float fX, fY, fZ; + for (uint8 i = 0; i < MAX_SKELETONS; ++i) + { + m_creature->GetRandomPoint(aPitTeleportLocs[0], aPitTeleportLocs[1], aPitTeleportLocs[2], 4.0f, fX, fY, fZ); + if (Creature* pSummoned = m_creature->SummonCreature(NPC_SACRIFICED_TROLL, fX, fY, fZ, 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 15000)) + pSummoned->AI()->AttackStart(pTarget); + } + + m_uiTeleportTimer = urand(15000, 23000); + } + } + else + m_uiTeleportTimer -= uiDiff; DoMeleeAttackIfReady(); } }; -//Healing Ward +// HACK script! Should not need to have totems in sd2 struct MANGOS_DLL_DECL mob_healing_wardAI : public ScriptedAI { - mob_healing_wardAI(Creature* pCreature) : ScriptedAI(pCreature) - { - m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); - Reset(); - } + mob_healing_wardAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset(); } - ScriptedInstance* m_pInstance; - - uint32 Heal_Timer; + uint32 m_uiHealTimer; void Reset() { - Heal_Timer = 2000; + m_uiHealTimer = 3000; // Timer unknown, sources go over 1s, per tick to 3s, keep 3s as in original script } - void UpdateAI (const uint32 diff) + void AttackStart(Unit* pWho) {} + void MoveInLineOfSight(Unit* pWho) {} + + void UpdateAI (const uint32 uiDiff) { - //Heal_Timer - if (Heal_Timer < diff) + // Heal Timer + if (m_uiHealTimer < uiDiff) { - if (m_pInstance) - { - if (Unit *pJindo = m_pInstance->instance->GetCreature(m_pInstance->GetData64(DATA_JINDO))) - { - if (pJindo->isAlive()) - DoCastSpellIfCan(pJindo, SPELL_HEAL); - } - } - Heal_Timer = 3000; - }else Heal_Timer -= diff; - - if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) - return; - - DoMeleeAttackIfReady(); + DoCastSpellIfCan(m_creature, SPELL_HEALING_WARD_HEAL); + m_uiHealTimer = 3000; + } + else + m_uiHealTimer -= uiDiff; } }; -//Shade of Jindo +// TODO Move to Acid struct MANGOS_DLL_DECL mob_shade_of_jindoAI : public ScriptedAI { mob_shade_of_jindoAI(Creature* pCreature) : ScriptedAI(pCreature) @@ -216,25 +210,27 @@ struct MANGOS_DLL_DECL mob_shade_of_jindoAI : public ScriptedAI ScriptedInstance* m_pInstance; - uint32 ShadowShock_Timer; + uint32 m_uiShadowShockTimer; void Reset() { - ShadowShock_Timer = 1000; - m_creature->CastSpell(m_creature, SPELL_INVISIBLE,true); + m_uiShadowShockTimer = 1000; + DoCastSpellIfCan(m_creature, SPELL_SHADE_OF_JINDO_PASSIVE); } - void UpdateAI (const uint32 diff) + void UpdateAI (const uint32 uiDiff) { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; - //ShadowShock_Timer - if (ShadowShock_Timer < diff) + // ShadowShock Timer + if (m_uiShadowShockTimer < uiDiff) { - DoCastSpellIfCan(m_creature->getVictim(), SPELL_SHADOWSHOCK); - ShadowShock_Timer = 2000; - }else ShadowShock_Timer -= diff; + if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_SHADOWSHOCK) == CAST_OK) + m_uiShadowShockTimer = 2000; + } + else + m_uiShadowShockTimer -= uiDiff; DoMeleeAttackIfReady(); } @@ -257,20 +253,20 @@ CreatureAI* GetAI_mob_shade_of_jindo(Creature* pCreature) void AddSC_boss_jindo() { - Script *newscript; - - newscript = new Script; - newscript->Name = "boss_jindo"; - newscript->GetAI = &GetAI_boss_jindo; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "mob_healing_ward"; - newscript->GetAI = &GetAI_mob_healing_ward; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "mob_shade_of_jindo"; - newscript->GetAI = &GetAI_mob_shade_of_jindo; - newscript->RegisterSelf(); + Script* pNewScript; + + pNewScript = new Script; + pNewScript->Name = "boss_jindo"; + pNewScript->GetAI = &GetAI_boss_jindo; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "mob_healing_ward"; + pNewScript->GetAI = &GetAI_mob_healing_ward; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "mob_shade_of_jindo"; + pNewScript->GetAI = &GetAI_mob_shade_of_jindo; + pNewScript->RegisterSelf(); } diff --git a/scripts/eastern_kingdoms/zulgurub/boss_mandokir.cpp b/scripts/eastern_kingdoms/zulgurub/boss_mandokir.cpp index 524a73c..2201ac4 100644 --- a/scripts/eastern_kingdoms/zulgurub/boss_mandokir.cpp +++ b/scripts/eastern_kingdoms/zulgurub/boss_mandokir.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or @@ -167,10 +167,10 @@ struct MANGOS_DLL_DECL boss_mandokirAI : public ScriptedAI if (m_pInstance) { - if (Creature* jTemp = m_creature->GetMap()->GetCreature(m_pInstance->GetData64(DATA_JINDO))) + if (Creature* pJindo = m_creature->GetMap()->GetCreature(m_pInstance->GetData64(NPC_JINDO))) { - if (jTemp->isAlive()) - DoScriptText(SAY_GRATS_JINDO, jTemp); + if (pJindo->isAlive()) + DoScriptText(SAY_GRATS_JINDO, pJindo); } } diff --git a/scripts/eastern_kingdoms/zulgurub/boss_marli.cpp b/scripts/eastern_kingdoms/zulgurub/boss_marli.cpp index 17e5881..b5d1b8f 100644 --- a/scripts/eastern_kingdoms/zulgurub/boss_marli.cpp +++ b/scripts/eastern_kingdoms/zulgurub/boss_marli.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/scripts/eastern_kingdoms/zulgurub/boss_renataki.cpp b/scripts/eastern_kingdoms/zulgurub/boss_renataki.cpp index 8eb7e8f..f0358d9 100644 --- a/scripts/eastern_kingdoms/zulgurub/boss_renataki.cpp +++ b/scripts/eastern_kingdoms/zulgurub/boss_renataki.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/scripts/eastern_kingdoms/zulgurub/boss_thekal.cpp b/scripts/eastern_kingdoms/zulgurub/boss_thekal.cpp index 720d3d0..2586217 100644 --- a/scripts/eastern_kingdoms/zulgurub/boss_thekal.cpp +++ b/scripts/eastern_kingdoms/zulgurub/boss_thekal.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or @@ -24,35 +24,122 @@ EndScriptData */ #include "precompiled.h" #include "zulgurub.h" -#define SAY_AGGRO -1309009 -#define SAY_DEATH -1309010 - -#define SPELL_MORTALCLEAVE 22859 -#define SPELL_SILENCE 23207 -#define SPELL_FRENZY 23342 -#define SPELL_FORCEPUNCH 24189 -#define SPELL_CHARGE 24408 -#define SPELL_ENRAGE 23537 -#define SPELL_SUMMONTIGERS 24183 -#define SPELL_TIGER_FORM 24169 -#define SPELL_RESURRECT 24173 //We will not use this spell. - -//Zealot Lor'Khan Spells -#define SPELL_SHIELD 25020 -#define SPELL_BLOODLUST 24185 -#define SPELL_GREATERHEAL 24208 -#define SPELL_DISARM 22691 - -//Zealot Lor'Khan Spells -#define SPELL_SWEEPINGSTRIKES 18765 -#define SPELL_SINISTERSTRIKE 15667 -#define SPELL_GOUGE 24698 -#define SPELL_KICK 15614 -#define SPELL_BLIND 21060 - -struct MANGOS_DLL_DECL boss_thekalAI : public ScriptedAI +enum { - boss_thekalAI(Creature* pCreature) : ScriptedAI(pCreature) + SAY_AGGRO = -1309009, + SAY_DEATH = -1309010, + + SPELL_MORTAL_CLEAVE = 22859, + SPELL_SILENCE = 23207, + SPELL_FRENZY = 23342, + SPELL_FORCE_PUNCH = 24189, + SPELL_CHARGE = 24408, + SPELL_ENRAGE = 23537, + SPELL_SUMMON_TIGERS = 24183, + SPELL_TIGER_FORM = 24169, + SPELL_RESURRECT = 24173, + + // Zealot Lor'Khan Spells + SPELL_SHIELD = 25020, + SPELL_BLOODLUST = 24185, + SPELL_GREATER_HEAL = 24208, + SPELL_DISARM = 22691, + + //Zealot Lor'Khan Spells + SPELL_SWEEPING_STRIKES = 18765, + SPELL_SINISTER_STRIKE = 15667, + SPELL_GOUGE = 24698, + SPELL_KICK = 15614, + SPELL_BLIND = 21060, + + PHASE_NORMAL = 1, + PHASE_FAKE_DEATH = 2, + PHASE_WAITING = 3, + PHASE_TIGER = 4, +}; + +// abstract base class for faking death +struct MANGOS_DLL_DECL boss_thekalBaseAI : public ScriptedAI +{ + boss_thekalBaseAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_uiPhase = PHASE_NORMAL; + } + + uint8 m_uiPhase; + + virtual void OnFakeingDeath() {} + virtual void OnRevive() {} + + void DamageTaken(Unit* pKiller, uint32& uiDamage) + { + if (uiDamage < m_creature->GetHealth()) + return; + + // Prevent glitch if in fake death + if (m_uiPhase == PHASE_FAKE_DEATH || m_uiPhase == PHASE_WAITING) + { + uiDamage = 0; + return; + } + + // Only init fake in normal phase + if (m_uiPhase != PHASE_NORMAL) + return; + + uiDamage = 0; + + m_creature->InterruptNonMeleeSpells(true); + m_creature->SetHealth(0); + m_creature->StopMoving(); + m_creature->ClearComboPointHolders(); + m_creature->RemoveAllAurasOnDeath(); + m_creature->ModifyAuraState(AURA_STATE_HEALTHLESS_20_PERCENT, false); + m_creature->ModifyAuraState(AURA_STATE_HEALTHLESS_35_PERCENT, false); + m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + m_creature->ClearAllReactives(); + m_creature->GetMotionMaster()->Clear(); + m_creature->GetMotionMaster()->MoveIdle(); + m_creature->SetStandState(UNIT_STAND_STATE_DEAD); + + m_uiPhase = PHASE_FAKE_DEATH; + + OnFakeingDeath(); + } + + void Revive(bool bOnlyFlags = false) + { + m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + m_creature->SetStandState(UNIT_STAND_STATE_STAND); + + if (bOnlyFlags) + return; + + m_creature->SetHealth(m_creature->GetMaxHealth()); + m_uiPhase = PHASE_NORMAL; + + DoResetThreat(); + Reset(); + + // Assume Attack + if (m_creature->getVictim()) + m_creature->GetMotionMaster()->MoveChase(m_creature->getVictim()); + + OnRevive(); + } + + void PreventRevive() + { + if (m_creature->IsNonMeleeSpellCasted(true)) + m_creature->InterruptNonMeleeSpells(true); + + m_uiPhase = PHASE_WAITING; + } +}; + +struct MANGOS_DLL_DECL boss_thekalAI : public boss_thekalBaseAI +{ + boss_thekalAI(Creature* pCreature) : boss_thekalBaseAI(pCreature) { m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); Reset(); @@ -60,459 +147,502 @@ struct MANGOS_DLL_DECL boss_thekalAI : public ScriptedAI ScriptedInstance* m_pInstance; - uint32 MortalCleave_Timer; - uint32 Silence_Timer; - uint32 Frenzy_Timer; - uint32 ForcePunch_Timer; - uint32 Charge_Timer; - uint32 Enrage_Timer; - uint32 SummonTigers_Timer; - uint32 Check_Timer; - uint32 Resurrect_Timer; + uint32 m_uiMortalCleaveTimer; + uint32 m_uiSilenceTimer; + uint32 m_uiFrenzyTimer; + uint32 m_uiForcePunchTimer; + uint32 m_uiChargeTimer; + uint32 m_uiEnrageTimer; + uint32 m_uiSummonTigersTimer; + uint32 m_uiResurrectTimer; - bool Enraged; - bool PhaseTwo; - bool WasDead; + bool m_bEnraged; void Reset() { - MortalCleave_Timer = 4000; - Silence_Timer = 9000; - Frenzy_Timer = 30000; - ForcePunch_Timer = 4000; - Charge_Timer = 12000; - Enrage_Timer = 32000; - SummonTigers_Timer = 25000; - Check_Timer = 10000; - Resurrect_Timer = 10000; - - Enraged = false; - PhaseTwo = false; - WasDead = false; + m_uiMortalCleaveTimer = 4000; + m_uiSilenceTimer = 9000; + m_uiFrenzyTimer = 30000; + m_uiForcePunchTimer = 4000; + m_uiChargeTimer = 12000; + m_uiEnrageTimer = 32000; + m_uiSummonTigersTimer = 25000; + m_uiResurrectTimer = 10000; + m_uiPhase = PHASE_NORMAL; + + m_bEnraged = false; + + // remove fake death + Revive(true); } - void Aggro(Unit *who) + void Aggro(Unit* pWho) { DoScriptText(SAY_AGGRO, m_creature); } - void JustDied(Unit* Killer) + void JustDied(Unit* pKiller) { DoScriptText(SAY_DEATH, m_creature); - if (m_pInstance) - m_pInstance->SetData(TYPE_THEKAL, DONE); + if (!m_pInstance) + return; + + m_pInstance->SetData(TYPE_THEKAL, DONE); + + // remove the two adds + if (Creature* pZath = m_creature->GetMap()->GetCreature(m_pInstance->GetData64(NPC_ZATH))) + pZath->ForcedDespawn(); + if (Creature* pLorkhan = m_creature->GetMap()->GetCreature(m_pInstance->GetData64(NPC_LORKHAN))) + pLorkhan->ForcedDespawn(); } void JustReachedHome() { if (m_pInstance) - m_pInstance->SetData(TYPE_THEKAL, NOT_STARTED); + m_pInstance->SetData(TYPE_THEKAL, FAIL); } - void UpdateAI(const uint32 diff) + // Only call in context where m_pInstance is valid + bool CanPreventAddsResurrect() + { + // If any add is alive, return false + if (m_pInstance->GetData(TYPE_ZATH) != SPECIAL || m_pInstance->GetData(TYPE_LORKHAN) != SPECIAL) + return false; + + // Else Prevent them Resurrecting + if (Creature* pLorkhan = m_creature->GetMap()->GetCreature(m_pInstance->GetData64(NPC_LORKHAN))) + { + if (boss_thekalBaseAI* pFakerAI = dynamic_cast(pLorkhan->AI())) + pFakerAI->PreventRevive(); + } + Creature* pZath = m_creature->GetMap()->GetCreature(m_pInstance->GetData64(NPC_ZATH)); + { + if (boss_thekalBaseAI* pFakerAI = dynamic_cast(pZath->AI())) + pFakerAI->PreventRevive(); + } + + return true; + } + + void OnFakeingDeath() + { + m_uiResurrectTimer = 10000; + + if (m_pInstance) + { + m_pInstance->SetData(TYPE_THEKAL, SPECIAL); + + // If both Adds are already dead, don't wait 10 seconds + if (CanPreventAddsResurrect()) + m_uiResurrectTimer = 1000; + } + } + + void OnRevive() + { + if (!m_pInstance) + return; + + // Both Adds are 'dead' enter tiger phase + if (CanPreventAddsResurrect()) + { + DoCastSpellIfCan(m_creature, SPELL_TIGER_FORM, CAST_TRIGGERED); + m_uiPhase = PHASE_TIGER; + } + } + + void UpdateAI(const uint32 uiDiff) { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; - //Check_Timer for the death of LorKhan and Zath. - if (!WasDead && Check_Timer < diff) + switch (m_uiPhase) { - if (m_pInstance) - { - if (m_pInstance->GetData(TYPE_LORKHAN) == SPECIAL) + case PHASE_FAKE_DEATH: + if (m_uiResurrectTimer < uiDiff) { - //Resurrect LorKhan - if (Creature *pLorKhan = m_creature->GetMap()->GetCreature(m_pInstance->GetData64(DATA_LORKHAN))) - { - pLorKhan->SetStandState(UNIT_STAND_STATE_STAND); - pLorKhan->setFaction(14); - pLorKhan->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); - pLorKhan->SetHealth(int(pLorKhan->GetMaxHealth()*1.0)); + // resurrect him in any case + DoCastSpellIfCan(m_creature, SPELL_RESURRECT); - m_pInstance->SetData(TYPE_LORKHAN, DONE); + m_uiPhase = PHASE_WAITING; + if (m_pInstance) + { + CanPreventAddsResurrect(); + m_pInstance->SetData(TYPE_THEKAL, IN_PROGRESS); } } + else + m_uiResurrectTimer -= uiDiff; - if (m_pInstance->GetData(TYPE_ZATH) == SPECIAL) + // No break needed here + case PHASE_WAITING: + return; + + case PHASE_NORMAL: + if (m_uiMortalCleaveTimer < uiDiff) { - //Resurrect Zath - if (Creature *pZath = m_creature->GetMap()->GetCreature(m_pInstance->GetData64(DATA_ZATH))) - { - pZath->SetStandState(UNIT_STAND_STATE_STAND); - pZath->setFaction(14); - pZath->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); - pZath->SetHealth(int(pZath->GetMaxHealth()*1.0)); + if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_MORTAL_CLEAVE) == CAST_OK) + m_uiMortalCleaveTimer = urand(15000, 20000); + } + else + m_uiMortalCleaveTimer -= uiDiff; - m_pInstance->SetData(TYPE_ZATH, DONE); + if (m_uiSilenceTimer < uiDiff) + { + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) + { + if (DoCastSpellIfCan(pTarget, SPELL_SILENCE) == CAST_OK) + m_uiSilenceTimer = urand(20000, 25000); } } - } - Check_Timer = 5000; - }else Check_Timer -= diff; - - if (!PhaseTwo && MortalCleave_Timer < diff) - { - DoCastSpellIfCan(m_creature->getVictim(),SPELL_MORTALCLEAVE); - MortalCleave_Timer = urand(15000, 20000); - }else MortalCleave_Timer -= diff; - - if (!PhaseTwo && Silence_Timer < diff) - { - DoCastSpellIfCan(m_creature->getVictim(),SPELL_SILENCE); - Silence_Timer = urand(20000, 25000); - }else Silence_Timer -= diff; - - if (!PhaseTwo && !WasDead && m_creature->GetHealthPercent() < 5.0f) - { - m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); - m_creature->SetStandState(UNIT_STAND_STATE_SLEEP); - m_creature->AttackStop(); + else + m_uiSilenceTimer -= uiDiff; - if (m_pInstance) - m_pInstance->SetData(TYPE_THEKAL, SPECIAL); + break; + case PHASE_TIGER: + if (m_uiChargeTimer < uiDiff) + { + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) + { + if (DoCastSpellIfCan(pTarget, SPELL_CHARGE) == CAST_OK) + { + DoResetThreat(); + AttackStart(pTarget); + m_uiChargeTimer = urand(15000, 22000); + } + } + } + else + m_uiChargeTimer -= uiDiff; - WasDead = true; - } + if (m_uiFrenzyTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature, SPELL_FRENZY) == CAST_OK) + m_uiFrenzyTimer = 30000; + } + else + m_uiFrenzyTimer -= uiDiff; - //Thekal will transform to Tiger if he died and was not resurrected after 10 seconds. - if (!PhaseTwo && WasDead) - { - if (Resurrect_Timer < diff) - { - DoCastSpellIfCan(m_creature,SPELL_TIGER_FORM); - m_creature->SetFloatValue(OBJECT_FIELD_SCALE_X, 2.00f); - m_creature->SetStandState(UNIT_STAND_STATE_STAND); - m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); - m_creature->SetHealth(int(m_creature->GetMaxHealth()*1.0)); - const CreatureInfo *cinfo = m_creature->GetCreatureInfo(); - m_creature->SetBaseWeaponDamage(BASE_ATTACK, MINDAMAGE, (cinfo->mindmg +((cinfo->mindmg/100) * 40))); - m_creature->SetBaseWeaponDamage(BASE_ATTACK, MAXDAMAGE, (cinfo->maxdmg +((cinfo->maxdmg/100) * 40))); - m_creature->UpdateDamagePhysical(BASE_ATTACK); - DoResetThreat(); - PhaseTwo = true; - }else Resurrect_Timer -= diff; - } + if (m_uiForcePunchTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature, SPELL_FORCE_PUNCH) == CAST_OK) + m_uiForcePunchTimer = urand(16000, 21000); + } + else + m_uiForcePunchTimer -= uiDiff; - if (m_creature->GetHealthPercent() == 100.0f && WasDead) - { - WasDead = false; - } + if (m_uiSummonTigersTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature, SPELL_SUMMON_TIGERS) == CAST_OK) + m_uiSummonTigersTimer = urand(10000, 14000); + } + else + m_uiSummonTigersTimer -= uiDiff; - if (PhaseTwo) - { - if (Charge_Timer < diff) - { - if (Unit* target = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM,0)) + if (!m_bEnraged && m_creature->GetHealthPercent() < 11.0f) { - DoCastSpellIfCan(target,SPELL_CHARGE); - DoResetThreat(); - AttackStart(target); + if (DoCastSpellIfCan(m_creature, SPELL_ENRAGE) == CAST_OK) + m_bEnraged = true; } - Charge_Timer = urand(15000, 22000); - }else Charge_Timer -= diff; - - if (Frenzy_Timer < diff) - { - DoCastSpellIfCan(m_creature,SPELL_FRENZY); - Frenzy_Timer = 30000; - }else Frenzy_Timer -= diff; - - if (ForcePunch_Timer < diff) - { - DoCastSpellIfCan(m_creature->getVictim(),SPELL_SILENCE); - ForcePunch_Timer = urand(16000, 21000); - }else ForcePunch_Timer -= diff; - - if (SummonTigers_Timer < diff) - { - DoCastSpellIfCan(m_creature->getVictim(),SPELL_SUMMONTIGERS); - SummonTigers_Timer = urand(10000, 14000); - }else SummonTigers_Timer -= diff; - - if (m_creature->GetHealthPercent() < 11.0f && !Enraged) - { - DoCastSpellIfCan(m_creature, SPELL_ENRAGE); - Enraged = true; - } + + break; } - if (m_creature->getVictim()) // TODO - use correct check here, this only prevents crash - DoMeleeAttackIfReady(); + DoMeleeAttackIfReady(); } }; -//Zealot Lor'Khan -struct MANGOS_DLL_DECL mob_zealot_lorkhanAI : public ScriptedAI +/*###### +## mob_zealot_lorkhan +######*/ + +struct MANGOS_DLL_DECL mob_zealot_lorkhanAI : public boss_thekalBaseAI { - mob_zealot_lorkhanAI(Creature* pCreature) : ScriptedAI(pCreature) + mob_zealot_lorkhanAI(Creature* pCreature) : boss_thekalBaseAI(pCreature) { m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); Reset(); } - uint32 Shield_Timer; - uint32 BloodLust_Timer; - uint32 GreaterHeal_Timer; - uint32 Disarm_Timer; - uint32 Check_Timer; - - bool FakeDeath; - ScriptedInstance* m_pInstance; + uint32 m_uiShieldTimer; + uint32 m_uiBloodLustTimer; + uint32 m_uiGreaterHealTimer; + uint32 m_uiDisarmTimer; + uint32 m_uiResurrectTimer; + void Reset() { - Shield_Timer = 1000; - BloodLust_Timer = 16000; - GreaterHeal_Timer = 32000; - Disarm_Timer = 6000; - Check_Timer = 10000; - - FakeDeath = false; + m_uiShieldTimer = 1000; + m_uiBloodLustTimer = 16000; + m_uiGreaterHealTimer = 32000; + m_uiDisarmTimer = 6000; + m_uiPhase = PHASE_NORMAL; if (m_pInstance) m_pInstance->SetData(TYPE_LORKHAN, NOT_STARTED); - m_creature->SetStandState(UNIT_STAND_STATE_STAND); - m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + Revive(true); } - void UpdateAI (const uint32 diff) + void Aggro(Unit* pWho) + { + if (m_pInstance) + m_pInstance->SetData(TYPE_LORKHAN, IN_PROGRESS); + } + + void OnFakeingDeath() + { + m_uiResurrectTimer = 10000; + + if (m_pInstance) + m_pInstance->SetData(TYPE_LORKHAN, SPECIAL); + } + + void UpdateAI (const uint32 uiDiff) { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; - //Shield_Timer - if (Shield_Timer < diff) - { - DoCastSpellIfCan(m_creature,SPELL_SHIELD); - Shield_Timer = 61000; - }else Shield_Timer -= diff; - - //BloodLust_Timer - if (BloodLust_Timer < diff) + switch (m_uiPhase) { - DoCastSpellIfCan(m_creature,SPELL_BLOODLUST); - BloodLust_Timer = urand(20000, 28000); - }else BloodLust_Timer -= diff; + case PHASE_FAKE_DEATH: + if (m_uiResurrectTimer < uiDiff) + { + if (!m_pInstance) + return; - //Casting Greaterheal to Thekal or Zath if they are in meele range. - // TODO - why this range check? - if (GreaterHeal_Timer < diff) - { - if (m_pInstance) - { - Creature* pThekal = m_creature->GetMap()->GetCreature(m_pInstance->GetData64(DATA_THEKAL)); - Creature* pZath = m_creature->GetMap()->GetCreature(m_pInstance->GetData64(DATA_ZATH)); + if (m_pInstance->GetData(TYPE_THEKAL) != SPECIAL || m_pInstance->GetData(TYPE_ZATH) != SPECIAL) + { + DoCastSpellIfCan(m_creature, SPELL_RESURRECT); + m_pInstance->SetData(TYPE_LORKHAN, IN_PROGRESS); + } - switch(urand(0, 1)) - { - case 0: - if (pThekal && m_creature->IsWithinDistInMap(pThekal, ATTACK_DISTANCE)) - DoCastSpellIfCan(pThekal, SPELL_GREATERHEAL); - break; - case 1: - if (pZath && m_creature->IsWithinDistInMap(pZath, ATTACK_DISTANCE)) - DoCastSpellIfCan(pZath, SPELL_GREATERHEAL); - break; + m_uiPhase = PHASE_WAITING; } - } + else + m_uiResurrectTimer -= uiDiff; - GreaterHeal_Timer = urand(15000, 20000); - }else GreaterHeal_Timer -= diff; + // no break needed here + case PHASE_WAITING: + return; - //Disarm_Timer - if (Disarm_Timer < diff) - { - DoCastSpellIfCan(m_creature->getVictim(),SPELL_DISARM); - Disarm_Timer = urand(15000, 25000); - }else Disarm_Timer -= diff; + case PHASE_NORMAL: + // Shield_Timer + if (m_uiShieldTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature, SPELL_SHIELD) == CAST_OK) + m_uiShieldTimer = 61000; + } + else + m_uiShieldTimer -= uiDiff; - //Check_Timer for the death of LorKhan and Zath. - if (!FakeDeath && Check_Timer < diff) - { - if (m_pInstance) - { - if (m_pInstance->GetData(TYPE_THEKAL) == SPECIAL) + // BloodLust_Timer + if (m_uiBloodLustTimer < uiDiff) { - //Resurrect Thekal - if (Creature* pThekal = m_creature->GetMap()->GetCreature(m_pInstance->GetData64(DATA_THEKAL))) - { - pThekal->SetStandState(UNIT_STAND_STATE_STAND); - pThekal->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); - pThekal->setFaction(14); - pThekal->SetHealth(int(pThekal->GetMaxHealth()*1.0)); - } + // ToDo: research if this should be cast on Thekal or Zath + if (DoCastSpellIfCan(m_creature, SPELL_BLOODLUST) == CAST_OK) + m_uiBloodLustTimer = urand(20000, 28000); } + else + m_uiBloodLustTimer -= uiDiff; - if (m_pInstance->GetData(TYPE_ZATH) == SPECIAL) + // Casting Greaterheal to Thekal or Zath if they are in meele range. + // TODO - why this range check? + if (m_uiGreaterHealTimer < uiDiff) { - //Resurrect Zath - if (Creature* pZath = m_creature->GetMap()->GetCreature(m_pInstance->GetData64(DATA_ZATH))) + if (m_pInstance) { - pZath->SetStandState(UNIT_STAND_STATE_STAND); - pZath->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); - pZath->setFaction(14); - pZath->SetHealth(int(pZath->GetMaxHealth()*1.0)); + Creature* pThekal = m_creature->GetMap()->GetCreature(m_pInstance->GetData64(NPC_THEKAL)); + Creature* pZath = m_creature->GetMap()->GetCreature(m_pInstance->GetData64(NPC_ZATH)); + + switch(urand(0, 1)) + { + case 0: + if (pThekal && m_creature->IsWithinDistInMap(pThekal, 3*ATTACK_DISTANCE)) + DoCastSpellIfCan(pThekal, SPELL_GREATER_HEAL); + break; + case 1: + if (pZath && m_creature->IsWithinDistInMap(pZath, 3*ATTACK_DISTANCE)) + DoCastSpellIfCan(pZath, SPELL_GREATER_HEAL); + break; + } } - } - } - - Check_Timer = 5000; - }else Check_Timer -= diff; - if (m_creature->GetHealthPercent() < 5.0f) - { - m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); - m_creature->SetStandState(UNIT_STAND_STATE_SLEEP); - m_creature->setFaction(35); - m_creature->AttackStop(); + m_uiGreaterHealTimer = urand(15000, 20000); + } + else + m_uiGreaterHealTimer -= uiDiff; - if (m_pInstance) - m_pInstance->SetData(TYPE_LORKHAN, SPECIAL); + // Disarm_Timer + if (m_uiDisarmTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_DISARM) == CAST_OK) + m_uiDisarmTimer = urand(15000, 25000); + } + else + m_uiDisarmTimer -= uiDiff; - FakeDeath = true; + break; } - if (!FakeDeath) - DoMeleeAttackIfReady(); + DoMeleeAttackIfReady(); } }; -//Zealot Zath -struct MANGOS_DLL_DECL mob_zealot_zathAI : public ScriptedAI +/*###### +## npc_zealot_zath +######*/ + +struct MANGOS_DLL_DECL mob_zealot_zathAI : public boss_thekalBaseAI { - mob_zealot_zathAI(Creature* pCreature) : ScriptedAI(pCreature) + mob_zealot_zathAI(Creature* pCreature) : boss_thekalBaseAI(pCreature) { m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); Reset(); } - uint32 SweepingStrikes_Timer; - uint32 SinisterStrike_Timer; - uint32 Gouge_Timer; - uint32 Kick_Timer; - uint32 Blind_Timer; - uint32 Check_Timer; - - bool FakeDeath; - ScriptedInstance* m_pInstance; + uint32 m_uiSweepingStrikesTimer; + uint32 m_uiSinisterStrikeTimer; + uint32 m_uiGougeTimer; + uint32 m_uiKickTimer; + uint32 m_uiBlindTimer; + uint32 m_uiResurrectTimer; + void Reset() { - SweepingStrikes_Timer = 13000; - SinisterStrike_Timer = 8000; - Gouge_Timer = 25000; - Kick_Timer = 18000; - Blind_Timer = 5000; - Check_Timer = 10000; - - FakeDeath = false; + m_uiSweepingStrikesTimer = 13000; + m_uiSinisterStrikeTimer = 8000; + m_uiGougeTimer = 25000; + m_uiKickTimer = 18000; + m_uiBlindTimer = 5000; + m_uiPhase = PHASE_NORMAL; if (m_pInstance) m_pInstance->SetData(TYPE_ZATH, NOT_STARTED); - m_creature->SetStandState(UNIT_STAND_STATE_STAND); - m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); + Revive(true); } - void UpdateAI (const uint32 diff) + void Aggro(Unit* pWho) { - if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) - return; + if (m_pInstance) + m_pInstance->SetData(TYPE_ZATH, IN_PROGRESS); + } - //SweepingStrikes_Timer - if (SweepingStrikes_Timer < diff) - { - DoCastSpellIfCan(m_creature->getVictim(),SPELL_SWEEPINGSTRIKES); - SweepingStrikes_Timer = urand(22000, 26000); - }else SweepingStrikes_Timer -= diff; + void OnFakeingDeath() + { + m_uiResurrectTimer = 10000; - //SinisterStrike_Timer - if (SinisterStrike_Timer < diff) - { - DoCastSpellIfCan(m_creature->getVictim(),SPELL_SINISTERSTRIKE); - SinisterStrike_Timer = urand(8000, 16000); - }else SinisterStrike_Timer -= diff; + if (m_pInstance) + m_pInstance->SetData(TYPE_ZATH, SPECIAL); + } - //Gouge_Timer - if (Gouge_Timer < diff) + void UpdateAI (const uint32 uiDiff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; + + switch (m_uiPhase) { - DoCastSpellIfCan(m_creature->getVictim(),SPELL_GOUGE); + case PHASE_FAKE_DEATH: + if (m_uiResurrectTimer < uiDiff) + { + if (!m_pInstance) + return; - if (m_creature->getThreatManager().getThreat(m_creature->getVictim())) - m_creature->getThreatManager().modifyThreatPercent(m_creature->getVictim(),-100); + if (m_pInstance->GetData(TYPE_THEKAL) != SPECIAL || m_pInstance->GetData(TYPE_LORKHAN) != SPECIAL) + { + DoCastSpellIfCan(m_creature, SPELL_RESURRECT); + m_pInstance->SetData(TYPE_ZATH, IN_PROGRESS); + } - Gouge_Timer = urand(17000, 27000); - }else Gouge_Timer -= diff; + m_uiPhase = PHASE_WAITING; + } + else + m_uiResurrectTimer -= uiDiff; - //Kick_Timer - if (Kick_Timer < diff) - { - DoCastSpellIfCan(m_creature->getVictim(),SPELL_KICK); - Kick_Timer = urand(15000, 25000); - }else Kick_Timer -= diff; + // no break needed here + case PHASE_WAITING: + return; - //Blind_Timer - if (Blind_Timer < diff) - { - DoCastSpellIfCan(m_creature->getVictim(),SPELL_BLIND); - Blind_Timer = urand(10000, 20000); - }else Blind_Timer -= diff; + case PHASE_NORMAL: + // SweepingStrikes_Timer + if (m_uiSweepingStrikesTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature, SPELL_SWEEPING_STRIKES) == CAST_OK) + m_uiSweepingStrikesTimer = urand(22000, 26000); + } + else + m_uiSweepingStrikesTimer -= uiDiff; - //Check_Timer for the death of LorKhan and Zath. - if (!FakeDeath && Check_Timer < diff) - { - if (m_pInstance) - { - if (m_pInstance->GetData(TYPE_LORKHAN) == SPECIAL) + // SinisterStrike_Timer + if (m_uiSinisterStrikeTimer < uiDiff) { - //Resurrect LorKhan - if (Creature* pLorKhan = m_creature->GetMap()->GetCreature(m_pInstance->GetData64(DATA_LORKHAN))) - { - pLorKhan->SetStandState(UNIT_STAND_STATE_STAND); - pLorKhan->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); - pLorKhan->setFaction(14); - pLorKhan->SetHealth(int(pLorKhan->GetMaxHealth()*1.0)); - } + if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_SINISTER_STRIKE) == CAST_OK) + m_uiSinisterStrikeTimer = urand(8000, 16000); } + else + m_uiSinisterStrikeTimer -= uiDiff; - if (m_pInstance->GetData(TYPE_THEKAL) == SPECIAL) + // Gouge_Timer + if (m_uiGougeTimer < uiDiff) { - //Resurrect Thekal - if (Creature* pThekal = m_creature->GetMap()->GetCreature(m_pInstance->GetData64(DATA_THEKAL))) + if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_GOUGE) == CAST_OK) { - pThekal->SetStandState(UNIT_STAND_STATE_STAND); - pThekal->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); - pThekal->setFaction(14); - pThekal->SetHealth(int(pThekal->GetMaxHealth()*1.0)); + if (m_creature->getThreatManager().getThreat(m_creature->getVictim())) + m_creature->getThreatManager().modifyThreatPercent(m_creature->getVictim(),-100); + + m_uiGougeTimer = urand(17000, 27000); } } - } + else + m_uiGougeTimer -= uiDiff; - Check_Timer = 5000; - }else Check_Timer -= diff; - - if (m_creature->GetHealthPercent() <= 5.0f) - { - m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); - m_creature->SetStandState(UNIT_STAND_STATE_SLEEP); - m_creature->setFaction(35); - m_creature->AttackStop(); + // Kick_Timer + if (m_uiKickTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_KICK) == CAST_OK) + m_uiKickTimer = urand(15000, 25000); + } + else + m_uiKickTimer -= uiDiff; - if (m_pInstance) - m_pInstance->SetData(TYPE_ZATH, SPECIAL); + // Blind_Timer + if (m_uiBlindTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_BLIND) == CAST_OK) + m_uiBlindTimer = urand(10000, 20000); + } + else + m_uiBlindTimer -= uiDiff; - FakeDeath = true; + break; } - if (!FakeDeath) - DoMeleeAttackIfReady(); + DoMeleeAttackIfReady(); } }; +bool EffectDummyCreature_thekal_resurrection(Unit* pCaster, uint32 uiSpellId, SpellEffectIndex uiEffIndex, Creature* pCreatureTarget) +{ + //always check spellid and effectindex + if (uiSpellId == SPELL_RESURRECT && uiEffIndex == EFFECT_INDEX_0) + { + if (boss_thekalBaseAI* pFakerAI = dynamic_cast(pCreatureTarget->AI())) + pFakerAI->Revive(); + + //always return true when we are handling this spell and effect + return true; + } + + return false; +} + CreatureAI* GetAI_boss_thekal(Creature* pCreature) { return new boss_thekalAI(pCreature); @@ -530,20 +660,23 @@ CreatureAI* GetAI_mob_zealot_zath(Creature* pCreature) void AddSC_boss_thekal() { - Script *newscript; - - newscript = new Script; - newscript->Name = "boss_thekal"; - newscript->GetAI = &GetAI_boss_thekal; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "mob_zealot_lorkhan"; - newscript->GetAI = &GetAI_mob_zealot_lorkhan; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "mob_zealot_zath"; - newscript->GetAI = &GetAI_mob_zealot_zath; - newscript->RegisterSelf(); + Script* pNewScript; + + pNewScript = new Script; + pNewScript->Name = "boss_thekal"; + pNewScript->GetAI = &GetAI_boss_thekal; + pNewScript->pEffectDummyNPC = &EffectDummyCreature_thekal_resurrection; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "mob_zealot_lorkhan"; + pNewScript->GetAI = &GetAI_mob_zealot_lorkhan; + pNewScript->pEffectDummyNPC = &EffectDummyCreature_thekal_resurrection; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "mob_zealot_zath"; + pNewScript->GetAI = &GetAI_mob_zealot_zath; + pNewScript->pEffectDummyNPC = &EffectDummyCreature_thekal_resurrection; + pNewScript->RegisterSelf(); } diff --git a/scripts/eastern_kingdoms/zulgurub/boss_venoxis.cpp b/scripts/eastern_kingdoms/zulgurub/boss_venoxis.cpp index 6b7610b..f8d5f70 100644 --- a/scripts/eastern_kingdoms/zulgurub/boss_venoxis.cpp +++ b/scripts/eastern_kingdoms/zulgurub/boss_venoxis.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/scripts/eastern_kingdoms/zulgurub/boss_wushoolay.cpp b/scripts/eastern_kingdoms/zulgurub/boss_wushoolay.cpp index 0ade4ef..4238dba 100644 --- a/scripts/eastern_kingdoms/zulgurub/boss_wushoolay.cpp +++ b/scripts/eastern_kingdoms/zulgurub/boss_wushoolay.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/scripts/eastern_kingdoms/zulgurub/instance_zulgurub.cpp b/scripts/eastern_kingdoms/zulgurub/instance_zulgurub.cpp index 3dcc00c..9ae3320 100644 --- a/scripts/eastern_kingdoms/zulgurub/instance_zulgurub.cpp +++ b/scripts/eastern_kingdoms/zulgurub/instance_zulgurub.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or @@ -24,221 +24,189 @@ EndScriptData */ #include "precompiled.h" #include "zulgurub.h" -struct MANGOS_DLL_DECL instance_zulgurub : public ScriptedInstance +instance_zulgurub::instance_zulgurub(Map* pMap) : ScriptedInstance(pMap), + m_uiLorKhanGUID(0), + m_uiZathGUID(0), + m_uiThekalGUID(0), + m_uiJindoGUID(0), + m_uiHakkarGUID(0), + m_bHasIntroYelled(false), + m_bHasAltarYelled(false) { - instance_zulgurub(Map* pMap) : ScriptedInstance(pMap) {Initialize();}; - - std::string strInstData; - // If all High Priest bosses were killed. Lorkhan, Zath and Ohgan are added too. - uint32 m_auiEncounter[MAX_ENCOUNTER]; + Initialize(); +} - // Storing Lorkhan, Zath and Thekal because we need to cast on them later. Jindo is needed for heal function too. - uint64 m_uiLorKhanGUID; - uint64 m_uiZathGUID; - uint64 m_uiThekalGUID; - uint64 m_uiJindoGUID; - uint64 m_uiHakkarGUID; +void instance_zulgurub::Initialize() +{ + memset(&m_auiEncounter, 0, sizeof(m_auiEncounter)); +} - void Initialize() +void instance_zulgurub::DoYellAtTriggerIfCan(uint32 uiTriggerId) +{ + if (uiTriggerId == AREATRIGGER_ENTER && !m_bHasIntroYelled) { - memset(&m_auiEncounter, 0, sizeof(m_auiEncounter)); - - m_uiLorKhanGUID = 0; - m_uiZathGUID = 0; - m_uiThekalGUID = 0; - m_uiJindoGUID = 0; - m_uiHakkarGUID = 0; + if (Creature* pHakkar = instance->GetCreature(m_uiHakkarGUID)) + { + DoScriptText(SAY_HAKKAR_PROTECT, pHakkar); + m_bHasIntroYelled = true; + } } - - // each time High Priest dies lower Hakkar's HP - void LowerHakkarHitPoints() + else if (uiTriggerId == AREATRIGGER_ALTAR && !m_bHasAltarYelled) { if (Creature* pHakkar = instance->GetCreature(m_uiHakkarGUID)) { - if (pHakkar->isAlive()) - { - pHakkar->SetMaxHealth(pHakkar->GetMaxHealth() - 60000); - pHakkar->SetHealth(pHakkar->GetHealth() - 60000); - } + DoScriptText(SAY_MINION_DESTROY, pHakkar); + m_bHasAltarYelled = true; } } +} - bool IsEncounterInProgress() const +void instance_zulgurub::OnCreatureCreate(Creature* pCreature) +{ + switch(pCreature->GetEntry()) { - //not active in Zul'Gurub - return false; + case NPC_LORKHAN: + m_uiLorKhanGUID = pCreature->GetGUID(); + break; + case NPC_ZATH: + m_uiZathGUID = pCreature->GetGUID(); + break; + case NPC_THEKAL: + m_uiThekalGUID = pCreature->GetGUID(); + break; + case NPC_JINDO: + m_uiJindoGUID = pCreature->GetGUID(); + break; + case NPC_HAKKAR: + m_uiHakkarGUID = pCreature->GetGUID(); + break; } +} - void OnCreatureCreate(Creature* pCreature) +void instance_zulgurub::SetData(uint32 uiType, uint32 uiData) +{ + switch(uiType) { - switch(pCreature->GetEntry()) - { - case NPC_LORKHAN: - m_uiLorKhanGUID = pCreature->GetGUID(); - break; - case NPC_ZATH: - m_uiZathGUID = pCreature->GetGUID(); - break; - case NPC_THEKAL: - m_uiThekalGUID = pCreature->GetGUID(); - break; - case NPC_JINDO: - m_uiJindoGUID = pCreature->GetGUID(); - break; - case NPC_HAKKAR: - m_uiHakkarGUID = pCreature->GetGUID(); - for(uint8 i = 0; i < 5; ++i) - { - if (m_auiEncounter[i] == DONE) - LowerHakkarHitPoints(); - } - break; - } + case TYPE_JEKLIK: + case TYPE_VENOXIS: + case TYPE_MARLI: + case TYPE_THEKAL: + case TYPE_ARLOKK: + m_auiEncounter[uiType] = uiData; + if (uiData == DONE) + DoLowerHakkarHitPoints(); + break; + case TYPE_OHGAN: + case TYPE_LORKHAN: + case TYPE_ZATH: + m_auiEncounter[uiType] = uiData; + break; } - void SetData(uint32 uiType, uint32 uiData) + if (uiData == DONE) { - switch(uiType) - { - case TYPE_ARLOKK: - m_auiEncounter[0] = uiData; - if (uiData == DONE) - LowerHakkarHitPoints(); - break; - case TYPE_JEKLIK: - m_auiEncounter[1] = uiData; - if (uiData == DONE) - LowerHakkarHitPoints(); - break; - case TYPE_VENOXIS: - m_auiEncounter[2] = uiData; - if (uiData == DONE) - LowerHakkarHitPoints(); - break; - case TYPE_MARLI: - m_auiEncounter[3] = uiData; - if (uiData == DONE) - LowerHakkarHitPoints(); - break; - case TYPE_THEKAL: - m_auiEncounter[4] = uiData; - if (uiData == DONE) - LowerHakkarHitPoints(); - break; - case TYPE_LORKHAN: - m_auiEncounter[5] = uiData; - break; - case TYPE_ZATH: - m_auiEncounter[6] = uiData; - break; - case TYPE_OHGAN: - m_auiEncounter[7] = uiData; - break; - case TYPE_HAKKAR: - m_auiEncounter[8] = uiData; - break; - } - - if (uiData == DONE) - { - OUT_SAVE_INST_DATA; - - std::ostringstream saveStream; - saveStream << m_auiEncounter[0] << " " << m_auiEncounter[1] << " " << m_auiEncounter[2] << " " - << m_auiEncounter[3] << " " << m_auiEncounter[4] << " " << m_auiEncounter[5] << " " - << m_auiEncounter[6] << " " << m_auiEncounter[7] << " " << m_auiEncounter[8]; + OUT_SAVE_INST_DATA; - strInstData = saveStream.str(); + std::ostringstream saveStream; + saveStream << m_auiEncounter[0] << " " << m_auiEncounter[1] << " " << m_auiEncounter[2] << " " + << m_auiEncounter[3] << " " << m_auiEncounter[4] << " " << m_auiEncounter[5] << " " + << m_auiEncounter[6] << " " << m_auiEncounter[7]; - SaveToDB(); - OUT_SAVE_INST_DATA_COMPLETE; - } - } + m_strInstData = saveStream.str(); - const char* Save() - { - return strInstData.c_str(); + SaveToDB(); + OUT_SAVE_INST_DATA_COMPLETE; } +} - void Load(const char* chrIn) +// Each time High Priest dies lower Hakkar's HP +void instance_zulgurub::DoLowerHakkarHitPoints() +{ + if (Creature* pHakkar = instance->GetCreature(m_uiHakkarGUID)) { - if (!chrIn) + if (pHakkar->isAlive() && pHakkar->GetMaxHealth() > HP_LOSS_PER_PRIEST) { - OUT_LOAD_INST_DATA_FAIL; - return; - } - - OUT_LOAD_INST_DATA(chrIn); + pHakkar->SetMaxHealth(pHakkar->GetMaxHealth() - HP_LOSS_PER_PRIEST); + pHakkar->SetHealth(pHakkar->GetHealth() - HP_LOSS_PER_PRIEST); + } + } +} - std::istringstream loadStream(chrIn); - loadStream >> m_auiEncounter[0] >> m_auiEncounter[1] >> m_auiEncounter[2] >> m_auiEncounter[3] - >> m_auiEncounter[4] >> m_auiEncounter[5] >> m_auiEncounter[6] >> m_auiEncounter[7] - >> m_auiEncounter[8]; +void instance_zulgurub::Load(const char* chrIn) +{ + if (!chrIn) + { + OUT_LOAD_INST_DATA_FAIL; + return; + } - for(uint8 i = 0; i < MAX_ENCOUNTER; ++i) - { - if (m_auiEncounter[i] == IN_PROGRESS) - m_auiEncounter[i] = NOT_STARTED; - } + OUT_LOAD_INST_DATA(chrIn); - OUT_LOAD_INST_DATA_COMPLETE; - } + std::istringstream loadStream(chrIn); + loadStream >> m_auiEncounter[0] >> m_auiEncounter[1] >> m_auiEncounter[2] >> m_auiEncounter[3] + >> m_auiEncounter[4] >> m_auiEncounter[5] >> m_auiEncounter[6] >> m_auiEncounter[7]; - uint32 GetData(uint32 uiType) + for(uint8 i = 0; i < MAX_ENCOUNTER; ++i) { - switch(uiType) - { - case TYPE_ARLOKK: - return m_auiEncounter[0]; - case TYPE_JEKLIK: - return m_auiEncounter[1]; - case TYPE_VENOXIS: - return m_auiEncounter[2]; - case TYPE_MARLI: - return m_auiEncounter[3]; - case TYPE_THEKAL: - return m_auiEncounter[4]; - case TYPE_LORKHAN: - return m_auiEncounter[5]; - case TYPE_ZATH: - return m_auiEncounter[6]; - case TYPE_OHGAN: - return m_auiEncounter[7]; - case TYPE_HAKKAR: - return m_auiEncounter[8]; - } - return 0; + if (m_auiEncounter[i] == IN_PROGRESS) + m_auiEncounter[i] = NOT_STARTED; } - uint64 GetData64(uint32 uiData) + OUT_LOAD_INST_DATA_COMPLETE; +} + +uint32 instance_zulgurub::GetData(uint32 uiType) +{ + if (uiType < MAX_ENCOUNTER) + return m_auiEncounter[uiType]; + + return 0; +} + +uint64 instance_zulgurub::GetData64(uint32 uiData) +{ + switch(uiData) { - switch(uiData) - { - case DATA_LORKHAN: - return m_uiLorKhanGUID; - case DATA_ZATH: - return m_uiZathGUID; - case DATA_THEKAL: - return m_uiThekalGUID; - case DATA_JINDO: - return m_uiJindoGUID; - case DATA_HAKKAR: - return m_uiHakkarGUID; - } - return 0; + case NPC_LORKHAN: return m_uiLorKhanGUID; + case NPC_ZATH: return m_uiZathGUID; + case NPC_THEKAL: return m_uiThekalGUID; + case NPC_JINDO: return m_uiJindoGUID; + case NPC_HAKKAR: return m_uiHakkarGUID; + default: + return 0; } -}; +} InstanceData* GetInstanceData_instance_zulgurub(Map* pMap) { return new instance_zulgurub(pMap); } +bool AreaTrigger_at_zulgurub(Player* pPlayer, AreaTriggerEntry const* pAt) +{ + if (pAt->id == AREATRIGGER_ENTER || pAt->id == AREATRIGGER_ALTAR) + { + if (pPlayer->isGameMaster() || pPlayer->isDead()) + return false; + + if (instance_zulgurub* pInstance = (instance_zulgurub*)pPlayer->GetInstanceData()) + pInstance->DoYellAtTriggerIfCan(pAt->id); + } + + return false; +} + void AddSC_instance_zulgurub() { - Script* newscript; - newscript = new Script; - newscript->Name = "instance_zulgurub"; - newscript->GetInstanceData = &GetInstanceData_instance_zulgurub; - newscript->RegisterSelf(); + Script* pNewScript; + + pNewScript = new Script; + pNewScript->Name = "instance_zulgurub"; + pNewScript->GetInstanceData = &GetInstanceData_instance_zulgurub; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "at_zulgurub"; + pNewScript->pAreaTrigger = &AreaTrigger_at_zulgurub; + pNewScript->RegisterSelf(); } diff --git a/scripts/eastern_kingdoms/zulgurub/zulgurub.h b/scripts/eastern_kingdoms/zulgurub/zulgurub.h index 5b0b652..db72b38 100644 --- a/scripts/eastern_kingdoms/zulgurub/zulgurub.h +++ b/scripts/eastern_kingdoms/zulgurub/zulgurub.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ @@ -7,7 +7,17 @@ enum { - MAX_ENCOUNTER = 9, + MAX_ENCOUNTER = 8, + MAX_PRIESTS = 5, + + TYPE_JEKLIK = 0, + TYPE_VENOXIS = 1, + TYPE_MARLI = 2, + TYPE_THEKAL = 3, + TYPE_ARLOKK = 4, + TYPE_OHGAN = 5, // Do not change, used by Acid + TYPE_LORKHAN = 6, + TYPE_ZATH = 7, NPC_LORKHAN = 11347, NPC_ZATH = 11348, @@ -15,21 +25,49 @@ enum NPC_JINDO = 11380, NPC_HAKKAR = 14834, - TYPE_ARLOKK = 1, - TYPE_JEKLIK = 2, - TYPE_VENOXIS = 3, - TYPE_MARLI = 4, - TYPE_OHGAN = 5, - TYPE_THEKAL = 6, - TYPE_ZATH = 7, - TYPE_LORKHAN = 8, - TYPE_HAKKAR = 9, - - DATA_JINDO = 10, - DATA_LORKHAN = 11, - DATA_THEKAL = 12, - DATA_ZATH = 13, - DATA_HAKKAR = 14 + SAY_MINION_DESTROY = -1309022, + SAY_HAKKAR_PROTECT = -1309023, + + HP_LOSS_PER_PRIEST = 60000, + + AREATRIGGER_ENTER = 3958, + AREATRIGGER_ALTAR = 3960, +}; + +class MANGOS_DLL_DECL instance_zulgurub : public ScriptedInstance +{ + public: + instance_zulgurub(Map* pMap); + ~instance_zulgurub() {} + + void Initialize(); + // IsEncounterInProgress() const { return false; } // not active in Zul'Gurub + + void OnCreatureCreate(Creature* pCreature); + + void SetData(uint32 uiType, uint32 uiData); + uint32 GetData(uint32 uiType); + uint64 GetData64(uint32 uiData); + + const char* Save() { return m_strInstData.c_str(); } + void Load(const char* chrIn); + + void DoYellAtTriggerIfCan(uint32 uiTriggerId); + + protected: + void DoLowerHakkarHitPoints(); + + uint32 m_auiEncounter[MAX_ENCOUNTER]; + std::string m_strInstData; + + uint64 m_uiLorKhanGUID; + uint64 m_uiZathGUID; + uint64 m_uiThekalGUID; + uint64 m_uiJindoGUID; + uint64 m_uiHakkarGUID; + + bool m_bHasIntroYelled; + bool m_bHasAltarYelled; }; #endif diff --git a/scripts/examples/example_creature.cpp b/scripts/examples/example_creature.cpp index acbacc5..8fa9e7b 100644 --- a/scripts/examples/example_creature.cpp +++ b/scripts/examples/example_creature.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/scripts/examples/example_escort.cpp b/scripts/examples/example_escort.cpp index 2362ee0..213dd1e 100644 --- a/scripts/examples/example_escort.cpp +++ b/scripts/examples/example_escort.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or @@ -180,7 +180,7 @@ CreatureAI* GetAI_example_escort(Creature* pCreature) bool GossipHello_example_escort(Player* pPlayer, Creature* pCreature) { pPlayer->TalkedToCreature(pCreature->GetEntry(), pCreature->GetGUID()); - pPlayer->PrepareGossipMenu(pCreature, 0); + pPlayer->PrepareGossipMenu(pCreature, pPlayer->GetDefaultGossipMenuForSource(pCreature)); pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_1, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+1); pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_2, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+2); diff --git a/scripts/examples/example_gossip_codebox.cpp b/scripts/examples/example_gossip_codebox.cpp index bdcfb43..8243204 100644 --- a/scripts/examples/example_gossip_codebox.cpp +++ b/scripts/examples/example_gossip_codebox.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/scripts/examples/example_misc.cpp b/scripts/examples/example_misc.cpp index e396e2e..3a62bce 100644 --- a/scripts/examples/example_misc.cpp +++ b/scripts/examples/example_misc.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/scripts/kalimdor/ashenvale.cpp b/scripts/kalimdor/ashenvale.cpp index d7dd564..e6af555 100644 --- a/scripts/kalimdor/ashenvale.cpp +++ b/scripts/kalimdor/ashenvale.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/scripts/kalimdor/azshara.cpp b/scripts/kalimdor/azshara.cpp index a999481..2d2c857 100644 --- a/scripts/kalimdor/azshara.cpp +++ b/scripts/kalimdor/azshara.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/scripts/kalimdor/azuremyst_isle.cpp b/scripts/kalimdor/azuremyst_isle.cpp index 5af3646..f4ed445 100644 --- a/scripts/kalimdor/azuremyst_isle.cpp +++ b/scripts/kalimdor/azuremyst_isle.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/scripts/kalimdor/blackfathom_deeps/blackfathom_deeps.h b/scripts/kalimdor/blackfathom_deeps/blackfathom_deeps.h index 7f49c31..ab45423 100644 --- a/scripts/kalimdor/blackfathom_deeps/blackfathom_deeps.h +++ b/scripts/kalimdor/blackfathom_deeps/blackfathom_deeps.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ @@ -7,23 +7,117 @@ enum { - MAX_ENCOUNTER = 6, + MAX_ENCOUNTER = 2, + MAX_FIRES = 4, + MAX_COUNT_POS = 3, TYPE_KELRIS = 1, TYPE_SHRINE = 2, NPC_KELRIS = 4832, - NPC_SERVANT = 4978, + + // Shrine event + NPC_AKUMAI_SERVANT = 4978, + NPC_AKUMAI_SNAPJAW = 4825, + NPC_BARBED_CRUSTACEAN = 4823, + NPC_MURKSHALLOW_SOFTSHELL = 4977, GO_PORTAL_DOOR = 21117, GO_SHRINE_1 = 21118, GO_SHRINE_2 = 21119, GO_SHRINE_3 = 21120, GO_SHRINE_4 = 21121, +}; + + /* This is the spawn pattern for the event mobs + * D + * 0 3 + * 1 S 4 + * 2 5 + * E + + * This event spawns 4 sets of mobs + * The order in whitch the fires are lit doesn't matter + + * First: 3 Snapjaws: Positions 0, 1, 5 + * Second: 2 Servants: Positions 1, 4 + * Third: 4 Crabs: Positions 0, 2, 3, 4 + * Fourth: 10 Murkshallows: Positions 2*0, 1, 2*2; 3, 2*4, 2*5 + + * On wipe the mobs don't despawn; they stay there until player returns + */ + +struct Locations +{ + float m_fX, m_fY, m_fZ, m_fO; +}; + +static const Locations aSpawnLocations[6] = // Should be near the correct positions +{ + {-768.949f, -174.413f, -25.87f, 3.09f}, // Left side + {-768.888f, -164.238f, -25.87f, 3.09f}, + {-768.951f, -153.911f, -25.88f, 3.09f}, + {-867.782f, -174.352f, -25.87f, 6.27f}, // Right side + {-867.875f, -164.089f, -25.87f, 6.27f}, + {-867.859f, -153.927f, -25.88f, 6.27f} +}; + +struct PosCount +{ + uint8 m_uiCount, m_uiSummonPosition; +}; + +struct SummonInformation +{ + uint8 m_uiWaveIndex; + uint32 m_uiNpcEntry; + PosCount m_aCountAndPos[MAX_COUNT_POS]; +}; + +// ASSERT m_uiSummonPosition < 6 (see aSpawnLocations) +static const SummonInformation aWaveSummonInformation[] = +{ + {0, NPC_AKUMAI_SNAPJAW, {{1, 0}, {1, 1}, {1, 5}}}, + {1, NPC_AKUMAI_SERVANT, {{1, 1}, {1, 4}, {0, 0}}}, + {2, NPC_BARBED_CRUSTACEAN, {{1, 0}, {1, 2}, {0, 0}}}, + {2, NPC_BARBED_CRUSTACEAN, {{1, 3}, {1, 4}, {0, 0}}}, + {3, NPC_MURKSHALLOW_SOFTSHELL, {{2, 0}, {1, 1}, {2, 2}}}, + {3, NPC_MURKSHALLOW_SOFTSHELL, {{1, 3}, {2, 4}, {2, 5}}} +}; + +class MANGOS_DLL_DECL instance_blackfathom_deeps : public ScriptedInstance +{ + public: + instance_blackfathom_deeps(Map* pMap); + ~instance_blackfathom_deeps() {} + + void Initialize(); + + void OnCreatureCreate(Creature* pCreature); + void OnObjectCreate(GameObject* pGo); + void OnCreatureDeath(Creature* pCreature); + + void Update(uint32 uiDiff); + + void SetData(uint32 uiType, uint32 uiData); + uint32 GetData(uint32 uiType); + + const char* Save() { return m_strInstData.c_str(); } + void Load(const char* chrIn); + + protected: + void DoSpawnMobs(uint8 uiWaveIndex); + bool IsWaveEventFinished(); + + uint32 m_auiEncounter[MAX_ENCOUNTER]; + std::string m_strInstData; + + uint64 m_uiKelrisGUID; + uint64 m_uiPortalGUID; + uint32 m_uiSpawnMobsTimer[MAX_FIRES]; + uint8 m_uiWaveCounter; - DATA_TWILIGHT_LORD_KELRIS = 10, - DATA_SHRINE_OF_GELIHAST = 11, - DATA_ALTAR_OF_THE_DEEPS = 12 + std::list m_lWaveMobsGuids[MAX_FIRES]; }; #endif diff --git a/scripts/kalimdor/blackfathom_deeps/instance_blackfathom_deeps.cpp b/scripts/kalimdor/blackfathom_deeps/instance_blackfathom_deeps.cpp index c8e746f..7eade5c 100644 --- a/scripts/kalimdor/blackfathom_deeps/instance_blackfathom_deeps.cpp +++ b/scripts/kalimdor/blackfathom_deeps/instance_blackfathom_deeps.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or @@ -29,186 +29,216 @@ EndScriptData */ Must kill twilight lord for shrine event to be possible */ -struct MANGOS_DLL_DECL instance_blackfathom_deeps : public ScriptedInstance +instance_blackfathom_deeps::instance_blackfathom_deeps(Map* pMap) : ScriptedInstance(pMap), + m_uiKelrisGUID(0), + m_uiPortalGUID(0), + m_uiWaveCounter(0) { - instance_blackfathom_deeps(Map* pMap) : ScriptedInstance(pMap) {Initialize();}; + Initialize(); +} - uint64 m_uiKelrisGUID; - uint64 m_uiShrineOfGelihastGUID; - uint64 m_uiAltarOfTheDeepsGUID; - uint64 m_uiPortalGUID; - uint32 m_uiSpawnServantTimer; +void instance_blackfathom_deeps::Initialize() +{ + memset(&m_auiEncounter, 0, sizeof(m_auiEncounter)); + memset(&m_uiSpawnMobsTimer, 0, sizeof(m_uiSpawnMobsTimer)); +} - uint32 m_auiEncounter[MAX_ENCOUNTER]; +void instance_blackfathom_deeps::OnCreatureCreate(Creature* pCreature) +{ + if (pCreature->GetEntry() == NPC_KELRIS) + m_uiKelrisGUID = pCreature->GetGUID(); +} - void Initialize() +void instance_blackfathom_deeps::OnObjectCreate(GameObject* pGo) +{ + switch(pGo->GetEntry()) { - memset(&m_auiEncounter, 0, sizeof(m_auiEncounter)); - - m_uiKelrisGUID = 0; - m_uiShrineOfGelihastGUID = 0; - m_uiAltarOfTheDeepsGUID = 0; - m_uiPortalGUID = 0; - m_uiSpawnServantTimer = 0; + case GO_PORTAL_DOOR: + if (m_auiEncounter[1] == DONE) + pGo->SetGoState(GO_STATE_ACTIVE); + + m_uiPortalGUID = pGo->GetGUID(); + break; + case GO_SHRINE_1: + case GO_SHRINE_2: + case GO_SHRINE_3: + case GO_SHRINE_4: + if (m_auiEncounter[1] == DONE) + pGo->SetGoState(GO_STATE_ACTIVE); + break; } +} - void OnCreatureCreate(Creature* pCreature) - { - if (pCreature->GetEntry() == NPC_KELRIS) - m_uiKelrisGUID = pCreature->GetGUID(); - } +void instance_blackfathom_deeps::DoSpawnMobs(uint8 uiWaveIndex) +{ + Creature* pKelris = instance->GetCreature(m_uiKelrisGUID); + if (!pKelris) + return; - void OnObjectCreate(GameObject* pGo) - { - switch(pGo->GetEntry()) - { - case GO_PORTAL_DOOR: - if (m_auiEncounter[1] == DONE) - pGo->SetGoState(GO_STATE_ACTIVE); - - m_uiPortalGUID = pGo->GetGUID(); - break; - case GO_SHRINE_1: - if (m_auiEncounter[2] == DONE) - pGo->SetGoState(GO_STATE_ACTIVE); - break; - case GO_SHRINE_2: - if (m_auiEncounter[3] == DONE) - pGo->SetGoState(GO_STATE_ACTIVE); - break; - case GO_SHRINE_3: - if (m_auiEncounter[4] == DONE) - pGo->SetGoState(GO_STATE_ACTIVE); - break; - case GO_SHRINE_4: - if (m_auiEncounter[5] == DONE) - pGo->SetGoState(GO_STATE_ACTIVE); - break; - - case 103015: m_uiShrineOfGelihastGUID = pGo->GetGUID(); break; - case 103016: m_uiAltarOfTheDeepsGUID = pGo->GetGUID(); break; + float fX_resp, fY_resp, fZ_resp; - } - } + pKelris->GetRespawnCoord(fX_resp, fY_resp, fZ_resp); - bool CanOpenEndDoor() + for (uint8 i = 0; i < sizeof(aWaveSummonInformation) / sizeof(SummonInformation); ++i) { - if (m_auiEncounter[0] != DONE) - return false; + if (aWaveSummonInformation[i].m_uiWaveIndex != uiWaveIndex) + continue; - if (m_auiEncounter[2] == DONE && m_auiEncounter[3] == DONE && m_auiEncounter[4] == DONE && m_auiEncounter[5] == DONE) - return true; + // Summon mobs at positions + for (uint8 j = 0; j < MAX_COUNT_POS; ++j) + { + for (uint8 k = 0; k < aWaveSummonInformation[i].m_aCountAndPos[j].m_uiCount; ++k) + { + uint8 uiPos = aWaveSummonInformation[i].m_aCountAndPos[j].m_uiSummonPosition; + float fPosX = aSpawnLocations[uiPos].m_fX; + float fPosY = aSpawnLocations[uiPos].m_fY; + float fPosZ = aSpawnLocations[uiPos].m_fZ; + float fPosO = aSpawnLocations[uiPos].m_fO; - return false; + // Adapt fPosY slightly in case of higher summon-counts + if (aWaveSummonInformation[i].m_aCountAndPos[j].m_uiCount > 1) + fPosY = fPosY - INTERACTION_DISTANCE / 2 + k * INTERACTION_DISTANCE / aWaveSummonInformation[i].m_aCountAndPos[j].m_uiCount; + + if (Creature* pSummoned = pKelris->SummonCreature(aWaveSummonInformation[i].m_uiNpcEntry, fPosX, fPosY, fPosZ, fPosO, TEMPSUMMON_DEAD_DESPAWN, 0)) + { + pSummoned->GetMotionMaster()->MovePoint(0, fX_resp, fY_resp, fZ_resp); + m_lWaveMobsGuids[uiWaveIndex].push_back(pSummoned->GetGUIDLow()); + } + } + } } +} - void SpawnServants() +void instance_blackfathom_deeps::SetData(uint32 uiType, uint32 uiData) +{ + switch(uiType) { - if (Creature* pKelris = instance->GetCreature(m_uiKelrisGUID)) - { - float fX_resp, fY_resp, fZ_resp; - pKelris->GetRespawnCoord(fX_resp, fY_resp, fZ_resp); - - for(uint8 i = 0; i < 5 ; ++i) + case TYPE_KELRIS: // EventAI must set instance data (1,3) at his death + if (m_auiEncounter[0] != DONE && uiData == DONE) + m_auiEncounter[0] = uiData; + break; + case TYPE_SHRINE: + m_auiEncounter[1] = uiData; + if (uiData == IN_PROGRESS) { - // this part gets a random position at circumference point in a circle - // fRadius is how far from center to calculate. - // here we use kelris's close point coords as base and then move the summoned to the location of his respawn coords - float fRadius = 30.0f; - float fAngle = 2.0 * M_PI * rand_norm(); + m_uiSpawnMobsTimer[m_uiWaveCounter] = 3000; + ++m_uiWaveCounter; + } + else if (uiData == DONE) + DoUseDoorOrButton(m_uiPortalGUID); + break; + } - float fX, fY, fZ; + if (uiData == DONE) + { + OUT_SAVE_INST_DATA; - fRadius *= sqrt(rand_norm()); + std::ostringstream saveStream; - pKelris->GetClosePoint(fX, fY, fZ, 0.0f, fRadius, fAngle); + saveStream << m_auiEncounter[0] << " " << m_auiEncounter[1]; - if (Creature* pServant = pKelris->SummonCreature(NPC_SERVANT, fX, fY, fZ, 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 300000)) - pServant->GetMotionMaster()->MovePoint(0, fX_resp, fY_resp, fZ_resp); - } + m_strInstData = saveStream.str(); + SaveToDB(); + OUT_SAVE_INST_DATA_COMPLETE; + } +} - } +uint32 instance_blackfathom_deeps::GetData(uint32 uiType) +{ + switch(uiType) + { + case TYPE_KELRIS: return m_auiEncounter[0]; + case TYPE_SHRINE: return m_auiEncounter[1]; + default: + return 0; } +} - void SetData(uint32 uiType, uint32 uiData) +void instance_blackfathom_deeps::Load(const char* chrIn) +{ + if (!chrIn) { - switch(uiType) - { - case TYPE_KELRIS: // eventAI must set instance data (1,3) at his death - if (m_auiEncounter[0] != DONE && uiData == DONE) - m_auiEncounter[0] = uiData; - break; - case TYPE_SHRINE: - { - switch(uiData) - { - case GO_SHRINE_1: - m_auiEncounter[2] = DONE; - break; - case GO_SHRINE_2: - m_auiEncounter[3] = DONE; - break; - case GO_SHRINE_3: - m_auiEncounter[4] = DONE; - break; - case GO_SHRINE_4: - m_auiEncounter[5] = DONE; - break; - } + OUT_LOAD_INST_DATA_FAIL; + return; + } - m_uiSpawnServantTimer = 7500; + OUT_LOAD_INST_DATA(chrIn); - if (CanOpenEndDoor()) - { - m_auiEncounter[1] = DONE; - DoUseDoorOrButton(m_uiPortalGUID); - } + std::istringstream loadStream(chrIn); + loadStream >> m_auiEncounter[0] >> m_auiEncounter[1]; - break; - } - } + for(uint8 i = 0; i < MAX_ENCOUNTER; ++i) + { + if (m_auiEncounter[i] == IN_PROGRESS) + m_auiEncounter[i] = NOT_STARTED; } - uint32 GetData(uint32 uiType) - { - switch(uiType) - { - case TYPE_KELRIS: - return m_auiEncounter[0]; - case TYPE_SHRINE: - return m_auiEncounter[1]; - } + OUT_LOAD_INST_DATA_COMPLETE; +} - return 0; - } +void instance_blackfathom_deeps::OnCreatureDeath(Creature* pCreature) +{ + // Only use this function if shrine event is in progress + if (m_auiEncounter[1] != IN_PROGRESS) + return; - uint64 GetData64(uint32 uiData) + switch (pCreature->GetEntry()) { - switch(uiData) - { - case DATA_TWILIGHT_LORD_KELRIS: - return m_uiKelrisGUID; - case DATA_SHRINE_OF_GELIHAST: - return m_uiShrineOfGelihastGUID; - } + case NPC_AKUMAI_SERVANT: + m_lWaveMobsGuids[1].remove(pCreature->GetGUIDLow()); + break; + case NPC_AKUMAI_SNAPJAW: + m_lWaveMobsGuids[0].remove(pCreature->GetGUIDLow()); + break; + case NPC_BARBED_CRUSTACEAN: + m_lWaveMobsGuids[2].remove(pCreature->GetGUIDLow()); + break; + case NPC_MURKSHALLOW_SOFTSHELL: + m_lWaveMobsGuids[3].remove(pCreature->GetGUIDLow()); + break; + } + + if (IsWaveEventFinished()) + SetData(TYPE_SHRINE, DONE); +} - return 0; +// Check if all the summoned event mobs are dead +bool instance_blackfathom_deeps::IsWaveEventFinished() +{ + // If not all fires are lighted return + if (m_uiWaveCounter < MAX_FIRES) + return false; + + // Check if all mobs are dead + for (uint8 i = 0; i < MAX_FIRES; ++i) + { + if (!m_lWaveMobsGuids[i].empty()) + return false; } - void Update(uint32 uiDiff) + return true; +} + +void instance_blackfathom_deeps::Update(uint32 uiDiff) +{ + // Only use this function if shrine event is in progress + if (m_auiEncounter[1] != IN_PROGRESS) + return; + + for (uint8 i = 0; i < MAX_FIRES; ++i) { - if (m_uiSpawnServantTimer) + if (m_uiSpawnMobsTimer[i]) { - if (m_uiSpawnServantTimer <= uiDiff) + if (m_uiSpawnMobsTimer[i] <= uiDiff) { - SpawnServants(); - m_uiSpawnServantTimer = 0; + DoSpawnMobs(i); + m_uiSpawnMobsTimer[i] = 0; } else - m_uiSpawnServantTimer -= uiDiff; + m_uiSpawnMobsTimer[i] -= uiDiff; } } -}; +} InstanceData* GetInstanceData_instance_blackfathom_deeps(Map* pMap) { @@ -217,14 +247,17 @@ InstanceData* GetInstanceData_instance_blackfathom_deeps(Map* pMap) bool GOUse_go_fire_of_akumai(Player* pPlayer, GameObject* pGo) { - ScriptedInstance* pInstance = (ScriptedInstance*)pGo->GetInstanceData(); + instance_blackfathom_deeps* pInstance = (instance_blackfathom_deeps*)pGo->GetInstanceData(); if (!pInstance) return true; + if (pInstance->GetData(TYPE_SHRINE) == DONE) + return true; + if (pInstance->GetData(TYPE_KELRIS) == DONE) { - pInstance->SetData(TYPE_SHRINE, pGo->GetEntry()); + pInstance->SetData(TYPE_SHRINE, IN_PROGRESS); return false; } @@ -233,15 +266,15 @@ bool GOUse_go_fire_of_akumai(Player* pPlayer, GameObject* pGo) void AddSC_instance_blackfathom_deeps() { - Script *newscript; + Script* pNewScript; - newscript = new Script; - newscript->Name = "instance_blackfathom_deeps"; - newscript->GetInstanceData = &GetInstanceData_instance_blackfathom_deeps; - newscript->RegisterSelf(); + pNewScript = new Script; + pNewScript->Name = "instance_blackfathom_deeps"; + pNewScript->GetInstanceData = &GetInstanceData_instance_blackfathom_deeps; + pNewScript->RegisterSelf(); - newscript = new Script; - newscript->Name = "go_fire_of_akumai"; - newscript->pGOUse = &GOUse_go_fire_of_akumai; - newscript->RegisterSelf(); + pNewScript = new Script; + pNewScript->Name = "go_fire_of_akumai"; + pNewScript->pGOUse = &GOUse_go_fire_of_akumai; + pNewScript->RegisterSelf(); } diff --git a/scripts/kalimdor/bloodmyst_isle.cpp b/scripts/kalimdor/bloodmyst_isle.cpp index b08e125..86b33c8 100644 --- a/scripts/kalimdor/bloodmyst_isle.cpp +++ b/scripts/kalimdor/bloodmyst_isle.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or @@ -52,7 +52,7 @@ struct MANGOS_DLL_DECL mob_webbed_creatureAI : public ScriptedAI case 0: spawnCreatureID = 17681; if (Killer->GetTypeId() == TYPEID_PLAYER) - ((Player*)Killer)->KilledMonsterCredit(spawnCreatureID, m_creature->GetGUID()); + ((Player*)Killer)->KilledMonsterCredit(spawnCreatureID, m_creature->GetObjectGuid()); break; case 1: case 2: @@ -61,7 +61,7 @@ struct MANGOS_DLL_DECL mob_webbed_creatureAI : public ScriptedAI } if (spawnCreatureID) - m_creature->SummonCreature(spawnCreatureID, 0.0f, 0.0f, 0.0f, m_creature->GetOrientation(), TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 60000); + m_creature->SummonCreature(spawnCreatureID, 0.0f, 0.0f, 0.0f, m_creature->GetOrientation(), TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 25000); } }; CreatureAI* GetAI_mob_webbed_creature(Creature* pCreature) diff --git a/scripts/kalimdor/boss_azuregos.cpp b/scripts/kalimdor/boss_azuregos.cpp index be2a6c0..88ff2d7 100644 --- a/scripts/kalimdor/boss_azuregos.cpp +++ b/scripts/kalimdor/boss_azuregos.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/scripts/kalimdor/caverns_of_time/culling_of_stratholme/boss_infinite_corruptor.cpp b/scripts/kalimdor/caverns_of_time/culling_of_stratholme/boss_infinite_corruptor.cpp index 9af9774..f501429 100644 --- a/scripts/kalimdor/caverns_of_time/culling_of_stratholme/boss_infinite_corruptor.cpp +++ b/scripts/kalimdor/caverns_of_time/culling_of_stratholme/boss_infinite_corruptor.cpp @@ -23,7 +23,7 @@ SDCategory: Culling of Stratholme EndScriptData */ #include "precompiled.h" -#include "def_culling_of_stratholme.h" +#include "culling_of_stratholme.h" enum { diff --git a/scripts/kalimdor/caverns_of_time/culling_of_stratholme/boss_lord_epoch.cpp b/scripts/kalimdor/caverns_of_time/culling_of_stratholme/boss_lord_epoch.cpp index 244d425..7b739ce 100644 --- a/scripts/kalimdor/caverns_of_time/culling_of_stratholme/boss_lord_epoch.cpp +++ b/scripts/kalimdor/caverns_of_time/culling_of_stratholme/boss_lord_epoch.cpp @@ -23,7 +23,7 @@ SDCategory: Culling of Stratholme EndScriptData */ #include "precompiled.h" -#include "def_culling_of_stratholme.h" +#include "culling_of_stratholme.h" enum { diff --git a/scripts/kalimdor/caverns_of_time/culling_of_stratholme/boss_malganis.cpp b/scripts/kalimdor/caverns_of_time/culling_of_stratholme/boss_malganis.cpp index 5a31bcd..23a3155 100644 --- a/scripts/kalimdor/caverns_of_time/culling_of_stratholme/boss_malganis.cpp +++ b/scripts/kalimdor/caverns_of_time/culling_of_stratholme/boss_malganis.cpp @@ -23,7 +23,7 @@ SDCategory: Culling of Stratholme EndScriptData */ #include "precompiled.h" -#include "def_culling_of_stratholme.h" +#include "culling_of_stratholme.h" enum { diff --git a/scripts/kalimdor/caverns_of_time/culling_of_stratholme/boss_meathook.cpp b/scripts/kalimdor/caverns_of_time/culling_of_stratholme/boss_meathook.cpp index fe59399..523ee63 100644 --- a/scripts/kalimdor/caverns_of_time/culling_of_stratholme/boss_meathook.cpp +++ b/scripts/kalimdor/caverns_of_time/culling_of_stratholme/boss_meathook.cpp @@ -23,7 +23,7 @@ SDCategory: Culling of Stratholme EndScriptData */ #include "precompiled.h" -#include "def_culling_of_stratholme.h" +#include "culling_of_stratholme.h" enum { diff --git a/scripts/kalimdor/caverns_of_time/culling_of_stratholme/boss_salramm.cpp b/scripts/kalimdor/caverns_of_time/culling_of_stratholme/boss_salramm.cpp index 7aed1e8..ceb7d01 100644 --- a/scripts/kalimdor/caverns_of_time/culling_of_stratholme/boss_salramm.cpp +++ b/scripts/kalimdor/caverns_of_time/culling_of_stratholme/boss_salramm.cpp @@ -23,7 +23,7 @@ SDCategory: Culling of Stratholme EndScriptData */ #include "precompiled.h" -#include "def_culling_of_stratholme.h" +#include "culling_of_stratholme.h" enum { diff --git a/scripts/kalimdor/caverns_of_time/culling_of_stratholme/culling_of_stratholme.cpp b/scripts/kalimdor/caverns_of_time/culling_of_stratholme/culling_of_stratholme.cpp index 3ec07ff..f4d6576 100644 --- a/scripts/kalimdor/caverns_of_time/culling_of_stratholme/culling_of_stratholme.cpp +++ b/scripts/kalimdor/caverns_of_time/culling_of_stratholme/culling_of_stratholme.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or @@ -23,7 +23,7 @@ SDCategory: Culling of Stratholme EndScriptData */ #include "precompiled.h" -#include "def_culling_of_stratholme.h" +#include "culling_of_stratholme.h" #include "escort_ai.h" #include "WorldPacket.h" #include "Weather.h" diff --git a/scripts/kalimdor/caverns_of_time/culling_of_stratholme/culling_of_stratholme.h b/scripts/kalimdor/caverns_of_time/culling_of_stratholme/culling_of_stratholme.h new file mode 100644 index 0000000..6bfbdce --- /dev/null +++ b/scripts/kalimdor/caverns_of_time/culling_of_stratholme/culling_of_stratholme.h @@ -0,0 +1,110 @@ +/* Copyright (C) 2006 - 2011 ScriptDev2 + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + + +/* ScriptData +SDName: instance_culling_of_stratholme +SD%Complete: ?% +SDComment: by MaxXx2021 +SDCategory: Culling of Stratholme +EndScriptData */ + +#ifndef DEF_CULLING_OF_STRATHOLME_H +#define DEF_CULLING_OF_STRATHOLME_H + +enum Data +{ + TYPE_QUEST = 1, + TYPE_INTRO = 2, + TYPE_CRATES_COUNT = 3, + TYPE_PHASE = 4, + TYPE_ENCOUNTER = 5, + TYPE_WAVE_COUNT = 6, + TYPE_WING = 7, + TYPE_BONUS = 8, + TYPE_MALGANIS = 9, + + DATA_TEMPSUMMON = 10, + + QUEST_DISPELLING_ILLUSIONS = 13149, + QUEST_A_ROYAL_ESCORT = 13151, + ITEM_ARCANE_DISRUPTOR = 37888, + + NPC_CHROMI01 = 26527, + NPC_CHROMI02 = 27915, + NPC_ARTHAS = 26499, + NPC_JAINA = 26497, + NPC_UTHER = 26528, + NPC_KNIGHT = 28612, + NPC_MIKE = 30571, + NPC_MAL_CORICS = 31017, + NPC_GRIAN_STONE = 30561, + NPC_JAMES = 30553, + NPC_FRAS_FRASIABI = 30552, + NPC_FORRESTER = 30551, + NPC_ROGER = 27903, + NPC_CRATE = 30996, + NPC_MORIGAN = 27877, + NPC_PERELLI = 27876, + NPC_JENA = 27885, + NPC_MARTHA = 27884, + NPC_MALCOLM = 27891, + NPC_DOG = 27892, + NPC_BARTLEBY = 27907, + NPC_MARINE = 27745, + NPC_PRIEST = 27747, + + NPC_INFINITE_ADVERSARY = 27742, + NPC_INFINITE_HUNTER = 27743, + NPC_INFINITE_AGENT = 27744, + NPC_TIME_RIFT = 28409, + NPC_TIME_RIFT_2 = 28439, + NPC_ZOMBIE = 27737, + NPC_GHOUL = 28249, + NPC_NECROMANCER = 28200, + NPC_STALKER = 28199, + NPC_FIEND = 27734, + NPC_GOLEM = 28201, + NPC_EGHOUL = 27729, + NPC_CONSTRUCT = 27736, + NPC_ACOLYTE = 27731, + NPC_MEATHOOK = 26529, + NPC_SALRAMM = 26530, + NPC_EPOCH = 26532, + NPC_MALGANIS = 26533, + NPC_CITY = 28167, + NPC_INFINITE_CORRUPTOR = 32273, + + GO_CRATE_LIGHT = 190117, + GO_SHKAF_GATE = 188686, + GO_MALGANIS_GATE1 = 187711, + GO_MALGANIS_GATE2 = 187723, + GO_MALGANIS_CHEST = 190663, + GO_MALGANIS_CHEST_H = 193597, + GO_EXIT = 191788, + + + WORLD_STATE_COS_TIME_ON = 3932, + WORLD_STATE_COS_TIME_COUNT = 3931, + WORLD_STATE_COS_WAVE_COUNT = 3504, + WORLD_STATE_COS_CRATE_ON = 3479, + WORLD_STATE_COS_CRATE_COUNT = 3480, + + RIGHT = 1, + LEFT = 2 +}; + +#endif diff --git a/scripts/kalimdor/caverns_of_time/culling_of_stratholme/culling_of_stratholmeai.cpp b/scripts/kalimdor/caverns_of_time/culling_of_stratholme/culling_of_stratholmeai.cpp index cb6acf8..b354281 100644 --- a/scripts/kalimdor/caverns_of_time/culling_of_stratholme/culling_of_stratholmeai.cpp +++ b/scripts/kalimdor/caverns_of_time/culling_of_stratholme/culling_of_stratholmeai.cpp @@ -23,7 +23,7 @@ SDCategory: Culling of Stratholme EndScriptData */ #include "precompiled.h" -#include "def_culling_of_stratholme.h" +#include "culling_of_stratholme.h" #include "escort_ai.h" #include "WorldPacket.h" diff --git a/scripts/kalimdor/caverns_of_time/culling_of_stratholme/instance_culling_of_stratholme.cpp b/scripts/kalimdor/caverns_of_time/culling_of_stratholme/instance_culling_of_stratholme.cpp index 737dfaa..20ecac6 100644 --- a/scripts/kalimdor/caverns_of_time/culling_of_stratholme/instance_culling_of_stratholme.cpp +++ b/scripts/kalimdor/caverns_of_time/culling_of_stratholme/instance_culling_of_stratholme.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or @@ -23,7 +23,7 @@ SDCategory: Culling of Stratholme EndScriptData */ #include "precompiled.h" -#include "def_culling_of_stratholme.h" +#include "culling_of_stratholme.h" struct MANGOS_DLL_DECL instance_culling_of_stratholme : public ScriptedInstance { diff --git a/scripts/kalimdor/caverns_of_time/culling_of_stratholme/trash_culling_of_stratholme.cpp b/scripts/kalimdor/caverns_of_time/culling_of_stratholme/trash_culling_of_stratholme.cpp index 41a5d1d..c1d144d 100644 --- a/scripts/kalimdor/caverns_of_time/culling_of_stratholme/trash_culling_of_stratholme.cpp +++ b/scripts/kalimdor/caverns_of_time/culling_of_stratholme/trash_culling_of_stratholme.cpp @@ -23,7 +23,7 @@ SDCategory: Culling of Stratholme EndScriptData */ #include "precompiled.h" -#include "def_culling_of_stratholme.h" +#include "culling_of_stratholme.h" /*### ## npc_cs_gnoul diff --git a/scripts/kalimdor/caverns_of_time/dark_portal/boss_aeonus.cpp b/scripts/kalimdor/caverns_of_time/dark_portal/boss_aeonus.cpp index ab1f90f..0455d1e 100644 --- a/scripts/kalimdor/caverns_of_time/dark_portal/boss_aeonus.cpp +++ b/scripts/kalimdor/caverns_of_time/dark_portal/boss_aeonus.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/scripts/kalimdor/caverns_of_time/dark_portal/boss_chrono_lord_deja.cpp b/scripts/kalimdor/caverns_of_time/dark_portal/boss_chrono_lord_deja.cpp index 0a09f14..03b31a8 100644 --- a/scripts/kalimdor/caverns_of_time/dark_portal/boss_chrono_lord_deja.cpp +++ b/scripts/kalimdor/caverns_of_time/dark_portal/boss_chrono_lord_deja.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/scripts/kalimdor/caverns_of_time/dark_portal/boss_temporus.cpp b/scripts/kalimdor/caverns_of_time/dark_portal/boss_temporus.cpp index 361bd6a..8af500f 100644 --- a/scripts/kalimdor/caverns_of_time/dark_portal/boss_temporus.cpp +++ b/scripts/kalimdor/caverns_of_time/dark_portal/boss_temporus.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/scripts/kalimdor/caverns_of_time/dark_portal/dark_portal.cpp b/scripts/kalimdor/caverns_of_time/dark_portal/dark_portal.cpp index 51ad631..5376162 100644 --- a/scripts/kalimdor/caverns_of_time/dark_portal/dark_portal.cpp +++ b/scripts/kalimdor/caverns_of_time/dark_portal/dark_portal.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/scripts/kalimdor/caverns_of_time/dark_portal/dark_portal.h b/scripts/kalimdor/caverns_of_time/dark_portal/dark_portal.h index 8848157..8afa2fb 100644 --- a/scripts/kalimdor/caverns_of_time/dark_portal/dark_portal.h +++ b/scripts/kalimdor/caverns_of_time/dark_portal/dark_portal.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/scripts/kalimdor/caverns_of_time/hyjal/hyjal.cpp b/scripts/kalimdor/caverns_of_time/hyjal/hyjal.cpp index fc0a35a..124f3ae 100644 --- a/scripts/kalimdor/caverns_of_time/hyjal/hyjal.cpp +++ b/scripts/kalimdor/caverns_of_time/hyjal/hyjal.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/scripts/kalimdor/caverns_of_time/hyjal/hyjal.h b/scripts/kalimdor/caverns_of_time/hyjal/hyjal.h index 80c1b50..4c0d83c 100644 --- a/scripts/kalimdor/caverns_of_time/hyjal/hyjal.h +++ b/scripts/kalimdor/caverns_of_time/hyjal/hyjal.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/scripts/kalimdor/caverns_of_time/hyjal/hyjalAI.h b/scripts/kalimdor/caverns_of_time/hyjal/hyjalAI.h index 614d969..5f5387e 100644 --- a/scripts/kalimdor/caverns_of_time/hyjal/hyjalAI.h +++ b/scripts/kalimdor/caverns_of_time/hyjal/hyjalAI.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/scripts/kalimdor/caverns_of_time/hyjal/instance_hyjal.cpp b/scripts/kalimdor/caverns_of_time/hyjal/instance_hyjal.cpp index ea1f11a..8382cb3 100644 --- a/scripts/kalimdor/caverns_of_time/hyjal/instance_hyjal.cpp +++ b/scripts/kalimdor/caverns_of_time/hyjal/instance_hyjal.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/scripts/kalimdor/caverns_of_time/old_hillsbrad/boss_captain_skarloc.cpp b/scripts/kalimdor/caverns_of_time/old_hillsbrad/boss_captain_skarloc.cpp index 2ae0044..35d4173 100644 --- a/scripts/kalimdor/caverns_of_time/old_hillsbrad/boss_captain_skarloc.cpp +++ b/scripts/kalimdor/caverns_of_time/old_hillsbrad/boss_captain_skarloc.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/scripts/kalimdor/caverns_of_time/old_hillsbrad/boss_epoch_hunter.cpp b/scripts/kalimdor/caverns_of_time/old_hillsbrad/boss_epoch_hunter.cpp index 28e1266..616d84b 100644 --- a/scripts/kalimdor/caverns_of_time/old_hillsbrad/boss_epoch_hunter.cpp +++ b/scripts/kalimdor/caverns_of_time/old_hillsbrad/boss_epoch_hunter.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/scripts/kalimdor/caverns_of_time/old_hillsbrad/boss_leutenant_drake.cpp b/scripts/kalimdor/caverns_of_time/old_hillsbrad/boss_leutenant_drake.cpp index cf4f614..7eb9909 100644 --- a/scripts/kalimdor/caverns_of_time/old_hillsbrad/boss_leutenant_drake.cpp +++ b/scripts/kalimdor/caverns_of_time/old_hillsbrad/boss_leutenant_drake.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/scripts/kalimdor/caverns_of_time/old_hillsbrad/instance_old_hillsbrad.cpp b/scripts/kalimdor/caverns_of_time/old_hillsbrad/instance_old_hillsbrad.cpp index c5d7946..474535c 100644 --- a/scripts/kalimdor/caverns_of_time/old_hillsbrad/instance_old_hillsbrad.cpp +++ b/scripts/kalimdor/caverns_of_time/old_hillsbrad/instance_old_hillsbrad.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/scripts/kalimdor/caverns_of_time/old_hillsbrad/old_hillsbrad.cpp b/scripts/kalimdor/caverns_of_time/old_hillsbrad/old_hillsbrad.cpp index f40073b..dfd93b3 100644 --- a/scripts/kalimdor/caverns_of_time/old_hillsbrad/old_hillsbrad.cpp +++ b/scripts/kalimdor/caverns_of_time/old_hillsbrad/old_hillsbrad.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or @@ -450,7 +450,7 @@ struct MANGOS_DLL_DECL npc_thrall_old_hillsbradAI : public npc_escortAI for(Map::PlayerList::const_iterator itr = lPlayerList.begin(); itr != lPlayerList.end(); ++itr) { if (Player* pPlayer = itr->getSource()) - pPlayer->KilledMonsterCredit(NPC_THRALL_QUEST_TRIGGER, m_creature->GetGUID()); + pPlayer->KilledMonsterCredit(NPC_THRALL_QUEST_TRIGGER, m_creature->GetObjectGuid()); } } diff --git a/scripts/kalimdor/caverns_of_time/old_hillsbrad/old_hillsbrad.h b/scripts/kalimdor/caverns_of_time/old_hillsbrad/old_hillsbrad.h index bddf573..8fcf89d 100644 --- a/scripts/kalimdor/caverns_of_time/old_hillsbrad/old_hillsbrad.h +++ b/scripts/kalimdor/caverns_of_time/old_hillsbrad/old_hillsbrad.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/scripts/kalimdor/darkshore.cpp b/scripts/kalimdor/darkshore.cpp index a58565b..95fb9f8 100644 --- a/scripts/kalimdor/darkshore.cpp +++ b/scripts/kalimdor/darkshore.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/scripts/kalimdor/desolace.cpp b/scripts/kalimdor/desolace.cpp index 5640383..f0f997c 100644 --- a/scripts/kalimdor/desolace.cpp +++ b/scripts/kalimdor/desolace.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or @@ -17,15 +17,21 @@ /* ScriptData SDName: Desolace SD%Complete: 100 -SDComment: Quest support: 5561 +SDComment: Quest support: 5561, 1440 SDCategory: Desolace EndScriptData */ /* ContentData npc_aged_dying_ancient_kodo +npc_dalinda_malem EndContentData */ #include "precompiled.h" +#include "escort_ai.h" + +/*###### +## npc_aged_dying_ancient_kodo +######*/ enum { @@ -161,14 +167,69 @@ bool GossipHello_npc_aged_dying_ancient_kodo(Player* pPlayer, Creature* pCreatur return true; } +/*###### +## npc_dalinda_malem +######*/ + +enum +{ + QUEST_RETURN_TO_VAHLARRIEL = 1440, +}; + +struct MANGOS_DLL_DECL npc_dalinda_malemAI : public npc_escortAI +{ + npc_dalinda_malemAI(Creature* m_creature) : npc_escortAI(m_creature) { Reset(); } + + void Reset() {} + + void JustStartedEscort() + { + m_creature->SetStandState(UNIT_STAND_STATE_STAND); + } + + void WaypointReached(uint32 uiPointId) + { + if (uiPointId == 18) + { + if (Player* pPlayer = GetPlayerForEscort()) + pPlayer->GroupEventHappens(QUEST_RETURN_TO_VAHLARRIEL, m_creature); + } + } +}; + +CreatureAI* GetAI_npc_dalinda_malem(Creature* pCreature) +{ + return new npc_dalinda_malemAI(pCreature); +} + +bool QuestAccept_npc_dalinda_malem(Player* pPlayer, Creature* pCreature, const Quest* pQuest) +{ + if (pQuest->GetQuestId() == QUEST_RETURN_TO_VAHLARRIEL) + { + if (npc_dalinda_malemAI* pEscortAI = dynamic_cast(pCreature->AI())) + { + // TODO This faction change needs confirmation, also possible that we need to drop her PASSIVE flag + pCreature->setFaction(FACTION_ESCORT_A_NEUTRAL_PASSIVE); + pEscortAI->Start(false, pPlayer->GetGUID(), pQuest); + } + } + return true; +} + void AddSC_desolace() { - Script *newscript; - - newscript = new Script; - newscript->Name = "npc_aged_dying_ancient_kodo"; - newscript->GetAI = &GetAI_npc_aged_dying_ancient_kodo; - newscript->pEffectDummyNPC = &EffectDummyCreature_npc_aged_dying_ancient_kodo; - newscript->pGossipHello = &GossipHello_npc_aged_dying_ancient_kodo; - newscript->RegisterSelf(); + Script* pNewScript; + + pNewScript = new Script; + pNewScript->Name = "npc_aged_dying_ancient_kodo"; + pNewScript->GetAI = &GetAI_npc_aged_dying_ancient_kodo; + pNewScript->pEffectDummyNPC = &EffectDummyCreature_npc_aged_dying_ancient_kodo; + pNewScript->pGossipHello = &GossipHello_npc_aged_dying_ancient_kodo; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "npc_dalinda_malem"; + pNewScript->GetAI = &GetAI_npc_dalinda_malem; + pNewScript->pQuestAcceptNPC = &QuestAccept_npc_dalinda_malem; + pNewScript->RegisterSelf(); } diff --git a/scripts/kalimdor/dire_maul/dire_maul.cpp b/scripts/kalimdor/dire_maul/dire_maul.cpp index 15c85cd..d01dfca 100644 --- a/scripts/kalimdor/dire_maul/dire_maul.cpp +++ b/scripts/kalimdor/dire_maul/dire_maul.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/scripts/kalimdor/dire_maul/dire_maul.h b/scripts/kalimdor/dire_maul/dire_maul.h index b53e72e..6f3a472 100644 --- a/scripts/kalimdor/dire_maul/dire_maul.h +++ b/scripts/kalimdor/dire_maul/dire_maul.h @@ -1,3 +1,136 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ + +#ifndef DEF_DM_H +#define DEF_DM_H + +enum +{ + MAX_ENCOUNTER = 11, + MAX_GENERATORS = 5, + + // East + TYPE_ALZZIN = 0, // Do not change - Handled with Acid + TYPE_ZEVRIM = 1, + TYPE_IRONBARK = 2, + + // West + TYPE_IMMOLTHAR = 3, + TYPE_PRINCE = 4, + TYPE_PYLON_1 = 5, + TYPE_PYLON_2 = TYPE_PYLON_1 + 1, + TYPE_PYLON_3 = TYPE_PYLON_1 + 2, + TYPE_PYLON_4 = TYPE_PYLON_1 + 3, + TYPE_PYLON_5 = TYPE_PYLON_1 + 4, + + // North + TYPE_KING_GORDOK = 10, + + // East + GO_CRUMBLE_WALL = 177220, + GO_CORRUPT_VINE = 179502, + GO_FELVINE_SHARD = 179559, + GO_CONSERVATORY_DOOR = 176907, // Opened by Ironbark the redeemed + + NPC_ZEVRIM_THORNHOOF = 11490, + NPC_OLD_IRONBARK = 11491, + NPC_IRONBARK_REDEEMED = 14241, + + // West + NPC_PRINCE_TORTHELDRIN = 11486, + NPC_IMMOLTHAR = 11496, + NPC_ARCANE_ABERRATION = 11480, + NPC_MANA_REMNANT = 11483, + NPC_HIGHBORNE_SUMMONER = 11466, + + GO_PRINCES_CHEST = 179545, + GO_PRINCES_CHEST_AURA = 179563, + GO_CRYSTAL_GENERATOR_1 = 177259, + GO_CRYSTAL_GENERATOR_2 = 177257, + GO_CRYSTAL_GENERATOR_3 = 177258, + GO_CRYSTAL_GENERATOR_4 = 179504, + GO_CRYSTAL_GENERATOR_5 = 179505, + GO_FORCEFIELD = 179503, + GO_WARPWOOD_DOOR = 177221, + + // North + NPC_GUARD_MOLDAR = 14326, + NPC_STOMPER_KREEG = 14322, + NPC_GUARD_FENGUS = 14321, + NPC_GUARD_SLIPKIK = 14323, + NPC_CAPTAIN_KROMCRUSH = 14325, + NPC_CHORUSH = 14324, + NPC_KING_GORDOK = 11501, + NPC_MIZZLE_THE_CRAFTY = 14353, + + GO_KNOTS_CACHE = 179501, + GO_KNOTS_BALL_AND_CHAIN = 179511, + GO_GORDOK_TRIBUTE = 179564, + + SAY_FREE_IMMOLTHAR = -1429000, + SAY_KILL_IMMOLTHAR = -1429001, + SAY_IRONBARK_REDEEM = -1429002, + + FACTION_HOSTILE = 14, + SPELL_KING_OF_GORDOK = 22799, +}; + +class MANGOS_DLL_DECL instance_dire_maul : public ScriptedInstance +{ + public: + instance_dire_maul(Map* pMap); + ~instance_dire_maul() {} + + void Initialize(); + + void OnCreatureCreate(Creature* pCreature); + void OnObjectCreate(GameObject* pGo); + + void SetData(uint32 uiType, uint32 uiData); + uint32 GetData(uint32 uiType); + uint64 GetData64(uint32 uiData); + + void OnCreatureEnterCombat(Creature* pCreature); + void OnCreatureDeath(Creature* pCreature); + + const char* Save() { return m_strInstData.c_str(); } + void Load(const char* chrIn); + + protected: + bool CheckAllGeneratorsDestroyed(); + void ProcessForceFieldOpening(); + + uint32 m_auiEncounter[MAX_ENCOUNTER]; + std::string m_strInstData; + + // East + bool m_bWallDestroyed; + + uint64 m_uiCrumbleWallGUID; + uint64 m_uiCorruptVineGUID; + uint64 m_uiConservatoryDoorGUID; + uint64 m_uiOldIronbarkGUID; + + std::list m_lFelvineShardGUIDs; + + // West + uint64 m_auiCrystalGeneratorGUID[MAX_GENERATORS]; + + uint64 m_uiPrinceTortheldrinGUID; + uint64 m_uiImmolTharGUID; + uint64 m_uiForcefieldGUID; + uint64 m_uiPrincesChestAuraGUID; + uint64 m_uiTendrisWarpwoodDoorGUID; + + std::list m_luiHighborneSummonerGUIDs; + std::list m_lGeneratorGuardGUIDs; + std::set m_sSortedGeneratorGuards[MAX_GENERATORS]; + + // North + uint64 m_uiGordokGUID; + uint64 m_uiChoRushGUID; + uint64 m_uiMizzleGUID; +}; + +#endif diff --git a/scripts/kalimdor/dire_maul/instance_dire_maul.cpp b/scripts/kalimdor/dire_maul/instance_dire_maul.cpp index fb80a3c..e33a3a8 100644 --- a/scripts/kalimdor/dire_maul/instance_dire_maul.cpp +++ b/scripts/kalimdor/dire_maul/instance_dire_maul.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or @@ -15,202 +15,445 @@ */ /* ScriptData -SDName: Instance_Dire_Maul -SD%Complete: 50% -SDComment: Doorhandling in Dire_Maul +SDName: instance_dire_maul +SD%Complete: 30 +SDComment: Basic Support - Most events and quest-related stuff missing SDCategory: Dire Maul EndScriptData */ #include "precompiled.h" -struct Encounter +#include "dire_maul.h" + +instance_dire_maul::instance_dire_maul(Map* pMap) : ScriptedInstance(pMap), + // East + m_bWallDestroyed(false), + m_uiCrumbleWallGUID(0), + m_uiCorruptVineGUID(0), + m_uiConservatoryDoorGUID(0), + m_uiOldIronbarkGUID(0), + + // West + m_uiPrinceTortheldrinGUID(0), + m_uiImmolTharGUID(0), + m_uiForcefieldGUID(0), + m_uiPrincesChestAuraGUID(0), + m_uiTendrisWarpwoodDoorGUID(0), + + // North + m_uiGordokGUID(0), + m_uiChoRushGUID(0), + m_uiMizzleGUID(0) { - uint64 GUID; - bool dead; -}; -enum + Initialize(); +} + +void instance_dire_maul::Initialize() { - TYPE_CRYSTAL_GENERATOR_01 = 1, - TYPE_CRYSTAL_GENERATOR_02 = 2, - TYPE_CRYSTAL_GENERATOR_03 = 3, - TYPE_CRYSTAL_GENERATOR_04 = 4, - TYPE_CRYSTAL_GENERATOR_05 = 5, - DIRE_MAUL_CRYSTAL_GENERATOR_01 = 177259, - DIRE_MAUL_CRYSTAL_GENERATOR_02 = 177257, - DIRE_MAUL_CRYSTAL_GENERATOR_03 = 177258, - DIRE_MAUL_CRYSTAL_GENERATOR_04 = 179504, - DIRE_MAUL_CRYSTAL_GENERATOR_05 = 179505 -}; - -struct MANGOS_DLL_DECL instance_dire_maul : public ScriptedInstance + memset(&m_auiEncounter, 0, sizeof(m_auiEncounter)); + memset(&m_auiCrystalGeneratorGUID, 0, sizeof(m_auiCrystalGeneratorGUID)); + + m_lFelvineShardGUIDs.clear(); + m_luiHighborneSummonerGUIDs.clear(); + m_lGeneratorGuardGUIDs.clear(); +} + +void instance_dire_maul::OnCreatureCreate(Creature* pCreature) { - instance_dire_maul(Map *pMap) : ScriptedInstance(pMap) {Initialize();}; + switch(pCreature->GetEntry()) + { + // East + case NPC_OLD_IRONBARK: + m_uiOldIronbarkGUID = pCreature->GetGUID(); + break; - Encounter m_Encounter[6]; - uint32 m_uiGenerator[5]; + // West + case NPC_PRINCE_TORTHELDRIN: + m_uiPrinceTortheldrinGUID = pCreature->GetGUID(); + if (m_auiEncounter[TYPE_IMMOLTHAR] == DONE) + pCreature->setFaction(FACTION_HOSTILE); + break; + case NPC_ARCANE_ABERRATION: + case NPC_MANA_REMNANT: + m_lGeneratorGuardGUIDs.push_back(pCreature->GetGUID()); + break; + case NPC_IMMOLTHAR: + m_uiImmolTharGUID = pCreature->GetGUID(); + break; + case NPC_HIGHBORNE_SUMMONER: + m_luiHighborneSummonerGUIDs.push_back(pCreature->GetGUID()); + break; - uint32 uiTimer; - uint64 m_uiConservatoryDoorGUID; - bool m_bConservatoryDoorOPEN; - uint64 m_uiCrumbleWallDoorGUID; - bool m_bCrumbleWallDoorOPEN; - uint64 m_uiForceFieldDoorGUID; - bool m_bForceFieldDoorOPEN; + // North + case NPC_CHORUSH: + m_uiChoRushGUID = pCreature->GetGUID(); + break; + case NPC_KING_GORDOK: + m_uiGordokGUID = pCreature->GetGUID(); + break; + case NPC_MIZZLE_THE_CRAFTY: + m_uiMizzleGUID = pCreature->GetGUID(); + break; + } +} - void Initialize() +void instance_dire_maul::OnObjectCreate(GameObject* pGo) +{ + switch(pGo->GetEntry()) { - for (int i = 0; i < 6;++i) - { - m_Encounter[i].GUID = 0; - m_Encounter[i].dead = false; - } - m_uiConservatoryDoorGUID = 0; - m_bConservatoryDoorOPEN = false; - m_uiCrumbleWallDoorGUID = 0; - m_bCrumbleWallDoorOPEN = false; - m_uiForceFieldDoorGUID = 0; - uiTimer = 10000; + // East + case GO_CONSERVATORY_DOOR: + m_uiConservatoryDoorGUID = pGo->GetGUID(); + if (m_auiEncounter[TYPE_IRONBARK] == DONE) + pGo->SetGoState(GO_STATE_ACTIVE); + break; + case GO_CRUMBLE_WALL: + m_uiCrumbleWallGUID = pGo->GetGUID(); + if (m_bWallDestroyed || m_auiEncounter[TYPE_ALZZIN] == DONE) + pGo->SetGoState(GO_STATE_ACTIVE); + break; + case GO_CORRUPT_VINE: + m_uiCorruptVineGUID = pGo->GetGUID(); + if (m_auiEncounter[TYPE_ALZZIN] == DONE) + pGo->SetGoState(GO_STATE_ACTIVE); + break; + case GO_FELVINE_SHARD: + m_lFelvineShardGUIDs.push_back(pGo->GetGUID()); + break; + + // West + case GO_CRYSTAL_GENERATOR_1: + m_auiCrystalGeneratorGUID[0] = pGo->GetGUID(); + if (m_auiEncounter[TYPE_PYLON_1] == DONE) + pGo->SetGoState(GO_STATE_ACTIVE); + break; + case GO_CRYSTAL_GENERATOR_2: + m_auiCrystalGeneratorGUID[1] = pGo->GetGUID(); + if (m_auiEncounter[TYPE_PYLON_2] == DONE) + pGo->SetGoState(GO_STATE_ACTIVE); + break; + case GO_CRYSTAL_GENERATOR_3: + m_auiCrystalGeneratorGUID[2] = pGo->GetGUID(); + if (m_auiEncounter[TYPE_PYLON_3] == DONE) + pGo->SetGoState(GO_STATE_ACTIVE); + break; + case GO_CRYSTAL_GENERATOR_4: + m_auiCrystalGeneratorGUID[3] = pGo->GetGUID(); + if (m_auiEncounter[TYPE_PYLON_4] == DONE) + pGo->SetGoState(GO_STATE_ACTIVE); + break; + case GO_CRYSTAL_GENERATOR_5: + m_auiCrystalGeneratorGUID[4] = pGo->GetGUID(); + if (m_auiEncounter[TYPE_PYLON_5] == DONE) + pGo->SetGoState(GO_STATE_ACTIVE); + break; + case GO_FORCEFIELD: + m_uiForcefieldGUID = pGo->GetGUID(); + if (CheckAllGeneratorsDestroyed()) + pGo->SetGoState(GO_STATE_ACTIVE); + break; + case GO_PRINCES_CHEST_AURA: + m_uiPrincesChestAuraGUID = pGo->GetGUID(); + break; } +} - void OnCreatureCreate(Creature* pCreature) +void instance_dire_maul::SetData(uint32 uiType, uint32 uiData) +{ + switch(uiType) { - switch (pCreature->GetEntry()) - { - case 14354: //Pusillin - m_Encounter[0].dead = false; - m_Encounter[0].GUID = pCreature->GetGUID(); - break; - case 14349: //Pimgib - m_Encounter[1].dead = false; - m_Encounter[1].GUID = pCreature->GetGUID(); - break; - case 14327: //Lethtendris - m_Encounter[2].dead = false; - m_Encounter[2].GUID = pCreature->GetGUID(); - break; - case 13280: //Hydrospawn - m_Encounter[3].dead = false; - m_Encounter[3].GUID = pCreature->GetGUID(); - break; - case 11490: //Zeorim Thornhoot - m_Encounter[4].dead = false; - m_Encounter[4].GUID = pCreature->GetGUID(); - break; - case 11492: //Alzzin the Wildshaper - m_Encounter[5].dead = false; - m_Encounter[5].GUID = pCreature->GetGUID(); - break; - } + // East + case TYPE_ZEVRIM: + if (uiData == DONE) + { + // Update Old Ironbark so he can open the conservatory door + if (Creature* pIronbark = instance->GetCreature(m_uiOldIronbarkGUID)) + { + DoScriptText(SAY_IRONBARK_REDEEM, pIronbark); + pIronbark->UpdateEntry(NPC_IRONBARK_REDEEMED); + } + } + m_auiEncounter[uiType] = uiData; + break; + case TYPE_IRONBARK: + m_auiEncounter[uiType] = uiData; + break; + case TYPE_ALZZIN: // This Encounter is expected to be handled within Acid (reason handling at 50% hp) + if (uiData == DONE) + { + if (!m_bWallDestroyed) + { + DoUseDoorOrButton(m_uiCrumbleWallGUID); + m_bWallDestroyed = true; + } + + DoUseDoorOrButton(m_uiCorruptVineGUID); + + if (!m_lFelvineShardGUIDs.empty()) + { + for(std::list::iterator i = m_lFelvineShardGUIDs.begin(); i != m_lFelvineShardGUIDs.end(); ++i) + DoRespawnGameObject(*i); + } + } + else if (uiData == SPECIAL && !m_bWallDestroyed) + { + DoUseDoorOrButton(m_uiCrumbleWallGUID); + m_bWallDestroyed = true; + } + m_auiEncounter[uiType] = uiData; + break; + + // West + case TYPE_IMMOLTHAR: + if (uiData == DONE) + { + if (Creature* pPrince = instance->GetCreature(m_uiPrinceTortheldrinGUID)) + { + DoScriptText(SAY_FREE_IMMOLTHAR, pPrince); + pPrince->setFaction(FACTION_HOSTILE); + // Despawn Chest-Aura + if (GameObject* pChestAura = instance->GetGameObject(m_uiPrincesChestAuraGUID)) + pChestAura->Use(pPrince); + } + } + m_auiEncounter[uiType] = uiData; + break; + case TYPE_PRINCE: + m_auiEncounter[uiType] = uiData; + break; + case TYPE_PYLON_1: + case TYPE_PYLON_2: + case TYPE_PYLON_3: + case TYPE_PYLON_4: + case TYPE_PYLON_5: + m_auiEncounter[uiType] = uiData; + if (uiData == DONE) + { + DoUseDoorOrButton(m_auiCrystalGeneratorGUID[uiType - TYPE_PYLON_1]); + if (CheckAllGeneratorsDestroyed()) + ProcessForceFieldOpening(); + } + break; + + // North + case TYPE_KING_GORDOK: + m_auiEncounter[uiType] = uiData; + if (uiData == DONE) + { + // Apply Aura to players in the map + Map::PlayerList const& players = instance->GetPlayers(); + for(Map::PlayerList::const_iterator itr = players.begin(); itr != players.end(); ++itr) + { + if (Player* pPlayer = itr->getSource()) + pPlayer->CastSpell(pPlayer, SPELL_KING_OF_GORDOK, true); + } + } + break; } - void OnObjectCreate(GameObject* pGo) + if (uiData == DONE) { - switch (pGo->GetEntry()) - { - case 177220: //Crumble Wall - m_uiCrumbleWallDoorGUID = pGo->GetGUID(); - break; - case 176907: //Conservatory Door - m_uiConservatoryDoorGUID = pGo->GetGUID(); - break; - case 179503: //Force Field - m_uiForceFieldDoorGUID = pGo->GetGUID(); + OUT_SAVE_INST_DATA; + std::ostringstream saveStream; + saveStream << m_auiEncounter[0] << " " << m_auiEncounter[1] << " " << m_auiEncounter[2] << " " + << m_auiEncounter[3] << " " << m_auiEncounter[4] << " " << m_auiEncounter[5] << " " + << m_auiEncounter[6] << " " << m_auiEncounter[7] << " " << m_auiEncounter[8] << " " + << m_auiEncounter[9] << " " << m_auiEncounter[10]; - } + m_strInstData = saveStream.str(); + + SaveToDB(); + OUT_SAVE_INST_DATA_COMPLETE; } - void Update(uint32 uiDiff) - { - //check every 10 seconds - if (uiTimer < uiDiff) - { - if (!m_bCrumbleWallDoorOPEN) - if (!m_Encounter[5].dead) - if (Creature *creature = instance->GetCreature(m_Encounter[5].GUID)) - if (!creature->isAlive()) - { - m_Encounter[5].dead = true; - DoUseDoorOrButton(m_uiCrumbleWallDoorGUID); - m_bCrumbleWallDoorOPEN = true; - } - - if (!m_bConservatoryDoorOPEN) - { - for (int i = 0; i < 5; ++i) - { - if (!m_Encounter[i].dead) - if (Creature *creature = instance->GetCreature(m_Encounter[i].GUID)) - if (!creature->isAlive()) - { - m_Encounter[i].dead = true; - } - } - if (m_Encounter[0].dead && m_Encounter[1].dead && m_Encounter[2].dead && m_Encounter[3].dead && m_Encounter[4].dead) - { - DoUseDoorOrButton(m_uiConservatoryDoorGUID); - m_bConservatoryDoorOPEN = true; - } - } - uiTimer = 10000; - } - else - { - uiTimer -= uiDiff; - } - } - - void SetData(uint32 uiType, uint32 uiData) +} + +uint32 instance_dire_maul::GetData(uint32 uiType) +{ + if (uiType < MAX_ENCOUNTER) + return m_auiEncounter[uiType]; + + return 0; +} + +uint64 instance_dire_maul::GetData64(uint32 uiData) +{ + switch(uiData) { - switch(uiType) - { - case TYPE_CRYSTAL_GENERATOR_01: m_uiGenerator[0] = uiData; break; - case TYPE_CRYSTAL_GENERATOR_02: m_uiGenerator[1] = uiData; break; - case TYPE_CRYSTAL_GENERATOR_03: m_uiGenerator[2] = uiData; break; - case TYPE_CRYSTAL_GENERATOR_04: m_uiGenerator[3] = uiData; break; - case TYPE_CRYSTAL_GENERATOR_05: m_uiGenerator[4] = uiData; break; - default: - error_log("SD2: Instance Dire Maul: ERROR SetData = %u for type %u does not exist/not implemented.", uiType, uiData); - break; - } - if (m_uiGenerator[0] == SPECIAL && m_uiGenerator[1] == SPECIAL && m_uiGenerator[2] == SPECIAL && m_uiGenerator[3] == SPECIAL && m_uiGenerator[4] == SPECIAL) - DoUseDoorOrButton(m_uiForceFieldDoorGUID); - - - } -}; + case NPC_CHORUSH: return m_uiChoRushGUID; + case NPC_KING_GORDOK: return m_uiGordokGUID; + default: + return 0; + } +} -InstanceData* GetInstanceData_instance_dire_maul(Map* pMap) +void instance_dire_maul::OnCreatureEnterCombat(Creature* pCreature) { - return new instance_dire_maul(pMap); + switch (pCreature->GetEntry()) + { + // West + // - Handling of guards of generators + case NPC_ARCANE_ABERRATION: + case NPC_MANA_REMNANT: + if (!m_lGeneratorGuardGUIDs.empty()) + { + for (uint8 i = 0; i < MAX_GENERATORS; ++i) + { + GameObject* pGenerator = instance->GetGameObject(m_auiCrystalGeneratorGUID[i]); + // Skip non-existing or finished generators + if (!pGenerator || GetData(TYPE_PYLON_1 + i) == DONE) + continue; + + // Sort all remaining (alive) NPCs to unfinished generators + for (std::list::iterator itr = m_lGeneratorGuardGUIDs.begin(); itr != m_lGeneratorGuardGUIDs.end();) + { + Creature* pGuard = instance->GetCreature(*itr); + if (!pGuard || pGuard->isDead()) // Remove invalid guids and dead guards + { + m_lGeneratorGuardGUIDs.erase(itr++); + continue; + } + + if (pGuard->IsWithinDistInMap(pGenerator, 20.0f)) + { + m_sSortedGeneratorGuards[i].insert(pGuard->GetGUIDLow()); + m_lGeneratorGuardGUIDs.erase(itr++); + } + else + ++itr; + } + } + } + break; + // - Set InstData for ImmolThar + case NPC_IMMOLTHAR: + SetData(TYPE_IMMOLTHAR, IN_PROGRESS); + break; + } +} + +void instance_dire_maul::OnCreatureDeath(Creature* pCreature) +{ + switch (pCreature->GetEntry()) + { + // East + // - Handling Zevrim and Old Ironbark for the door event + case NPC_ZEVRIM_THORNHOOF: + SetData(TYPE_ZEVRIM, DONE); + break; + case NPC_IRONBARK_REDEEMED: + SetData(TYPE_IRONBARK, DONE); + break; + + // West + // - Handling of guards of generators + case NPC_ARCANE_ABERRATION: + case NPC_MANA_REMNANT: + for (uint8 i = 0; i < MAX_GENERATORS; ++i) + { + // Skip already activated generators + if (GetData(TYPE_PYLON_1 + i) == DONE) + continue; + + // Only process generator where the npc is sorted in + if (m_sSortedGeneratorGuards[i].find(pCreature->GetGUIDLow()) != m_sSortedGeneratorGuards[i].end()) + { + m_sSortedGeneratorGuards[i].erase(pCreature->GetGUIDLow()); + if (m_sSortedGeneratorGuards[i].empty()) + SetData(TYPE_PYLON_1 + i, DONE); + + break; + } + } + break; + // - Set InstData for ImmolThar + case NPC_IMMOLTHAR: + SetData(TYPE_IMMOLTHAR, DONE); + break; + + // North + // - Handling of Ogre Boss (Assume boss can be handled in Acid) + case NPC_KING_GORDOK: + SetData(TYPE_KING_GORDOK, DONE); + break; + } } -bool GOUse_go_dire_maul_generator(Player* pPlayer, GameObject* pGo) +void instance_dire_maul::Load(const char* chrIn) { - ScriptedInstance* pInstance = (ScriptedInstance*)pGo->GetInstanceData(); + if (!chrIn) + { + OUT_LOAD_INST_DATA_FAIL; + return; + } + + OUT_LOAD_INST_DATA(chrIn); + + std::istringstream loadStream(chrIn); + loadStream >> m_auiEncounter[0] >> m_auiEncounter[1] >> m_auiEncounter[2] >> + m_auiEncounter[3] >> m_auiEncounter[4] >> m_auiEncounter[5] >> + m_auiEncounter[6] >> m_auiEncounter[7] >> m_auiEncounter[8] >> + m_auiEncounter[9] >> m_auiEncounter[10]; - if (!pInstance) + if (m_auiEncounter[TYPE_ALZZIN] >= DONE) + m_bWallDestroyed = true; + + for(uint8 i = 0; i < MAX_ENCOUNTER; ++i) + { + if (m_auiEncounter[i] == IN_PROGRESS) + m_auiEncounter[i] = NOT_STARTED; + } + + OUT_LOAD_INST_DATA_COMPLETE; +} + +bool instance_dire_maul::CheckAllGeneratorsDestroyed() +{ + if (m_auiEncounter[TYPE_PYLON_1] != DONE || m_auiEncounter[TYPE_PYLON_2] != DONE || m_auiEncounter[TYPE_PYLON_3] != DONE || m_auiEncounter[TYPE_PYLON_4] != DONE || m_auiEncounter[TYPE_PYLON_5] != DONE) return false; - switch(pGo->GetEntry()) + return true; +} + +void instance_dire_maul::ProcessForceFieldOpening() +{ + // 'Open' the force field + DoUseDoorOrButton(m_uiForcefieldGUID); + + // Let the summoners attack Immol'Thar + Creature* pImmolThar = instance->GetCreature(m_uiImmolTharGUID); + if (!pImmolThar || pImmolThar->isDead()) + return; + + bool bHasYelled = false; + for (std::list::const_iterator itr = m_luiHighborneSummonerGUIDs.begin(); itr != m_luiHighborneSummonerGUIDs.end(); ++itr) { - case DIRE_MAUL_CRYSTAL_GENERATOR_01 : pInstance->SetData(TYPE_CRYSTAL_GENERATOR_01, SPECIAL); break; - case DIRE_MAUL_CRYSTAL_GENERATOR_02 : pInstance->SetData(TYPE_CRYSTAL_GENERATOR_02, SPECIAL); break; - case DIRE_MAUL_CRYSTAL_GENERATOR_03 : pInstance->SetData(TYPE_CRYSTAL_GENERATOR_03, SPECIAL); break; - case DIRE_MAUL_CRYSTAL_GENERATOR_04 : pInstance->SetData(TYPE_CRYSTAL_GENERATOR_04, SPECIAL); break; - case DIRE_MAUL_CRYSTAL_GENERATOR_05 : pInstance->SetData(TYPE_CRYSTAL_GENERATOR_05, SPECIAL); break; + Creature* pSummoner = instance->GetCreature(*itr); + + if (!bHasYelled && pSummoner) + { + DoScriptText(SAY_KILL_IMMOLTHAR, pSummoner); + bHasYelled = true; + } + + if (!pSummoner || pSummoner->isDead()) + continue; + + pSummoner->AI()->AttackStart(pImmolThar); } - return false; + m_luiHighborneSummonerGUIDs.clear(); +} + +InstanceData* GetInstanceData_instance_dire_maul(Map* pMap) +{ + return new instance_dire_maul(pMap); } void AddSC_instance_dire_maul() { - Script *newscript; - newscript = new Script; - newscript->Name = "instance_dire_maul"; - newscript->GetInstanceData = &GetInstanceData_instance_dire_maul; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "go_dire_maul_generator"; - newscript->pGOUse = &GOUse_go_dire_maul_generator; - newscript->RegisterSelf(); + Script* pNewScript; + + pNewScript = new Script; + pNewScript->Name = "instance_dire_maul"; + pNewScript->GetInstanceData = &GetInstanceData_instance_dire_maul; + pNewScript->RegisterSelf(); } diff --git a/scripts/kalimdor/dustwallow_marsh.cpp b/scripts/kalimdor/dustwallow_marsh.cpp index 9abe135..d0e5ce0 100644 --- a/scripts/kalimdor/dustwallow_marsh.cpp +++ b/scripts/kalimdor/dustwallow_marsh.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or @@ -71,7 +71,7 @@ struct MANGOS_DLL_DECL mobs_risen_husk_spiritAI : public ScriptedAI void JustSummoned(Creature* pSummoned) { if (m_pCreditPlayer) - m_pCreditPlayer->KilledMonsterCredit(pSummoned->GetEntry(), pSummoned->GetGUID()); + m_pCreditPlayer->KilledMonsterCredit(pSummoned->GetEntry(), pSummoned->GetObjectGuid()); } void DamageTaken(Unit* pDoneBy, uint32 &uiDamage) diff --git a/scripts/kalimdor/felwood.cpp b/scripts/kalimdor/felwood.cpp index 0ef3396..07a4222 100644 --- a/scripts/kalimdor/felwood.cpp +++ b/scripts/kalimdor/felwood.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or @@ -424,7 +424,7 @@ struct MANGOS_DLL_DECL npc_kroshiusAI : public ScriptedAI } break; } - m_uiPhase++; + ++m_uiPhase; } else m_uiPhaseTimer -= uiDiff; diff --git a/scripts/kalimdor/feralas.cpp b/scripts/kalimdor/feralas.cpp index 5a22812..7ec9248 100644 --- a/scripts/kalimdor/feralas.cpp +++ b/scripts/kalimdor/feralas.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/scripts/kalimdor/maraudon/boss_landslide.cpp b/scripts/kalimdor/maraudon/boss_landslide.cpp index 55398a6..994bbc1 100644 --- a/scripts/kalimdor/maraudon/boss_landslide.cpp +++ b/scripts/kalimdor/maraudon/boss_landslide.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/scripts/kalimdor/maraudon/boss_noxxion.cpp b/scripts/kalimdor/maraudon/boss_noxxion.cpp index 1c8b02a..70b20aa 100644 --- a/scripts/kalimdor/maraudon/boss_noxxion.cpp +++ b/scripts/kalimdor/maraudon/boss_noxxion.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/scripts/kalimdor/maraudon/boss_princess_theradras.cpp b/scripts/kalimdor/maraudon/boss_princess_theradras.cpp index 88fffb6..285fd95 100644 --- a/scripts/kalimdor/maraudon/boss_princess_theradras.cpp +++ b/scripts/kalimdor/maraudon/boss_princess_theradras.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/scripts/kalimdor/moonglade.cpp b/scripts/kalimdor/moonglade.cpp index 7443850..25c5d9d 100644 --- a/scripts/kalimdor/moonglade.cpp +++ b/scripts/kalimdor/moonglade.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/scripts/kalimdor/mulgore.cpp b/scripts/kalimdor/mulgore.cpp index 02857e4..f770096 100644 --- a/scripts/kalimdor/mulgore.cpp +++ b/scripts/kalimdor/mulgore.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or @@ -82,7 +82,7 @@ struct MANGOS_DLL_DECL npc_kyle_the_frenziedAI : public ScriptedAI m_bEvent = true; DoScriptText(EMOTE_SEE_LUNCH, m_creature); - m_creature->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_ONESHOT_CREATURE_SPECIAL); + m_creature->HandleEmote(EMOTE_ONESHOT_CREATURE_SPECIAL); } } @@ -112,16 +112,32 @@ struct MANGOS_DLL_DECL npc_kyle_the_frenziedAI : public ScriptedAI case 1: if (Player* pPlayer = m_creature->GetMap()->GetPlayer(m_uiPlayerGUID)) { - if (GameObject* pGo = pPlayer->GetGameObject(SPELL_LUNCH)) + GameObject* pGo = pPlayer->GetGameObject(SPELL_LUNCH); + + // Workaround for broken function GetGameObject + if (!pGo) + { + const SpellEntry* pSpell = GetSpellStore()->LookupEntry(SPELL_LUNCH); + + uint32 uiGameobjectEntry = pSpell->EffectMiscValue[EFFECT_INDEX_1]; + + pGo = GetClosestGameObjectWithEntry(pPlayer, uiGameobjectEntry, 2*INTERACTION_DISTANCE); + } + + if (pGo) { m_bIsMovingToLunch = true; - m_creature->GetMotionMaster()->MovePoint(POINT_ID, pGo->GetPositionX(), pGo->GetPositionY(), pGo->GetPositionZ()); + + float fX, fY, fZ; + pGo->GetContactPoint(m_creature, fX, fY, fZ, CONTACT_DISTANCE); + + m_creature->GetMotionMaster()->MovePoint(POINT_ID, fX, fY, fZ); } } break; case 2: DoScriptText(EMOTE_EAT_LUNCH, m_creature); - m_creature->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_STATE_USESTANDING); + m_creature->HandleEmote(EMOTE_STATE_USESTANDING); break; case 3: if (Player* pPlayer = m_creature->GetMap()->GetPlayer(m_uiPlayerGUID)) @@ -132,10 +148,10 @@ struct MANGOS_DLL_DECL npc_kyle_the_frenziedAI : public ScriptedAI case 4: m_uiEventTimer = 30000; DoScriptText(EMOTE_DANCE, m_creature); - m_creature->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_STATE_DANCESPECIAL); + m_creature->HandleEmote(EMOTE_STATE_DANCESPECIAL); break; case 5: - m_creature->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_STATE_NONE); + m_creature->HandleEmote(EMOTE_STATE_NONE); Reset(); m_creature->GetMotionMaster()->Clear(); break; diff --git a/scripts/kalimdor/onyxias_lair/boss_onyxia.cpp b/scripts/kalimdor/onyxias_lair/boss_onyxia.cpp index 95dd9bb..5e56bea 100644 --- a/scripts/kalimdor/onyxias_lair/boss_onyxia.cpp +++ b/scripts/kalimdor/onyxias_lair/boss_onyxia.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/scripts/kalimdor/onyxias_lair/instance_onyxias_lair.cpp b/scripts/kalimdor/onyxias_lair/instance_onyxias_lair.cpp index 62ac0e1..79064dd 100644 --- a/scripts/kalimdor/onyxias_lair/instance_onyxias_lair.cpp +++ b/scripts/kalimdor/onyxias_lair/instance_onyxias_lair.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/scripts/kalimdor/onyxias_lair/onyxias_lair.h b/scripts/kalimdor/onyxias_lair/onyxias_lair.h index 08bc832..ef5cb19 100644 --- a/scripts/kalimdor/onyxias_lair/onyxias_lair.h +++ b/scripts/kalimdor/onyxias_lair/onyxias_lair.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/scripts/kalimdor/orgrimmar.cpp b/scripts/kalimdor/orgrimmar.cpp index 54310b9..1671368 100644 --- a/scripts/kalimdor/orgrimmar.cpp +++ b/scripts/kalimdor/orgrimmar.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/scripts/kalimdor/razorfen_downs/boss_amnennar_the_coldbringer.cpp b/scripts/kalimdor/razorfen_downs/boss_amnennar_the_coldbringer.cpp index f06e08f..103aa18 100644 --- a/scripts/kalimdor/razorfen_downs/boss_amnennar_the_coldbringer.cpp +++ b/scripts/kalimdor/razorfen_downs/boss_amnennar_the_coldbringer.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/scripts/kalimdor/razorfen_downs/razorfen_downs.cpp b/scripts/kalimdor/razorfen_downs/razorfen_downs.cpp index 4a893bd..3e3681c 100644 --- a/scripts/kalimdor/razorfen_downs/razorfen_downs.cpp +++ b/scripts/kalimdor/razorfen_downs/razorfen_downs.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/scripts/kalimdor/razorfen_kraul/instance_razorfen_kraul.cpp b/scripts/kalimdor/razorfen_kraul/instance_razorfen_kraul.cpp index eda879e..1639977 100644 --- a/scripts/kalimdor/razorfen_kraul/instance_razorfen_kraul.cpp +++ b/scripts/kalimdor/razorfen_kraul/instance_razorfen_kraul.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/scripts/kalimdor/razorfen_kraul/razorfen_kraul.cpp b/scripts/kalimdor/razorfen_kraul/razorfen_kraul.cpp new file mode 100644 index 0000000..1beadb8 --- /dev/null +++ b/scripts/kalimdor/razorfen_kraul/razorfen_kraul.cpp @@ -0,0 +1,158 @@ +/* Copyright (C) 2006 - 2011 ScriptDev2 + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: Razorfen_Kraul +SD%Complete: 100 +SDComment: Willix the Importer Escort Event +SDCategory: Razorfen Kraul +EndScriptData */ + +/* ContentData +quest_willix_the_importer +EndContentData */ + +#include "precompiled.h" +#include "escort_ai.h" + +enum +{ + QUEST_WILLIX_THE_IMPORTER = 1144, + + SAY_WILLIX_READY = -1047000, + SAY_WILLIX_1 = -1047001, + SAY_WILLIX_2 = -1047002, + SAY_WILLIX_3 = -1047003, + SAY_WILLIX_4 = -1047004, + SAY_WILLIX_5 = -1047005, + SAY_WILLIX_6 = -1047006, + SAY_WILLIX_7 = -1047007, + SAY_WILLIX_END = -1047008, + + SAY_WILLIX_AGGRO_1 = -1047009, + SAY_WILLIX_AGGRO_2 = -1047010, + SAY_WILLIX_AGGRO_3 = -1047011, + SAY_WILLIX_AGGRO_4 = -1047012, + + NPC_RAGING_AGAMAR = 4514 +}; + +static const float aBoarSpawn[4][3] = +{ + {2151.420f, 1733.18f, 52.10f}, + {2144.463f, 1726.89f, 51.93f}, + {1956.433f, 1597.97f, 81.75f}, + {1958.971f, 1599.01f, 81.44f} +}; + +struct MANGOS_DLL_DECL npc_willix_the_importerAI : public npc_escortAI +{ + npc_willix_the_importerAI(Creature* m_creature) : npc_escortAI(m_creature) { Reset(); } + + void Reset() {} + + // Exact use of these texts remains unknown, it seems that he should only talk when he initiates the attack or he is the first who is attacked by a npc + void Aggro(Unit* pWho) + { + switch(urand(0, 6)) // Not always said + { + case 0: DoScriptText(SAY_WILLIX_AGGRO_1, m_creature, pWho); break; + case 1: DoScriptText(SAY_WILLIX_AGGRO_2, m_creature, pWho); break; + case 2: DoScriptText(SAY_WILLIX_AGGRO_3, m_creature, pWho); break; + case 3: DoScriptText(SAY_WILLIX_AGGRO_4, m_creature, pWho); break; + } + } + + void JustSummoned(Creature* pSummoned) + { + pSummoned->AI()->AttackStart(m_creature); + } + + void WaypointReached(uint32 uiPointId) + { + switch (uiPointId) + { + case 2: + DoScriptText(SAY_WILLIX_1, m_creature); + break; + case 6: + DoScriptText(SAY_WILLIX_2, m_creature); + break; + case 9: + DoScriptText(SAY_WILLIX_3, m_creature); + break; + case 14: + DoScriptText(SAY_WILLIX_4, m_creature); + // Summon 2 boars on the pathway + m_creature->SummonCreature(NPC_RAGING_AGAMAR, aBoarSpawn[0][0], aBoarSpawn[0][1], aBoarSpawn[0][2], 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 25000); + m_creature->SummonCreature(NPC_RAGING_AGAMAR, aBoarSpawn[1][0], aBoarSpawn[1][1], aBoarSpawn[1][2], 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 25000); + break; + case 25: + DoScriptText(SAY_WILLIX_5, m_creature); + break; + case 33: + DoScriptText(SAY_WILLIX_6, m_creature); + break; + case 44: + DoScriptText(SAY_WILLIX_7, m_creature); + // Summon 2 boars at the end + m_creature->SummonCreature(NPC_RAGING_AGAMAR, aBoarSpawn[2][0], aBoarSpawn[2][1], aBoarSpawn[2][2], 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 25000); + m_creature->SummonCreature(NPC_RAGING_AGAMAR, aBoarSpawn[3][0], aBoarSpawn[3][1], aBoarSpawn[3][2], 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 25000); + break; + case 45: + DoScriptText(SAY_WILLIX_END, m_creature); + m_creature->SetFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_QUESTGIVER); + // Complete event + if (Player* pPlayer = GetPlayerForEscort()) + pPlayer->GroupEventHappens(QUEST_WILLIX_THE_IMPORTER, m_creature); + SetEscortPaused(true); + break; + } + + } +}; + +CreatureAI* GetAI_npc_willix_the_importer(Creature* pCreature) +{ + return new npc_willix_the_importerAI(pCreature); +} + +bool QuestAccept_npc_willix_the_importer(Player* pPlayer, Creature* pCreature, const Quest* pQuest) +{ + if (pQuest->GetQuestId() == QUEST_WILLIX_THE_IMPORTER) + { + if (npc_willix_the_importerAI* pEscortAI = dynamic_cast(pCreature->AI())) + { + // After 4.0.1 set run = true + pEscortAI->Start(false, pPlayer->GetGUID(), pQuest); + DoScriptText(SAY_WILLIX_READY, pCreature, pPlayer); + pCreature->setFaction(FACTION_ESCORT_N_NEUTRAL_PASSIVE); + } + } + + return true; +} + +void AddSC_razorfen_kraul() +{ + Script* pNewScript; + + pNewScript = new Script; + pNewScript->Name = "npc_willix_the_importer"; + pNewScript->GetAI = &GetAI_npc_willix_the_importer; + pNewScript->pQuestAcceptNPC = &QuestAccept_npc_willix_the_importer; + pNewScript->RegisterSelf(); +} diff --git a/scripts/kalimdor/razorfen_kraul/razorfen_kraul.h b/scripts/kalimdor/razorfen_kraul/razorfen_kraul.h index 2bf2c10..c11c5c0 100644 --- a/scripts/kalimdor/razorfen_kraul/razorfen_kraul.h +++ b/scripts/kalimdor/razorfen_kraul/razorfen_kraul.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/scripts/kalimdor/ruins_of_ahnqiraj/boss_ayamiss.cpp b/scripts/kalimdor/ruins_of_ahnqiraj/boss_ayamiss.cpp index 91b8802..b96722d 100644 --- a/scripts/kalimdor/ruins_of_ahnqiraj/boss_ayamiss.cpp +++ b/scripts/kalimdor/ruins_of_ahnqiraj/boss_ayamiss.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/scripts/kalimdor/ruins_of_ahnqiraj/boss_buru.cpp b/scripts/kalimdor/ruins_of_ahnqiraj/boss_buru.cpp index c48e6a8..c7410f1 100644 --- a/scripts/kalimdor/ruins_of_ahnqiraj/boss_buru.cpp +++ b/scripts/kalimdor/ruins_of_ahnqiraj/boss_buru.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/scripts/kalimdor/ruins_of_ahnqiraj/boss_kurinnaxx.cpp b/scripts/kalimdor/ruins_of_ahnqiraj/boss_kurinnaxx.cpp index 70566ff..dab2493 100644 --- a/scripts/kalimdor/ruins_of_ahnqiraj/boss_kurinnaxx.cpp +++ b/scripts/kalimdor/ruins_of_ahnqiraj/boss_kurinnaxx.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/scripts/kalimdor/ruins_of_ahnqiraj/boss_moam.cpp b/scripts/kalimdor/ruins_of_ahnqiraj/boss_moam.cpp index 84513e2..4f53323 100644 --- a/scripts/kalimdor/ruins_of_ahnqiraj/boss_moam.cpp +++ b/scripts/kalimdor/ruins_of_ahnqiraj/boss_moam.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/scripts/kalimdor/ruins_of_ahnqiraj/boss_ossirian.cpp b/scripts/kalimdor/ruins_of_ahnqiraj/boss_ossirian.cpp index 0aa57eb..a5e5ee0 100644 --- a/scripts/kalimdor/ruins_of_ahnqiraj/boss_ossirian.cpp +++ b/scripts/kalimdor/ruins_of_ahnqiraj/boss_ossirian.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/scripts/kalimdor/ruins_of_ahnqiraj/boss_rajaxx.cpp b/scripts/kalimdor/ruins_of_ahnqiraj/boss_rajaxx.cpp index a1da1da..19943ef 100644 --- a/scripts/kalimdor/ruins_of_ahnqiraj/boss_rajaxx.cpp +++ b/scripts/kalimdor/ruins_of_ahnqiraj/boss_rajaxx.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/scripts/kalimdor/ruins_of_ahnqiraj/instance_ruins_of_ahnqiraj.cpp b/scripts/kalimdor/ruins_of_ahnqiraj/instance_ruins_of_ahnqiraj.cpp index 8d08202..072d429 100644 --- a/scripts/kalimdor/ruins_of_ahnqiraj/instance_ruins_of_ahnqiraj.cpp +++ b/scripts/kalimdor/ruins_of_ahnqiraj/instance_ruins_of_ahnqiraj.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or @@ -24,172 +24,210 @@ EndScriptData */ #include "precompiled.h" #include "ruins_of_ahnqiraj.h" +instance_ruins_of_ahnqiraj::instance_ruins_of_ahnqiraj(Map* pMap) : ScriptedInstance(pMap), + m_uiOssirianGUID(0), + m_uiBuruGUID(0), + m_uiKurinnaxxGUID(0), + m_uiAndorovGUID(0), + m_uiQeezGUID(0), + m_uiTuubidGUID(0), + m_uiDrennGUID(0), + m_uiXurremGUID(0), + m_uiYeggethGUID(0), + m_uiPakkonGUID(0), + m_uiZerranGUID(0), + m_uiRajaxxGUID(0) +{ + Initialize(); +} + +void instance_ruins_of_ahnqiraj::Initialize() +{ + memset(&m_auiEncounter, 0, sizeof(m_auiEncounter)); +} -struct MANGOS_DLL_DECL instance_ruins_of_ahnqiraj : public ScriptedInstance +void instance_ruins_of_ahnqiraj::OnPlayerEnter(Player* pPlayer) { - instance_ruins_of_ahnqiraj(Map* pMap) : ScriptedInstance(pMap) {Initialize();} - - std::string strInstData; - uint32 m_auiEncounter[MAX_ENCOUNTER]; - - uint64 m_uiOssirianGUID; - uint64 m_uiBuruGUID; - uint64 m_uiKurinnaxxGUID; - uint64 m_uiAndorovGUID; - uint64 m_uiRajaxxGUID; - uint64 m_uiQeezGUID; - uint64 m_uiTuubidGUID; - uint64 m_uiDrennGUID; - uint64 m_uiXurremGUID; - uint64 m_uiYeggethGUID; - uint64 m_uiPakkonGUID; - uint64 m_uiZerranGUID; - - void Initialize() + // Spawn andorov if necessary + DoSapwnAndorovIfCan(); +} + +void instance_ruins_of_ahnqiraj::OnCreatureCreate(Creature* pCreature) +{ + switch(pCreature->GetEntry()) { - memset(&m_auiEncounter, 0, sizeof(m_auiEncounter)); - - m_uiOssirianGUID = 0; - m_uiBuruGUID = 0; - m_uiKurinnaxxGUID = 0; - m_uiAndorovGUID = 0; - m_uiQeezGUID = 0; - m_uiTuubidGUID = 0; - m_uiDrennGUID = 0; - m_uiXurremGUID = 0; - m_uiYeggethGUID = 0; - m_uiPakkonGUID = 0; - m_uiZerranGUID = 0; - m_uiRajaxxGUID = 0; + case NPC_OSSIRIAN: m_uiOssirianGUID = pCreature->GetGUID(); break; + case NPC_BURU: m_uiBuruGUID = pCreature->GetGUID(); break; + case NPC_KURINNAXX: m_uiKurinnaxxGUID = pCreature->GetGUID(); break; + case NPC_GENERAL_ANDOROV: m_uiAndorovGUID = pCreature->GetGUID(); break; + case NPC_CAPTAIN_QEEZ: m_uiQeezGUID = pCreature->GetGUID(); break; + case NPC_CAPTAIN_TUUBID: m_uiTuubidGUID = pCreature->GetGUID(); break; + case NPC_CAPTAIN_DRENN: m_uiDrennGUID = pCreature->GetGUID(); break; + case NPC_CAPTAIN_XURREM: m_uiXurremGUID = pCreature->GetGUID(); break; + case NPC_MAJOR_YEGGETH: m_uiYeggethGUID = pCreature->GetGUID(); break; + case NPC_MAJOR_PAKKON: m_uiPakkonGUID = pCreature->GetGUID(); break; + case NPC_COLONEL_ZERRAN: m_uiZerranGUID = pCreature->GetGUID(); break; + case NPC_RAJAXX: m_uiRajaxxGUID = pCreature->GetGUID(); break; } +} - void OnCreatureCreate(Creature* pCreature) +void instance_ruins_of_ahnqiraj::OnObjectCreate(GameObject* pGo) +{ + switch(pGo->GetEntry()) { - switch(pCreature->GetEntry()) - { - case NPC_OSSIRIAN: m_uiOssirianGUID = pCreature->GetGUID(); break; - case NPC_BURU: m_uiBuruGUID = pCreature->GetGUID(); break; - case NPC_KURINNAXX: m_uiKurinnaxxGUID = pCreature->GetGUID(); break; - case NPC_GENERAL_ANDOROV: m_uiAndorovGUID = pCreature->GetGUID(); break; - case NPC_CAPTAIN_QEEZ: m_uiQeezGUID = pCreature->GetGUID(); break; - case NPC_CAPTAIN_TUUBID: m_uiTuubidGUID = pCreature->GetGUID(); break; - case NPC_CAPTAIN_DRENN: m_uiDrennGUID = pCreature->GetGUID(); break; - case NPC_CAPTAIN_XURREM: m_uiXurremGUID = pCreature->GetGUID(); break; - case NPC_MAJOR_YEGGETH: m_uiYeggethGUID = pCreature->GetGUID(); break; - case NPC_MAJOR_PAKKON: m_uiPakkonGUID = pCreature->GetGUID(); break; - case NPC_COLONEL_ZERRAN: m_uiZerranGUID = pCreature->GetGUID(); break; - case NPC_RAJAXX: m_uiRajaxxGUID = pCreature->GetGUID(); break; - } + // Make them unusable temporarily + case GO_OSSIRIAN_CRYSTAL: pGo->SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_INTERACT_COND); break; } +} - void OnObjectCreate(GameObject* pGo) +void instance_ruins_of_ahnqiraj::OnCreatureEnterCombat(Creature* pCreature) +{ + switch (pCreature->GetEntry()) { - switch(pGo->GetEntry()) - { - case GO_OSSIRIAN_CRYSTAL: pGo->SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_INTERACT_COND); break; //to make them unusable temporarily - } + case NPC_KURINNAXX: SetData(TYPE_KURINNAXX, IN_PROGRESS); break; + case NPC_RAJAXX: SetData(TYPE_RAJAXX, IN_PROGRESS); break; + case NPC_MOAM: SetData(TYPE_MOAM, IN_PROGRESS); break; + case NPC_BURU: SetData(TYPE_BURU, IN_PROGRESS); break; + case NPC_AYAMISS: SetData(TYPE_AYAMISS, IN_PROGRESS); break; + case NPC_OSSIRIAN: SetData(TYPE_OSSIRIAN, IN_PROGRESS); break; } +} - bool IsEncounterInProgress() const +void instance_ruins_of_ahnqiraj::OnCreatureEvade(Creature* pCreature) +{ + switch (pCreature->GetEntry()) { - for (uint8 i = 0; i < MAX_ENCOUNTER; ++i) - if (m_auiEncounter[i] == IN_PROGRESS) - return true; - - return false; + case NPC_KURINNAXX: SetData(TYPE_KURINNAXX, FAIL); break; + case NPC_RAJAXX: SetData(TYPE_RAJAXX, FAIL); break; + case NPC_MOAM: SetData(TYPE_MOAM, FAIL); break; + case NPC_BURU: SetData(TYPE_BURU, FAIL); break; + case NPC_AYAMISS: SetData(TYPE_AYAMISS, FAIL); break; + case NPC_OSSIRIAN: SetData(TYPE_OSSIRIAN, FAIL); break; } +} - const char* Save() +void instance_ruins_of_ahnqiraj::OnCreatureDeath(Creature* pCreature) +{ + switch (pCreature->GetEntry()) { - return strInstData.c_str(); + case NPC_KURINNAXX: SetData(TYPE_KURINNAXX, DONE); break; + case NPC_RAJAXX: SetData(TYPE_RAJAXX, DONE); break; + case NPC_MOAM: SetData(TYPE_MOAM, DONE); break; + case NPC_BURU: SetData(TYPE_BURU, DONE); break; + case NPC_AYAMISS: SetData(TYPE_AYAMISS, DONE); break; + case NPC_OSSIRIAN: SetData(TYPE_OSSIRIAN, DONE); break; } +} - uint64 GetData64(uint32 uiData) +void instance_ruins_of_ahnqiraj::SetData(uint32 uiType, uint32 uiData) +{ + switch(uiType) { - switch(uiData) - { - case DATA_OSSIRIAN: return m_uiOssirianGUID; - case DATA_BURU: return m_uiBuruGUID; - case DATA_ANDOROV: return m_uiAndorovGUID; - case DATA_KURINNAXX: return m_uiKurinnaxxGUID; - case DATA_QEEZ: return m_uiQeezGUID; - case DATA_TUUBID: return m_uiTuubidGUID; - case DATA_DRENN: return m_uiDrennGUID; - case DATA_XURREM: return m_uiXurremGUID; - case DATA_YEGGETH: return m_uiYeggethGUID; - case DATA_PAKKON: return m_uiPakkonGUID; - case DATA_ZERRAN: return m_uiZerranGUID; - case DATA_RAJAXX: return m_uiRajaxxGUID; - } - return 0; + case TYPE_KURINNAXX: + if (uiData == DONE) + { + DoSapwnAndorovIfCan(); + + // Yell after kurinnaxx + if (Creature* pOssirian = instance->GetCreature(m_uiOssirianGUID)) + DoScriptText(SAY_OSSIRIAN_INTRO, pOssirian); + } + m_auiEncounter[uiType] = uiData; + break; + case TYPE_RAJAXX: + case TYPE_MOAM: + case TYPE_BURU: + case TYPE_AYAMISS: + case TYPE_OSSIRIAN: + m_auiEncounter[uiType] = uiData; + break; } - void SetData(uint32 uiType, uint32 uiData) + if (uiData == DONE) { - switch(uiType) - { - case TYPE_RAJAXX: - m_auiEncounter[0] = uiData; - break; - case TYPE_KURINNAXX: - m_auiEncounter[1] = uiData; - break; - } - - if (uiData == DONE) - { - OUT_SAVE_INST_DATA; - - std::ostringstream saveStream; - saveStream << m_auiEncounter[0] << " " << m_auiEncounter[1] << " "; - - strInstData = saveStream.str(); - - SaveToDB(); - OUT_SAVE_INST_DATA_COMPLETE; - } + OUT_SAVE_INST_DATA; + + std::ostringstream saveStream; + saveStream << m_auiEncounter[0] << " " << m_auiEncounter[1] << " " << m_auiEncounter[2] + << " " << m_auiEncounter[3] << " " << m_auiEncounter[4] << " " << m_auiEncounter[5]; + + m_strInstData = saveStream.str(); + + SaveToDB(); + OUT_SAVE_INST_DATA_COMPLETE; } +} - void Load(const char* chrIn) - { - if (!chrIn) - { - OUT_LOAD_INST_DATA_FAIL; - return; - } +uint32 instance_ruins_of_ahnqiraj::GetData(uint32 uiType) +{ + if (uiType < MAX_ENCOUNTER) + return m_auiEncounter[uiType]; + + return 0; +} - OUT_LOAD_INST_DATA(chrIn); +void instance_ruins_of_ahnqiraj::DoSapwnAndorovIfCan() +{ + // The npc is also a vendor so always spawn after kurinnaxx + if (m_auiEncounter[TYPE_KURINNAXX] != DONE) + return; - std::istringstream loadStream(chrIn); + if (m_uiAndorovGUID) + return; - loadStream >> m_auiEncounter[0] >> m_auiEncounter[1]; + Player* pPlayer = GetPlayerInMap(); + if (!pPlayer) + return; - for(uint8 i = 0; i < MAX_ENCOUNTER; ++i) - { - if (m_auiEncounter[i] == IN_PROGRESS) - m_auiEncounter[i] = NOT_STARTED; - } + for (uint8 i = 0; i < MAX_HELPERS; ++i) + pPlayer->SummonCreature(aAndorovSpawnLocs[i].m_uiEntry, aAndorovSpawnLocs[i].m_fX, aAndorovSpawnLocs[i].m_fY, aAndorovSpawnLocs[i].m_fZ, aAndorovSpawnLocs[i].m_fO, TEMPSUMMON_DEAD_DESPAWN, 0); +} - OUT_LOAD_INST_DATA_COMPLETE; +uint64 instance_ruins_of_ahnqiraj::GetData64(uint32 uiData) +{ + switch(uiData) + { + case NPC_OSSIRIAN: return m_uiOssirianGUID; + case NPC_BURU: return m_uiBuruGUID; + case NPC_GENERAL_ANDOROV: return m_uiAndorovGUID; + case NPC_KURINNAXX: return m_uiKurinnaxxGUID; + case NPC_CAPTAIN_QEEZ: return m_uiQeezGUID; + case NPC_CAPTAIN_TUUBID: return m_uiTuubidGUID; + case NPC_CAPTAIN_DRENN: return m_uiDrennGUID; + case NPC_CAPTAIN_XURREM: return m_uiXurremGUID; + case NPC_MAJOR_YEGGETH: return m_uiYeggethGUID; + case NPC_MAJOR_PAKKON: return m_uiPakkonGUID; + case NPC_COLONEL_ZERRAN: return m_uiZerranGUID; + case NPC_RAJAXX: return m_uiRajaxxGUID; + + default: + return 0; + } +} - //spawn andorov on load - if (m_auiEncounter[0] == DONE) - if (Creature* pRajaxx = instance->GetCreature(m_uiRajaxxGUID)) - pRajaxx->SummonCreature(NPC_GENERAL_ANDOROV, -8873.42f, 1647.67f, 21.386f, 5.69141f, TEMPSUMMON_CORPSE_DESPAWN, 0); +void instance_ruins_of_ahnqiraj::Load(const char* chrIn) +{ + if (!chrIn) + { + OUT_LOAD_INST_DATA_FAIL; + return; } - uint32 GetData(uint32 uiType) + OUT_LOAD_INST_DATA(chrIn); + + std::istringstream loadStream(chrIn); + + loadStream >> m_auiEncounter[0] >> m_auiEncounter[1] >> m_auiEncounter[2] + >> m_auiEncounter[3] >> m_auiEncounter[4] >> m_auiEncounter[5]; + + for(uint8 i = 0; i < MAX_ENCOUNTER; ++i) { - switch(uiType) - { - case TYPE_RAJAXX: - return m_auiEncounter[0]; - case TYPE_KURINNAXX: - return m_auiEncounter[1]; - } - return 0; + if (m_auiEncounter[i] == IN_PROGRESS) + m_auiEncounter[i] = NOT_STARTED; } -}; + + OUT_LOAD_INST_DATA_COMPLETE; +} InstanceData* GetInstanceData_instance_ruins_of_ahnqiraj(Map* pMap) { @@ -198,9 +236,10 @@ InstanceData* GetInstanceData_instance_ruins_of_ahnqiraj(Map* pMap) void AddSC_instance_ruins_of_ahnqiraj() { - Script* newscript; - newscript = new Script; - newscript->Name = "instance_ruins_of_ahnqiraj"; - newscript->GetInstanceData = &GetInstanceData_instance_ruins_of_ahnqiraj; - newscript->RegisterSelf(); + Script* pNewScript; + + pNewScript = new Script; + pNewScript->Name = "instance_ruins_of_ahnqiraj"; + pNewScript->GetInstanceData = &GetInstanceData_instance_ruins_of_ahnqiraj; + pNewScript->RegisterSelf(); } diff --git a/scripts/kalimdor/ruins_of_ahnqiraj/ruins_of_ahnqiraj.cpp b/scripts/kalimdor/ruins_of_ahnqiraj/ruins_of_ahnqiraj.cpp index dcb362e..8f772d0 100644 --- a/scripts/kalimdor/ruins_of_ahnqiraj/ruins_of_ahnqiraj.cpp +++ b/scripts/kalimdor/ruins_of_ahnqiraj/ruins_of_ahnqiraj.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/scripts/kalimdor/ruins_of_ahnqiraj/ruins_of_ahnqiraj.h b/scripts/kalimdor/ruins_of_ahnqiraj/ruins_of_ahnqiraj.h index 3b31a27..1a4533b 100644 --- a/scripts/kalimdor/ruins_of_ahnqiraj/ruins_of_ahnqiraj.h +++ b/scripts/kalimdor/ruins_of_ahnqiraj/ruins_of_ahnqiraj.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ @@ -7,38 +7,96 @@ enum { - MAX_ENCOUNTER = 2, - - DATA_OSSIRIAN = 1, - DATA_BURU = 2, - DATA_ANDOROV = 3, - DATA_KURINNAXX = 4, - DATA_QEEZ = 5, - DATA_TUUBID = 6, - DATA_DRENN = 7, - DATA_XURREM = 8, - DATA_YEGGETH = 9, - DATA_PAKKON = 10, - DATA_ZERRAN = 11, - DATA_RAJAXX = 12, - - TYPE_RAJAXX = 13, - TYPE_KURINNAXX = 14, - - NPC_OSSIRIAN = 15339, - NPC_BURU = 15370, - NPC_KALDOREI_ELITE = 15473, - NPC_GENERAL_ANDOROV = 15471, - NPC_RAJAXX = 15341, - NPC_KURINNAXX = 15348, - NPC_COLONEL_ZERRAN = 15385, - NPC_MAJOR_PAKKON = 15388, - NPC_MAJOR_YEGGETH = 15386, - NPC_CAPTAIN_XURREM = 15390, - NPC_CAPTAIN_DRENN = 15389, - NPC_CAPTAIN_TUUBID = 15392, - NPC_CAPTAIN_QEEZ = 15391, - - GO_OSSIRIAN_CRYSTAL = 180619 + MAX_ENCOUNTER = 6, + MAX_HELPERS = 5, + + TYPE_KURINNAXX = 0, + TYPE_RAJAXX = 1, + TYPE_MOAM = 2, + TYPE_BURU = 3, + TYPE_AYAMISS = 4, + TYPE_OSSIRIAN = 5, + + NPC_KURINNAXX = 15348, + NPC_MOAM = 15340, + NPC_BURU = 15370, + NPC_AYAMISS = 15369, + NPC_OSSIRIAN = 15339, + NPC_GENERAL_ANDOROV = 15471, // The general and the kaldorei are escorted for the rajaxx encounter + NPC_KALDOREI_ELITE = 15473, + NPC_RAJAXX = 15341, // All of the following are used in the rajaxx encounter + NPC_COLONEL_ZERRAN = 15385, + NPC_MAJOR_PAKKON = 15388, + NPC_MAJOR_YEGGETH = 15386, + NPC_CAPTAIN_XURREM = 15390, + NPC_CAPTAIN_DRENN = 15389, + NPC_CAPTAIN_TUUBID = 15392, + NPC_CAPTAIN_QEEZ = 15391, + + GO_OSSIRIAN_CRYSTAL = 180619, // Used in the ossirian encounter + + SAY_OSSIRIAN_INTRO = -1509022 // Yelled after Kurinnax dies +}; + +struct SpawnLocation +{ + uint32 m_uiEntry; + float m_fX, m_fY, m_fZ, m_fO; +}; + +// These positions are likely wrong, and the npcs need some movement to these coords +// TODO Research proper positions +static const SpawnLocation aAndorovSpawnLocs[MAX_HELPERS] = +{ + {NPC_GENERAL_ANDOROV, -8876.97f, 1651.96f, 21.57f, 5.52f}, + {NPC_KALDOREI_ELITE, -8875.47f, 1653.51f, 21.57f, 5.32f}, + {NPC_KALDOREI_ELITE, -8873.96f, 1655.06f, 21.57f, 5.13f}, + {NPC_KALDOREI_ELITE, -8878.26f, 1650.63f, 21.57f, 5.7f}, + {NPC_KALDOREI_ELITE, -8879.46f, 1649.39f, 21.57f, 5.85f} +}; + +class MANGOS_DLL_DECL instance_ruins_of_ahnqiraj : public ScriptedInstance +{ + public: + instance_ruins_of_ahnqiraj(Map* pMap); + ~instance_ruins_of_ahnqiraj() {} + + void Initialize(); + + // bool IsEncounterInProgress() const; // not active in AQ20 + + void OnCreatureCreate(Creature* pCreature); + void OnObjectCreate(GameObject* pGo); + void OnPlayerEnter(Player* pPlayer); + + void OnCreatureEnterCombat(Creature* pCreature); + void OnCreatureEvade(Creature* pCreature); + void OnCreatureDeath(Creature* pCreature); + + void SetData(uint32 uiType, uint32 uiData); + uint32 GetData(uint32 uiType); + uint64 GetData64(uint32 uiData); + + const char* Save() { return m_strInstData.c_str(); } + void Load(const char* chrIn); + + private: + void DoSapwnAndorovIfCan(); + + uint32 m_auiEncounter[MAX_ENCOUNTER]; + std::string m_strInstData; + + uint64 m_uiOssirianGUID; + uint64 m_uiBuruGUID; + uint64 m_uiKurinnaxxGUID; + uint64 m_uiAndorovGUID; + uint64 m_uiRajaxxGUID; + uint64 m_uiQeezGUID; + uint64 m_uiTuubidGUID; + uint64 m_uiDrennGUID; + uint64 m_uiXurremGUID; + uint64 m_uiYeggethGUID; + uint64 m_uiPakkonGUID; + uint64 m_uiZerranGUID; }; #endif diff --git a/scripts/kalimdor/silithus.cpp b/scripts/kalimdor/silithus.cpp index 804e3dc..8e87d04 100644 --- a/scripts/kalimdor/silithus.cpp +++ b/scripts/kalimdor/silithus.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or @@ -202,7 +202,7 @@ bool GossipSelect_npcs_rutgar_and_frankal(Player* pPlayer, Creature* pCreature, case GOSSIP_ACTION_INFO_DEF + 6: pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXTID_RUTGAR7, pCreature->GetGUID()); //'kill' our trigger to update quest status - pPlayer->KilledMonsterCredit(TRIGGER_RUTGAR, pCreature->GetGUID()); + pPlayer->KilledMonsterCredit(TRIGGER_RUTGAR, pCreature->GetObjectGuid()); break; case GOSSIP_ACTION_INFO_DEF + 9: @@ -228,7 +228,7 @@ bool GossipSelect_npcs_rutgar_and_frankal(Player* pPlayer, Creature* pCreature, case GOSSIP_ACTION_INFO_DEF + 14: pPlayer->SEND_GOSSIP_MENU(GOSSIP_TEXTID_FRANKAL6, pCreature->GetGUID()); //'kill' our trigger to update quest status - pPlayer->KilledMonsterCredit(TRIGGER_FRANKAL, pCreature->GetGUID()); + pPlayer->KilledMonsterCredit(TRIGGER_FRANKAL, pCreature->GetObjectGuid()); break; } return true; diff --git a/scripts/kalimdor/stonetalon_mountains.cpp b/scripts/kalimdor/stonetalon_mountains.cpp index 65e1ff9..234f2f4 100644 --- a/scripts/kalimdor/stonetalon_mountains.cpp +++ b/scripts/kalimdor/stonetalon_mountains.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/scripts/kalimdor/tanaris.cpp b/scripts/kalimdor/tanaris.cpp index 49aba27..9f6fd45 100644 --- a/scripts/kalimdor/tanaris.cpp +++ b/scripts/kalimdor/tanaris.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/scripts/kalimdor/teldrassil.cpp b/scripts/kalimdor/teldrassil.cpp index 292f06b..11a57c5 100644 --- a/scripts/kalimdor/teldrassil.cpp +++ b/scripts/kalimdor/teldrassil.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/scripts/kalimdor/temple_of_ahnqiraj/boss_bug_trio.cpp b/scripts/kalimdor/temple_of_ahnqiraj/boss_bug_trio.cpp index 3b215e0..a0605af 100644 --- a/scripts/kalimdor/temple_of_ahnqiraj/boss_bug_trio.cpp +++ b/scripts/kalimdor/temple_of_ahnqiraj/boss_bug_trio.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/scripts/kalimdor/temple_of_ahnqiraj/boss_cthun.cpp b/scripts/kalimdor/temple_of_ahnqiraj/boss_cthun.cpp index 8f41678..216701c 100644 --- a/scripts/kalimdor/temple_of_ahnqiraj/boss_cthun.cpp +++ b/scripts/kalimdor/temple_of_ahnqiraj/boss_cthun.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/scripts/kalimdor/temple_of_ahnqiraj/boss_fankriss.cpp b/scripts/kalimdor/temple_of_ahnqiraj/boss_fankriss.cpp index 1233cda..3f31576 100644 --- a/scripts/kalimdor/temple_of_ahnqiraj/boss_fankriss.cpp +++ b/scripts/kalimdor/temple_of_ahnqiraj/boss_fankriss.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/scripts/kalimdor/temple_of_ahnqiraj/boss_huhuran.cpp b/scripts/kalimdor/temple_of_ahnqiraj/boss_huhuran.cpp index 2527c78..901a80b 100644 --- a/scripts/kalimdor/temple_of_ahnqiraj/boss_huhuran.cpp +++ b/scripts/kalimdor/temple_of_ahnqiraj/boss_huhuran.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/scripts/kalimdor/temple_of_ahnqiraj/boss_ouro.cpp b/scripts/kalimdor/temple_of_ahnqiraj/boss_ouro.cpp index bb1ff57..23faaf4 100644 --- a/scripts/kalimdor/temple_of_ahnqiraj/boss_ouro.cpp +++ b/scripts/kalimdor/temple_of_ahnqiraj/boss_ouro.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/scripts/kalimdor/temple_of_ahnqiraj/boss_sartura.cpp b/scripts/kalimdor/temple_of_ahnqiraj/boss_sartura.cpp index 0eaf2f0..de5583c 100644 --- a/scripts/kalimdor/temple_of_ahnqiraj/boss_sartura.cpp +++ b/scripts/kalimdor/temple_of_ahnqiraj/boss_sartura.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/scripts/kalimdor/temple_of_ahnqiraj/boss_skeram.cpp b/scripts/kalimdor/temple_of_ahnqiraj/boss_skeram.cpp index 9a69081..a6e1ccd 100644 --- a/scripts/kalimdor/temple_of_ahnqiraj/boss_skeram.cpp +++ b/scripts/kalimdor/temple_of_ahnqiraj/boss_skeram.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/scripts/kalimdor/temple_of_ahnqiraj/boss_twinemperors.cpp b/scripts/kalimdor/temple_of_ahnqiraj/boss_twinemperors.cpp index df5140f..e719837 100644 --- a/scripts/kalimdor/temple_of_ahnqiraj/boss_twinemperors.cpp +++ b/scripts/kalimdor/temple_of_ahnqiraj/boss_twinemperors.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/scripts/kalimdor/temple_of_ahnqiraj/boss_viscidus.cpp b/scripts/kalimdor/temple_of_ahnqiraj/boss_viscidus.cpp index d741e0d..319a207 100644 --- a/scripts/kalimdor/temple_of_ahnqiraj/boss_viscidus.cpp +++ b/scripts/kalimdor/temple_of_ahnqiraj/boss_viscidus.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/scripts/kalimdor/temple_of_ahnqiraj/instance_temple_of_ahnqiraj.cpp b/scripts/kalimdor/temple_of_ahnqiraj/instance_temple_of_ahnqiraj.cpp index 3d3d41a..a438d92 100644 --- a/scripts/kalimdor/temple_of_ahnqiraj/instance_temple_of_ahnqiraj.cpp +++ b/scripts/kalimdor/temple_of_ahnqiraj/instance_temple_of_ahnqiraj.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/scripts/kalimdor/temple_of_ahnqiraj/mob_anubisath_sentinel.cpp b/scripts/kalimdor/temple_of_ahnqiraj/mob_anubisath_sentinel.cpp index 55a7acc..1fd543a 100644 --- a/scripts/kalimdor/temple_of_ahnqiraj/mob_anubisath_sentinel.cpp +++ b/scripts/kalimdor/temple_of_ahnqiraj/mob_anubisath_sentinel.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/scripts/kalimdor/temple_of_ahnqiraj/temple_of_ahnqiraj.h b/scripts/kalimdor/temple_of_ahnqiraj/temple_of_ahnqiraj.h index 4d7f46c..8755dfc 100644 --- a/scripts/kalimdor/temple_of_ahnqiraj/temple_of_ahnqiraj.h +++ b/scripts/kalimdor/temple_of_ahnqiraj/temple_of_ahnqiraj.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/scripts/kalimdor/the_barrens.cpp b/scripts/kalimdor/the_barrens.cpp index facf071..c1bc606 100644 --- a/scripts/kalimdor/the_barrens.cpp +++ b/scripts/kalimdor/the_barrens.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/scripts/kalimdor/thousand_needles.cpp b/scripts/kalimdor/thousand_needles.cpp index f09f6dc..38a830c 100644 --- a/scripts/kalimdor/thousand_needles.cpp +++ b/scripts/kalimdor/thousand_needles.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/scripts/kalimdor/thunder_bluff.cpp b/scripts/kalimdor/thunder_bluff.cpp index a9315a2..ef609f8 100644 --- a/scripts/kalimdor/thunder_bluff.cpp +++ b/scripts/kalimdor/thunder_bluff.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/scripts/kalimdor/ungoro_crater.cpp b/scripts/kalimdor/ungoro_crater.cpp index e46d565..9ff7250 100644 --- a/scripts/kalimdor/ungoro_crater.cpp +++ b/scripts/kalimdor/ungoro_crater.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/scripts/kalimdor/wailing_caverns/instance_wailing_caverns.cpp b/scripts/kalimdor/wailing_caverns/instance_wailing_caverns.cpp index f711110..5f4fd79 100644 --- a/scripts/kalimdor/wailing_caverns/instance_wailing_caverns.cpp +++ b/scripts/kalimdor/wailing_caverns/instance_wailing_caverns.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or @@ -25,7 +25,8 @@ EndScriptData */ #include "wailing_caverns.h" instance_wailing_caverns::instance_wailing_caverns(Map* pMap) : ScriptedInstance(pMap), - m_uiNaralexGUID(0) + m_uiNaralexGUID(0), + m_uiDiscipleGUID(0) { Initialize(); } diff --git a/scripts/kalimdor/wailing_caverns/wailing_caverns.cpp b/scripts/kalimdor/wailing_caverns/wailing_caverns.cpp index 1ee57bd..d98fe3e 100644 --- a/scripts/kalimdor/wailing_caverns/wailing_caverns.cpp +++ b/scripts/kalimdor/wailing_caverns/wailing_caverns.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/scripts/kalimdor/wailing_caverns/wailing_caverns.h b/scripts/kalimdor/wailing_caverns/wailing_caverns.h index 7a7b9e6..d2fd227 100644 --- a/scripts/kalimdor/wailing_caverns/wailing_caverns.h +++ b/scripts/kalimdor/wailing_caverns/wailing_caverns.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/scripts/kalimdor/winterspring.cpp b/scripts/kalimdor/winterspring.cpp index 310b331..c3126e7 100644 --- a/scripts/kalimdor/winterspring.cpp +++ b/scripts/kalimdor/winterspring.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/scripts/kalimdor/zulfarrak/boss_zumrah.cpp b/scripts/kalimdor/zulfarrak/boss_zumrah.cpp index 48c241b..7f1672d 100644 --- a/scripts/kalimdor/zulfarrak/boss_zumrah.cpp +++ b/scripts/kalimdor/zulfarrak/boss_zumrah.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/scripts/kalimdor/zulfarrak/instance_zulfarrak.cpp b/scripts/kalimdor/zulfarrak/instance_zulfarrak.cpp index 594242e..3e564da 100644 --- a/scripts/kalimdor/zulfarrak/instance_zulfarrak.cpp +++ b/scripts/kalimdor/zulfarrak/instance_zulfarrak.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/scripts/kalimdor/zulfarrak/zulfarrak.cpp b/scripts/kalimdor/zulfarrak/zulfarrak.cpp index 5ca70c4..4e922b0 100644 --- a/scripts/kalimdor/zulfarrak/zulfarrak.cpp +++ b/scripts/kalimdor/zulfarrak/zulfarrak.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/scripts/kalimdor/zulfarrak/zulfarrak.h b/scripts/kalimdor/zulfarrak/zulfarrak.h index 1efd7bf..3326112 100644 --- a/scripts/kalimdor/zulfarrak/zulfarrak.h +++ b/scripts/kalimdor/zulfarrak/zulfarrak.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/scripts/northrend/borean_tundra.cpp b/scripts/northrend/borean_tundra.cpp index 44adb97..3893f89 100644 --- a/scripts/northrend/borean_tundra.cpp +++ b/scripts/northrend/borean_tundra.cpp @@ -291,6 +291,128 @@ CreatureAI* GetAI_npc_nesingwary_trapper(Creature* pCreature) return new npc_nesingwary_trapperAI(pCreature); } +/*##### +# npc_oil_stained_wolf +#####*/ + +enum +{ + SPELL_THROW_WOLF_BAIT = 53326, + SPELL_PLACE_WOLF_BAIT = 46072, // doesn't appear to be used for anything + SPELL_HAS_EATEN = 46073, + SPELL_SUMMON_DROPPINGS = 46075, + + FACTION_MONSTER = 634, + + POINT_DEST = 1 +}; + +struct MANGOS_DLL_DECL npc_oil_stained_wolfAI : public ScriptedAI +{ + npc_oil_stained_wolfAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset(); } + + bool m_bCanCrapInPublic; + uint32 m_uiPooTimer; + + void Reset() + { + m_bCanCrapInPublic = false; + m_uiPooTimer = 0; + } + + void MovementInform(uint32 uiType, uint32 uiPointId) + { + if (uiType != POINT_MOTION_TYPE) + return; + + if (uiPointId == POINT_DEST) + { + DoCastSpellIfCan(m_creature, SPELL_HAS_EATEN); + m_uiPooTimer = 4000; + } + } + + void UpdateAI(const uint32 uiDiff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + { + if (m_uiPooTimer) + { + if (m_uiPooTimer <= uiDiff) + { + if (m_bCanCrapInPublic) + { + DoCastSpellIfCan(m_creature, SPELL_SUMMON_DROPPINGS); + m_creature->GetMotionMaster()->Clear(); + Reset(); + } + else + { + m_creature->HandleEmote(EMOTE_ONESHOT_BATTLEROAR); + m_bCanCrapInPublic = true; + m_uiPooTimer = 3000; + } + } + else + m_uiPooTimer -= uiDiff; + } + + return; + } + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_npc_oil_stained_wolf(Creature* pCreature) +{ + return new npc_oil_stained_wolfAI(pCreature); +} + +bool EffectDummyCreature_npc_oil_stained_wolf(Unit* pCaster, uint32 uiSpellId, SpellEffectIndex uiEffIndex, Creature* pCreatureTarget) +{ + if (uiSpellId == SPELL_THROW_WOLF_BAIT) + { + if (uiEffIndex == EFFECT_INDEX_0 && pCreatureTarget->getFaction() != FACTION_MONSTER && !pCreatureTarget->HasAura(SPELL_HAS_EATEN)) + { + pCreatureTarget->SetFactionTemporary(FACTION_MONSTER); + pCreatureTarget->RemoveSplineFlag(SPLINEFLAG_WALKMODE); + + pCreatureTarget->GetMotionMaster()->MoveIdle(); + + float fX, fY, fZ; + pCaster->GetContactPoint(pCreatureTarget, fX, fY, fZ, CONTACT_DISTANCE); + pCreatureTarget->GetMotionMaster()->MovePoint(POINT_DEST, fX, fY, fZ); + return true; + } + } + + return false; +} + +bool EffectAuraDummy_npc_oil_stained_wolf(const Aura* pAura, bool bApply) +{ + if (pAura->GetId() == SPELL_HAS_EATEN) + { + if (pAura->GetEffIndex() != EFFECT_INDEX_0) + return false; + + if (bApply) + { + pAura->GetTarget()->HandleEmote(EMOTE_ONESHOT_CUSTOMSPELL01); + } + else + { + Creature* pCreature = (Creature*)pAura->GetTarget(); + pCreature->setFaction(pCreature->GetCreatureInfo()->faction_A); + } + + return true; + } + + return false; +} + /*###### ## go_caribou_trap ######*/ @@ -319,6 +441,100 @@ bool GOUse_go_caribou_trap(Player* pPlayer, GameObject* pGo) return true; } +/*##### +# npc_sinkhole_kill_credit +#####*/ + +enum +{ + SPELL_SUMMON_EXPLOSIVES_CART_FIRE = 46799, + SPELL_SUMMON_SCOURGE_BURROWER = 46800, + SPELL_COSMETIC_HUGE_EXPLOSION = 46225, + SPELL_CANNON_FIRE = 42445, +}; + +struct MANGOS_DLL_DECL npc_sinkhole_kill_creditAI : public ScriptedAI +{ + npc_sinkhole_kill_creditAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset(); } + + ObjectGuid m_uiCartGUID; + ObjectGuid m_uiWormGUID; + uint32 m_uiCartTimer; + uint32 m_uiCartPhase; + + void Reset() + { + m_uiCartGUID.Clear(); + m_uiWormGUID.Clear(); + m_uiCartTimer = 2000; + m_uiCartPhase = 0; + } + + void JustSummoned(Creature* pSummoned) + { + m_uiWormGUID = pSummoned->GetObjectGuid(); + } + + void JustSummoned(GameObject* pGo) + { + // Go is not really needed, but ok to use as a check point so only one "event" can be processed at a time + if (!m_uiCartGUID.IsEmpty()) + return; + + // Expecting summoned from mangos dummy effect 46797 + m_uiCartGUID = pGo->GetObjectGuid(); + } + + void UpdateAI(const uint32 uiDiff) + { + if (!m_uiCartGUID.IsEmpty()) + { + if (m_uiCartTimer <= uiDiff) + { + switch(m_uiCartPhase) + { + case 0: + DoCastSpellIfCan(m_creature, SPELL_SUMMON_EXPLOSIVES_CART_FIRE); + m_uiCartTimer = 4000; + break; + case 1: + // Unclear if these should be in a dummy effect or not. + // The order of spells are correct though. + DoCastSpellIfCan(m_creature, SPELL_COSMETIC_HUGE_EXPLOSION, CAST_TRIGGERED); + DoCastSpellIfCan(m_creature, SPELL_CANNON_FIRE, CAST_TRIGGERED); + break; + case 2: + DoCastSpellIfCan(m_creature, SPELL_SUMMON_SCOURGE_BURROWER); + m_uiCartTimer = 2000; + break; + case 3: + if (Creature* pWorm = m_creature->GetMap()->GetCreature(m_uiWormGUID)) + { + pWorm->SetDeathState(JUST_DIED); + pWorm->SetHealth(0); + } + m_uiCartTimer = 10000; + break; + case 4: + if (Creature* pWorm = m_creature->GetMap()->GetCreature(m_uiWormGUID)) + pWorm->RemoveCorpse(); + + Reset(); + return; + } + + ++m_uiCartPhase; + } + else + m_uiCartTimer -= uiDiff; + } + } +}; + +CreatureAI* GetAI_npc_sinkhole_kill_credit(Creature* pCreature) +{ + return new npc_sinkhole_kill_creditAI(pCreature); +} /*###### ## npc_surristrasz @@ -693,7 +909,7 @@ struct MANGOS_DLL_DECL npc_beryl_sorcererAI : public FollowerAI { AttackStart(pWho); } - + void SpellHit(Unit* pCaster, SpellEntry const* pSpell) { if (pSpell->Id == SPELL_ARCANE_CHAINS && pCaster->GetTypeId() == TYPEID_PLAYER && !bEnslaved) @@ -706,7 +922,7 @@ struct MANGOS_DLL_DECL npc_beryl_sorcererAI : public FollowerAI StartFollow(pChainer, 35, NULL); m_creature->UpdateEntry(NPC_CAPTURED_BERLY_SORCERER); DoCast(m_creature, SPELL_COSMETIC_ENSLAVE_CHAINS_SELF, true); - + bEnslaved = true; } } @@ -743,66 +959,78 @@ CreatureAI* GetAI_npc_beryl_sorcerer(Creature* pCreature) void AddSC_borean_tundra() { - Script *newscript; - - newscript = new Script; - newscript->Name = "npc_fizzcrank_fullthrottle"; - newscript->pGossipHello = &GossipHello_npc_fizzcrank_fullthrottle; - newscript->pGossipSelect = &GossipSelect_npc_fizzcrank_fullthrottle; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "npc_iruk"; - newscript->pGossipHello = &GossipHello_npc_iruk; - newscript->pGossipSelect = &GossipSelect_npc_iruk; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "npc_kara_thricestar"; - newscript->pGossipHello = &GossipHello_npc_kara_thricestar; - newscript->pGossipSelect = &GossipSelect_npc_kara_thricestar; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "npc_nesingwary_trapper"; - newscript->GetAI = &GetAI_npc_nesingwary_trapper; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "go_caribou_trap"; - newscript->pGOUse = &GOUse_go_caribou_trap; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "npc_surristrasz"; - newscript->pGossipHello = &GossipHello_npc_surristrasz; - newscript->pGossipSelect = &GossipSelect_npc_surristrasz; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "npc_tiare"; - newscript->pGossipHello = &GossipHello_npc_tiare; - newscript->pGossipSelect = &GossipSelect_npc_tiare; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "npc_lurgglbr"; - newscript->GetAI = &GetAI_npc_lurgglbr; - newscript->pQuestAcceptNPC = &QuestAccept_npc_lurgglbr; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "npc_nexus_drake"; - newscript->GetAI = &GetAI_npc_nexus_drake; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "go_scourge_cage"; - newscript->pGOUse = &GOHello_go_scourge_cage; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "npc_beryl_sorcerer"; - newscript->GetAI = &GetAI_npc_beryl_sorcerer; - newscript->RegisterSelf(); + Script* pNewScript; + + pNewScript = new Script; + pNewScript->Name = "npc_fizzcrank_fullthrottle"; + pNewScript->pGossipHello = &GossipHello_npc_fizzcrank_fullthrottle; + pNewScript->pGossipSelect = &GossipSelect_npc_fizzcrank_fullthrottle; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "npc_iruk"; + pNewScript->pGossipHello = &GossipHello_npc_iruk; + pNewScript->pGossipSelect = &GossipSelect_npc_iruk; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "npc_kara_thricestar"; + pNewScript->pGossipHello = &GossipHello_npc_kara_thricestar; + pNewScript->pGossipSelect = &GossipSelect_npc_kara_thricestar; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "npc_nesingwary_trapper"; + pNewScript->GetAI = &GetAI_npc_nesingwary_trapper; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "npc_oil_stained_wolf"; + pNewScript->GetAI = &GetAI_npc_oil_stained_wolf; + pNewScript->pEffectDummyNPC = &EffectDummyCreature_npc_oil_stained_wolf; + pNewScript->pEffectAuraDummy = &EffectAuraDummy_npc_oil_stained_wolf; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "go_caribou_trap"; + pNewScript->pGOUse = &GOUse_go_caribou_trap; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "npc_sinkhole_kill_credit"; + pNewScript->GetAI = &GetAI_npc_sinkhole_kill_credit; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "npc_surristrasz"; + pNewScript->pGossipHello = &GossipHello_npc_surristrasz; + pNewScript->pGossipSelect = &GossipSelect_npc_surristrasz; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "npc_tiare"; + pNewScript->pGossipHello = &GossipHello_npc_tiare; + pNewScript->pGossipSelect = &GossipSelect_npc_tiare; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "npc_lurgglbr"; + pNewScript->GetAI = &GetAI_npc_lurgglbr; + pNewScript->pQuestAcceptNPC = &QuestAccept_npc_lurgglbr; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "npc_nexus_drake"; + pNewScript->GetAI = &GetAI_npc_nexus_drake; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "go_scourge_cage"; + pNewScript->pGOUse = &GOHello_go_scourge_cage; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "npc_beryl_sorcerer"; + pNewScript->GetAI = &GetAI_npc_beryl_sorcerer; + pNewScript->RegisterSelf(); } diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_champion/boss_argent_challenge.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_champion/boss_argent_challenge.cpp index 85c0a4c..bdacd79 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_champion/boss_argent_challenge.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_champion/boss_argent_challenge.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_champion/boss_black_knight.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_champion/boss_black_knight.cpp index ef1b990..ee36cf5 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_champion/boss_black_knight.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_champion/boss_black_knight.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_champion/boss_grand_champions.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_champion/boss_grand_champions.cpp index 42f216d..726d842 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_champion/boss_grand_champions.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_champion/boss_grand_champions.cpp @@ -1,5 +1,5 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 -* This program is free software; you can redistribute it and/or modify +/* Copyright (C) 2006 - 2011 ScriptDev2 + * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. @@ -551,11 +551,11 @@ struct MANGOS_DLL_DECL mob_toc5_hunterAI : public ScriptedAI { if (!m_creature->IsWithinDistInMap(m_creature->getVictim(), 8) && m_creature->IsWithinDistInMap(m_creature->getVictim(), 30)) { - m_creature->SetSpeedRate(MOVE_RUN, 0.0001f); + m_creature->SetSpeedRate(MOVE_RUN, 0.0001); } else { - m_creature->SetSpeedRate(MOVE_RUN, 1.2f); + m_creature->SetSpeedRate(MOVE_RUN, 1.2); } enemy_check = 100; }else enemy_check -= diff; diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_champion/instance_trial_of_the_champion.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_champion/instance_trial_of_the_champion.cpp index 52ffa9d..1565873 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_champion/instance_trial_of_the_champion.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_champion/instance_trial_of_the_champion.cpp @@ -1,18 +1,18 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 -* This program is free software; you can redistribute it and/or modify -* it under the terms of the GNU General Public License as published by -* the Free Software Foundation; either version 2 of the License, or -* (at your option) any later version. -* -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program; if not, write to the Free Software -* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -*/ +/* Copyright (C) 2006 - 2011 ScriptDev2 + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ /* ScriptData SDName: Instance_Trial_Of_the_Champion @@ -32,6 +32,7 @@ enum PhaseControl ALLIANCE_CONTROL_PHASE_SHIFT_1 = 55774, ALLIANCE_CONTROL_PHASE_SHIFT_2 = 60027, }; + struct MANGOS_DLL_DECL instance_trial_of_the_champion : public ScriptedInstance { instance_trial_of_the_champion(Map* pMap) : ScriptedInstance(pMap) { Initialize(); } @@ -104,15 +105,12 @@ struct MANGOS_DLL_DECL instance_trial_of_the_champion : public ScriptedInstance m_uiMemoryGUID = 0; m_uiArgentChallengerID = 0; - for (uint8 i = 0; i < MAX_ENCOUNTER; ++i) + for (uint8 i = 0; i < MAX_ENCOUNTER; ++i) m_auiEncounter[i] = NOT_STARTED; } - void OnPlayerEnter(Player *pPlayer) { - - //if (!sWorld.getConfig(CONFIG_BOOL_ALLOW_TWO_SIDE_INTERACTION_GROUP)) return; switch (pPlayer->GetTeam()) @@ -128,7 +126,7 @@ struct MANGOS_DLL_DECL instance_trial_of_the_champion : public ScriptedInstance pPlayer->CastSpell(pPlayer, ALLIANCE_CONTROL_PHASE_SHIFT_2, false); break; } - } + }; void OnCreatureCreate(Creature* pCreature) { diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_champion/trial_of_the_champion.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_champion/trial_of_the_champion.cpp index 5008342..72d1de0 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_champion/trial_of_the_champion.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_champion/trial_of_the_champion.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_champion/trial_of_the_champion.h b/scripts/northrend/crusaders_coliseum/trial_of_the_champion/trial_of_the_champion.h index e8d6338..8303b4f 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_champion/trial_of_the_champion.h +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_champion/trial_of_the_champion.h @@ -1,6 +1,6 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 -* This program is free software licensed under GPL version 2 -* Please see the included DOCS/LICENSE.TXT for more information */ +/* Copyright (C) 2006 - 2011 ScriptDev2 + * This program is free software licensed under GPL version 2 + * Please see the included DOCS/LICENSE.TXT for more information */ #ifndef DEF_TOC_H #define DEF_TOC_H @@ -83,4 +83,4 @@ enum }; -#endif \ No newline at end of file +#endif diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_anubarak_trial.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_anubarak_trial.cpp index 63485f6..5560089 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_anubarak_trial.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_anubarak_trial.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_faction_champions.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_faction_champions.cpp index a8fa628..5b5c9c3 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_faction_champions.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_faction_champions.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_jaraxxus.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_jaraxxus.cpp index 854eec3..95665a3 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_jaraxxus.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_jaraxxus.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_northrend_beasts.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_northrend_beasts.cpp index cd9ca99..5d0f23c 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_northrend_beasts.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_northrend_beasts.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_twin_valkyr.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_twin_valkyr.cpp index 8b73d6b..100c0a9 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_twin_valkyr.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/boss_twin_valkyr.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/instance_trial_of_the_crusader.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/instance_trial_of_the_crusader.cpp index ed7863d..f9d9021 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/instance_trial_of_the_crusader.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/instance_trial_of_the_crusader.cpp @@ -1,18 +1,18 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 -* This program is free software; you can redistribute it and/or modify -* it under the terms of the GNU General Public License as published by -* the Free Software Foundation; either version 2 of the License, or -* (at your option) any later version. -* -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program; if not, write to the Free Software -* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -*/ +/* Copyright (C) 2006 - 2011 ScriptDev2 + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ /* ScriptData SDName: instance_trial_of_the_crusader diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.cpp b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.cpp index fad3f99..8cf9934 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.cpp +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or @@ -1394,4 +1394,4 @@ void AddSC_trial_of_the_crusader() NewScript->Name = "npc_rinn_toc"; NewScript->GetAI = &GetAI_npc_rinn_toc; NewScript->RegisterSelf(); -} \ No newline at end of file +} diff --git a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.h b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.h index 8cf000f..f5f5f71 100644 --- a/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.h +++ b/scripts/northrend/crusaders_coliseum/trial_of_the_crusader/trial_of_the_crusader.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2009 - 2011 by /dev/rsa for ScriptDev2 +/* Copyright (C) 2009 - 2010 by /dev/rsa for ScriptDev2 * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/scripts/northrend/dalaran.cpp b/scripts/northrend/dalaran.cpp index 5010bf9..2537121 100644 --- a/scripts/northrend/dalaran.cpp +++ b/scripts/northrend/dalaran.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/scripts/northrend/dragonblight.cpp b/scripts/northrend/dragonblight.cpp index 800590f..716bf05 100644 --- a/scripts/northrend/dragonblight.cpp +++ b/scripts/northrend/dragonblight.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or @@ -17,14 +17,14 @@ /* ScriptData SDName: Dragonblight SD%Complete: 100 -SDComment: Quest support: 12166, 12499/12500(end sequenze). Taxi paths Wyrmrest temple. +SDComment: Quest support: 12166, 12261, 12499/12500(end sequenze). Taxi paths Wyrmrest temple. SDCategory: Dragonblight EndScriptData */ /* ContentData npc_afrasastrasz npc_alexstrasza_wr_gate -npc_liquid_fire_of_elune +npc_destructive_ward npc_tariolstrasz npc_torastrasza EndContentData */ @@ -107,6 +107,143 @@ bool GossipSelect_npc_alexstrasza_wr_gate(Player* pPlayer, Creature* pCreature, return true; } +/*##### +# npc_destructive_ward +#####*/ + +enum +{ + SAY_WARD_POWERUP = -1000664, + SAY_WARD_CHARGED = -1000665, + + SPELL_DESTRUCTIVE_PULSE = 48733, + SPELL_DESTRUCTIVE_BARRAGE = 48734, + SPELL_DESTRUCTIVE_WARD_POWERUP = 48735, + + SPELL_SUMMON_SMOLDERING_SKELETON = 48715, + SPELL_SUMMON_SMOLDERING_CONSTRUCT = 48718, + SPELL_DESTRUCTIVE_WARD_KILL_CREDIT = 52409, + + MAX_STACK = 1, +}; + +// Script is based on real event from you-know-where. +// Some sources show the event in a bit different way, for unknown reason. +// Devs decided to add it in the below way, until more details can be obtained. + +// It will be only two power-up's, where other sources has a different count (2-4 stacks has been observed) +// Probably caused by either a change in a patch (bugfix?) or the powerup has a condition (some +// sources suggest this, but without any explanation about what this might be) + +struct MANGOS_DLL_DECL npc_destructive_wardAI : public Scripted_NoMovementAI +{ + npc_destructive_wardAI(Creature* pCreature) : Scripted_NoMovementAI(pCreature) + { + m_uiPowerTimer = 30000; + m_uiStack = 0; + m_uiSummonTimer = 2000; + m_bCanPulse = false; + m_bFirst = true; + Reset(); + } + + uint32 m_uiPowerTimer; + uint32 m_uiStack; + uint32 m_uiSummonTimer; + bool m_bFirst; + bool m_bCanPulse; + + void Reset() { } + + void JustSummoned(Creature* pSummoned) + { + pSummoned->AI()->AttackStart(m_creature); + } + + void UpdateAI(const uint32 uiDiff) + { + if (m_bCanPulse) + { + if (DoCastSpellIfCan(m_creature, m_uiStack > MAX_STACK ? SPELL_DESTRUCTIVE_BARRAGE : SPELL_DESTRUCTIVE_PULSE) == CAST_OK) + m_bCanPulse = false; + } + + if (m_uiSummonTimer) + { + if (m_uiSummonTimer <= uiDiff) + { + if (m_bFirst) + m_uiSummonTimer = 25000; + else + m_uiSummonTimer = 0; + + switch(m_uiStack) + { + case 0: + DoCastSpellIfCan(m_creature, SPELL_SUMMON_SMOLDERING_SKELETON, CAST_TRIGGERED); + break; + case 1: + DoCastSpellIfCan(m_creature, SPELL_SUMMON_SMOLDERING_CONSTRUCT, CAST_TRIGGERED); + + if (m_bFirst) + break; + + DoCastSpellIfCan(m_creature, SPELL_SUMMON_SMOLDERING_CONSTRUCT, CAST_TRIGGERED); + break; + case 2: + if (m_bFirst) + break; + + DoCastSpellIfCan(m_creature, SPELL_SUMMON_SMOLDERING_SKELETON, CAST_TRIGGERED); + DoCastSpellIfCan(m_creature, SPELL_SUMMON_SMOLDERING_SKELETON, CAST_TRIGGERED); + DoCastSpellIfCan(m_creature, SPELL_SUMMON_SMOLDERING_CONSTRUCT, CAST_TRIGGERED); + break; + } + + m_bFirst = !m_bFirst; + } + else + m_uiSummonTimer -= uiDiff; + } + + if (!m_uiPowerTimer) + return; + + if (m_uiPowerTimer <= uiDiff) + { + if (m_uiStack > MAX_STACK) + { + if (DoCastSpellIfCan(m_creature, SPELL_DESTRUCTIVE_WARD_KILL_CREDIT) == CAST_OK) + { + DoScriptText(SAY_WARD_CHARGED, m_creature, m_creature->GetOwner()); + m_uiPowerTimer = 0; + m_uiSummonTimer = 0; + m_bCanPulse = true; + } + } + else if (DoCastSpellIfCan(m_creature, SPELL_DESTRUCTIVE_WARD_POWERUP) == CAST_OK) + { + DoScriptText(SAY_WARD_POWERUP, m_creature, m_creature->GetOwner()); + + m_uiPowerTimer = 30000; + m_uiSummonTimer = 2000; + + m_bFirst = true; + m_bCanPulse = true; // pulse right after each charge + + ++m_uiStack; + } + } + else + m_uiPowerTimer -= uiDiff; + } +}; + +CreatureAI* GetAI_npc_destructive_ward(Creature* pCreature) +{ + return new npc_destructive_wardAI(pCreature); +} + /*###### ## npc_tariolstrasz ######*/ @@ -191,29 +328,34 @@ bool GossipSelect_npc_torastrasza(Player* pPlayer, Creature* pCreature, uint32 u void AddSC_dragonblight() { - Script *newscript; - - newscript = new Script; - newscript->Name = "npc_afrasastrasz"; - newscript->pGossipHello = &GossipHello_npc_afrasastrasz; - newscript->pGossipSelect = &GossipSelect_npc_afrasastrasz; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "npc_alexstrasza_wr_gate"; - newscript->pGossipHello = &GossipHello_npc_alexstrasza_wr_gate; - newscript->pGossipSelect = &GossipSelect_npc_alexstrasza_wr_gate; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "npc_tariolstrasz"; - newscript->pGossipHello = &GossipHello_npc_tariolstrasz; - newscript->pGossipSelect = &GossipSelect_npc_tariolstrasz; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "npc_torastrasza"; - newscript->pGossipHello = &GossipHello_npc_torastrasza; - newscript->pGossipSelect = &GossipSelect_npc_torastrasza; - newscript->RegisterSelf(); + Script* pNewScript; + + pNewScript = new Script; + pNewScript->Name = "npc_afrasastrasz"; + pNewScript->pGossipHello = &GossipHello_npc_afrasastrasz; + pNewScript->pGossipSelect = &GossipSelect_npc_afrasastrasz; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "npc_alexstrasza_wr_gate"; + pNewScript->pGossipHello = &GossipHello_npc_alexstrasza_wr_gate; + pNewScript->pGossipSelect = &GossipSelect_npc_alexstrasza_wr_gate; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "npc_destructive_ward"; + pNewScript->GetAI = &GetAI_npc_destructive_ward; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "npc_tariolstrasz"; + pNewScript->pGossipHello = &GossipHello_npc_tariolstrasz; + pNewScript->pGossipSelect = &GossipSelect_npc_tariolstrasz; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "npc_torastrasza"; + pNewScript->pGossipHello = &GossipHello_npc_torastrasza; + pNewScript->pGossipSelect = &GossipSelect_npc_torastrasza; + pNewScript->RegisterSelf(); } diff --git a/scripts/northrend/draktharon_keep/boss_dred.cpp b/scripts/northrend/draktharon_keep/boss_dred.cpp index 31ddb2f..86b779c 100644 --- a/scripts/northrend/draktharon_keep/boss_dred.cpp +++ b/scripts/northrend/draktharon_keep/boss_dred.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/scripts/northrend/grizzly_hills.cpp b/scripts/northrend/grizzly_hills.cpp index ec17bac..bcc3f05 100644 --- a/scripts/northrend/grizzly_hills.cpp +++ b/scripts/northrend/grizzly_hills.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/scripts/northrend/gundrak/boss_eck.cpp b/scripts/northrend/gundrak/boss_eck.cpp index fa33159..ef4e3d3 100644 --- a/scripts/northrend/gundrak/boss_eck.cpp +++ b/scripts/northrend/gundrak/boss_eck.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/scripts/northrend/howling_fjord.cpp b/scripts/northrend/howling_fjord.cpp index 0e6bae8..b9c8c2f 100644 --- a/scripts/northrend/howling_fjord.cpp +++ b/scripts/northrend/howling_fjord.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or @@ -17,20 +17,130 @@ /* ScriptData SDName: Howling_Fjord SD%Complete: ? -SDComment: Quest support: 11221, 11483, 11300, 11464 +SDComment: Quest support: 11221, 11300, 11464, 11343 SDCategory: Howling Fjord EndScriptData */ /* ContentData +npc_ancient_male_vrykul +at_ancient_male_vrykul npc_daegarn npc_deathstalker_razael - TODO, can be moved to database npc_dark_ranger_lyana - TODO, can be moved to database -npc_mcgoyver - TODO, can be moved to database npc_silvermoon_harry EndContentData */ #include "precompiled.h" +enum +{ + SPELL_ECHO_OF_YMIRON = 42786, + SPELL_SECRET_OF_NIFFELVAR = 43458, + QUEST_ECHO_OF_YMIRON = 11343, + NPC_MALE_VRYKUL = 24314, + NPC_FEMALE_VRYKUL = 24315, + + SAY_VRYKUL_CURSED = -1000635, + EMOTE_VRYKUL_POINT = -1000636, + EMOTE_VRYKUL_SOB = -1000637, + SAY_VRYKUL_DISPOSE = -1000638, + SAY_VRYKUL_BEG = -1000639, + SAY_VRYKUL_WHAT = -1000640, + SAY_VRYKUL_HIDE = -1000641, +}; + +struct MANGOS_DLL_DECL npc_ancient_male_vrykulAI : public ScriptedAI +{ + npc_ancient_male_vrykulAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset(); } + + bool m_bEventInProgress; + uint32 m_uiPhase; + uint32 m_uiPhaseTimer; + + void Reset() + { + m_bEventInProgress = false; + m_uiPhase = 0; + m_uiPhaseTimer = 0; + } + + void StartEvent() + { + if (m_bEventInProgress) + return; + + m_bEventInProgress = true; + } + + void UpdateAI(const uint32 uiDiff) + { + if (!m_bEventInProgress) + return; + + if (m_uiPhaseTimer < uiDiff) + m_uiPhaseTimer = 5000; + else + { + m_uiPhaseTimer -= uiDiff; + return; + } + + Creature* pFemale = GetClosestCreatureWithEntry(m_creature, NPC_FEMALE_VRYKUL, 10.0f); + + switch(m_uiPhase) + { + case 0: + DoScriptText(SAY_VRYKUL_CURSED, m_creature); + DoScriptText(EMOTE_VRYKUL_POINT, m_creature); + break; + case 1: + if (pFemale) + DoScriptText(EMOTE_VRYKUL_SOB, pFemale); + DoScriptText(SAY_VRYKUL_DISPOSE, m_creature); + break; + case 2: + if (pFemale) + DoScriptText(SAY_VRYKUL_BEG, pFemale); + break; + case 3: + DoScriptText(SAY_VRYKUL_WHAT, m_creature); + break; + case 4: + if (pFemale) + DoScriptText(SAY_VRYKUL_HIDE, pFemale); + break; + case 5: + DoCastSpellIfCan(m_creature, SPELL_SECRET_OF_NIFFELVAR); + break; + case 6: + Reset(); + return; + } + + ++m_uiPhase; + } +}; + +CreatureAI* GetAI_npc_ancient_male_vrykul(Creature* pCreature) +{ + return new npc_ancient_male_vrykulAI(pCreature); +} + +bool AreaTrigger_at_ancient_male_vrykul(Player* pPlayer, AreaTriggerEntry const* pAt) +{ + if (pPlayer->isAlive() && pPlayer->GetQuestStatus(QUEST_ECHO_OF_YMIRON) == QUEST_STATUS_INCOMPLETE && + pPlayer->HasAura(SPELL_ECHO_OF_YMIRON)) + { + if (Creature* pCreature = GetClosestCreatureWithEntry(pPlayer, NPC_MALE_VRYKUL, 20.0f)) + { + if (npc_ancient_male_vrykulAI* pVrykulAI = dynamic_cast(pCreature->AI())) + pVrykulAI->StartEvent(); + } + } + + return true; +} + /*###### ## npc_daegarn ######*/ @@ -93,7 +203,7 @@ struct MANGOS_DLL_DECL npc_daegarnAI : public ScriptedAI void SummonGladiator(uint32 uiEntry) { - m_creature->SummonCreature(uiEntry, afSummon[0], afSummon[1], afSummon[2], 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30*IN_MILLISECONDS); + m_creature->SummonCreature(uiEntry, afSummon[0], afSummon[1], afSummon[2], 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 20*IN_MILLISECONDS); } void SummonedMovementInform(Creature* pSummoned, uint32 uiMotionType, uint32 uiPointId) @@ -529,6 +639,16 @@ void AddSC_howling_fjord() { Script* pNewScript; + pNewScript = new Script; + pNewScript->Name = "npc_ancient_male_vrykul"; + pNewScript->GetAI = &GetAI_npc_ancient_male_vrykul; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "at_ancient_male_vrykul"; + pNewScript->pAreaTrigger = &AreaTrigger_at_ancient_male_vrykul; + pNewScript->RegisterSelf(); + pNewScript = new Script; pNewScript->Name = "npc_daegarn"; pNewScript->GetAI = &GetAI_npc_daegarn; diff --git a/scripts/northrend/icecrown.cpp b/scripts/northrend/icecrown.cpp index 30881b2..ac5ba85 100644 --- a/scripts/northrend/icecrown.cpp +++ b/scripts/northrend/icecrown.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or @@ -17,7 +17,7 @@ /* ScriptData SDName: Icecrown SD%Complete: 100 -SDComment: Quest support: 12807, Vendor support: 34885 +SDComment: Vendor support: 34885 SDCategory: Icecrown EndScriptData */ diff --git a/scripts/northrend/icecrown_citadel/frozen_halls/forge_of_souls/boss_bronjahm.cpp b/scripts/northrend/icecrown_citadel/frozen_halls/forge_of_souls/boss_bronjahm.cpp index 0815074..24df960 100644 --- a/scripts/northrend/icecrown_citadel/frozen_halls/forge_of_souls/boss_bronjahm.cpp +++ b/scripts/northrend/icecrown_citadel/frozen_halls/forge_of_souls/boss_bronjahm.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or @@ -22,7 +22,7 @@ SDCategory: Icecrown - forge of souls EndScriptData */ #include "precompiled.h" -#include "def_forge.h" +#include "forge_of_souls.h" enum BossSpells { diff --git a/scripts/northrend/icecrown_citadel/frozen_halls/forge_of_souls/boss_devourer_of_souls.cpp b/scripts/northrend/icecrown_citadel/frozen_halls/forge_of_souls/boss_devourer_of_souls.cpp index 4c79643..8ab9fbd 100644 --- a/scripts/northrend/icecrown_citadel/frozen_halls/forge_of_souls/boss_devourer_of_souls.cpp +++ b/scripts/northrend/icecrown_citadel/frozen_halls/forge_of_souls/boss_devourer_of_souls.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or @@ -22,7 +22,7 @@ SDCategory: The Forge of Souls EndScriptData */ #include "precompiled.h" -#include "def_forge.h" +#include "forge_of_souls.h" enum { @@ -172,52 +172,12 @@ struct MANGOS_DLL_DECL boss_devourer_of_soulsAI : public ScriptedAI m_creature->DealDamage(i->getSource(), uiDamage/2,NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false); } - void SpawnOutro(uint32 guid) - { - if (Creature *pSummon = m_creature->SummonCreature(guid, SpawnLoc[0].x, SpawnLoc[0].y, SpawnLoc[0].z,0, TEMPSUMMON_TIMED_DESPAWN, 300000)) - { - uint8 i = urand(1,MAX_POINTS); - - pSummon->GetMotionMaster()->MovePoint(i, SpawnLoc[i].x, SpawnLoc[i].y, SpawnLoc[i].z); - - if (pSummon->GetEntry() == npc_jaina_extro) - DoScriptText(SAY_JAINA_FS09_EXTRO, pSummon); - else if (pSummon->GetEntry() == npc_sylvana_extro) - DoScriptText(SAY_SYLVANA_FS07_EXTRO, pSummon); - } - } - void JustDied(Unit* pKiller) { if(!m_pInstance) return; m_pInstance->SetData(TYPE_DEVOURER, DONE); DoScriptText(SAY_DEVOURER_DEATH_MALE_01, m_creature); DespawnAllSummons(); - - Player* player = (Player*)pKiller; - - if(player->GetTeam() == ALLIANCE) - { - m_pInstance->SetData64(DATA_LIDER,0); - SpawnOutro(npc_jaina_extro); - SpawnOutro(npc_jaina_credit); - SpawnOutro(npc_mage); - SpawnOutro(npc_mage_woman); - SpawnOutro(npc_cc_a_01); - SpawnOutro(npc_cc_a_02); - SpawnOutro(npc_cc_a_03); - - } else - { - m_pInstance->SetData64(DATA_LIDER,1); - SpawnOutro(npc_sylvana_extro); - SpawnOutro(npc_sylvana_credit); - SpawnOutro(npc_mage); - SpawnOutro(npc_mage_woman); - SpawnOutro(npc_cc_h_01); - SpawnOutro(npc_cc_h_02); - SpawnOutro(npc_cc_h_03); - }; } void KilledUnit(Unit* victim) diff --git a/scripts/northrend/icecrown_citadel/frozen_halls/forge_of_souls/forge_of_souls.cpp b/scripts/northrend/icecrown_citadel/frozen_halls/forge_of_souls/forge_of_souls.cpp index 6dcab36..bab17e7 100644 --- a/scripts/northrend/icecrown_citadel/frozen_halls/forge_of_souls/forge_of_souls.cpp +++ b/scripts/northrend/icecrown_citadel/frozen_halls/forge_of_souls/forge_of_souls.cpp @@ -23,7 +23,7 @@ SDAuthor: MaxXx2021 aka Mioka EndScriptData */ #include "precompiled.h" -#include "def_forge.h" +#include "forge_of_souls.h" enum { @@ -95,22 +95,22 @@ bool StartEvent; m_pInstance->SetData(TYPE_INTRO, DONE); m_creature->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_QUESTGIVER); m_creature->RemoveFlag(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_GOSSIP); - if(m_creature->GetEntry() == npc_jaina) + if(m_creature->GetEntry() == NPC_JAINA_BEGIN ) { DoScriptText(SAY_JAINA_FS01, m_creature); StepTimer = 7000; } - if(m_creature->GetEntry() == npc_sylvana) + if(m_creature->GetEntry() == NPC_SILVANA_BEGIN) StepTimer = 100; ++Step; break; case 1: - if(m_creature->GetEntry() == npc_jaina) + if(m_creature->GetEntry() == NPC_JAINA_BEGIN ) { DoScriptText(SAY_JAINA_FS02, m_creature); StepTimer = 9000; } - if(m_creature->GetEntry() == npc_sylvana) + if(m_creature->GetEntry() == NPC_SILVANA_BEGIN) { DoScriptText(SAY_SYLVANA_FS01, m_creature); StepTimer = 12000; @@ -118,12 +118,12 @@ bool StartEvent; ++Step; break; case 2: - if(m_creature->GetEntry() == npc_jaina) + if(m_creature->GetEntry() == NPC_JAINA_BEGIN ) { DoScriptText(SAY_JAINA_FS03, m_creature); StepTimer = 8000; } - if(m_creature->GetEntry() == npc_sylvana) + if(m_creature->GetEntry() == NPC_SILVANA_BEGIN) { DoScriptText(SAY_SYLVANA_FS02, m_creature); StepTimer = 11000; @@ -131,12 +131,12 @@ bool StartEvent; ++Step; break; case 3: - if(m_creature->GetEntry() == npc_jaina) + if(m_creature->GetEntry() == NPC_JAINA_BEGIN ) { DoScriptText(SAY_JAINA_FS04, m_creature); StepTimer = 10000; } - if(m_creature->GetEntry() == npc_sylvana) + if(m_creature->GetEntry() == NPC_SILVANA_BEGIN) { DoScriptText(SAY_SYLVANA_FS03, m_creature); StepTimer = 11000; @@ -144,12 +144,12 @@ bool StartEvent; ++Step; break; case 4: - if(m_creature->GetEntry() == npc_jaina) + if(m_creature->GetEntry() == NPC_JAINA_BEGIN ) { DoScriptText(SAY_JAINA_FS05, m_creature); StepTimer = 8000; } - if(m_creature->GetEntry() == npc_sylvana) + if(m_creature->GetEntry() == NPC_SILVANA_BEGIN) { DoScriptText(SAY_SYLVANA_FS04, m_creature); StepTimer = 12000; @@ -157,12 +157,12 @@ bool StartEvent; ++Step; break; case 5: - if(m_creature->GetEntry() == npc_jaina) + if(m_creature->GetEntry() == NPC_JAINA_BEGIN ) { DoScriptText(SAY_JAINA_FS06, m_creature); StepTimer = 12000; } - if(m_creature->GetEntry() == npc_sylvana) + if(m_creature->GetEntry() == NPC_SILVANA_BEGIN) { DoScriptText(SAY_SYLVANA_FS05, m_creature); StepTimer = 7000; @@ -170,12 +170,12 @@ bool StartEvent; ++Step; break; case 6: - if(m_creature->GetEntry() == npc_jaina) + if(m_creature->GetEntry() == NPC_JAINA_BEGIN ) { DoScriptText(SAY_JAINA_FS07, m_creature); StepTimer = 7000; } - if(m_creature->GetEntry() == npc_sylvana) + if(m_creature->GetEntry() == NPC_SILVANA_BEGIN) { DoScriptText(SAY_SYLVANA_FS06, m_creature); StepTimer = 4000; @@ -183,7 +183,7 @@ bool StartEvent; ++Step; break; case 7: - if(m_creature->GetEntry() == npc_jaina) + if(m_creature->GetEntry() == NPC_JAINA_BEGIN ) { DoScriptText(SAY_JAINA_FS08, m_creature); StepTimer = 5000; @@ -262,10 +262,6 @@ uint32 uiSummon_counter; if (m_pInstance->GetData(TYPE_DEVOURER) == DONE) { - if(m_pInstance->GetData64(DATA_LIDER) == 1 && m_creature->GetEntry() == npc_sylvana_extro) return; - - if(m_pInstance->GetData64(DATA_LIDER) == 2 && m_creature->GetEntry() == npc_jaina_extro) return; - if(StepTimer < diff) { switch(Step) @@ -279,218 +275,18 @@ uint32 uiSummon_counter; ++Step; break; case 1: - if(m_creature->GetEntry() == npc_jaina_extro) - { - StepTimer = 100; - if (uiSummon_counter < 4) - { - if (Creature* pTemp = m_creature->SummonCreature(npc_cc_a_01,5623.609f,2457.946f,705.891f,1.37f, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 300000)) - { - pTemp->RemoveSplineFlag(SPLINEFLAG_WALKMODE); - pTemp->SetUInt64Value(UNIT_FIELD_TARGET, m_creature->GetGUID()); - switch(uiSummon_counter) - { - case 0: - pTemp->GetMotionMaster()->MovePoint(0, 5659.251f, 2472.017f, 708.696f); - break; - case 1: - pTemp->GetMotionMaster()->MovePoint(0, 5627.611f, 2501.972f, 708.696f); - break; - case 2: - pTemp->GetMotionMaster()->MovePoint(0, 5680.920f, 2482.998f, 708.696f); - break; - case 3: - pTemp->GetMotionMaster()->MovePoint(0, 5641.398f, 2523.911f, 708.696f); - break; - } - uiSummon_counter++; - } - } - else - { - uiSummon_counter = 0; - Step++; - } - } - if(m_creature->GetEntry() == npc_sylvana_extro) - { - StepTimer = 100; - if (uiSummon_counter < 4) - { - if (Creature* pTemp = m_creature->SummonCreature(npc_cc_h_01,5623.609f,2457.946f,705.891f,1.37f, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 300000)) - { - pTemp->RemoveSplineFlag(SPLINEFLAG_WALKMODE); - pTemp->SetUInt64Value(UNIT_FIELD_TARGET, m_creature->GetGUID()); - switch(uiSummon_counter) - { - case 0: - pTemp->GetMotionMaster()->MovePoint(0, 5659.251f, 2472.017f, 708.696f); - break; - case 1: - pTemp->GetMotionMaster()->MovePoint(0, 5627.611f, 2501.972f, 708.696f); - break; - case 2: - pTemp->GetMotionMaster()->MovePoint(0, 5680.920f, 2482.998f, 708.696f); - break; - case 3: - pTemp->GetMotionMaster()->MovePoint(0, 5641.398f, 2523.911f, 708.696f); - break; - } - uiSummon_counter++; - } - } - else - { - uiSummon_counter = 0; - Step++; - } - } break; case 2: - if(m_creature->GetEntry() == npc_jaina_extro) - { - StepTimer = 100; - if (uiSummon_counter < 4) - { - if (Creature* pTemp = m_creature->SummonCreature(npc_cc_a_02,5623.609f,2457.946f,705.891f,1.37f, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 300000)) - { - pTemp->RemoveSplineFlag(SPLINEFLAG_WALKMODE); - pTemp->SetUInt64Value(UNIT_FIELD_TARGET, m_creature->GetGUID()); - switch(uiSummon_counter) - { - case 0: - pTemp->GetMotionMaster()->MovePoint(0, 5661.508f, 2473.066f, 708.696f); - break; - case 1: - pTemp->GetMotionMaster()->MovePoint(0, 5627.146f, 2499.098f, 708.696f); - break; - case 2: - pTemp->GetMotionMaster()->MovePoint(0, 5682.331f, 2485.985f, 708.696f); - break; - case 3: - pTemp->GetMotionMaster()->MovePoint(0, 5639.636f, 2521.228f, 708.696f); - break; - } - uiSummon_counter++; - } - } - else - { - uiSummon_counter = 0; - Step++; - } - } - if(m_creature->GetEntry() == npc_sylvana_extro) - { - StepTimer = 100; - if (uiSummon_counter < 4) - { - if (Creature* pTemp = m_creature->SummonCreature(npc_cc_h_02,5623.609f,2457.946f,705.891f,1.37f, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 300000)) - { - pTemp->RemoveSplineFlag(SPLINEFLAG_WALKMODE); - pTemp->SetUInt64Value(UNIT_FIELD_TARGET, m_creature->GetGUID()); - switch(uiSummon_counter) - { - case 0: - pTemp->GetMotionMaster()->MovePoint(0, 5661.508f, 2473.066f, 708.696f); - break; - case 1: - pTemp->GetMotionMaster()->MovePoint(0, 5627.146f, 2499.098f, 708.696f); - break; - case 2: - pTemp->GetMotionMaster()->MovePoint(0, 5682.331f, 2485.985f, 708.696f); - break; - case 3: - pTemp->GetMotionMaster()->MovePoint(0, 5639.636f, 2521.228f, 708.696f); - break; - } - uiSummon_counter++; - } - } - else - { - uiSummon_counter = 0; - Step++; - } - } break; case 3: - if(m_creature->GetEntry() == npc_jaina_extro) - { - StepTimer = 100; - if (uiSummon_counter < 4) - { - if (Creature* pTemp = m_creature->SummonCreature(npc_cc_a_03,5623.609f,2457.946f,705.891f,1.37f, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 300000)) - { - pTemp->RemoveSplineFlag(SPLINEFLAG_WALKMODE); - pTemp->SetUInt64Value(UNIT_FIELD_TARGET, m_creature->GetGUID()); - switch(uiSummon_counter) - { - case 0: - pTemp->GetMotionMaster()->MovePoint(0, 5664.265f, 2473.974f, 708.696f); - break; - case 1: - pTemp->GetMotionMaster()->MovePoint(0, 5626.768f, 2496.534f, 708.696f); - break; - case 2: - pTemp->GetMotionMaster()->MovePoint(0, 5683.696f, 2489.598f, 708.696f); - break; - case 3: - pTemp->GetMotionMaster()->MovePoint(0, 5637.580f, 2518.249f, 708.696f); - break; - } - uiSummon_counter++; - } - } - else - { - uiSummon_counter = 0; - StepTimer = 8000; - Step++; - } - } - if(m_creature->GetEntry() == npc_sylvana_extro) - { - StepTimer = 100; - if (uiSummon_counter < 4) - { - if (Creature* pTemp = m_creature->SummonCreature(npc_cc_h_03,5623.609f,2457.946f,705.891f,1.37f, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 300000)) - { - pTemp->RemoveSplineFlag(SPLINEFLAG_WALKMODE); - pTemp->SetUInt64Value(UNIT_FIELD_TARGET, m_creature->GetGUID()); - switch(uiSummon_counter) - { - case 0: - pTemp->GetMotionMaster()->MovePoint(0, 5664.265f, 2473.974f, 708.696f); - break; - case 1: - pTemp->GetMotionMaster()->MovePoint(0, 5626.768f, 2496.534f, 708.696f); - break; - case 2: - pTemp->GetMotionMaster()->MovePoint(0, 5683.696f, 2489.598f, 708.696f); - break; - case 3: - pTemp->GetMotionMaster()->MovePoint(0, 5637.580f, 2518.249f, 708.696f); - break; - } - uiSummon_counter++; - } - } - else - { - uiSummon_counter = 0; - StepTimer = 8000; - Step++; - } - } break; case 4: - if(m_creature->GetEntry() == npc_jaina_extro) + if(m_creature->GetEntry() == NPC_JAINA_END) { DoScriptText(SAY_JAINA_FS09_EXTRO, m_creature); StepTimer = 6000; } - if(m_creature->GetEntry() == npc_sylvana_extro) + if(m_creature->GetEntry() == NPC_SILVANA_END) { DoScriptText(SAY_SYLVANA_FS07_EXTRO, m_creature); StepTimer = 3000; diff --git a/scripts/northrend/icecrown_citadel/frozen_halls/forge_of_souls/forge_of_souls.h b/scripts/northrend/icecrown_citadel/frozen_halls/forge_of_souls/forge_of_souls.h new file mode 100644 index 0000000..a8fe66e --- /dev/null +++ b/scripts/northrend/icecrown_citadel/frozen_halls/forge_of_souls/forge_of_souls.h @@ -0,0 +1,130 @@ +/* Copyright (C) 2006 - 2011 ScriptDev2 + * This program is free software licensed under GPL version 2 + * Please see the included DOCS/LICENSE.TXT for more information */ + +#ifndef DEF_FORGE_OF_SOULS_H +#define DEF_FORGE_OF_SOULS_H +#include "BSW_ai.h" + +enum +{ + MAX_ENCOUNTER = 2, + TYPE_INTRO = 0, + TYPE_BRONJAHM = 1, + TYPE_DEVOURER = 2, + TYPE_ACHIEV_PHANTOM_BLAST = 3, + + DATA_SOULFRAGMENT_REMOVE = 4, // on Death and on Use + + NPC_BRONJAHM = 36497, + NPC_DEVOURER = 36502, + NPC_CORRUPTED_SOUL_FRAGMENT = 36535, + + // Event NPCs + NPC_SILVANA_BEGIN = 37596, + NPC_SILVANA_END = 38161, + NPC_JAINA_BEGIN = 37597, + NPC_JAINA_END = 38160, + NPC_ARCHMAGE_ELANDRA = 37774, + NPC_ARCHMAGE_KORELN = 37582, + NPC_DARK_RANGER_KALIRA = 37583, + NPC_DARK_RANGER_LORALEN = 37779, + NPC_COLISEUM_CHAMPION_A_P = 37498, // Alliance Paladin + NPC_COLISEUM_CHAMPION_A_F = 37496, // Alliance Footman + NPC_COLISEUM_CHAMPION_A_M = 37497, // Alliance Mage + NPC_COLISEUM_CHAMPION_H_F = 37584, // Horde Footman + NPC_COLISEUM_CHAMPION_H_T = 37587, // Horde Taure + NPC_COLISEUM_CHAMPION_H_M = 37588, // Horde Mage + + ACHIEV_CRIT_SOUL_POWER = 12752, + ACHIEV_CRIT_PHANTOM_BLAST = 12976, +}; + +struct sIntoEventNpcSpawnLocations +{ + uint32 uiEntryHorde, uiEntryAlliance; + float fSpawnX, fSpawnY, fSpawnZ, fSpawnO; +}; + +/* Still TODO +** We have 12 npc-entries to do moving, and often different waypoints for one entry +** Best way to handle the paths of these mobs is still open +*/ + +struct sExtroEventNpcLocations +{ + uint32 uiEntryHorde, uiEntryAlliance; + float fStartO, fEndO; // Orientation for Spawning + float fSpawnX, fSpawnY, fSpawnZ; + float fEndX, fEndY, fEndZ; +}; + +// TODO: verify Horde - Entries +const sIntoEventNpcSpawnLocations aEventBeginLocations[3] = +{ + {NPC_SILVANA_BEGIN, NPC_JAINA_BEGIN, 4901.25439f, 2206.861f, 638.8166f, 5.88175964f}, + {NPC_DARK_RANGER_KALIRA, NPC_ARCHMAGE_ELANDRA, 4899.709961f, 2205.899902f, 638.817017f, 5.864306f}, + {NPC_DARK_RANGER_LORALEN, NPC_ARCHMAGE_KORELN, 4903.160156f, 2213.090088f, 638.817017f, 0.1745329f} +}; + +const sExtroEventNpcLocations aEventEndLocations[18] = +{ + // Horde Entry Ally Entry O_Spawn O_End SpawnPos EndPos + {NPC_SILVANA_END, NPC_JAINA_END, 0.8901179f, 0.890118f, 5606.34033f, 2436.32129f, 705.9351f, 5638.404f, 2477.154f, 708.6932f}, + {NPC_COLISEUM_CHAMPION_H_F, NPC_COLISEUM_CHAMPION_A_F, 0.9773844f, 1.780236f, 5593.632f, 2428.57983f, 705.9351f, 5695.879f, 2522.944f, 714.6915f}, + {NPC_COLISEUM_CHAMPION_H_F, NPC_COLISEUM_CHAMPION_A_F, 1.1519173f, 1.78023f, 5594.079f, 2425.111f, 705.9351f, 5692.123f, 2522.613f, 714.6915f}, + {NPC_COLISEUM_CHAMPION_H_F, NPC_COLISEUM_CHAMPION_A_F, 0.6108652f, 0.296706f, 5597.932f, 2421.78125f, 705.9351f, 5669.314f, 2540.029f, 714.6915f}, + {NPC_COLISEUM_CHAMPION_H_F, NPC_COLISEUM_CHAMPION_A_F, 1.0471975f, 5.358161f, 5598.03564f, 2429.37671f, 705.9351f, 5639.267f, 2520.912f, 708.6959f}, + {NPC_COLISEUM_CHAMPION_H_F, NPC_COLISEUM_CHAMPION_A_F, 0.8901179f, 0.112373f, 5600.836f, 2421.35938f, 705.9351f, 5668.145f, 2543.854f, 714.6915f}, + {NPC_COLISEUM_CHAMPION_H_F, NPC_COLISEUM_CHAMPION_A_F, 0.8901179f, 5.358161f, 5600.848f, 2429.54517f, 705.9351f, 5639.961f, 2522.936f, 708.6959f}, + {NPC_COLISEUM_CHAMPION_H_F, NPC_COLISEUM_CHAMPION_A_F, 0.8901179f, 5.347504f, 5601.46533f, 2426.77075f, 705.9351f, 5643.156f, 2525.342f, 708.6958f}, + {NPC_COLISEUM_CHAMPION_H_F, NPC_COLISEUM_CHAMPION_A_F, 1.1519173f, 0.232039f, 5601.587f, 2418.60425f, 705.9351f, 5670.483f, 2536.204f, 714.6915f}, + {NPC_DARK_RANGER_LORALEN, NPC_ARCHMAGE_KORELN, 0.7853982f, 3.717551f, 5606.35059f, 2432.88013f, 705.9351f, 5688.9f, 2538.981f, 714.6915f}, + {NPC_DARK_RANGER_KALIRA, NPC_ARCHMAGE_ELANDRA, 0.9599311f, 4.694936f, 5602.80371f, 2435.66846f, 705.9351f, 5685.069f, 2541.771f, 714.6915f}, + {NPC_COLISEUM_CHAMPION_H_T, NPC_COLISEUM_CHAMPION_A_P, 0.8552113f, 1.958489f, 5589.8125f, 2421.27075f, 705.9351f, 5669.351f, 2472.626f, 708.6959f}, + {NPC_COLISEUM_CHAMPION_H_T, NPC_COLISEUM_CHAMPION_A_P, 0.8552113f, 2.111848f, 5592.2666f, 2419.37842f, 705.9351f, 5665.927f, 2470.574f, 708.6959f}, + {NPC_COLISEUM_CHAMPION_H_T, NPC_COLISEUM_CHAMPION_A_P, 0.9075712f, 2.196496f, 5594.64746f, 2417.10767f, 705.9351f, 5662.503f, 2468.522f, 708.6958f}, + {NPC_COLISEUM_CHAMPION_H_M, NPC_COLISEUM_CHAMPION_A_M, 1.0646508f, 0.837758f, 5585.49854f, 2418.22925f, 705.9351f, 5624.832f, 2473.713f, 708.6959f}, + {NPC_COLISEUM_CHAMPION_H_M, NPC_COLISEUM_CHAMPION_A_M, 0.9424777f, 0.837758f, 5586.80029f, 2416.97388f, 705.9351f, 5627.443f, 2472.236f, 708.6959f}, + {NPC_COLISEUM_CHAMPION_H_M, NPC_COLISEUM_CHAMPION_A_M, 0.9250245f, 0.977384f, 5591.653f, 2412.89771f, 705.9351f, 5637.912f, 2465.69f, 708.6959f}, + {NPC_COLISEUM_CHAMPION_H_M, NPC_COLISEUM_CHAMPION_A_M, 0.8726646f, 0.977384f, 5593.93652f, 2410.875f, 705.9351f, 5642.629f, 2474.331f, 708.6959f} +}; + +class MANGOS_DLL_DECL instance_forge_of_souls : public ScriptedInstance +{ + public: + instance_forge_of_souls(Map* pMap); + ~instance_forge_of_souls() {} + + void Initialize(); + + void OnCreatureCreate(Creature* pCreature); + + void SetData(uint32 uiType, uint32 uiData); + uint32 GetData(uint32 uiType); + uint64 GetData64(uint32 uiData); + void SetData64(uint32 uiType, uint64 uiData); + + void OnPlayerEnter(Player* pPlayer); + void ProcessEventNpcs(Player* pPlayer, bool bChanged); + bool CheckAchievementCriteriaMeet(uint32 uiCriteriaId, Player const* pSource, Unit const* pTarget, uint32 uiMiscValue1 /* = 0*/); + + const char* Save() { return strInstData.c_str(); } + void Load(const char* chrIn); + + protected: + uint32 m_auiEncounter[MAX_ENCOUNTER]; + std::string strInstData; + + bool m_bCriteriaPhantomBlastFailed; + + uint32 m_uiTeam; // Team of first entered player, used to set if Jaina or Silvana to spawn + + uint64 m_uiBronjahmGUID; + uint64 m_uiDevourerOrSoulsGUID; + + std::list m_luiSoulFragmentAliveGUIDs; + std::list m_lEventMobGUIDs; +}; + +#endif diff --git a/scripts/northrend/icecrown_citadel/frozen_halls/forge_of_souls/instance_forge_of_souls.cpp b/scripts/northrend/icecrown_citadel/frozen_halls/forge_of_souls/instance_forge_of_souls.cpp index 350eda5..0b549a1 100644 --- a/scripts/northrend/icecrown_citadel/frozen_halls/forge_of_souls/instance_forge_of_souls.cpp +++ b/scripts/northrend/icecrown_citadel/frozen_halls/forge_of_souls/instance_forge_of_souls.cpp @@ -1,175 +1,222 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 -* This program is free software; you can redistribute it and/or modify -* it under the terms of the GNU General Public License as published by -* the Free Software Foundation; either version 2 of the License, or -* (at your option) any later version. -* -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program; if not, write to the Free Software -* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -*/ +/* Copyright (C) 2006 - 2011 ScriptDev2 + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: instance_forge_of_souls +SD%Complete: 90% +SDComment: TODO: Movement of the extro-event is missing, implementation unclear! +SDCategory: The Forge of Souls +EndScriptData */ #include "precompiled.h" -#include "def_forge.h" +#include "forge_of_souls.h" -struct MANGOS_DLL_DECL instance_forge_of_souls : public ScriptedInstance +instance_forge_of_souls::instance_forge_of_souls(Map* pMap) : ScriptedInstance(pMap), + m_bCriteriaPhantomBlastFailed(false), + m_uiTeam(0), + m_uiBronjahmGUID(0), + m_uiDevourerOrSoulsGUID(0) { - instance_forge_of_souls(Map* pMap) : ScriptedInstance(pMap) - { - Regular = pMap->IsRegularDifficulty(); - Initialize(); - } - - bool Regular; - bool needSave; - std::string strSaveData; - - //Creatures GUID - uint32 m_auiEncounter[MAX_ENCOUNTERS+1]; - uint64 m_uiBronjahmGUID; - uint64 m_uiDevourerGUID; - uint64 m_uiLiderGUID; + Initialize(); +} - void OpenDoor(uint64 guid) - { - if(!guid) return; - GameObject* pGo = instance->GetGameObject(guid); - if(pGo) pGo->SetGoState(GO_STATE_ACTIVE); - } +void instance_forge_of_souls::Initialize() +{ + memset(&m_auiEncounter, 0, sizeof(m_auiEncounter)); +} - void CloseDoor(uint64 guid) +void instance_forge_of_souls::OnCreatureCreate(Creature* pCreature) +{ + switch(pCreature->GetEntry()) { - if(!guid) return; - GameObject* pGo = instance->GetGameObject(guid); - if(pGo) pGo->SetGoState(GO_STATE_READY); + case NPC_BRONJAHM: m_uiBronjahmGUID = pCreature->GetGUID(); break; + case NPC_DEVOURER: m_uiDevourerOrSoulsGUID = pCreature->GetGUID(); break; + case NPC_CORRUPTED_SOUL_FRAGMENT: m_luiSoulFragmentAliveGUIDs.push_back(pCreature->GetGUID()); break; } +} - void Initialize() +void instance_forge_of_souls::OnPlayerEnter(Player* pPlayer) +{ + if (!m_uiTeam) // very first player to enter { - for (uint8 i = 0; i < MAX_ENCOUNTERS; ++i) - m_auiEncounter[i] = NOT_STARTED; - m_uiBronjahmGUID =0; - m_uiDevourerGUID =0; + m_uiTeam = pPlayer->GetTeam(); + ProcessEventNpcs(pPlayer, false); } +} - void OnCreatureCreate(Creature* pCreature) - { - switch(pCreature->GetEntry()) - { - case NPC_DEVOURER: - m_uiDevourerGUID = pCreature->GetGUID(); - break; - case NPC_BRONJAHM: - m_uiBronjahmGUID = pCreature->GetGUID(); - break; - } - } +void instance_forge_of_souls::ProcessEventNpcs(Player* pPlayer, bool bChanged) +{ + if (!pPlayer) + return; - void OnObjectCreate(GameObject* pGo) + if (m_auiEncounter[0] != DONE || m_auiEncounter[1] != DONE) { - switch(pGo->GetEntry()) + // Spawn Begin Mobs + for (uint8 i = 0; i < sizeof(aEventBeginLocations)/sizeof(sIntoEventNpcSpawnLocations); ++i) { + if (Creature* pSummon = pPlayer->SummonCreature(m_uiTeam == HORDE ? aEventBeginLocations[i].uiEntryHorde : aEventBeginLocations[i].uiEntryAlliance, + aEventBeginLocations[i].fSpawnX, aEventBeginLocations[i].fSpawnY, aEventBeginLocations[i].fSpawnZ, aEventBeginLocations[i].fSpawnO, TEMPSUMMON_DEAD_DESPAWN, 24*HOUR*IN_MILLISECONDS)) + m_lEventMobGUIDs.push_back(pSummon->GetGUID()); } } - void SetData(uint32 uiType, uint32 uiData) + else { - switch(uiType) + // if bChanged, despawn Begin Mobs, spawn End Mobs at Spawn, else spawn EndMobs at End + if (bChanged) { - case TYPE_INTRO: m_auiEncounter[0] = uiData; break; - case TYPE_BRONJAHM: m_auiEncounter[1] = uiData; break; - case TYPE_DEVOURER: m_auiEncounter[2] = uiData; break; - default: break; + for (std::list::const_iterator itr = m_lEventMobGUIDs.begin(); itr != m_lEventMobGUIDs.end(); ++itr) + { + if (Creature* pSummoned = instance->GetCreature(*itr)) + pSummoned->ForcedDespawn(); + } + + for (uint8 i = 0; i < sizeof(aEventEndLocations)/sizeof(sExtroEventNpcLocations); ++i) + { + pPlayer->SummonCreature(m_uiTeam == HORDE ? aEventEndLocations[i].uiEntryHorde : aEventEndLocations[i].uiEntryAlliance, + aEventEndLocations[i].fSpawnX, aEventEndLocations[i].fSpawnY, aEventEndLocations[i].fSpawnZ, aEventEndLocations[i].fStartO, TEMPSUMMON_DEAD_DESPAWN, 24*HOUR*IN_MILLISECONDS); + + // TODO: Let the NPCs Move along their paths + } } - - if (uiData == DONE) - { - OUT_SAVE_INST_DATA; - - std::ostringstream saveStream; - - for(uint8 i = 0; i < MAX_ENCOUNTERS; ++i) - saveStream << m_auiEncounter[i] << " "; - - strSaveData = saveStream.str(); - - SaveToDB(); - OUT_SAVE_INST_DATA_COMPLETE; + else + { // Summon at end, without event + for (uint8 i = 0; i < sizeof(aEventEndLocations)/sizeof(sExtroEventNpcLocations); ++i) + { + pPlayer->SummonCreature(m_uiTeam == HORDE ? aEventEndLocations[i].uiEntryHorde : aEventEndLocations[i].uiEntryAlliance, + aEventEndLocations[i].fEndX, aEventEndLocations[i].fEndY, aEventEndLocations[i].fEndZ, aEventEndLocations[i].fEndO, TEMPSUMMON_DEAD_DESPAWN, 24*HOUR*IN_MILLISECONDS); + } } } +} - const char* Save() +bool instance_forge_of_souls::CheckAchievementCriteriaMeet(uint32 uiCriteriaId, Player const* pSource, Unit const* pTarget, uint32 uiMiscValue1 /* = 0*/) +{ + switch (uiCriteriaId) { - return strSaveData.c_str(); + case ACHIEV_CRIT_SOUL_POWER: + return m_luiSoulFragmentAliveGUIDs.size() >= 4; + case ACHIEV_CRIT_PHANTOM_BLAST: + return !m_bCriteriaPhantomBlastFailed; + default: + return 0; } +} - uint32 GetData(uint32 uiType) +void instance_forge_of_souls::SetData(uint32 uiType, uint32 uiData) +{ + switch(uiType) { - switch(uiType) - { - case TYPE_INTRO: return m_auiEncounter[0]; - case TYPE_BRONJAHM: return m_auiEncounter[1]; - case TYPE_DEVOURER: return m_auiEncounter[2]; - } - return 0; + case TYPE_BRONJAHM: + m_auiEncounter[0] = uiData; + + // Despawn remaining adds and clear list + for (std::list::const_iterator itr = m_luiSoulFragmentAliveGUIDs.begin(); itr != m_luiSoulFragmentAliveGUIDs.end(); ++itr) + { + if (Creature* pFragment = instance->GetCreature(*itr)) + pFragment->ForcedDespawn(); + } + m_luiSoulFragmentAliveGUIDs.clear(); + break; + case TYPE_DEVOURER: + m_auiEncounter[1] = uiData; + if (uiData == DONE) + ProcessEventNpcs(GetPlayerInMap(), true); + break; + case TYPE_ACHIEV_PHANTOM_BLAST: + m_bCriteriaPhantomBlastFailed = (uiData == FAIL); + return; } - uint64 GetData64(uint32 uiData) + if (uiData == DONE) { - switch(uiData) - { - case NPC_BRONJAHM: return m_uiBronjahmGUID; - case NPC_DEVOURER: return m_uiDevourerGUID; - case DATA_LIDER: return m_uiLiderGUID; - } - return 0; + OUT_SAVE_INST_DATA; + + std::ostringstream saveStream; + saveStream << m_auiEncounter[0] << " " << m_auiEncounter[1]; + + strInstData = saveStream.str(); + + SaveToDB(); + OUT_SAVE_INST_DATA_COMPLETE; } +} - void SetData64(uint32 uiData, uint64 uiGuid) +void instance_forge_of_souls::Load(const char* chrIn) +{ + if (!chrIn) { - switch(uiData) - { - case DATA_LIDER: m_uiLiderGUID = uiGuid; - } + OUT_LOAD_INST_DATA_FAIL; + return; } - void Load(const char* chrIn) - { - if (!chrIn) - { - OUT_LOAD_INST_DATA_FAIL; - return; - } + OUT_LOAD_INST_DATA(chrIn); - OUT_LOAD_INST_DATA(chrIn); + std::istringstream loadStream(chrIn); + loadStream >> m_auiEncounter[0] >> m_auiEncounter[1]; - std::istringstream loadStream(chrIn); + for(uint8 i = 0; i < MAX_ENCOUNTER; ++i) + { + if (m_auiEncounter[i] == IN_PROGRESS) + m_auiEncounter[i] = NOT_STARTED; + } - for(uint8 i = 0; i < MAX_ENCOUNTERS; ++i) - { - loadStream >> m_auiEncounter[i]; + OUT_LOAD_INST_DATA_COMPLETE; +} - if (m_auiEncounter[i] == IN_PROGRESS) - m_auiEncounter[i] = NOT_STARTED; - } +uint32 instance_forge_of_souls::GetData(uint32 uiType) +{ + switch(uiType) + { + case TYPE_BRONJAHM: + return m_auiEncounter[0]; + case TYPE_DEVOURER: + return m_auiEncounter[1]; + default: + return 0; + } +} - OUT_LOAD_INST_DATA_COMPLETE; +uint64 instance_forge_of_souls::GetData64(uint32 uiData) +{ + switch(uiData) + { + case NPC_BRONJAHM: + return m_uiBronjahmGUID; + case NPC_DEVOURER: + return m_uiDevourerOrSoulsGUID; + default: + return 0; } -}; +} + +void instance_forge_of_souls::SetData64(uint32 uiType, uint64 uiData) +{ + if (uiType == DATA_SOULFRAGMENT_REMOVE) + m_luiSoulFragmentAliveGUIDs.remove(uiData); +} InstanceData* GetInstanceData_instance_forge_of_souls(Map* pMap) { return new instance_forge_of_souls(pMap); } - void AddSC_instance_forge_of_souls() { Script* pNewScript; + pNewScript = new Script; pNewScript->Name = "instance_forge_of_souls"; pNewScript->GetInstanceData = &GetInstanceData_instance_forge_of_souls; diff --git a/scripts/northrend/icecrown_citadel/frozen_halls/halls_of_reflection/boss_falric.cpp b/scripts/northrend/icecrown_citadel/frozen_halls/halls_of_reflection/boss_falric.cpp index 7dc943b..8f651a8 100644 --- a/scripts/northrend/icecrown_citadel/frozen_halls/halls_of_reflection/boss_falric.cpp +++ b/scripts/northrend/icecrown_citadel/frozen_halls/halls_of_reflection/boss_falric.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/scripts/northrend/icecrown_citadel/frozen_halls/halls_of_reflection/boss_lich_king.cpp b/scripts/northrend/icecrown_citadel/frozen_halls/halls_of_reflection/boss_lich_king.cpp index 04eeaa7..a6f5978 100644 --- a/scripts/northrend/icecrown_citadel/frozen_halls/halls_of_reflection/boss_lich_king.cpp +++ b/scripts/northrend/icecrown_citadel/frozen_halls/halls_of_reflection/boss_lich_king.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/scripts/northrend/icecrown_citadel/frozen_halls/halls_of_reflection/boss_marwyn.cpp b/scripts/northrend/icecrown_citadel/frozen_halls/halls_of_reflection/boss_marwyn.cpp index b34437d..5b58a71 100644 --- a/scripts/northrend/icecrown_citadel/frozen_halls/halls_of_reflection/boss_marwyn.cpp +++ b/scripts/northrend/icecrown_citadel/frozen_halls/halls_of_reflection/boss_marwyn.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/scripts/northrend/icecrown_citadel/frozen_halls/halls_of_reflection/halls_of_reflection.cpp b/scripts/northrend/icecrown_citadel/frozen_halls/halls_of_reflection/halls_of_reflection.cpp index 5662ef3..22bf376 100644 --- a/scripts/northrend/icecrown_citadel/frozen_halls/halls_of_reflection/halls_of_reflection.cpp +++ b/scripts/northrend/icecrown_citadel/frozen_halls/halls_of_reflection/halls_of_reflection.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/scripts/northrend/icecrown_citadel/frozen_halls/halls_of_reflection/halls_of_reflection.h b/scripts/northrend/icecrown_citadel/frozen_halls/halls_of_reflection/halls_of_reflection.h index b53e72e..9702c1d 100644 --- a/scripts/northrend/icecrown_citadel/frozen_halls/halls_of_reflection/halls_of_reflection.h +++ b/scripts/northrend/icecrown_citadel/frozen_halls/halls_of_reflection/halls_of_reflection.h @@ -1,3 +1,3 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/scripts/northrend/icecrown_citadel/frozen_halls/halls_of_reflection/instance_halls_of_reflection.cpp b/scripts/northrend/icecrown_citadel/frozen_halls/halls_of_reflection/instance_halls_of_reflection.cpp index 28699e7..3cefc23 100644 --- a/scripts/northrend/icecrown_citadel/frozen_halls/halls_of_reflection/instance_halls_of_reflection.cpp +++ b/scripts/northrend/icecrown_citadel/frozen_halls/halls_of_reflection/instance_halls_of_reflection.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/boss_forgemaster_garfrost.cpp b/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/boss_forgemaster_garfrost.cpp index 771760d..aeb2482 100644 --- a/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/boss_forgemaster_garfrost.cpp +++ b/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/boss_forgemaster_garfrost.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or @@ -15,53 +15,19 @@ */ /* ScriptData -SDName: boss_forgemaster_gafrost -SD%Complete: 60% -SDComment: by Tacx +SDName: boss_forgemaster_garfrost +SD%Complete: 70 +SDComment: TODO movement to the forges currently workaround (need core support for Jump-MMGen) SDCategory: Pit of Saron EndScriptData */ #include "precompiled.h" #include "pit_of_saron.h" -enum -{ - //common - SPELL_BERSERK = 47008, - //yells - SAY_AGGRO = -1658001, - SAY_SLAY_1 = -1658002, - SAY_SLAY_2 = -1658003, - SAY_DEATH = -1658004, - SAY_PHASE2 = -1658005, - SAY_PHASE3 = -1658006, - SAY_DEEPFREZE = -1658006, - SAY_TYRANNUS_DEATH = -1659007, - //summons - //Abilities - SPELL_PERMAFROST = 70326, - SPELL_PERMAFROST_TRIGGER = 68786, - SPELL_THROW_SARONITE = 68788, - SPELL_THUNDERING_STOMP = 68771, - SPELL_CHILLING_WAVE = 68778, - SPELL_CHILLING_WAVE_H = 70333, - SPELL_DEEP_FREEZE = 70381, - SPELL_DEEP_FREEZE_H = 72930, - SPELL_FORGE_MACE = 68785, - SPELL_FORGE_MACE_H = 70335, - SPELL_FORGE_BLADE = 68774, - SPELL_FORGE_BLADE_H = 70334, - EQUIP_ID_SWORD = 49345, - EQUIP_ID_MACE = 49344, - ACHIEV_DOESNT_GO_TO_ELEVEN = 4524 - -}; - -/* enum saysSD2 { SAY_AGGRO = -1658014, SAY_SLAY_1 = -1658015, - SAY_BOULDER_HIT = -1658016, + SAY_BOULDER_HIT = -1658016, // TODO How must this be handled? SAY_DEATH = -1658017, SAY_FORGE_1 = -1658018, SAY_FORGE_2 = -1658019, @@ -70,8 +36,26 @@ enum saysSD2 EMOTE_THROW_SARONITE = -1658022, EMOTE_DEEP_FREEZE = -1658023, + + SPELL_PERMAFROST = 70326, + SPELL_THROW_SARONITE = 68788, + SPELL_THUNDERING_STOMP = 68771, + SPELL_FORGE_FROZEN_BLADE = 68774, + SPELL_CHILLING_WAVE = 68778, + SPELL_FORGE_FROSTBORN_MACE = 68785, + SPELL_DEEP_FREEZE = 70381, + + PHASE_NO_ENCHANTMENT = 1, + PHASE_BLADE_ENCHANTMENT = 2, + PHASE_MACE_ENCHANTMENT = 3, + PHASE_MOVEMENT = 4, +}; + +static const float aGarfrostMoveLocs[2][3] = +{ + {719.785f, -230.227f, 527.033f}, + {657.539f, -203.564f, 526.691f}, }; -*/ struct MANGOS_DLL_DECL boss_forgemaster_garfrostAI : public ScriptedAI { @@ -81,163 +65,165 @@ struct MANGOS_DLL_DECL boss_forgemaster_garfrostAI : public ScriptedAI Reset(); } - ScriptedInstance *m_pInstance; - + ScriptedInstance* m_pInstance; - bool m_bIsRegularMode; - bool m_bIsPhase2; - bool m_bIsPhase3; - bool m_bIsAchievement; - - uint32 m_uiThrowSaronite_Timer; - uint32 m_uiChillingWave_Timer; - uint32 m_uiDeepFreeze_Timer; - uint32 m_uiBladeReturn_Timer; - uint32 m_uiMaceReturn_Timer; + uint32 m_uiThrowSaroniteTimer; + uint32 m_uiPhase; + uint32 m_uiChillingWaveTimer; + uint32 m_uiDeepFreezeTimer; void Reset() { - m_bIsPhase2 = false; - m_bIsPhase3 = false; - m_bIsAchievement = true; - m_uiThrowSaronite_Timer = 20000; - m_uiChillingWave_Timer = 9990000; - m_uiDeepFreeze_Timer = 9990000; - m_uiBladeReturn_Timer = 4500; - m_uiMaceReturn_Timer = 6000; - - if(!m_pInstance) return; - m_pInstance->SetData(TYPE_GARFROST, NOT_STARTED); + m_uiThrowSaroniteTimer = 13000; + m_uiChillingWaveTimer = 10000; + m_uiDeepFreezeTimer = 10000; + SetCombatMovement(true); + m_uiPhase = PHASE_NO_ENCHANTMENT; } - void Aggro(Unit *who) + void Aggro(Unit* pWho) { - DoScriptText(SAY_AGGRO, m_creature); - DoCast(m_creature, SPELL_PERMAFROST); - if(!m_pInstance) return; - m_pInstance->SetData(TYPE_GARFROST, IN_PROGRESS); + DoScriptText(SAY_AGGRO, m_creature, pWho); + DoCastSpellIfCan(m_creature, SPELL_PERMAFROST); } - void KilledUnit(Unit* victim) + void JustDied(Unit* pKiller) { - switch (urand(0,1)) - { - case 0: DoScriptText(SAY_SLAY_1, m_creature); break; - case 1: DoScriptText(SAY_SLAY_2, m_creature); break; - } + DoScriptText(SAY_DEATH, m_creature, pKiller); } - void JustDied(Unit* pkiller) + void KilledUnit() { - DoScriptText(SAY_DEATH, m_creature); - if(!m_pInstance) return; - m_pInstance->SetData(TYPE_GARFROST, DONE); + DoScriptText(SAY_SLAY_1, m_creature); } - void UpdateAI(const uint32 diff) + void MovementInform(uint32 uiMotionType, uint32 uiPointId) { - if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + // TODO Change to jump movement type when proper implemented + if (uiMotionType != POINT_MOTION_TYPE) return; - if (((m_creature->GetHealth()*100 / m_creature->GetMaxHealth()) < 66) && !m_bIsPhase2) - { - m_bIsPhase2 = true; - DoScriptText(SAY_PHASE2, m_creature); - DoCast(m_creature, SPELL_THUNDERING_STOMP); - m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE|UNIT_FLAG_NOT_SELECTABLE); - m_creature->GetMotionMaster()->Clear(); - m_creature->GetMotionMaster()->MovePoint(0, 654.021f, -201.438f, 526.699f); - } + if (uiPointId != PHASE_BLADE_ENCHANTMENT && uiPointId != PHASE_MACE_ENCHANTMENT) + return; - if (((m_creature->GetHealth()*100 / m_creature->GetMaxHealth()) < 33) && !m_bIsPhase3) + // Cast and say expected spell + DoCastSpellIfCan(m_creature, uiPointId == PHASE_BLADE_ENCHANTMENT ? SPELL_FORGE_FROZEN_BLADE : SPELL_FORGE_FROSTBORN_MACE); + DoScriptText(uiPointId == PHASE_BLADE_ENCHANTMENT ? SAY_FORGE_1 : SAY_FORGE_2, m_creature); + + m_uiThrowSaroniteTimer += 5000; // Delay next Saronit + m_uiPhase = uiPointId; + SetCombatMovement(true); + + if (m_creature->getVictim()) { - m_bIsPhase3 = true; - DoScriptText(SAY_PHASE3, m_creature); - DoCast(m_creature, SPELL_THUNDERING_STOMP); - m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE|UNIT_FLAG_NOT_SELECTABLE); m_creature->GetMotionMaster()->Clear(); - m_creature->GetMotionMaster()->MovePoint(0, 718.009f, -229.447f, 526.847f); + m_creature->GetMotionMaster()->MoveChase(m_creature->getVictim()); } + } - if (m_bIsPhase2) - { - if (m_uiBladeReturn_Timer < diff) - { - DoCast(m_creature, m_bIsRegularMode ? SPELL_FORGE_BLADE : SPELL_FORGE_BLADE_H); - SetEquipmentSlots(false, EQUIP_ID_SWORD, -1, -1); - m_creature->SetByteValue(UNIT_FIELD_BYTES_2, 0, SHEATH_STATE_MELEE); - m_creature->GetMotionMaster()->Clear(); - m_creature->GetMotionMaster()->MoveChase(m_creature->getVictim()); - m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE|UNIT_FLAG_NOT_SELECTABLE); - m_uiBladeReturn_Timer = 9900000; - } - else - m_uiBladeReturn_Timer -= diff; + void UpdateAI(const uint32 uiDiff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + return; - m_uiChillingWave_Timer = 10000; - } + // Do nothing more while moving + if (m_uiPhase == PHASE_MOVEMENT) + return; - if (m_bIsPhase3) + // Casted in every phase + if (m_uiThrowSaroniteTimer < uiDiff) { - if (m_uiMaceReturn_Timer < diff) + // TODO - only target players? + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) { - m_creature->RemoveAurasDueToSpell(m_bIsRegularMode ? SPELL_FORGE_BLADE : SPELL_FORGE_BLADE_H); - DoCast(m_creature, m_bIsRegularMode ? SPELL_FORGE_MACE : SPELL_FORGE_MACE_H); - SetEquipmentSlots(false, EQUIP_ID_MACE, -1, -1); - m_creature->SetByteValue(UNIT_FIELD_BYTES_2, 0, SHEATH_STATE_MELEE); - m_creature->GetMotionMaster()->Clear(); - m_creature->GetMotionMaster()->MoveChase(m_creature->getVictim()); - m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE|UNIT_FLAG_NOT_SELECTABLE); - m_uiMaceReturn_Timer = 9900000; + if (DoCastSpellIfCan(pTarget, SPELL_THROW_SARONITE) == CAST_OK) + { + DoScriptText(EMOTE_THROW_SARONITE, m_creature, pTarget); + m_uiThrowSaroniteTimer = 16000; + } } - else - m_uiMaceReturn_Timer -= diff; - m_uiChillingWave_Timer = 999000; - m_uiDeepFreeze_Timer = 10000; } + else + m_uiThrowSaroniteTimer -= uiDiff; - if (m_uiThrowSaronite_Timer < diff) + switch (m_uiPhase) { - if (Unit* Target = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) - DoCast(Target, SPELL_THROW_SARONITE); - m_uiThrowSaronite_Timer = (m_bIsRegularMode ? 20000 : 25000); - } - else - m_uiThrowSaronite_Timer -= diff; - - if (m_uiChillingWave_Timer < diff) - { - DoCast(m_creature, SPELL_CHILLING_WAVE); - m_uiChillingWave_Timer = (m_bIsRegularMode ? 40000 : 30000); - } - else - m_uiChillingWave_Timer -= diff; - - if (m_uiDeepFreeze_Timer < diff) - { - if (Unit* Target = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) - DoCast(Target, m_bIsRegularMode ? SPELL_DEEP_FREEZE : SPELL_DEEP_FREEZE_H); - m_uiDeepFreeze_Timer = (m_bIsRegularMode ? 27500 : 25000); + case PHASE_NO_ENCHANTMENT: + { + if (m_creature->GetHealthPercent() < 66.0f) + { + DoCastSpellIfCan(m_creature, SPELL_THUNDERING_STOMP, CAST_INTERRUPT_PREVIOUS); + SetCombatMovement(false); + + // TODO This should actually be jump movement + m_creature->GetMotionMaster()->MovePoint(PHASE_BLADE_ENCHANTMENT, aGarfrostMoveLocs[0][0], aGarfrostMoveLocs[0][1], aGarfrostMoveLocs[0][2]); + m_uiPhase = PHASE_MOVEMENT; + + // Stop further action + return; + } + break; + } + case PHASE_BLADE_ENCHANTMENT: + { + if (m_creature->GetHealthPercent() < 33.0f) + { + DoCastSpellIfCan(m_creature, SPELL_THUNDERING_STOMP, CAST_INTERRUPT_PREVIOUS); + SetCombatMovement(false); + + // TODO This should actually be jump movement + m_creature->GetMotionMaster()->MovePoint(PHASE_MACE_ENCHANTMENT, aGarfrostMoveLocs[1][0], aGarfrostMoveLocs[1][1], aGarfrostMoveLocs[1][2]); + m_uiPhase = PHASE_MOVEMENT; + + // Stop further action + return; + } + + if (m_uiChillingWaveTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_CHILLING_WAVE) == CAST_OK) + m_uiChillingWaveTimer = 14000; + } + else + m_uiChillingWaveTimer -= uiDiff; + + break; + } + case PHASE_MACE_ENCHANTMENT: + { + if (m_uiDeepFreezeTimer < uiDiff) + { + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) + { + if (DoCastSpellIfCan(pTarget, SPELL_DEEP_FREEZE) == CAST_OK) + { + DoScriptText(EMOTE_DEEP_FREEZE, m_creature, pTarget); + m_uiDeepFreezeTimer = 20000; + } + } + } + else + m_uiDeepFreezeTimer -= uiDiff; + + break; + } } - else - m_uiDeepFreeze_Timer -= diff; DoMeleeAttackIfReady(); } }; - CreatureAI* GetAI_boss_forgemaster_garfrost(Creature* pCreature) { return new boss_forgemaster_garfrostAI(pCreature); } - void AddSC_boss_garfrost() { - Script *newscript; - newscript = new Script; - newscript->Name = "boss_forgemaster_garfrost"; - newscript->GetAI = &GetAI_boss_forgemaster_garfrost; - newscript->RegisterSelf(); + Script* pNewScript; + + pNewScript = new Script; + pNewScript->Name = "boss_forgemaster_garfrost"; + pNewScript->GetAI = &GetAI_boss_forgemaster_garfrost; + pNewScript->RegisterSelf(); } diff --git a/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/boss_krick_and_ick.cpp b/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/boss_krick_and_ick.cpp index 6667a59..0bf790d 100644 --- a/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/boss_krick_and_ick.cpp +++ b/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/boss_krick_and_ick.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or @@ -15,115 +15,287 @@ */ /* ScriptData -SDName: boss_ick && boss_krick -SD%Complete: 1% -SDComment: by ..., modified by /dev/rsa +SDName: boss_krick_and_ick +SD%Complete: 0% +SDComment: encounter need vehicle support; outro is missing; explosive barrage doesn't work fine; pursue doesn't work fine SDCategory: Pit of Saron EndScriptData */ #include "precompiled.h" #include "pit_of_saron.h" + enum { - //common - SPELL_BERSERK = 47008, - //yells - //summons - NPC_EXPLODING_ORB = 36610, - //Abilities - SPELL_FEAR = 68950, - SPELL_EXPLOSIVE_ORB = 69019, - SPELL_EXPLOSIVE = 69012, - SPELL_SHADOWBOLT = 69028, - SPELL_STRANGULATE = 69413, - SPELL_TOXIC = 69024, - SPELL_KICK = 69021, - SPELL_POISON = 68989, - SPELL_POISON_H = 70434, - SPELL_PURSUIT = 68987, - SPELL_PUSTULANT = 69581, - SPELL_CONFUSION = 69029, + SAY_AGGRO = -1658024, + SAY_SLAY_1 = -1658025, + SAY_SLAY_2 = -1658026, + SAY_ORDER_STOP = -1658027, + SAY_ORDER_BLOW = -1658028, + SAY_TARGET_1 = -1658029, + SAY_TARGET_2 = -1658030, + SAY_TARGET_3 = -1658031, + + EMOTE_KRICK_MINES = -1658032, + EMOTE_ICK_POISON = -1658033, + EMOTE_ICK_CHASING = -1658034, + + SAY_OUTRO_1 = -1658035, + SAY_JAINA_KRICK_1 = -1658036, + SAY_SYLVANAS_KRICK_1 = -1658037, + SAY_OUTRO_2 = -1658038, + SAY_JAINA_KRICK_2 = -1658039, + SAY_SYLVANAS_KRICK_2 = -1658040, + SAY_OUTRO_3 = -1658041, + SAY_TYRANNUS_KRICK_1 = -1658042, + SAY_OUTRO_4 = -1658043, + SAY_TYRANNUS_KRICK_2 = -1658044, + SAY_JAINA_KRICK_3 = -1658045, + SAY_SYLVANAS_KRICK_3 = -1658046, + + // ick + SPELL_POISON_NOVA = 68989, + SPELL_POISON_NOVA_H = 70434, + SPELL_MIGHTY_KICK = 69021, + SPELL_PURSUED = 68987, + + // krick + SPELL_TOXIC_WASTE = 69024, + SPELL_TOXIC_WASTE_H = 70436, + SPELL_STRANGULATING = 69413, // spell used by tyrannus at the outro event + SPELL_SHADOW_BOLT = 69028, + SPELL_EXPLOSIVE_BARRAGE = 69263, // maybe 69012? + + NPC_EXPLOSIVE_ORB = 36610, + SPELL_EXPLOSIVE_BARRAGE_ORB = 69019, }; -struct MANGOS_DLL_DECL boss_krickAI : public ScriptedAI +struct MANGOS_DLL_DECL boss_ickAI : public ScriptedAI { - boss_krickAI(Creature* pCreature) : ScriptedAI(pCreature) + boss_ickAI(Creature *pCreature) : ScriptedAI(pCreature) { - pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); - Regular = pCreature->GetMap()->IsRegularDifficulty(); + m_pInstance = (instance_pit_of_saron*)pCreature->GetInstanceData(); + m_bIsRegularMode = pCreature->GetMap()->IsRegularDifficulty(); Reset(); } - bool Regular; - ScriptedInstance *pInstance; + instance_pit_of_saron* m_pInstance; + bool m_bIsRegularMode; + + uint32 m_uiPoisonNovaTimer; + uint32 m_uiPursueTimer; + uint32 m_uiMightKickTimer; void Reset() { - if(pInstance) pInstance->SetData(TYPE_KRICK, NOT_STARTED); + m_uiPoisonNovaTimer = 30000; + m_uiPursueTimer = 10000; + m_uiMightKickTimer = 20000; } - void Aggro(Unit *who) + void KilledUnit(Unit* pVictim) { - if(pInstance) pInstance->SetData(TYPE_KRICK, IN_PROGRESS); + if(Creature* pKrick = m_pInstance->instance->GetCreature(m_pInstance->GetData64(NPC_KRICK))) + DoScriptText(urand(0, 1) ? SAY_SLAY_1 : SAY_SLAY_2, pKrick); } - void JustDied(Unit *killer) + void Aggro(Unit* pWho) { - if(pInstance) pInstance->SetData(TYPE_KRICK, DONE); + if (m_pInstance) + m_pInstance->SetData(TYPE_KRICK, IN_PROGRESS); } - void UpdateAI(const uint32 diff) + void JustDied(Unit* pKiller) + { + if (m_pInstance) + m_pInstance->SetData(TYPE_KRICK, DONE); + + // ToDo - remove this when outro implemented + if(Creature* pKrick = m_pInstance->instance->GetCreature(m_pInstance->GetData64(NPC_KRICK))) + pKrick->DealDamage(pKrick, pKrick->GetMaxHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false); + } + + void JustReachedHome() + { + if (m_pInstance) + m_pInstance->SetData(TYPE_KRICK, FAIL); + } + + void UpdateAI(const uint32 uiDiff) { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; + if (m_uiPoisonNovaTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature, m_bIsRegularMode ? SPELL_POISON_NOVA : SPELL_POISON_NOVA_H)) + { + if(Creature* pKrick = m_pInstance->instance->GetCreature(m_pInstance->GetData64(NPC_KRICK))) + DoScriptText(SAY_ORDER_BLOW, pKrick); + m_uiPoisonNovaTimer = 30000; + } + } + else + m_uiPoisonNovaTimer -= uiDiff; + + if (m_uiPursueTimer < uiDiff) + { + if (Unit *pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) + { + if (DoCastSpellIfCan(pTarget, SPELL_PURSUED) == CAST_OK) + { + if(Creature* pKrick = m_pInstance->instance->GetCreature(m_pInstance->GetData64(NPC_KRICK))) + { + switch (urand(0, 2)) + { + case 0: + DoScriptText(SAY_TARGET_1, pKrick); + break; + case 1: + DoScriptText(SAY_TARGET_2, pKrick); + break; + case 2: + DoScriptText(SAY_TARGET_3, pKrick); + break; + } + } + + DoScriptText(EMOTE_ICK_CHASING, m_creature, pTarget); + + m_uiPursueTimer = 13000; + } + } + } + else + m_uiPursueTimer -= uiDiff; + + if (m_uiMightKickTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_MIGHTY_KICK) == CAST_OK) + m_uiMightKickTimer = 25000; + } + else + m_uiMightKickTimer -= uiDiff; + DoMeleeAttackIfReady(); } }; -struct MANGOS_DLL_DECL boss_ickAI : public ScriptedAI +struct MANGOS_DLL_DECL boss_krickAI : public ScriptedAI { - boss_ickAI(Creature* pCreature) : ScriptedAI(pCreature) + boss_krickAI(Creature *pCreature) : ScriptedAI(pCreature) { - pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); - Regular = pCreature->GetMap()->IsRegularDifficulty(); + m_pInstance = (instance_pit_of_saron*)pCreature->GetInstanceData(); + m_bIsRegularMode = pCreature->GetMap()->IsRegularDifficulty(); Reset(); } - bool Regular; - ScriptedInstance *pInstance; + instance_pit_of_saron* m_pInstance; + bool m_bIsRegularMode; - void Reset() - { - } - - void Aggro(Unit *who) - { - } + uint32 m_uiToxicWasteTimer; + uint32 m_uiShadowboltTimer; + uint32 m_uiExplosivBarrageTimer; + // workaround + uint32 m_uiSummonOrbsTimer; + uint32 m_uiSummonOverTimer; + bool m_bIsSummoning; - void JustDied(Unit *killer) + void Reset() { + m_uiToxicWasteTimer = 5000; + m_uiShadowboltTimer = 15000; + m_uiExplosivBarrageTimer = 35000; + // workaround + m_uiSummonOrbsTimer = 600000; + m_uiSummonOverTimer = 600000; + m_bIsSummoning = false; } - void UpdateAI(const uint32 diff) + void UpdateAI(const uint32 uiDiff) { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; - DoMeleeAttackIfReady(); + if (m_uiToxicWasteTimer < uiDiff) + { + if(Creature* pIck = m_pInstance->instance->GetCreature(m_pInstance->GetData64(NPC_ICK))) + { + if (Unit* pTarget = pIck->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) + { + if (DoCastSpellIfCan(pTarget, m_bIsRegularMode ? SPELL_TOXIC_WASTE : SPELL_TOXIC_WASTE_H) == CAST_OK) + m_uiToxicWasteTimer = 10000; + } + } + } + else + m_uiToxicWasteTimer -= uiDiff; + + if (m_uiShadowboltTimer < uiDiff) + { + if(Creature* pIck = m_pInstance->instance->GetCreature(m_pInstance->GetData64(NPC_ICK))) + { + if (Unit* pTarget = pIck->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) + { + if (DoCastSpellIfCan(pTarget, SPELL_SHADOW_BOLT) == CAST_OK) + m_uiShadowboltTimer = 5000; + } + } + } + else + m_uiShadowboltTimer -= uiDiff; + + if (m_uiExplosivBarrageTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature, SPELL_EXPLOSIVE_BARRAGE) == CAST_OK) + { + DoScriptText(SAY_ORDER_STOP, m_creature); + DoScriptText(EMOTE_KRICK_MINES, m_creature); + m_uiExplosivBarrageTimer = 45000; + } + + // workaround + m_uiSummonOrbsTimer = 3000; + m_uiSummonOverTimer = 18000; + m_bIsSummoning = true; + } + else + m_uiExplosivBarrageTimer -= uiDiff; + + // workaround + if (m_uiSummonOrbsTimer < uiDiff && m_bIsSummoning) + { + for(uint8 i = 0; i < 4; ++i) + { + if(Creature* pIck = GetClosestCreatureWithEntry(m_creature, NPC_ICK, 100.0f)) + { + if (Unit* pTarget = pIck->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) + m_creature->SummonCreature(NPC_EXPLOSIVE_ORB, pTarget->GetPositionX() + urand(0, 3), pTarget->GetPositionY() + urand(0, 3), pTarget->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN, 4000); + } + } + m_uiSummonOrbsTimer = 1500; + } + else + m_uiSummonOrbsTimer -= uiDiff; + + if (m_uiSummonOverTimer < uiDiff && m_bIsSummoning) + { + m_bIsSummoning = false; + m_uiSummonOverTimer = 60000; + } + else + m_uiSummonOverTimer -= uiDiff; } }; -CreatureAI* GetAI_boss_krick(Creature* pCreature) +CreatureAI* GetAI_boss_ick(Creature* pCreature) { - return new boss_krickAI(pCreature); + return new boss_ickAI (pCreature); } -CreatureAI* GetAI_boss_ick(Creature* pCreature) +CreatureAI* GetAI_boss_krick(Creature* pCreature) { - return new boss_ickAI(pCreature); + return new boss_krickAI (pCreature); } - struct MANGOS_DLL_DECL mob_exploding_orbAI : public ScriptedAI { mob_exploding_orbAI(Creature *pCreature) : ScriptedAI(pCreature) @@ -152,7 +324,7 @@ struct MANGOS_DLL_DECL mob_exploding_orbAI : public ScriptedAI if (ExplodeTimer < diff) { - DoCast(m_creature, SPELL_EXPLOSIVE_ORB); + DoCast(m_creature, SPELL_EXPLOSIVE_BARRAGE_ORB); m_creature->ForcedDespawn(); } else ExplodeTimer -= diff; return; @@ -165,36 +337,6 @@ CreatureAI* GetAI_mob_exploding_orb(Creature* pCreature) return new mob_exploding_orbAI(pCreature); } - -enum -{ - SAY_AGGRO = -1658024, - SAY_SLAY_1 = -1658025, - SAY_SLAY_2 = -1658026, - SAY_ORDER_STOP = -1658027, - SAY_ORDER_BLOW = -1658028, - SAY_TARGET_1 = -1658029, - SAY_TARGET_2 = -1658030, - SAY_TARGET_3 = -1658031, - - EMOTE_KRICK_MINES = -1658032, - EMOTE_ICK_POISON = -1658033, - EMOTE_ICK_CHASING = -1658034, - - SAY_OUTRO_1 = -1658035, - SAY_JAINA_KRICK_1 = -1658036, - SAY_SYLVANAS_KRICK_1 = -1658037, - SAY_OUTRO_2 = -1658038, - SAY_JAINA_KRICK_2 = -1658039, - SAY_SYLVANAS_KRICK_2 = -1658040, - SAY_OUTRO_3 = -1658041, - SAY_TYRANNUS_KRICK_1 = -1658042, - SAY_OUTRO_4 = -1658043, - SAY_TYRANNUS_KRICK_2 = -1658044, - SAY_JAINA_KRICK_3 = -1658045, - SAY_SYLVANAS_KRICK_3 = -1658046, -}; - void AddSC_boss_krick_and_ick() { Script *newscript; diff --git a/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/boss_scourgelord_tyrannus.cpp b/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/boss_scourgelord_tyrannus.cpp index 9fbf113..11188fe 100644 --- a/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/boss_scourgelord_tyrannus.cpp +++ b/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/boss_scourgelord_tyrannus.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or @@ -16,24 +16,14 @@ /* ScriptData SDName: boss_scourgelord_tyrannus -SD%Complete: 0% -SDComment: +SD%Complete: 50% +SDComment: missing intro and outro; encounter need vehicle support SDCategory: Pit of Saron EndScriptData */ #include "precompiled.h" #include "pit_of_saron.h" -enum Spells -{ - //common - SPELL_BERSERK = 47008, - //yells - //summons - //Abilities - SPELL_FEAR = 68950 -}; - enum { SAY_PREFIGHT_1 = -1658050, @@ -48,96 +38,243 @@ enum EMOTE_RIMEFANG_ICEBOLT = -1658059, EMOTE_SMASH = -1658060, -}; + SPELL_FORCEFUL_SMASH = 69155, + SPELL_FORCEFUL_SMASH_H = 69627, + SPELL_OVERLORDS_BRAND = 69172, + SPELL_DARK_MIGHT = 69167, + SPELL_DARK_MIGHT_H = 69629, + SPELL_HOARFROST = 69246, + SPELL_MARK_OF_RIMEFANG = 69275, + SPELL_ICY_BLAST = 69233, + SPELL_ICY_BLAST_H = 69646, + SPELL_ICY_BLAST_SLOW = 69238, + SPELL_ICY_BLAST_SLOW_H = 69628, -struct MANGOS_DLL_DECL boss_scourgelord_tyrannusAI : public ScriptedAI + NPC_ICY_BLAST = 36731, + SPELL_ICY_BLAST_AURA = 69238, + SPELL_ICY_BLAST_AURA_H = 69628, +}; + +struct MANGOS_DLL_DECL boss_rimefangAI : public ScriptedAI { - boss_scourgelord_tyrannusAI(Creature* pCreature) : ScriptedAI(pCreature) + boss_rimefangAI(Creature *pCreature) : ScriptedAI(pCreature) { - pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + m_pInstance = (instance_pit_of_saron*)pCreature->GetInstanceData(); + m_bIsRegularMode = pCreature->GetMap()->IsRegularDifficulty(); + SetCombatMovement(false); Reset(); } - ScriptedInstance *pInstance; + instance_pit_of_saron* m_pInstance; + bool m_bIsRegularMode; + + uint32 m_uiHoarfrostTimer; + uint32 m_uiIcyBlastTimer; + uint32 m_uiIcyBlastSlowTimer; + uint64 m_uiMainTargetGUID; void Reset() { - if(pInstance) pInstance->SetData(TYPE_TYRANNUS, NOT_STARTED); + m_uiHoarfrostTimer = 25000; + m_uiIcyBlastTimer = 35000; + m_uiIcyBlastSlowTimer = 30000; + m_uiMainTargetGUID = 0; } - void Aggro(Unit *who) + void SetMainTarget(uint64 m_uiTargetGUID) { - if(pInstance) pInstance->SetData(TYPE_TYRANNUS, IN_PROGRESS); + m_uiMainTargetGUID = m_uiTargetGUID; } - void JustDied(Unit *killer) + void JustSummoned(Creature* pSummoned) { - if(pInstance) pInstance->SetData(TYPE_TYRANNUS, DONE); + if(pSummoned->GetEntry() == NPC_ICY_BLAST) + pSummoned->CastSpell(pSummoned, SPELL_ICY_BLAST_AURA, false); } - void UpdateAI(const uint32 diff) + void UpdateAI(const uint32 uiDiff) { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; - DoMeleeAttackIfReady(); + if (m_uiHoarfrostTimer < uiDiff) + { + if (Unit* pTarget = m_creature->GetMap()->GetUnit(m_uiMainTargetGUID)) + DoCastSpellIfCan(pTarget, SPELL_HOARFROST); + else if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) + DoCastSpellIfCan(pTarget, SPELL_HOARFROST); + m_uiHoarfrostTimer = 20000; + } + else + m_uiHoarfrostTimer -= uiDiff; + + if (m_uiIcyBlastTimer < uiDiff) + { + if (Unit* pTarget = m_creature->GetMap()->GetUnit(m_uiMainTargetGUID)) + DoCastSpellIfCan(pTarget, m_bIsRegularMode ? SPELL_ICY_BLAST : SPELL_ICY_BLAST_H); + else if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) + DoCastSpellIfCan(pTarget, m_bIsRegularMode ? SPELL_ICY_BLAST : SPELL_ICY_BLAST_H); + m_uiIcyBlastTimer = 35000; + } + else + m_uiIcyBlastTimer -= uiDiff; + + if (m_uiIcyBlastSlowTimer < uiDiff) + { + if (Unit* pTarget = m_creature->GetMap()->GetUnit(m_uiMainTargetGUID)) + DoCastSpellIfCan(pTarget, m_bIsRegularMode ? SPELL_ICY_BLAST_SLOW : SPELL_ICY_BLAST_SLOW_H); + else if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) + DoCastSpellIfCan(pTarget, m_bIsRegularMode ? SPELL_ICY_BLAST_SLOW : SPELL_ICY_BLAST_SLOW_H); + m_uiIcyBlastSlowTimer = 40000; + } + else + m_uiIcyBlastSlowTimer -= uiDiff; } }; -struct MANGOS_DLL_DECL mob_rimefang_posAI : public ScriptedAI +struct MANGOS_DLL_DECL boss_tyrannusAI : public ScriptedAI { - mob_rimefang_posAI(Creature* pCreature) : ScriptedAI(pCreature) + boss_tyrannusAI(Creature *pCreature) : ScriptedAI(pCreature) { - pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + m_pInstance = (instance_pit_of_saron*)pCreature->GetInstanceData(); + m_bIsRegularMode = pCreature->GetMap()->IsRegularDifficulty(); Reset(); } - ScriptedInstance *pInstance; + instance_pit_of_saron* m_pInstance; + bool m_bIsRegularMode; + + uint32 m_uiForcefulSmashTimer; + uint32 m_uiOverlordsBrandTimer; + uint32 m_uiDarkMightTimer; + uint32 m_uiMarkOfRimefangTimer; void Reset() { + m_uiForcefulSmashTimer = 10000; + m_uiOverlordsBrandTimer = 35000; + m_uiDarkMightTimer = 40000; + m_uiMarkOfRimefangTimer = 30000; + } + + void JustReachedHome() + { + if (m_pInstance) + m_pInstance->SetData(TYPE_TYRANNUS, FAIL); + } + + void Aggro(Unit* pWho) + { + if (m_pInstance) + m_pInstance->SetData(TYPE_TYRANNUS, IN_PROGRESS); + + DoScriptText(SAY_AGGRO, m_creature); } - void Aggro(Unit *who) + void KilledUnit(Unit* pVictim) { + DoScriptText(urand(0, 1) ? SAY_SLAY_1 : SAY_SLAY_2, m_creature); } - void JustDied(Unit *killer) + void JustDied(Unit* pKiller) { + DoScriptText(SAY_DEATH, m_creature); + + // Temp hack until outro is implemented + if (Creature* pRimefang = m_pInstance->instance->GetCreature(m_pInstance->GetData64(NPC_RIMEFANG))) + { + pRimefang->GetMotionMaster()->Clear(); + pRimefang->GetMotionMaster()->MovePoint(0, 844.752f, 358.993f, 645.330f); + pRimefang->setFaction(35); + pRimefang->DeleteThreatList(); + pRimefang->RemoveAllAuras(); + pRimefang->ForcedDespawn(10000); + } + + if (m_pInstance) + m_pInstance->SetData(TYPE_TYRANNUS, DONE); } - void UpdateAI(const uint32 diff) + void UpdateAI(const uint32 uiDiff) { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; + if (m_uiForcefulSmashTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature->getVictim(), m_bIsRegularMode ? SPELL_FORCEFUL_SMASH : SPELL_FORCEFUL_SMASH_H) == CAST_OK) + m_uiForcefulSmashTimer = 50000; + } + else + m_uiForcefulSmashTimer -= uiDiff; + + if (m_uiOverlordsBrandTimer < uiDiff) + { + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) + { + if (DoCastSpellIfCan(pTarget, SPELL_OVERLORDS_BRAND) == CAST_OK) + m_uiOverlordsBrandTimer = 45000; + } + } + else + m_uiOverlordsBrandTimer -= uiDiff; + + if (m_uiDarkMightTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature, m_bIsRegularMode ? SPELL_DARK_MIGHT : SPELL_DARK_MIGHT_H) == CAST_OK) + { + DoScriptText(SAY_SMASH, m_creature); + DoScriptText(EMOTE_SMASH, m_creature); + + m_uiDarkMightTimer = 60000; + } + } + else + m_uiDarkMightTimer -= uiDiff; + + if (m_uiMarkOfRimefangTimer < uiDiff) + { + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) + { + if (DoCastSpellIfCan(pTarget, SPELL_MARK_OF_RIMEFANG) == CAST_OK) + { + if (Creature* pRimefang = m_pInstance->instance->GetCreature(m_pInstance->GetData64(NPC_RIMEFANG))) + ((boss_rimefangAI*)pRimefang->AI())->SetMainTarget(pTarget->GetGUID()); + + DoScriptText(SAY_MARK, m_creature); + m_uiMarkOfRimefangTimer = urand(30000, 40000); + } + } + } + else + m_uiMarkOfRimefangTimer -= uiDiff; + DoMeleeAttackIfReady(); } }; - -CreatureAI* GetAI_boss_scourgelord_tyrannus(Creature* pCreature) +CreatureAI* GetAI_boss_tyrannus(Creature* pCreature) { - return new boss_scourgelord_tyrannusAI(pCreature); + return new boss_tyrannusAI (pCreature); } -CreatureAI* GetAI_mob_rimefang_pos(Creature* pCreature) +CreatureAI* GetAI_boss_rimefang(Creature* pCreature) { - return new mob_rimefang_posAI(pCreature); + return new boss_rimefangAI (pCreature); } - void AddSC_boss_tyrannus() { - Script *newscript; - newscript = new Script; - newscript->Name = "boss_scourgelord_tyrannus"; - newscript->GetAI = &GetAI_boss_scourgelord_tyrannus; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name="mob_rimefang_pos"; - newscript->GetAI = &GetAI_mob_rimefang_pos; - newscript->RegisterSelf(); + Script* pNewScript; + + pNewScript = new Script; + pNewScript->Name="boss_scourgelord_tyrannus"; + pNewScript->GetAI = &GetAI_boss_tyrannus; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name="boss_rimefang"; + pNewScript->GetAI = &GetAI_boss_rimefang; + pNewScript->RegisterSelf(); } diff --git a/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/instance_pit_of_saron.cpp b/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/instance_pit_of_saron.cpp index 9c0586a..f4c79c1 100644 --- a/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/instance_pit_of_saron.cpp +++ b/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/instance_pit_of_saron.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or @@ -154,6 +154,17 @@ uint64 instance_pit_of_saron::GetData64(uint32 uiData) } } +bool AreaTrigger_at_tyrannus(Player* pPlayer, AreaTriggerEntry const* pAt) +{ + if (instance_pit_of_saron* pInstance = (instance_pit_of_saron*)pPlayer->GetInstanceData()) + { + if (pInstance->GetData(TYPE_TYRANNUS) == NOT_STARTED) + pInstance->SetData(TYPE_TYRANNUS, SPECIAL); + } + + return false; +} + InstanceData* GetInstanceData_instance_pit_of_saron(Map* pMap) { return new instance_pit_of_saron(pMap); @@ -167,4 +178,9 @@ void AddSC_instance_pit_of_saron() pNewScript->Name = "instance_pit_of_saron"; pNewScript->GetInstanceData = &GetInstanceData_instance_pit_of_saron; pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "at_tyrannus"; + pNewScript->pAreaTrigger = &AreaTrigger_at_tyrannus; + pNewScript->RegisterSelf(); } diff --git a/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/pit_of_saron.cpp b/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/pit_of_saron.cpp index 13b0af1..1e08640 100644 --- a/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/pit_of_saron.cpp +++ b/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/pit_of_saron.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/pit_of_saron.h b/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/pit_of_saron.h index 134b986..fcb082f 100644 --- a/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/pit_of_saron.h +++ b/scripts/northrend/icecrown_citadel/frozen_halls/pit_of_saron/pit_of_saron.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/blood_prince_council.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/blood_prince_council.cpp index 228a593..9ea4016 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/blood_prince_council.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/blood_prince_council.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or @@ -22,7 +22,7 @@ SDCategory: Icecrown Citadel EndScriptData */ // Need implement true movement for kinetic bomb, correct yells. #include "precompiled.h" -#include "def_spire.h" +#include "icecrown_citadel.h" enum BossSpells { diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_blood_queen_lanathel.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_blood_queen_lanathel.cpp index 58be8a1..1f43223 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_blood_queen_lanathel.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_blood_queen_lanathel.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or @@ -22,7 +22,7 @@ SDCategory: Icecrown Citadel EndScriptData */ // Need correct work of spells and timers #include "precompiled.h" -#include "def_spire.h" +#include "icecrown_citadel.h" enum BossSpells { @@ -44,7 +44,7 @@ enum BossSpells NPC_SWARMING_SHADOWS = 38163, SPELL_SWARMING_SHADOWS_VISUAL = 71267, - QUEST_24756 = 72934, + THIRST_QUENCHED_AURA = 72154, }; static Locations SpawnLoc[]= @@ -144,6 +144,9 @@ struct MANGOS_DLL_DECL boss_blood_queen_lanathelAI : public BSWScriptedAI }; }; + if (Unit* pTarget = doSelectRandomPlayer(SPELL_SHADOWS_EDGE, true, 100.0f)) + doAura(THIRST_QUENCHED_AURA,pTarget); + } void JustDied(Unit *killer) @@ -155,6 +158,7 @@ struct MANGOS_DLL_DECL boss_blood_queen_lanathelAI : public BSWScriptedAI DoScriptText(-1631333,m_creature,killer); m_creature->SetUInt32Value(UNIT_FIELD_BYTES_0, 0); m_creature->SetUInt32Value(UNIT_FIELD_BYTES_1, 0); + doRemoveFromAll(getSpellWithDifficulty(SPELL_ESSENCE_OF_BLOOD_QWEEN)); doRemoveFromAll(SPELL_ESSENCE_OF_BLOOD_QWEEN_2); doRemoveFromAll(SPELL_PACT_OF_DARKFALLEN); @@ -180,7 +184,7 @@ struct MANGOS_DLL_DECL boss_blood_queen_lanathelAI : public BSWScriptedAI if (Unit* pTarget= m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM,1)) doCast(SPELL_DELRIOUS_SLASH, pTarget); - timedCast(SPELL_PACT_OF_DARKFALLEN, diff); +// timedCast(SPELL_PACT_OF_DARKFALLEN, diff); timedCast(SPELL_SWARMING_SHADOWS, diff); diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_deathbringer_saurfang.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_deathbringer_saurfang.cpp index f3dcfc6..c69b166 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_deathbringer_saurfang.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_deathbringer_saurfang.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or @@ -21,7 +21,7 @@ SDComment: by /dev/rsa SDCategory: Icecrown Citadel EndScriptData */ #include "precompiled.h" -#include "def_spire.h" +#include "icecrown_citadel.h" enum { diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_festergut.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_festergut.cpp index ee711f3..dc2396d 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_festergut.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_festergut.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or @@ -22,7 +22,7 @@ SDCategory: Icecrown Citadel EndScriptData */ // Need correct timers #include "precompiled.h" -#include "def_spire.h" +#include "icecrown_citadel.h" enum BossSpells { @@ -41,7 +41,6 @@ enum BossSpells SPELL_INOCULATE = 69291, SPELL_REMOVE_UNOCULATE = 69298, SPELL_GASTRIC_BLOAT = 72219, - SPELL_GASTRIC_EXPLOSION = 72227, SPELL_VILE_GAS = 72272, SPELL_VILE_GAS_AURA = 69244, SPELL_VILE_GAS_AURA_0 = 69248, @@ -341,12 +340,6 @@ struct MANGOS_DLL_DECL boss_festergutAI : public BSWScriptedAI timedCast(SPELL_GASTRIC_BLOAT, diff); - if (auraCount(SPELL_GASTRIC_BLOAT,m_creature->getVictim(),EFFECT_INDEX_1) > 9) - { - m_creature->getVictim()->RemoveAurasDueToSpell(SPELL_GASTRIC_BLOAT); - doCast(SPELL_GASTRIC_EXPLOSION,m_creature->getVictim()); - }; - if (timedQuery(SPELL_VILE_GAS, diff)) { float fPosX, fPosY, fPosZ; diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_lady_deathwhisper.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_lady_deathwhisper.cpp index 25e9523..6079fc5 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_lady_deathwhisper.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_lady_deathwhisper.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or @@ -22,7 +22,7 @@ SDCategory: Icecrown Citadel EndScriptData */ // Need correct spells on adds and timers #include "precompiled.h" -#include "def_spire.h" +#include "icecrown_citadel.h" enum BossSpells { //common @@ -70,9 +70,9 @@ static Locations SpawnLoc[]= {-578.495728f, 2149.211182f, 50.848679f}, // 4 Left Door 1 {-598.636353f, 2149.211182f, 50.848679f}, // 5 Left Door 2 {-620.197449f, 2149.211182f, 50.848679f}, // 6 Left Door 3 - {-517.652466f, 2216.611328f, 62.823681f}, // 7 Upper marsh 1 - {-517.652466f, 2211.611328f, 62.823681f}, // 8 Upper marsh 2 - {-517.652466f, 2206.611328f, 62.823681f}, // 9 Upper marsh 3 + {-525.652466f, 2216.611328f, 62.823681f}, // 7 Upper marsh 1 + {-525.652466f, 2211.611328f, 62.823681f}, // 8 Upper marsh 2 + {-525.652466f, 2206.611328f, 62.823681f}, // 9 Upper marsh 3 }; struct MANGOS_DLL_DECL boss_lady_deathwhisperAI : public BSWScriptedAI diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_lord_marrowgar.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_lord_marrowgar.cpp index 7fb74a7..c640b70 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_lord_marrowgar.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_lord_marrowgar.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or @@ -21,7 +21,7 @@ SDComment: by /dev/rsa SDCategory: Icecrown Citadel EndScriptData */ #include "precompiled.h" -#include "def_spire.h" +#include "icecrown_citadel.h" enum { //common @@ -131,7 +131,7 @@ struct MANGOS_DLL_DECL boss_lord_marrowgarAI : public BSWScriptedAI { case 0: if (timedQuery(SPELL_BONE_STRIKE, diff)) - if (Unit* pTarget = doSelectRandomPlayer(SPELL_BONE_STRIKE_IMPALE, false, 60.0f)) + if (Unit* pTarget = doSelectRandomPlayer(SPELL_BONE_STRIKE_IMPALE, false, 60.0f, isHeroic())) if (doCast(SPELL_BONE_STRIKE, pTarget) == CAST_OK) { doSummonSpike(pTarget); diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_professor_putricide.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_professor_putricide.cpp index 02d3139..4161891 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_professor_putricide.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_professor_putricide.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or @@ -23,7 +23,7 @@ EndScriptData */ // Need implement model (aura?) for phase 2 and visual effects // I don't know how do mutated_abomination :( #include "precompiled.h" -#include "def_spire.h" +#include "icecrown_citadel.h" enum BossSpells { @@ -50,7 +50,6 @@ enum BossSpells NPC_GAS_CLOUD = 37562, SPELL_GASEOUS_BLOAT = 70672, SPELL_EXPUNGED_GAS = 70701, - SPELL_SOUL_FEAST = 71203, // NPC_VOLATILE_OOZE = 37697, SPELL_OOZE_ADHESIVE = 70447, @@ -80,6 +79,7 @@ enum BossSpells SPELL_BERSERK = 47008, QUEST_24749 = 71518, + SHADOW_INFUSION_AURA = 71516, // VIEW_1 = 30881, VIEW_2 = 30881, @@ -136,13 +136,14 @@ struct MANGOS_DLL_DECL boss_proffesor_putricideAI : public BSWScriptedAI void KilledUnit(Unit* pVictim) { - switch (urand(0,1)) { - case 0: - DoScriptText(-1631241,m_creature,pVictim); - break; - case 1: - DoScriptText(-1631242,m_creature,pVictim); - break; + switch (urand(0,1)) + { + case 0: + DoScriptText(-1631241,m_creature,pVictim); + break; + case 1: + DoScriptText(-1631242,m_creature,pVictim); + break; } } @@ -164,6 +165,9 @@ struct MANGOS_DLL_DECL boss_proffesor_putricideAI : public BSWScriptedAI pInstance->SetData(TYPE_PUTRICIDE, IN_PROGRESS); DoScriptText(-1631249,m_creature, pWho); + + if (Unit* pTarget = doSelectRandomPlayer(SPELL_SHADOWS_EDGE, true, 100.0f)) //hack! need remove later + doAura(SHADOW_INFUSION_AURA,pTarget); } void JustDied(Unit *killer) @@ -171,14 +175,6 @@ struct MANGOS_DLL_DECL boss_proffesor_putricideAI : public BSWScriptedAI if (!pInstance) return; pInstance->SetData(TYPE_PUTRICIDE, DONE); DoScriptText(-1631243,m_creature, killer); - for (uint8 i = 0; i < 5; i++) - { - if (Unit* pPlayer = doSelectRandomPlayer(SPELL_MUTATED_PLAGUE, true, 100.0f)) - { - doCast(QUEST_24749, pPlayer); - doRemove(SPELL_MUTATED_PLAGUE, pPlayer); - } - } } void JustSummoned(Creature* summoned) @@ -488,11 +484,6 @@ struct MANGOS_DLL_DECL mob_icc_gas_cloudAI : public BSWScriptedAI if (!pTarget) Aggro(m_creature->getVictim()); - if (timedQuery(SPELL_SOUL_FEAST, uiDiff)) - { - doCast(SPELL_SOUL_FEAST); - } - if (delay <= uiDiff) { if (pTarget && pTarget->isAlive() && pTarget->IsWithinDistInMap(m_creature, 3.0f)) @@ -573,12 +564,8 @@ struct MANGOS_DLL_DECL mob_icc_volatile_oozeAI : public BSWScriptedAI if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; - if (!pTarget) Aggro(m_creature->getVictim()); - - if (timedQuery(SPELL_SOUL_FEAST, uiDiff)) - { - doCast(SPELL_SOUL_FEAST); - } + if (!pTarget) + Aggro(m_creature->getVictim()); if (delay <= uiDiff) { diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_rotface.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_rotface.cpp index 1a0034c..3d3b2ae 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_rotface.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_rotface.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or @@ -22,7 +22,7 @@ SDCategory: Icecrown Citadel EndScriptData */ // Need correct timers #include "precompiled.h" -#include "def_spire.h" +#include "icecrown_citadel.h" enum BossSpells { diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_sindragosa.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_sindragosa.cpp index 53810de..358fbad 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_sindragosa.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_sindragosa.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or @@ -22,7 +22,7 @@ SDCategory: Icecrown Citadel EndScriptData */ // Need correct timers and models #include "precompiled.h" -#include "def_spire.h" +#include "icecrown_citadel.h" enum BossSpells { @@ -51,7 +51,8 @@ enum BossSpells NPC_FROST_BOMB = 37186, SPELL_FLY = 59553, - QUEST_24757 = 72289, + FROST_IMBUED_BLADE_AURA = 72290, + SPELL_BERSERK = 47008, // Rimefang @@ -162,6 +163,9 @@ struct MANGOS_DLL_DECL boss_sindragosaAI : public BSWScriptedAI DoScriptText(-1631420,m_creature,who); doCast(SPELL_FROST_AURA_1); + + if (Unit* pTarget = doSelectRandomPlayer(SPELL_SHADOWS_EDGE, true, 100.0f)) + doAura(FROST_IMBUED_BLADE_AURA,pTarget); } void JustDied(Unit *killer) @@ -171,7 +175,7 @@ struct MANGOS_DLL_DECL boss_sindragosaAI : public BSWScriptedAI doRemoveFromAll(SPELL_ICY_TOMB); pInstance->SetData(TYPE_SINDRAGOSA, DONE); DoScriptText(-1631423,m_creature,killer); - doCast(QUEST_24757); + if (Creature* pTemp = m_creature->GetMap()->GetCreature(pInstance->GetData64(NPC_RIMEFANG))) pTemp->SetRespawnDelay(7*DAY); if (Creature* pTemp = m_creature->GetMap()->GetCreature(pInstance->GetData64(NPC_SPINESTALKER))) diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_the_lich_king.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_the_lich_king.cpp index 12bea52..c054c4b 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_the_lich_king.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_the_lich_king.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or @@ -22,7 +22,7 @@ SDCategory: Icecrown Citadel EndScriptData */ // Need implement "in sword" phase #include "precompiled.h" -#include "def_spire.h" +#include "icecrown_citadel.h" enum BossSpells { @@ -147,17 +147,17 @@ struct MANGOS_DLL_DECL boss_the_lich_king_iccAI : public BSWScriptedAI battlestarted = false; finalphase = false; m_creature->SetOrientation(0.0f); - pInstance->CloseDoor(pInstance->GetData64(GO_ICESHARD_1)); - pInstance->CloseDoor(pInstance->GetData64(GO_ICESHARD_2)); - pInstance->CloseDoor(pInstance->GetData64(GO_ICESHARD_3)); - pInstance->CloseDoor(pInstance->GetData64(GO_ICESHARD_4)); + pInstance->DoCloseDoor(pInstance->GetData64(GO_ICESHARD_1)); + pInstance->DoCloseDoor(pInstance->GetData64(GO_ICESHARD_2)); + pInstance->DoCloseDoor(pInstance->GetData64(GO_ICESHARD_3)); + pInstance->DoCloseDoor(pInstance->GetData64(GO_ICESHARD_4)); if (oldflag) if (GameObject* pGoFloor = pInstance->instance->GetGameObject(pInstance->GetData64(GO_ARTHAS_PLATFORM))) { pGoFloor->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_DAMAGED | GO_FLAG_NODESPAWN); pGoFloor->SetUInt32Value(GAMEOBJECT_BYTES_1,oldflag); } - pInstance->CloseDoor(pInstance->GetData64(GO_FROSTY_WIND)); + pInstance->DoCloseDoor(pInstance->GetData64(GO_FROSTY_WIND)); } void MoveInLineOfSight(Unit* pWho) @@ -498,24 +498,24 @@ struct MANGOS_DLL_DECL boss_the_lich_king_iccAI : public BSWScriptedAI doCast(SPELL_QUAKE); stage = 4; DoScriptText(-1631524, m_creature); - pInstance->OpenDoor(pInstance->GetData64(GO_SNOW_EDGE)); + pInstance->DoOpenDoor(pInstance->GetData64(GO_SNOW_EDGE)); }; break; case 4: // Platform destruct if (timedQuery(SPELL_QUAKE, diff)) { - pInstance->OpenDoor(pInstance->GetData64(GO_ICESHARD_1)); - pInstance->OpenDoor(pInstance->GetData64(GO_ICESHARD_2)); - pInstance->OpenDoor(pInstance->GetData64(GO_ICESHARD_3)); - pInstance->OpenDoor(pInstance->GetData64(GO_ICESHARD_4)); + pInstance->DoOpenDoor(pInstance->GetData64(GO_ICESHARD_1)); + pInstance->DoOpenDoor(pInstance->GetData64(GO_ICESHARD_2)); + pInstance->DoOpenDoor(pInstance->GetData64(GO_ICESHARD_3)); + pInstance->DoOpenDoor(pInstance->GetData64(GO_ICESHARD_4)); if (GameObject* pGoFloor = pInstance->instance->GetGameObject(pInstance->GetData64(GO_ARTHAS_PLATFORM))) { pGoFloor->SetFlag(GAMEOBJECT_FLAGS, GO_FLAG_DAMAGED | GO_FLAG_NODESPAWN); oldflag = pGoFloor->GetUInt32Value(GAMEOBJECT_BYTES_1); pGoFloor->SetUInt32Value(GAMEOBJECT_BYTES_1,8449); } - pInstance->CloseDoor(pInstance->GetData64(GO_FROSTY_WIND)); - pInstance->CloseDoor(pInstance->GetData64(GO_SNOW_EDGE)); + pInstance->DoCloseDoor(pInstance->GetData64(GO_FROSTY_WIND)); + pInstance->DoCloseDoor(pInstance->GetData64(GO_SNOW_EDGE)); m_creature->GetMotionMaster()->Clear(); m_creature->GetMotionMaster()->MoveChase(m_creature->getVictim()); m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); @@ -567,7 +567,7 @@ struct MANGOS_DLL_DECL boss_the_lich_king_iccAI : public BSWScriptedAI pGoFloor->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_DAMAGED | GO_FLAG_NODESPAWN); pGoFloor->SetUInt32Value(GAMEOBJECT_BYTES_1,oldflag); } - pInstance->OpenDoor(pInstance->GetData64(GO_FROSTY_WIND)); + pInstance->DoOpenDoor(pInstance->GetData64(GO_FROSTY_WIND)); doCast(SPELL_REMORSELESS_WINTER); stage = 8; break; @@ -590,7 +590,7 @@ struct MANGOS_DLL_DECL boss_the_lich_king_iccAI : public BSWScriptedAI doCast(NPC_VILE_SPIRIT); doCast(SPELL_QUAKE); stage = 9; - pInstance->OpenDoor(pInstance->GetData64(GO_SNOW_EDGE)); + pInstance->DoOpenDoor(pInstance->GetData64(GO_SNOW_EDGE)); }; break; @@ -603,8 +603,8 @@ struct MANGOS_DLL_DECL boss_the_lich_king_iccAI : public BSWScriptedAI oldflag = pGoFloor->GetUInt32Value(GAMEOBJECT_BYTES_1); pGoFloor->SetUInt32Value(GAMEOBJECT_BYTES_1,8449); } - pInstance->CloseDoor(pInstance->GetData64(GO_SNOW_EDGE)); - pInstance->CloseDoor(pInstance->GetData64(GO_FROSTY_WIND)); + pInstance->DoCloseDoor(pInstance->GetData64(GO_SNOW_EDGE)); + pInstance->DoCloseDoor(pInstance->GetData64(GO_FROSTY_WIND)); m_creature->GetMotionMaster()->Clear(); m_creature->GetMotionMaster()->MoveChase(m_creature->getVictim()); m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_valithria_dreamwalker.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_valithria_dreamwalker.cpp index 97a0cde..ff69277 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_valithria_dreamwalker.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/boss_valithria_dreamwalker.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or @@ -22,7 +22,7 @@ SDCategory: Icecrown Citadel EndScriptData */ // Need move emerald dream to phase 32, correct timers and other #include "precompiled.h" -#include "def_spire.h" +#include "icecrown_citadel.h" static Locations SpawnLoc[]= { @@ -184,8 +184,8 @@ struct MANGOS_DLL_DECL boss_valithria_dreamwalkerAI : public BSWScriptedAI if (m_creature->isAlive()) m_creature->GetMotionMaster()->MoveTargetedHome(); m_creature->SetLootRecipient(NULL); - pInstance->CloseDoor(GetDoor(currentDoor)); - pInstance->CloseDoor(GetDoor(currentDoor2)); + pInstance->DoCloseDoor(GetDoor(currentDoor)); + pInstance->DoCloseDoor(GetDoor(currentDoor2)); Reset(); } @@ -368,19 +368,19 @@ struct MANGOS_DLL_DECL boss_valithria_dreamwalkerAI : public BSWScriptedAI speedK = speedK+10; if (currentDifficulty == RAID_DIFFICULTY_25MAN_NORMAL || currentDifficulty == RAID_DIFFICULTY_25MAN_HEROIC) { - pInstance->CloseDoor(GetDoor(currentDoor2)); + pInstance->DoCloseDoor(GetDoor(currentDoor2)); currentDoor2 = urand(1,2); - pInstance->OpenDoor(GetDoor(currentDoor2)); + pInstance->DoOpenDoor(GetDoor(currentDoor2)); CallMobs(currentDoor2); - pInstance->CloseDoor(GetDoor(currentDoor)); + pInstance->DoCloseDoor(GetDoor(currentDoor)); currentDoor = urand(3,4); - pInstance->OpenDoor(GetDoor(currentDoor)); + pInstance->DoOpenDoor(GetDoor(currentDoor)); CallMobs(currentDoor); } else { - pInstance->CloseDoor(GetDoor(currentDoor)); + pInstance->DoCloseDoor(GetDoor(currentDoor)); currentDoor = urand(1,4); - pInstance->OpenDoor(GetDoor(currentDoor)); + pInstance->DoOpenDoor(GetDoor(currentDoor)); CallMobs(currentDoor); } }; diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/gunship_battle.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/gunship_battle.cpp index caf8175..78d5fd7 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/gunship_battle.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/gunship_battle.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/icecrown_citadel.h b/scripts/northrend/icecrown_citadel/icecrown_citadel/icecrown_citadel.h index b53e72e..0975ec1 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/icecrown_citadel.h +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/icecrown_citadel.h @@ -1,3 +1,319 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2010 -2011 by /dev/rsa for ScriptDev2 * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ + +#ifndef DEF_ICECROWN_SPIRE_H +#define DEF_ICECROWN_SPIRE_H +#include "BSW_instance.h" +#include "BSW_ai.h" + +enum +{ + + TYPE_TELEPORT = 0, + TYPE_MARROWGAR = 1, + TYPE_DEATHWHISPER = 2, + TYPE_FLIGHT_WAR = 3, + TYPE_SAURFANG = 4, + TYPE_FESTERGUT = 5, + TYPE_ROTFACE = 6, + TYPE_PUTRICIDE = 7, + TYPE_BLOOD_COUNCIL = 8, + TYPE_LANATHEL = 9, + TYPE_VALITHRIA = 10, + TYPE_SINDRAGOSA = 11, + TYPE_KINGS_OF_ICC = 12, + TYPE_LICH_KING = 13, + TYPE_ICECROWN_QUESTS = 14, + TYPE_COUNT = 15, + MAX_ENCOUNTERS, + + TYPE_STINKY, + TYPE_PRECIOUS, + + NPC_LORD_MARROWGAR = 36612, + NPC_LADY_DEATHWHISPER = 36855, + NPC_DEATHBRINGER_SAURFANG = 37813, + NPC_FESTERGUT = 36626, + NPC_ROTFACE = 36627, + NPC_PROFESSOR_PUTRICIDE = 36678, + NPC_TALDARAM = 37973, + NPC_VALANAR = 37970, + NPC_KELESETH = 37972, + NPC_LANATHEL = 37955, + NPC_VALITHRIA = 36789, + NPC_VALITHRIA_QUEST = 38589, + NPC_SINDRAGOSA = 36853, + NPC_LICH_KING = 36597, + + NPC_LANATHEL_INTRO = 38004, + NPC_BLOOD_ORB_CONTROL = 38008, + + NPC_MURADIN = 36948, + + NPC_TIRION = 38995, + NPC_MENETHIL = 38579, + NPC_SPIRIT_WARDEN = 38579, + + NPC_FROSTMOURNE_TRIGGER = 38584, + NPC_FROSTMOURNE_HOLDER = 27880, + + NPC_STINKY = 37025, + NPC_PRECIOUS = 37217, + + NPC_RIMEFANG = 37533, + NPC_SPINESTALKER = 37534, + + NPC_COMBAT_TRIGGER = 38752, + + GO_TELEPORT_GOSSIP_MESSAGE = 99323, + TELEPORT_GOSSIP_MESSAGE = 99322, + + GO_ICEWALL_1 = 201911, + GO_ICEWALL_2 = 201910, + + GO_MARROWGAR_DOOR = 201857, + + GO_ORATORY_DOOR = 201563, + GO_DEATHWHISPER_ELEVATOR = 202220, //5653 + + GO_SAURFANG_DOOR = 201825, + + GO_GAS_RELEASE_VALVE = 201616, //72479 + + GO_ORANGE_PLAGUE = 201371, //72536 + GO_GREEN_PLAGUE = 201370, //72537 + + GO_SCIENTIST_DOOR_GREEN = 201614, //72530 + GO_SCIENTIST_DOOR_ORANGE = 201613, //72531 + GO_SCIENTIST_DOOR_COLLISION = 201612, + GO_SCIENTIST_DOOR = 201372, //72541 + + GO_BLOODWING_DOOR = 201920, //72532 + GO_CRIMSON_HALL_DOOR = 201376, //72532 + GO_COUNCIL_DOOR_1 = 201377, //72533 + GO_COUNCIL_DOOR_2 = 201378, //72534 + + GO_BLOODPRINCE_DOOR = 201746, + GO_ICECROWN_GRATE = 201755, + + GO_FROSTWING_DOOR = 201919, + GO_GREEN_DRAGON_DOOR_1 = 201375, //1202 + GO_GREEN_DRAGON_DOOR_2 = 201374, //1200 + GO_VALITHRIA_DOOR_1 = 201380, //1618 + GO_VALITHRIA_DOOR_2 = 201382, //1482 + GO_VALITHRIA_DOOR_3 = 201383, //1335 + GO_VALITHRIA_DOOR_4 = 201381, //1558 + + GO_SINDRAGOSA_DOOR_1 = 201369, //1619 + GO_SINDRAGOSA_DOOR_2 = 201379, + + GO_SINDRAGOSA_ENTRANCE = 201373, + + GO_FROZENTRONE_TR = 202223, //72061 + + GO_SAURFANG_CACHE_10 = 202239, + GO_SAURFANG_CACHE_25 = 202240, + GO_SAURFANG_CACHE_10_H = 202238, + GO_SAURFANG_CACHE_25_H = 202241, + + GO_GUNSHIP_ARMORY_A_10 = 201872, // + GO_GUNSHIP_ARMORY_A_25 = 201873, // + GO_GUNSHIP_ARMORY_A_10H = 201874, // + GO_GUNSHIP_ARMORY_A_25H = 201875, // + + GO_GUNSHIP_ARMORY_H_10 = 202177, // + GO_GUNSHIP_ARMORY_H_25 = 202178, // + GO_GUNSHIP_ARMORY_H_10H = 202179, // + GO_GUNSHIP_ARMORY_H_25H = 202180, // + + GO_DREAMWALKER_CACHE_10 = 201959, // + GO_DREAMWALKER_CACHE_25 = 202339, // + GO_DREAMWALKER_CACHE_10_H = 202338, // + GO_DREAMWALKER_CACHE_25_H = 202340, // + + GO_PLAGUE_SIGIL = 202182, + GO_FROSTWING_SIGIL = 202181, + GO_BLOODWING_SIGIL = 202183, + + GO_ICESHARD_1 = 202142, //8304 + GO_ICESHARD_2 = 202141, //8364 + GO_ICESHARD_3 = 202143, //8310 + GO_ICESHARD_4 = 202144, //9007 + + GO_FROSTY_WIND = 202188, // + GO_FROSTY_EDGE = 202189, // + GO_SNOW_EDGE = 202190, // + GO_ARTHAS_PLATFORM = 202161, // + GO_ARTHAS_PRECIPICE = 202078, // + + TYPE_EVENT_TIMER = 99, + TYPE_EVENT = 100, + TYPE_EVENT_NPC = 101, + MAP_NUM = 631, + DATA_DIRECTION = 1001, + DATA_BLOOD_INVOCATION = 1002, + DESPAWN_TIME = 300000, + SPELL_SHADOWS_EDGE = 71168, + +}; + +class MANGOS_DLL_DECL instance_icecrown_spire : public BSWScriptedInstance +{ +public: + instance_icecrown_spire(Map* pMap); + ~instance_icecrown_spire() {} + + void Initialize(); + + void OnObjectCreate(GameObject* pGo); + void OnCreatureCreate(Creature* pCreature); + + void OpenAllDoors(); + void OnPlayerEnter(Player* pPlayer); + bool IsEncounterInProgress(); + + void SetData(uint32 uiType, uint32 uiData); + uint32 GetData(uint32 uiType); + uint64 GetData64(uint32 uiType); + + const char* Save() { return strSaveData.c_str(); } + void Load(const char* chrIn); + bool CheckAchievementCriteriaMeet(uint32 criteria_id, Player const* /*source*/, Unit const* /*target*/, uint32 /*miscvalue1*/); + +private: + + uint8 Difficulty; + bool needSave; + std::string strSaveData; + + //Creatures GUID + uint32 m_auiEncounter[MAX_ENCOUNTERS+1]; + uint64 m_uiMarrogwarGUID; + uint64 m_uiDeathWhisperGUID; + uint64 m_uiSaurfangGUID; + uint64 m_uiRotfaceGUID; + uint64 m_uiFestergutGUID; + uint64 m_uiPutricideGUID; + uint64 m_uiTaldaramGUID; + uint64 m_uiValanarGUID; + uint64 m_uiKelesethGUID; + uint64 m_uiLanathelGUID; + uint64 m_uiLanathelintroGUID; + uint64 m_uiValithriaGUID; + uint64 m_uiValithriaQuestGUID; + uint64 m_uiSindragosaGUID; + uint64 m_uiLichKingGUID; + uint64 m_uiGasReleaseValveGUID; + uint64 m_uiBloodOrbCtrlGUID; + + uint64 m_uiRimefangGUID; + uint64 m_uiSpinestalkerGUID; + + uint64 m_uiStinkyGUID; + uint64 m_uiPreciousGUID; + + uint64 m_uidummyTargetGUID; + + uint64 m_uiIcewall1GUID; + uint64 m_uiIcewall2GUID; + uint64 m_uiSaurfangDoorGUID; + uint64 m_uiOratoryDoorGUID; + uint64 m_uiDeathWhisperElevatorGUID; + uint64 m_uiOrangePlagueGUID; + uint64 m_uiGreenPlagueGUID; + uint64 m_uiSDoorGreenGUID; + uint64 m_uiSDoorOrangeGUID; + uint64 m_uiSDoorCollisionGUID; + uint64 m_uiScientistDoorGUID; + uint64 m_uiCrimsonDoorGUID; + uint64 m_uiBloodwingDoorGUID; + uint64 m_uiCounsilDoor1GUID; + uint64 m_uiCounsilDoor2GUID; + uint64 m_uiGreenDragonDoor1GUID; + uint64 m_uiGreenDragonDoor2GUID; + uint64 m_uiFrostwingDoorGUID; + + uint64 m_uiValithriaDoor1GUID; + uint64 m_uiValithriaDoor2GUID; + uint64 m_uiValithriaDoor3GUID; + uint64 m_uiValithriaDoor4GUID; + + uint64 m_uiSindragosaDoor1GUID; + uint64 m_uiSindragosaDoor2GUID; + + uint64 m_uiIceShard1GUID; + uint64 m_uiIceShard2GUID; + uint64 m_uiIceShard3GUID; + uint64 m_uiIceShard4GUID; + + uint64 m_uiFrostyWindGUID; + uint64 m_uiFrostyEdgeGUID; + uint64 m_uiSnowEdgeGUID; + uint64 m_uiArthasPlatformGUID; + uint64 m_uiArthasPrecipiceGUID; + + uint64 m_uiFrostmourneGUID; + uint64 m_uiFrostmourneTriggerGUID; + uint64 m_uiFrostmourneHolderGUID; + + uint64 m_uiSaurfangCacheGUID; + uint64 m_uiGunshipArmoryAGUID; + uint64 m_uiGunshipArmoryHGUID; + uint64 m_uiValitriaCacheGUID; + + uint64 m_uiGunshipArmoryH_ID; + uint64 m_uiGunshipArmoryA_ID; + + uint64 m_uiMarrogarDoor; + uint64 m_uiBloodPrinceDoor; + uint64 m_uiIceCrownGrate; + uint64 m_uiSindragosaEntrance; + + uint32 m_uiCouncilInvocation; + + uint32 m_auiEvent; + uint32 m_auiEventTimer; + uint32 m_uiDirection; + + uint32 m_uiStinkystate; + uint32 m_uiPreciousstate; + +}; + +enum AchievementCriteriaIds +{ + // Lord Marrowgar + CRITERIA_BONED_10N = 12775, + CRITERIA_BONED_25N = 12962, + CRITERIA_BONED_10H = 13393, + CRITERIA_BONED_25H = 13394, + + // Rotface + CRITERIA_DANCES_WITH_OOZES_10N = 12984, + CRITERIA_DANCES_WITH_OOZES_25N = 12966, + CRITERIA_DANCES_WITH_OOZES_10H = 12985, + CRITERIA_DANCES_WITH_OOZES_25H = 12983, + + // Professor Putricide + CRITERIA_NAUSEA_10N = 12987, + CRITERIA_NAUSEA_25N = 12968, + CRITERIA_NAUSEA_10H = 12988, + CRITERIA_NAUSEA_25H = 12981, + + // Blood Prince Council + CRITERIA_ORB_WHISPERER_10N = 13033, + CRITERIA_ORB_WHISPERER_25N = 12969, + CRITERIA_ORB_WHISPERER_10H = 13034, + CRITERIA_ORB_WHISPERER_25H = 13032, + + // Blood-Queen Lana'thel + CRITERIA_KILL_LANA_THEL_10M = 13340, + CRITERIA_KILL_LANA_THEL_25M = 13360, + CRITERIA_ONCE_BITTEN_TWICE_SHY_10N = 12780, + CRITERIA_ONCE_BITTEN_TWICE_SHY_25N = 13012, + CRITERIA_ONCE_BITTEN_TWICE_SHY_10V = 13011, + CRITERIA_ONCE_BITTEN_TWICE_SHY_25V = 13013, +}; + +#endif diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/icecrown_spire.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/icecrown_spire.cpp index 8e5a103..ae87df7 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/icecrown_spire.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/icecrown_spire.cpp @@ -22,17 +22,18 @@ SDCategory: Icecrown Citadel - mobs EndScriptData */ #include "precompiled.h" -#include "def_spire.h" +#include "icecrown_citadel.h" enum { SPELL_BERSERK = 47008, SPELL_FROST_BREATH = 70116, SPELL_BLIZZARD = 70362, - SPELL_SOUL_FEAST = 71203, SPELL_CLEAVE = 70361, SPELL_STOMP = 64652, SPELL_DEATH_PLAGUE = 72865, +// SPELL_DEATH_PLAGUE = 72879, + }; struct MANGOS_DLL_DECL mob_spire_frostwyrmAI : public BSWScriptedAI @@ -60,20 +61,20 @@ struct MANGOS_DLL_DECL mob_spire_frostwyrmAI : public BSWScriptedAI switch(stage) { - case 0: { - timedCast(SPELL_SOUL_FEAST, diff); - break;} - case 1: { + case 0: + break; + case 1: doCast(SPELL_BERSERK); stage = 2; - break;} - case 2: { - break;} - } + break; + case 2: + default: + break; + } - timedCast(SPELL_CLEAVE, diff); - timedCast(SPELL_BLIZZARD, diff); - timedCast(SPELL_FROST_BREATH, diff); + timedCast(SPELL_CLEAVE, diff); + timedCast(SPELL_BLIZZARD, diff); + timedCast(SPELL_FROST_BREATH, diff); if (m_creature->GetHealthPercent() < 10.0f && stage == 0) stage = 1; @@ -108,7 +109,7 @@ struct MANGOS_DLL_DECL mob_frost_giantAI : public BSWScriptedAI void JustDied(Unit *killer) { if(!pInstance) return; - if (killer->GetTypeId() == TYPEID_PLAYER) + if (killer->GetTypeId() == TYPEID_PLAYER || killer->GetCharmerOrOwner()->GetTypeId() == TYPEID_PLAYER ) pInstance->SetData(TYPE_FLIGHT_WAR, DONE); } @@ -131,18 +132,18 @@ struct MANGOS_DLL_DECL mob_frost_giantAI : public BSWScriptedAI switch(stage) { - case 0: { - timedCast(SPELL_SOUL_FEAST, diff); - break;} - case 1: { + case 0: + break; + case 1: doCast(SPELL_BERSERK); stage = 2; - break;} - case 2: { - break;} - } - timedCast(SPELL_STOMP, diff); - timedCast(SPELL_DEATH_PLAGUE, diff); + break; + case 2: + default: + break; + } + timedCast(SPELL_STOMP, diff); + timedCast(SPELL_DEATH_PLAGUE, diff); if (m_creature->GetHealthPercent() < 2.0f && stage == 0) stage = 1; diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/icecrown_teleport.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/icecrown_teleport.cpp index 1f378cb..895d2eb 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/icecrown_teleport.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/icecrown_teleport.cpp @@ -21,7 +21,7 @@ SDComment: by /dev/rsa SDCategory: Icecrown Citadel EndScriptData */ #include "precompiled.h" -#include "def_spire.h" +#include "icecrown_citadel.h" enum { @@ -89,9 +89,9 @@ bool GOHello_go_plague_sigil(Player *player, GameObject* pGo) if (pInstance->GetData(TYPE_FESTERGUT) == DONE && pInstance->GetData(TYPE_ROTFACE) == DONE) { - pInstance->OpenDoor(pInstance->GetData64(GO_SCIENTIST_DOOR_ORANGE)); - pInstance->OpenDoor(pInstance->GetData64(GO_SCIENTIST_DOOR_GREEN)); - pInstance->OpenDoor(pInstance->GetData64(GO_SCIENTIST_DOOR_COLLISION)); + pInstance->DoOpenDoor(pInstance->GetData64(GO_SCIENTIST_DOOR_ORANGE)); + pInstance->DoOpenDoor(pInstance->GetData64(GO_SCIENTIST_DOOR_GREEN)); + pInstance->DoOpenDoor(pInstance->GetData64(GO_SCIENTIST_DOOR_COLLISION)); }; return true; } @@ -102,7 +102,7 @@ bool GOHello_go_bloodwing_sigil(Player *player, GameObject* pGo) if(!pInstance) return false; if (pInstance->GetData(TYPE_SAURFANG) == DONE) - pInstance->OpenDoor(pInstance->GetData64(GO_BLOODWING_DOOR)); + pInstance->DoOpenDoor(pInstance->GetData64(GO_BLOODWING_DOOR)); return true; } @@ -113,7 +113,7 @@ bool GOHello_go_frostwing_sigil(Player *player, GameObject* pGo) if(!pInstance) return false; if (pInstance->GetData(TYPE_SAURFANG) == DONE) - pInstance->OpenDoor(pInstance->GetData64(GO_FROSTWING_DOOR)); + pInstance->DoOpenDoor(pInstance->GetData64(GO_FROSTWING_DOOR)); return true; } diff --git a/scripts/northrend/icecrown_citadel/icecrown_citadel/instance_icecrown_citadel.cpp b/scripts/northrend/icecrown_citadel/icecrown_citadel/instance_icecrown_citadel.cpp index 9b4473b..63612b6 100644 --- a/scripts/northrend/icecrown_citadel/icecrown_citadel/instance_icecrown_citadel.cpp +++ b/scripts/northrend/icecrown_citadel/icecrown_citadel/instance_icecrown_citadel.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or @@ -15,14 +15,837 @@ */ /* ScriptData -SDName: instance_icecrown_citadel -SD%Complete: 0 -SDComment: Placeholder +SDName: instance_icecrown_spire +SD%Complete: 90% +SDComment: by /dev/rsa SDCategory: Icecrown Citadel EndScriptData */ #include "precompiled.h" +#include "icecrown_citadel.h" +#include "World.h" -void AddSC_instance_icecrown_citadel() +static Locations SpawnLoc[]= { + {-446.788971f, 2003.362915f, 191.233948f}, // 0 Horde ship enter + {-428.140503f, 2421.336914f, 191.233078f}, // 1 Alliance ship enter +}; + + instance_icecrown_spire::instance_icecrown_spire(Map* pMap) : BSWScriptedInstance(pMap) + { + Difficulty = pMap->GetDifficulty(); + Initialize(); + } + + void instance_icecrown_spire::OpenAllDoors() + { + if (m_auiEncounter[1] == DONE) { + DoOpenDoor(m_uiIcewall1GUID); + DoOpenDoor(m_uiIcewall2GUID); + DoOpenDoor( m_uiOratoryDoorGUID); + }; + if (m_auiEncounter[2] == DONE) { + if (GameObject* pGO = instance->GetGameObject(m_uiDeathWhisperElevatorGUID)) + { + pGO->SetUInt32Value(GAMEOBJECT_LEVEL, 0); + pGO->SetGoState(GO_STATE_READY); + } + }; + if (m_auiEncounter[4] == DONE) { + DoOpenDoor(m_uiSaurfangDoorGUID); + DoOpenDoor(m_uiBloodwingDoorGUID); + DoOpenDoor(m_uiFrostwingDoorGUID); + }; + if (m_auiEncounter[5] == DONE) DoOpenDoor(m_uiSDoorOrangeGUID); + if (m_auiEncounter[6] == DONE) DoOpenDoor(m_uiSDoorGreenGUID); + if (m_auiEncounter[6] == DONE && m_auiEncounter[5] == DONE) DoOpenDoor(m_uiSDoorCollisionGUID); + if (m_auiEncounter[8] == DONE) { + DoOpenDoor(m_uiCounsilDoor1GUID); + DoOpenDoor(m_uiCounsilDoor2GUID); + }; + if (m_auiEncounter[10] == DONE) + { + DoOpenDoor(m_uiValithriaDoor2GUID); + DoOpenDoor(m_uiSindragosaDoor2GUID); + DoOpenDoor(m_uiSindragosaDoor1GUID); + }; + + } + + void instance_icecrown_spire::Initialize() + { + for (uint8 i = 0; i < MAX_ENCOUNTERS; ++i) + m_auiEncounter[i] = NOT_STARTED; + + m_auiEncounter[0] = 0; + + m_uiMarrogwarGUID = 0; + m_uiDeathWhisperGUID = 0; + m_uiSaurfangGUID = 0; + m_uiSaurfangCacheGUID = 0; + m_uiGunshipArmoryAGUID = 0; + m_uiGunshipArmoryHGUID = 0; + m_uiIcewall1GUID = 0; + m_uiIcewall2GUID = 0; + m_uiSDoorOrangeGUID = 0; + m_uiSDoorGreenGUID = 0; + m_uiBloodwingDoorGUID = 0; + m_uiSDoorCollisionGUID = 0; + m_auiEvent = 0; + m_auiEventTimer = 1000; + m_uiCouncilInvocation = 0; + m_uiDirection = 0; + m_uiStinkystate = NOT_STARTED; + m_uiPreciousstate = NOT_STARTED; + + switch (Difficulty) { + case RAID_DIFFICULTY_10MAN_NORMAL: + m_uiGunshipArmoryH_ID = GO_GUNSHIP_ARMORY_H_10; + m_uiGunshipArmoryA_ID = GO_GUNSHIP_ARMORY_A_10; + break; + case RAID_DIFFICULTY_10MAN_HEROIC: + m_uiGunshipArmoryH_ID = GO_GUNSHIP_ARMORY_H_10H; + m_uiGunshipArmoryA_ID = GO_GUNSHIP_ARMORY_A_10H; + break; + case RAID_DIFFICULTY_25MAN_NORMAL: + m_uiGunshipArmoryH_ID = GO_GUNSHIP_ARMORY_H_25; + m_uiGunshipArmoryA_ID = GO_GUNSHIP_ARMORY_A_25; + break; + case RAID_DIFFICULTY_25MAN_HEROIC: + m_uiGunshipArmoryH_ID = GO_GUNSHIP_ARMORY_H_25H; + m_uiGunshipArmoryA_ID = GO_GUNSHIP_ARMORY_A_25H; + break; + default: + m_uiGunshipArmoryH_ID = 0; + m_uiGunshipArmoryA_ID = 0; + break; + }; + } + + bool instance_icecrown_spire::IsEncounterInProgress() + { + for(uint8 i = 1; i < MAX_ENCOUNTERS-2 ; ++i) + if (m_auiEncounter[i] == IN_PROGRESS) return true; + + return false; + } + + void instance_icecrown_spire::OnPlayerEnter(Player *pPlayer) + { + OpenAllDoors(); + + enum PhaseControl + { + HORDE_CONTROL_PHASE_SHIFT_1 = 55773, + HORDE_CONTROL_PHASE_SHIFT_2 = 60028, + ALLIANCE_CONTROL_PHASE_SHIFT_1 = 55774, + ALLIANCE_CONTROL_PHASE_SHIFT_2 = 60027, + }; +/* + + if (!sWorld.getConfig(CONFIG_BOOL_ALLOW_TWO_SIDE_INTERACTION_GROUP)) return; + + switch (pPlayer->GetTeam()) + { + case ALLIANCE: + if (pPlayer && pPlayer->IsInWorld() && pPlayer->HasAura(HORDE_CONTROL_PHASE_SHIFT_1)) + pPlayer->RemoveAurasDueToSpell(HORDE_CONTROL_PHASE_SHIFT_1); + pPlayer->CastSpell(pPlayer, HORDE_CONTROL_PHASE_SHIFT_2, false); + break; + case HORDE: + if (pPlayer && pPlayer->IsInWorld() && pPlayer->HasAura(ALLIANCE_CONTROL_PHASE_SHIFT_1)) + pPlayer->RemoveAurasDueToSpell(ALLIANCE_CONTROL_PHASE_SHIFT_1); + pPlayer->CastSpell(pPlayer, ALLIANCE_CONTROL_PHASE_SHIFT_2, false); + break; + }; +*/ + }; + + void instance_icecrown_spire::OnCreatureCreate(Creature* pCreature) + { + switch(pCreature->GetEntry()) + { + case NPC_LORD_MARROWGAR: + m_uiMarrogwarGUID = pCreature->GetGUID(); + break; + case NPC_LADY_DEATHWHISPER: + m_uiDeathWhisperGUID = pCreature->GetGUID(); + break; + case NPC_DEATHBRINGER_SAURFANG: + m_uiSaurfangGUID = pCreature->GetGUID(); + break; + case NPC_FESTERGUT: + m_uiFestergutGUID = pCreature->GetGUID(); + break; + case NPC_ROTFACE: + m_uiRotfaceGUID = pCreature->GetGUID(); + break; + case NPC_PROFESSOR_PUTRICIDE: + m_uiPutricideGUID = pCreature->GetGUID(); + break; + case NPC_TALDARAM: + m_uiTaldaramGUID = pCreature->GetGUID(); + break; + case NPC_VALANAR: + m_uiValanarGUID = pCreature->GetGUID(); + break; + case NPC_KELESETH: + m_uiKelesethGUID = pCreature->GetGUID(); + break; + case NPC_LANATHEL: + m_uiLanathelGUID = pCreature->GetGUID(); + break; + case NPC_LANATHEL_INTRO: + m_uiLanathelintroGUID = pCreature->GetGUID(); + break; + case NPC_VALITHRIA: + m_uiValithriaGUID = pCreature->GetGUID(); + break; + case NPC_VALITHRIA_QUEST: + m_uiValithriaQuestGUID = pCreature->GetGUID(); + break; + case NPC_SINDRAGOSA: + m_uiSindragosaGUID = pCreature->GetGUID(); + break; + case NPC_LICH_KING: + m_uiLichKingGUID = pCreature->GetGUID(); + break; + case NPC_RIMEFANG: + m_uiRimefangGUID = pCreature->GetGUID(); + break; + case NPC_SPINESTALKER: + m_uiSpinestalkerGUID = pCreature->GetGUID(); + break; + case NPC_STINKY: + m_uiStinkyGUID = pCreature->GetGUID(); + break; + case NPC_PRECIOUS: + m_uiPreciousGUID = pCreature->GetGUID(); + break; + case NPC_COMBAT_TRIGGER: + m_uidummyTargetGUID = pCreature->GetGUID(); + break; + case NPC_FROSTMOURNE_TRIGGER: + m_uiFrostmourneTriggerGUID = pCreature->GetGUID(); + break; + case NPC_FROSTMOURNE_HOLDER: + m_uiFrostmourneHolderGUID = pCreature->GetGUID(); + break; + case NPC_BLOOD_ORB_CONTROL: + m_uiBloodOrbCtrlGUID = pCreature->GetGUID(); + break; + } + } + + void instance_icecrown_spire::OnObjectCreate(GameObject* pGo) + { + switch(pGo->GetEntry()) + { + case GO_ICEWALL_1: + m_uiIcewall1GUID = pGo->GetGUID(); + break; + case GO_ICEWALL_2: + m_uiIcewall2GUID = pGo->GetGUID(); + break; + case GO_ORATORY_DOOR: + m_uiOratoryDoorGUID = pGo->GetGUID(); + break; + case GO_DEATHWHISPER_ELEVATOR: + m_uiDeathWhisperElevatorGUID = pGo->GetGUID(); + break; + case GO_SAURFANG_DOOR: + m_uiSaurfangDoorGUID = pGo->GetGUID(); + break; + case GO_ORANGE_PLAGUE: + m_uiOrangePlagueGUID = pGo->GetGUID(); + break; + case GO_GREEN_PLAGUE: + m_uiGreenPlagueGUID = pGo->GetGUID(); + break; + case GO_SCIENTIST_DOOR_GREEN: + m_uiSDoorGreenGUID = pGo->GetGUID(); + break; + case GO_SCIENTIST_DOOR_ORANGE: + m_uiSDoorOrangeGUID = pGo->GetGUID(); + break; + case GO_SCIENTIST_DOOR_COLLISION: + m_uiSDoorCollisionGUID = pGo->GetGUID(); + break; + case GO_SCIENTIST_DOOR: + m_uiScientistDoorGUID = pGo->GetGUID(); + break; + case GO_CRIMSON_HALL_DOOR: + m_uiCrimsonDoorGUID = pGo->GetGUID(); + break; + case GO_BLOODWING_DOOR: + m_uiBloodwingDoorGUID = pGo->GetGUID(); + break; + case GO_COUNCIL_DOOR_1: + m_uiCounsilDoor1GUID = pGo->GetGUID(); + break; + case GO_COUNCIL_DOOR_2: + m_uiCounsilDoor2GUID = pGo->GetGUID(); + break; + case GO_FROSTWING_DOOR: + m_uiFrostwingDoorGUID = pGo->GetGUID(); + break; + case GO_GREEN_DRAGON_DOOR_1: + m_uiGreenDragonDoor1GUID = pGo->GetGUID(); + break; + case GO_GREEN_DRAGON_DOOR_2: + m_uiGreenDragonDoor2GUID = pGo->GetGUID(); + break; + case GO_VALITHRIA_DOOR_1: + m_uiValithriaDoor1GUID = pGo->GetGUID(); + break; + case GO_VALITHRIA_DOOR_2: + m_uiValithriaDoor2GUID = pGo->GetGUID(); + break; + case GO_VALITHRIA_DOOR_3: + m_uiValithriaDoor3GUID = pGo->GetGUID(); + break; + case GO_VALITHRIA_DOOR_4: + m_uiValithriaDoor4GUID = pGo->GetGUID(); + break; + case GO_SINDRAGOSA_DOOR_1: + m_uiSindragosaDoor1GUID = pGo->GetGUID(); + break; + case GO_SINDRAGOSA_DOOR_2: + m_uiSindragosaDoor2GUID = pGo->GetGUID(); + break; + case GO_SAURFANG_CACHE_10: + if(Difficulty == RAID_DIFFICULTY_10MAN_NORMAL) + m_uiSaurfangCacheGUID = pGo->GetGUID(); + break; + case GO_SAURFANG_CACHE_25: + if(Difficulty == RAID_DIFFICULTY_25MAN_NORMAL) + m_uiSaurfangCacheGUID = pGo->GetGUID(); + break; + case GO_SAURFANG_CACHE_10_H: + if(Difficulty == RAID_DIFFICULTY_10MAN_HEROIC) + m_uiSaurfangCacheGUID = pGo->GetGUID(); + break; + case GO_SAURFANG_CACHE_25_H: + if(Difficulty == RAID_DIFFICULTY_25MAN_HEROIC) + m_uiSaurfangCacheGUID = pGo->GetGUID(); + break; + case GO_GUNSHIP_ARMORY_A_10: + if(Difficulty == RAID_DIFFICULTY_10MAN_NORMAL) + m_uiGunshipArmoryAGUID = pGo->GetGUID(); + break; + case GO_GUNSHIP_ARMORY_A_25: + if(Difficulty == RAID_DIFFICULTY_25MAN_NORMAL) + m_uiGunshipArmoryAGUID = pGo->GetGUID(); + break; + case GO_GUNSHIP_ARMORY_A_10H: + if(Difficulty == RAID_DIFFICULTY_10MAN_HEROIC) + m_uiGunshipArmoryAGUID = pGo->GetGUID(); + break; + case GO_GUNSHIP_ARMORY_A_25H: + if(Difficulty == RAID_DIFFICULTY_25MAN_HEROIC) + m_uiGunshipArmoryAGUID = pGo->GetGUID(); + break; + case GO_GUNSHIP_ARMORY_H_10: + if(Difficulty == RAID_DIFFICULTY_10MAN_NORMAL) + m_uiGunshipArmoryHGUID = pGo->GetGUID(); + break; + case GO_GUNSHIP_ARMORY_H_25: + if(Difficulty == RAID_DIFFICULTY_25MAN_NORMAL) + m_uiGunshipArmoryHGUID = pGo->GetGUID(); + break; + case GO_GUNSHIP_ARMORY_H_10H: + if(Difficulty == RAID_DIFFICULTY_10MAN_HEROIC) + m_uiGunshipArmoryHGUID = pGo->GetGUID(); + break; + case GO_GUNSHIP_ARMORY_H_25H: + if(Difficulty == RAID_DIFFICULTY_25MAN_HEROIC) + m_uiGunshipArmoryHGUID = pGo->GetGUID(); + break; + case GO_DREAMWALKER_CACHE_10: + if(Difficulty == RAID_DIFFICULTY_10MAN_NORMAL) + m_uiValitriaCacheGUID = pGo->GetGUID(); + break; + case GO_DREAMWALKER_CACHE_25: + if(Difficulty == RAID_DIFFICULTY_25MAN_NORMAL) + m_uiValitriaCacheGUID = pGo->GetGUID(); + break; + case GO_DREAMWALKER_CACHE_10_H: + if(Difficulty == RAID_DIFFICULTY_10MAN_HEROIC) + m_uiValitriaCacheGUID = pGo->GetGUID(); + break; + case GO_DREAMWALKER_CACHE_25_H: + if(Difficulty == RAID_DIFFICULTY_25MAN_HEROIC) + m_uiValitriaCacheGUID = pGo->GetGUID(); + break; + case GO_ICESHARD_1: + m_uiIceShard1GUID = pGo->GetGUID(); + break; + case GO_ICESHARD_2: + m_uiIceShard2GUID = pGo->GetGUID(); + break; + case GO_ICESHARD_3: + m_uiIceShard3GUID = pGo->GetGUID(); + break; + case GO_ICESHARD_4: + m_uiIceShard4GUID = pGo->GetGUID(); + break; + case GO_FROSTY_WIND: + m_uiFrostyWindGUID = pGo->GetGUID(); + break; + case GO_FROSTY_EDGE: + m_uiFrostyEdgeGUID = pGo->GetGUID(); + break; + case GO_SNOW_EDGE: + m_uiSnowEdgeGUID = pGo->GetGUID(); + break; + case GO_ARTHAS_PLATFORM: + m_uiArthasPlatformGUID = pGo->GetGUID(); + break; + case GO_ARTHAS_PRECIPICE: + m_uiArthasPrecipiceGUID = pGo->GetGUID(); + break; + case GO_GAS_RELEASE_VALVE: + m_uiGasReleaseValveGUID = pGo->GetGUID(); + break; + case GO_MARROWGAR_DOOR: m_uiMarrogarDoor = pGo->GetGUID(); break; + case GO_BLOODPRINCE_DOOR: m_uiBloodPrinceDoor = pGo->GetGUID(); break; + case GO_ICECROWN_GRATE: m_uiIceCrownGrate = pGo->GetGUID(); break; + case GO_SINDRAGOSA_ENTRANCE: m_uiSindragosaEntrance = pGo->GetGUID(); break; + } + OpenAllDoors(); + } + + void instance_icecrown_spire::SetData(uint32 uiType, uint32 uiData) + { + switch(uiType) + { + case TYPE_TELEPORT: + break; + case TYPE_MARROWGAR: + m_auiEncounter[TYPE_MARROWGAR] = uiData; + if (uiData == IN_PROGRESS) + DoCloseDoor(m_uiMarrogarDoor); + else DoOpenDoor(m_uiMarrogarDoor); + + if (uiData == DONE) + { + DoOpenDoor(m_uiIcewall1GUID); + DoOpenDoor(m_uiIcewall2GUID); + DoOpenDoor(m_uiOratoryDoorGUID); + } + break; + case TYPE_DEATHWHISPER: + m_auiEncounter[TYPE_DEATHWHISPER] = uiData; + if (uiData == IN_PROGRESS) + DoCloseDoor(m_uiOratoryDoorGUID); + else DoOpenDoor(m_uiOratoryDoorGUID); + + if (uiData == DONE) + { + if (GameObject* pGO = instance->GetGameObject(m_uiDeathWhisperElevatorGUID)) + { + pGO->SetUInt32Value(GAMEOBJECT_LEVEL, 0); + pGO->SetGoState(GO_STATE_READY); + } + } + break; + case TYPE_FLIGHT_WAR: + if (uiData == DONE && m_auiEncounter[TYPE_FLIGHT_WAR] != DONE ) { + if (GameObject* pChest = instance->GetGameObject(m_uiGunshipArmoryAGUID)) + if (pChest && !pChest->isSpawned()) { + pChest->SetRespawnTime(7*DAY); + }; + + if (GameObject* pChest = instance->GetGameObject(m_uiGunshipArmoryHGUID)) + if (pChest && !pChest->isSpawned()) { + pChest->SetRespawnTime(7*DAY); + }; + }; + m_auiEncounter[3] = uiData; + break; + case TYPE_SAURFANG: + m_auiEncounter[TYPE_SAURFANG] = uiData; + if (uiData == DONE) + { + DoOpenDoor(m_uiSaurfangDoorGUID); + DoOpenDoor(m_uiBloodwingDoorGUID); + DoOpenDoor(m_uiFrostwingDoorGUID); + + if (GameObject* pChest = instance->GetGameObject(m_uiSaurfangCacheGUID)) + if (pChest && !pChest->isSpawned()) + { + pChest->SetRespawnTime(7*DAY); + }; + }; + break; + case TYPE_FESTERGUT: + m_auiEncounter[TYPE_FESTERGUT] = uiData; + + if (uiData == IN_PROGRESS) + DoCloseDoor(m_uiOrangePlagueGUID); + else DoOpenDoor(m_uiOrangePlagueGUID); + + if (uiData == DONE) + { + DoOpenDoor(m_uiSDoorOrangeGUID); + if (m_auiEncounter[TYPE_ROTFACE] == DONE) + { + DoOpenDoor(m_uiSDoorCollisionGUID); + DoOpenDoor(m_uiGreenPlagueGUID); + } + } + break; + case TYPE_ROTFACE: + m_auiEncounter[TYPE_ROTFACE] = uiData; + if (uiData == IN_PROGRESS) + DoCloseDoor(m_uiGreenPlagueGUID); + else + DoOpenDoor(m_uiGreenPlagueGUID); + if (uiData == DONE) + { + DoOpenDoor(m_uiSDoorGreenGUID); + if (m_auiEncounter[TYPE_FESTERGUT] == DONE) + { + DoOpenDoor(m_uiSDoorOrangeGUID); + DoOpenDoor(m_uiSDoorCollisionGUID); + } + } + break; + case TYPE_PUTRICIDE: + m_auiEncounter[TYPE_PUTRICIDE] = uiData; + if (uiData == IN_PROGRESS) + DoCloseDoor(m_uiScientistDoorGUID); + else + DoOpenDoor(m_uiScientistDoorGUID); + if (uiData == DONE) + { + if (m_auiEncounter[TYPE_SINDRAGOSA] == DONE + && m_auiEncounter[TYPE_LANATHEL] == DONE) + m_auiEncounter[TYPE_KINGS_OF_ICC] = DONE; + } + break; + case TYPE_BLOOD_COUNCIL: + m_auiEncounter[TYPE_BLOOD_COUNCIL] = uiData; + + if (uiData == IN_PROGRESS) + DoCloseDoor(m_uiCrimsonDoorGUID); + else + DoOpenDoor(m_uiCrimsonDoorGUID); + + if (uiData == DONE) + { + DoOpenDoor(m_uiCounsilDoor1GUID); + DoOpenDoor(m_uiCounsilDoor2GUID); + } + break; + case TYPE_LANATHEL: + m_auiEncounter[TYPE_LANATHEL] = uiData; + + if (uiData == IN_PROGRESS) + DoCloseDoor(m_uiBloodPrinceDoor); + else DoOpenDoor(m_uiBloodPrinceDoor); + + if (uiData == DONE) + { + DoOpenDoor(m_uiIceCrownGrate); + + if (m_auiEncounter[TYPE_PUTRICIDE] == DONE + && m_auiEncounter[TYPE_SINDRAGOSA] == DONE) + m_auiEncounter[TYPE_KINGS_OF_ICC] = DONE; + } + break; + case TYPE_VALITHRIA: + m_auiEncounter[TYPE_VALITHRIA] = uiData; + + if (uiData == IN_PROGRESS) + DoCloseDoor(m_uiGreenDragonDoor1GUID); + else + DoOpenDoor(m_uiGreenDragonDoor1GUID); + + if (uiData == DONE) + { + DoOpenDoor(m_uiGreenDragonDoor2GUID); + DoOpenDoor(m_uiSindragosaDoor1GUID); + DoOpenDoor(m_uiSindragosaDoor2GUID); + if (GameObject* pChest = instance->GetGameObject(m_uiValitriaCacheGUID)) + if (pChest && !pChest->isSpawned()) + { + pChest->SetRespawnTime(7*DAY); + }; + }; + break; + case TYPE_SINDRAGOSA: + m_auiEncounter[TYPE_SINDRAGOSA] = uiData; + + if (uiData == IN_PROGRESS) + DoCloseDoor(m_uiSindragosaEntrance); + else + DoOpenDoor(m_uiSindragosaEntrance); + + if (uiData == DONE) + { + if (m_auiEncounter[TYPE_PUTRICIDE] == DONE + && m_auiEncounter[TYPE_LANATHEL] == DONE) + m_auiEncounter[TYPE_KINGS_OF_ICC] = DONE; + } + break; + case TYPE_LICH_KING: + m_auiEncounter[TYPE_LICH_KING] = uiData; + break; + case TYPE_ICECROWN_QUESTS: + m_auiEncounter[TYPE_ICECROWN_QUESTS] = uiData; + break; + case TYPE_COUNT: + m_auiEncounter[TYPE_COUNT] = uiData; + uiData = NOT_STARTED; + break; + case DATA_BLOOD_INVOCATION: m_uiCouncilInvocation = uiData; + uiData = NOT_STARTED; + break; + case DATA_DIRECTION: m_uiDirection = uiData; + uiData = NOT_STARTED; + break; + case TYPE_EVENT: m_auiEvent = uiData; uiData = NOT_STARTED; break; + case TYPE_EVENT_TIMER: m_auiEventTimer = uiData; uiData = NOT_STARTED; break; + case TYPE_STINKY: m_uiStinkystate = uiData; uiData = NOT_STARTED; break; + case TYPE_PRECIOUS: m_uiPreciousstate = uiData; uiData = NOT_STARTED; break; + } + + if (uiData == DONE) + { + OUT_SAVE_INST_DATA; + + std::ostringstream saveStream; + + for(uint8 i = 0; i < MAX_ENCOUNTERS; ++i) + saveStream << m_auiEncounter[i] << " "; + + strSaveData = saveStream.str(); + + SaveToDB(); + OUT_SAVE_INST_DATA_COMPLETE; + } + } + + uint32 instance_icecrown_spire::GetData(uint32 uiType) + { + switch(uiType) + { + case TYPE_TELEPORT: + case TYPE_MARROWGAR: + case TYPE_DEATHWHISPER: + case TYPE_FLIGHT_WAR: + case TYPE_SAURFANG: + case TYPE_FESTERGUT: + case TYPE_ROTFACE: + case TYPE_PUTRICIDE: + case TYPE_BLOOD_COUNCIL: + case TYPE_LANATHEL: + case TYPE_VALITHRIA: + case TYPE_SINDRAGOSA: + case TYPE_KINGS_OF_ICC: + case TYPE_LICH_KING: + case TYPE_ICECROWN_QUESTS: + case TYPE_COUNT: + return m_auiEncounter[uiType]; + + case DATA_DIRECTION: return m_uiDirection; + case DATA_BLOOD_INVOCATION: return m_uiCouncilInvocation; + case TYPE_STINKY: return m_uiStinkystate; + case TYPE_PRECIOUS: return m_uiPreciousstate; + case TYPE_EVENT: return m_auiEvent; + case TYPE_EVENT_TIMER: return m_auiEventTimer; + case TYPE_EVENT_NPC: switch (m_auiEvent) + { + case 12030: + case 12050: + case 12051: + case 12052: + case 12053: + case 12070: + case 12090: + case 12110: + case 12130: + case 12150: + case 12170: + case 13110: + case 13130: + case 13131: + case 13132: + case 13150: + case 13170: + case 13190: + case 13210: + case 13230: + case 13250: + case 13270: + case 13290: + case 13310: + case 13330: + case 13350: + case 13370: + case 14010: + case 14030: + case 14050: + case 14070: + return NPC_TIRION; + break; + + case 12000: + case 12020: + case 12040: + case 12041: + case 12042: + case 12043: + case 12060: + case 12080: + case 12100: + case 12120: + case 12200: + case 13000: + case 13020: + case 13040: + case 13060: + case 13080: + case 13100: + case 13120: + case 13140: + case 13160: + case 13180: + case 13200: + case 13220: + case 13240: + case 13260: + case 13280: + case 13300: + case 14000: + return NPC_LICH_KING; + break; + case 500: + case 510: + case 550: + case 560: + case 570: + case 580: + case 590: + case 600: + case 610: + case 620: + case 630: + case 640: + case 650: + case 660: + return NPC_PROFESSOR_PUTRICIDE; + break; + + case 800: + case 810: + case 820: + return NPC_LANATHEL_INTRO; + break; + + default: + break; + }; + + } + return 0; + } + + uint64 instance_icecrown_spire::GetData64(uint32 uiData) + { + switch(uiData) + { + case NPC_LORD_MARROWGAR: return m_uiMarrogwarGUID; + case NPC_LADY_DEATHWHISPER: return m_uiDeathWhisperGUID; + case NPC_DEATHBRINGER_SAURFANG: return m_uiSaurfangGUID; + case NPC_FESTERGUT: return m_uiFestergutGUID; + case NPC_ROTFACE: return m_uiRotfaceGUID; + case NPC_PROFESSOR_PUTRICIDE: return m_uiPutricideGUID; + case NPC_TALDARAM: return m_uiTaldaramGUID; + case NPC_VALANAR: return m_uiValanarGUID; + case NPC_KELESETH: return m_uiKelesethGUID; + case NPC_LANATHEL: return m_uiLanathelGUID; + case NPC_LANATHEL_INTRO: return m_uiLanathelintroGUID; + case NPC_VALITHRIA: return m_uiValithriaGUID; + case NPC_VALITHRIA_QUEST: return m_uiValithriaQuestGUID; + case NPC_SINDRAGOSA: return m_uiSindragosaGUID; + case NPC_LICH_KING: return m_uiLichKingGUID; + case NPC_RIMEFANG: return m_uiRimefangGUID; + case NPC_SPINESTALKER: return m_uiSpinestalkerGUID; + case NPC_STINKY: return m_uiStinkyGUID; + case NPC_PRECIOUS: return m_uiPreciousGUID; + case GO_SCIENTIST_DOOR_ORANGE: return m_uiSDoorOrangeGUID; + case GO_SCIENTIST_DOOR_GREEN: return m_uiSDoorGreenGUID; + case GO_SCIENTIST_DOOR_COLLISION: return m_uiSDoorCollisionGUID; + case GO_BLOODWING_DOOR: return m_uiBloodwingDoorGUID; + case GO_FROSTWING_DOOR: return m_uiFrostwingDoorGUID; + case GO_VALITHRIA_DOOR_1: return m_uiValithriaDoor1GUID; + case GO_VALITHRIA_DOOR_2: return m_uiValithriaDoor2GUID; + case GO_VALITHRIA_DOOR_3: return m_uiValithriaDoor3GUID; + case GO_VALITHRIA_DOOR_4: return m_uiValithriaDoor4GUID; + case GO_ICESHARD_1: return m_uiIceShard1GUID; + case GO_ICESHARD_2: return m_uiIceShard2GUID; + case GO_ICESHARD_3: return m_uiIceShard3GUID; + case GO_ICESHARD_4: return m_uiIceShard4GUID; + case GO_FROSTY_WIND: return m_uiFrostyWindGUID; + case GO_FROSTY_EDGE: return m_uiFrostyEdgeGUID; + case GO_SNOW_EDGE: return m_uiSnowEdgeGUID; + case GO_ARTHAS_PLATFORM: return m_uiArthasPlatformGUID; + case GO_ARTHAS_PRECIPICE: return m_uiArthasPrecipiceGUID; + case NPC_FROSTMOURNE_TRIGGER: return m_uiFrostmourneTriggerGUID; + case NPC_FROSTMOURNE_HOLDER: return m_uiFrostmourneHolderGUID; + case NPC_COMBAT_TRIGGER: return m_uidummyTargetGUID; + case GO_GAS_RELEASE_VALVE: return m_uiGasReleaseValveGUID; + case NPC_BLOOD_ORB_CONTROL: return m_uiBloodOrbCtrlGUID; + case GO_MARROWGAR_DOOR: return m_uiMarrogarDoor; + case GO_BLOODPRINCE_DOOR: return m_uiBloodPrinceDoor; + case GO_ICECROWN_GRATE: return m_uiIceCrownGrate; + case GO_SINDRAGOSA_ENTRANCE: return m_uiSindragosaEntrance; + } + return 0; + } + + void instance_icecrown_spire::Load(const char* chrIn) + { + if (!chrIn) + { + OUT_LOAD_INST_DATA_FAIL; + return; + } + + OUT_LOAD_INST_DATA(chrIn); + + std::istringstream loadStream(chrIn); + + for(uint8 i = 0; i < MAX_ENCOUNTERS; ++i) + { + loadStream >> m_auiEncounter[i]; + + if (m_auiEncounter[i] == IN_PROGRESS && i >= 1) + m_auiEncounter[i] = NOT_STARTED; + } + + OUT_LOAD_INST_DATA_COMPLETE; + OpenAllDoors(); + } + + bool instance_icecrown_spire::CheckAchievementCriteriaMeet(uint32 criteria_id, Player const* player, Unit const* /*target*/, uint32 /*miscvalue1*/) + { + return GetCriteriaState(criteria_id, player); + } + +InstanceData* GetInstanceData_instance_icecrown_spire(Map* pMap) +{ + return new instance_icecrown_spire(pMap); +} + + +void AddSC_instance_icecrown_spire() +{ + Script* pNewScript; + pNewScript = new Script; + pNewScript->Name = "instance_icecrown_spire"; + pNewScript->GetInstanceData = &GetInstanceData_instance_icecrown_spire; + pNewScript->RegisterSelf(); } diff --git a/scripts/northrend/naxxramas/boss_anubrekhan.cpp b/scripts/northrend/naxxramas/boss_anubrekhan.cpp index f584f60..56c7fe6 100644 --- a/scripts/northrend/naxxramas/boss_anubrekhan.cpp +++ b/scripts/northrend/naxxramas/boss_anubrekhan.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2010 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/scripts/northrend/nexus/eye_of_eternity/boss_malygos.cpp b/scripts/northrend/nexus/eye_of_eternity/boss_malygos.cpp index eaff00a..17c352f 100644 --- a/scripts/northrend/nexus/eye_of_eternity/boss_malygos.cpp +++ b/scripts/northrend/nexus/eye_of_eternity/boss_malygos.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or @@ -1481,7 +1481,7 @@ struct MANGOS_DLL_DECL npc_whyrmrest_skytalonAI : public ScriptedAI { Active = false; seated = false; - ownerGUID = 0; + ownerGUID = ObjectGuid(); StartTimer = 500; SeatTimer = 2000; ownerGUID = m_creature->GetCreatorGuid(); diff --git a/scripts/northrend/nexus/nexus/boss_anomalus.cpp b/scripts/northrend/nexus/nexus/boss_anomalus.cpp index 0b21132..dc827b7 100644 --- a/scripts/northrend/nexus/nexus/boss_anomalus.cpp +++ b/scripts/northrend/nexus/nexus/boss_anomalus.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/scripts/northrend/nexus/nexus/boss_keristrasza.cpp b/scripts/northrend/nexus/nexus/boss_keristrasza.cpp index 2121fc9..470e751 100644 --- a/scripts/northrend/nexus/nexus/boss_keristrasza.cpp +++ b/scripts/northrend/nexus/nexus/boss_keristrasza.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2010 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or @@ -150,7 +150,7 @@ struct MANGOS_DLL_DECL boss_keristraszaAI : public ScriptedAI if (uiTailSweepTimer < uiDiff) { - if (DoCastSpellIfCan(m_creature, SPELL_TAIL_SWEEP) == CAST_OK) + if (DoCastSpellIfCan(m_creature, SPELL_TAIL_SWEEP) == CAST_OK) uiTailSweepTimer = urand(2500, 7500); } else diff --git a/scripts/northrend/nexus/nexus/boss_ormorok.cpp b/scripts/northrend/nexus/nexus/boss_ormorok.cpp index 752022d..6e5a71a 100644 --- a/scripts/northrend/nexus/nexus/boss_ormorok.cpp +++ b/scripts/northrend/nexus/nexus/boss_ormorok.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/scripts/northrend/nexus/nexus/boss_telestra.cpp b/scripts/northrend/nexus/nexus/boss_telestra.cpp index cf6349d..1a61b08 100644 --- a/scripts/northrend/nexus/nexus/boss_telestra.cpp +++ b/scripts/northrend/nexus/nexus/boss_telestra.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/scripts/northrend/nexus/nexus/instance_nexus.cpp b/scripts/northrend/nexus/nexus/instance_nexus.cpp index 626a2cd..8f01acd 100644 --- a/scripts/northrend/nexus/nexus/instance_nexus.cpp +++ b/scripts/northrend/nexus/nexus/instance_nexus.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2010 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/scripts/northrend/nexus/nexus/nexus.h b/scripts/northrend/nexus/nexus/nexus.h index 60a7e4b..f69854a 100644 --- a/scripts/northrend/nexus/nexus/nexus.h +++ b/scripts/northrend/nexus/nexus/nexus.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/scripts/northrend/nexus/oculus/boss_drakos.cpp b/scripts/northrend/nexus/oculus/boss_drakos.cpp index 1c220c1..71c809e 100644 --- a/scripts/northrend/nexus/oculus/boss_drakos.cpp +++ b/scripts/northrend/nexus/oculus/boss_drakos.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2008 - 2011 TrinityCore +/* Copyright (C) 2008 - 2010 TrinityCore * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/scripts/northrend/nexus/oculus/instance_oculus.cpp b/scripts/northrend/nexus/oculus/instance_oculus.cpp index 6e6576f..95219b7 100644 --- a/scripts/northrend/nexus/oculus/instance_oculus.cpp +++ b/scripts/northrend/nexus/oculus/instance_oculus.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2008 - 2011 TrinityCore +/* Copyright (C) 2008 - 2010 TrinityCore * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/scripts/northrend/nexus/oculus/oculus.cpp b/scripts/northrend/nexus/oculus/oculus.cpp index 7cdc0b3..2630b74 100644 --- a/scripts/northrend/nexus/oculus/oculus.cpp +++ b/scripts/northrend/nexus/oculus/oculus.cpp @@ -52,7 +52,7 @@ struct MANGOS_DLL_DECL mob_oculus_dragonAI : public ScriptedAI void Reset() { Active = false; - ownerGUID = 0; + ownerGUID = ObjectGuid(); StartTimer = 2000; switch (m_creature->GetEntry()) { diff --git a/scripts/northrend/obsidian_sanctum/boss_sartharion.cpp b/scripts/northrend/obsidian_sanctum/boss_sartharion.cpp index c04f215..a6bc4a2 100644 --- a/scripts/northrend/obsidian_sanctum/boss_sartharion.cpp +++ b/scripts/northrend/obsidian_sanctum/boss_sartharion.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2010 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/scripts/northrend/obsidian_sanctum/instance_obsidian_sanctum.cpp b/scripts/northrend/obsidian_sanctum/instance_obsidian_sanctum.cpp index 2f1bb92..d114854 100644 --- a/scripts/northrend/obsidian_sanctum/instance_obsidian_sanctum.cpp +++ b/scripts/northrend/obsidian_sanctum/instance_obsidian_sanctum.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/scripts/northrend/obsidian_sanctum/obsidian_sanctum.h b/scripts/northrend/obsidian_sanctum/obsidian_sanctum.h index 8351380..5b81600 100644 --- a/scripts/northrend/obsidian_sanctum/obsidian_sanctum.h +++ b/scripts/northrend/obsidian_sanctum/obsidian_sanctum.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/scripts/northrend/ruby_sanctum/instance_ruby_sanctum.cpp b/scripts/northrend/ruby_sanctum/instance_ruby_sanctum.cpp index ec94cf3..c747912 100644 --- a/scripts/northrend/ruby_sanctum/instance_ruby_sanctum.cpp +++ b/scripts/northrend/ruby_sanctum/instance_ruby_sanctum.cpp @@ -1,18 +1,19 @@ -/* Copyright (C) 2006 - 2010 ScriptDev2 -* This program is free software; you can redistribute it and/or modify -* it under the terms of the GNU General Public License as published by -* the Free Software Foundation; either version 2 of the License, or -* (at your option) any later version. -* -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program; if not, write to the Free Software -* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -*/ +/* Copyright (C) 2006 - 2011 ScriptDev2 + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + /* ScriptData SDName: instance_ruby_sanctum SD%Complete: 50% diff --git a/scripts/northrend/sholazar_basin.cpp b/scripts/northrend/sholazar_basin.cpp index 2922fe0..b14d901 100644 --- a/scripts/northrend/sholazar_basin.cpp +++ b/scripts/northrend/sholazar_basin.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or @@ -17,11 +17,12 @@ /* ScriptData SDName: Sholazar_Basin SD%Complete: 100 -SDComment: Quest support: 12573, 12570, 12580 +SDComment: Quest support: 12573, 12570, 12580, 12688 SDCategory: Sholazar Basin EndScriptData */ /* ContentData +npc_helice npc_injured_rainspeaker npc_mosswalker_victim npc_vekjik - TODO, can be moved to database (already exist) @@ -30,6 +31,171 @@ EndContentData */ #include "precompiled.h" #include "escort_ai.h" +/*###### +## npc_helice +######*/ + +enum +{ + QUEST_ENGINEERING_DISASTER = 12688, + + SAY_HELICE_ACCEPT = -1000657, + SAY_HELICE_EXPLOSIVES_1 = -1000658, + SAY_HELICE_EXPLODE_1 = -1000659, + SAY_HELICE_MOVE_ON = -1000660, + SAY_HELICE_EXPLOSIVES_2 = -1000661, + SAY_HELICE_EXPLODE_2 = -1000662, + SAY_HELICE_COMPLETE = -1000663, + + SPELL_DETONATE_EXPLOSIVES_1 = 52369, // first "barrel" + SPELL_DETONATE_EXPLOSIVES_2 = 52371, // second "barrel" +}; + +struct MANGOS_DLL_DECL npc_heliceAI : public npc_escortAI +{ + npc_heliceAI(Creature* pCreature) : npc_escortAI(pCreature) + { + m_uiExplodeTimer = 5000; + m_uiExplodePhase = 0; + m_bFirstBarrel = true; + Reset(); + } + + uint32 m_uiExplodeTimer; + uint32 m_uiExplodePhase; + bool m_bFirstBarrel; + + void Reset() + { + } + + void WaypointReached(uint32 uiPointId) + { + switch(uiPointId) + { + case 2: + { + if (Player* pPlayer = GetPlayerForEscort()) + { + DoScriptText(SAY_HELICE_EXPLOSIVES_1, m_creature, pPlayer); + SetEscortPaused(true); + } + break; + } + case 13: + { + if (Player* pPlayer = GetPlayerForEscort()) + { + DoScriptText(SAY_HELICE_EXPLOSIVES_2, m_creature, pPlayer); + SetEscortPaused(true); + } + break; + } + case 22: + { + if (Player* pPlayer = GetPlayerForEscort()) + { + DoScriptText(SAY_HELICE_COMPLETE, m_creature, pPlayer); + pPlayer->GroupEventHappens(QUEST_ENGINEERING_DISASTER, m_creature); + } + break; + } + } + } + + void UpdateEscortAI(const uint32 uiDiff) + { + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) + { + if (!HasEscortState(STATE_ESCORT_ESCORTING)) + return; + + if (HasEscortState(STATE_ESCORT_PAUSED)) + { + if (m_uiExplodeTimer < uiDiff) + { + if (m_bFirstBarrel) + { + switch(m_uiExplodePhase) + { + case 0: + DoCastSpellIfCan(m_creature, SPELL_DETONATE_EXPLOSIVES_1); + + if (Player* pPlayer = GetPlayerForEscort()) + DoScriptText(SAY_HELICE_EXPLODE_1, m_creature, pPlayer); + + m_uiExplodeTimer = 2500; + ++m_uiExplodePhase; + break; + case 1: + if (Player* pPlayer = GetPlayerForEscort()) + DoScriptText(SAY_HELICE_MOVE_ON, m_creature, pPlayer); + + m_uiExplodeTimer = 2500; + ++m_uiExplodePhase; + break; + case 2: + SetEscortPaused(false); + m_uiExplodePhase = 0; + m_uiExplodeTimer = 5000; + m_bFirstBarrel = false; + break; + } + } + else + { + switch(m_uiExplodePhase) + { + case 0: + DoCastSpellIfCan(m_creature, SPELL_DETONATE_EXPLOSIVES_2); + + if (Player* pPlayer = GetPlayerForEscort()) + DoScriptText(SAY_HELICE_EXPLODE_2, m_creature, pPlayer); + + m_uiExplodeTimer = 2500; + ++m_uiExplodePhase; + break; + case 1: + SetEscortPaused(false); + m_uiExplodePhase = 0; + m_uiExplodeTimer = 5000; + m_bFirstBarrel = true; + break; + } + } + } + else + m_uiExplodeTimer -= uiDiff; + } + + return; + } + + DoMeleeAttackIfReady(); + } +}; + +CreatureAI* GetAI_npc_helice(Creature* pCreature) +{ + return new npc_heliceAI(pCreature); +} + +bool QuestAccept_npc_helice(Player* pPlayer, Creature* pCreature, const Quest* pQuest) +{ + if (pQuest->GetQuestId() == QUEST_ENGINEERING_DISASTER) + { + DoScriptText(SAY_HELICE_ACCEPT, pCreature, pPlayer); + + if (npc_heliceAI* pEscortAI = dynamic_cast(pCreature->AI())) + { + pEscortAI->Start(false, pPlayer->GetGUID(), pQuest); + pCreature->SetFactionTemporary(FACTION_ESCORT_N_NEUTRAL_PASSIVE, TEMPFACTION_RESTORE_RESPAWN); + } + } + + return false; +} + /*###### ## npc_injured_rainspeaker ######*/ @@ -44,15 +210,15 @@ enum SAY_START = -1000606, SAY_END_1 = -1000607, SAY_END_2 = -1000608, - SAY_TRACKER = -1000609, + SAY_TRACKER = -1000609, // not used in escort (aggro text for trackers? something for vekjik?) NPC_FRENZYHEART_TRACKER = 28077, + SPELL_ORACLE_ESCORT_START = 51341, // unknown purpose SPELL_FEIGN_DEATH = 51329, SPELL_ORACLE_INTRO = 51448, }; -// TODO: add, if faction change is expected. struct MANGOS_DLL_DECL npc_injured_rainspeakerAI : public npc_escortAI { npc_injured_rainspeakerAI(Creature* pCreature) : npc_escortAI(pCreature) { Reset(); } @@ -62,7 +228,10 @@ struct MANGOS_DLL_DECL npc_injured_rainspeakerAI : public npc_escortAI void JustStartedEscort() { if (Player* pPlayer = GetPlayerForEscort()) + { DoScriptText(SAY_START, m_creature, pPlayer); + DoCastSpellIfCan(m_creature, SPELL_ORACLE_ESCORT_START); + } } void WaypointReached(uint32 uiPointId) @@ -74,8 +243,7 @@ struct MANGOS_DLL_DECL npc_injured_rainspeakerAI : public npc_escortAI if (Player* pPlayer = GetPlayerForEscort()) { DoScriptText(SAY_END_1, m_creature, pPlayer); - // more likely m_creature->player, doesn't seem to work though. - pPlayer->CastSpell(pPlayer, SPELL_ORACLE_INTRO, true); + DoCastSpellIfCan(m_creature, SPELL_ORACLE_INTRO); } break; } @@ -96,11 +264,6 @@ struct MANGOS_DLL_DECL npc_injured_rainspeakerAI : public npc_escortAI } } - void JustSummoned(Creature* pSummoned) - { - DoScriptText(SAY_TRACKER, pSummoned); - } - void UpdateEscortAI(const uint32 uiDiff) { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) @@ -124,7 +287,10 @@ bool QuestAccept_npc_injured_rainspeaker(Player* pPlayer, Creature* pCreature, c // Workaround, GossipHello/GossipSelect doesn't work well when object already has gossip from database if (npc_injured_rainspeakerAI* pEscortAI = dynamic_cast(pCreature->AI())) + { pEscortAI->Start(true, pPlayer->GetGUID(), pQuest); + pCreature->SetFactionTemporary(FACTION_ESCORT_N_NEUTRAL_PASSIVE, TEMPFACTION_RESTORE_RESPAWN); + } } return false; @@ -301,6 +467,12 @@ void AddSC_sholazar_basin() { Script* pNewScript; + pNewScript = new Script; + pNewScript->Name = "npc_helice"; + pNewScript->GetAI = &GetAI_npc_helice; + pNewScript->pQuestAcceptNPC = &QuestAccept_npc_helice; + pNewScript->RegisterSelf(); + pNewScript = new Script; pNewScript->Name = "npc_injured_rainspeaker"; pNewScript->GetAI = &GetAI_npc_injured_rainspeaker; diff --git a/scripts/northrend/storm_peaks.cpp b/scripts/northrend/storm_peaks.cpp index f366ea5..569c82c 100644 --- a/scripts/northrend/storm_peaks.cpp +++ b/scripts/northrend/storm_peaks.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/scripts/northrend/ulduar/halls_of_lightning/boss_bjarngrim.cpp b/scripts/northrend/ulduar/halls_of_lightning/boss_bjarngrim.cpp index 52f9f4a..af1eeb4 100644 --- a/scripts/northrend/ulduar/halls_of_lightning/boss_bjarngrim.cpp +++ b/scripts/northrend/ulduar/halls_of_lightning/boss_bjarngrim.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2010 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/scripts/northrend/ulduar/halls_of_lightning/boss_ionar.cpp b/scripts/northrend/ulduar/halls_of_lightning/boss_ionar.cpp index aef11c2..7bdb827 100644 --- a/scripts/northrend/ulduar/halls_of_lightning/boss_ionar.cpp +++ b/scripts/northrend/ulduar/halls_of_lightning/boss_ionar.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2010 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/scripts/northrend/ulduar/halls_of_lightning/boss_loken.cpp b/scripts/northrend/ulduar/halls_of_lightning/boss_loken.cpp index 7e6851e..b9b2731 100644 --- a/scripts/northrend/ulduar/halls_of_lightning/boss_loken.cpp +++ b/scripts/northrend/ulduar/halls_of_lightning/boss_loken.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2010 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/scripts/northrend/ulduar/halls_of_lightning/boss_volkhan.cpp b/scripts/northrend/ulduar/halls_of_lightning/boss_volkhan.cpp index 21be19a..def1c3f 100644 --- a/scripts/northrend/ulduar/halls_of_lightning/boss_volkhan.cpp +++ b/scripts/northrend/ulduar/halls_of_lightning/boss_volkhan.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2010 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/scripts/northrend/ulduar/halls_of_lightning/halls_of_lightning.h b/scripts/northrend/ulduar/halls_of_lightning/halls_of_lightning.h index 72106ff..ced4afe 100644 --- a/scripts/northrend/ulduar/halls_of_lightning/halls_of_lightning.h +++ b/scripts/northrend/ulduar/halls_of_lightning/halls_of_lightning.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2010 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/scripts/northrend/ulduar/halls_of_lightning/instance_halls_of_lightning.cpp b/scripts/northrend/ulduar/halls_of_lightning/instance_halls_of_lightning.cpp index a789a90..bc3da73 100644 --- a/scripts/northrend/ulduar/halls_of_lightning/instance_halls_of_lightning.cpp +++ b/scripts/northrend/ulduar/halls_of_lightning/instance_halls_of_lightning.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2010 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/scripts/northrend/ulduar/halls_of_stone/boss_krystallus.cpp b/scripts/northrend/ulduar/halls_of_stone/boss_krystallus.cpp index 7546133..d267c54 100644 --- a/scripts/northrend/ulduar/halls_of_stone/boss_krystallus.cpp +++ b/scripts/northrend/ulduar/halls_of_stone/boss_krystallus.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or @@ -23,7 +23,7 @@ SDCategory: Halls of Stone EndScriptData */ #include "precompiled.h" -#include "def_halls_of_stone.h" +#include "halls_of_stone.h" enum { diff --git a/scripts/northrend/ulduar/halls_of_stone/boss_maiden_of_grief.cpp b/scripts/northrend/ulduar/halls_of_stone/boss_maiden_of_grief.cpp index ef8072c..8dde169 100644 --- a/scripts/northrend/ulduar/halls_of_stone/boss_maiden_of_grief.cpp +++ b/scripts/northrend/ulduar/halls_of_stone/boss_maiden_of_grief.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or @@ -22,7 +22,7 @@ SDCategory: Halls of Stone EndScriptData */ #include "precompiled.h" -#include "def_halls_of_stone.h" +#include "halls_of_stone.h" enum { diff --git a/scripts/northrend/ulduar/halls_of_stone/boss_sjonnir.cpp b/scripts/northrend/ulduar/halls_of_stone/boss_sjonnir.cpp index 21a50f2..67ec769 100644 --- a/scripts/northrend/ulduar/halls_of_stone/boss_sjonnir.cpp +++ b/scripts/northrend/ulduar/halls_of_stone/boss_sjonnir.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or @@ -22,7 +22,7 @@ SDCategory: Halls of Stone EndScriptData */ #include "precompiled.h" -#include "def_halls_of_stone.h" +#include "halls_of_stone.h" enum { diff --git a/scripts/northrend/ulduar/halls_of_stone/halls_of_stone.cpp b/scripts/northrend/ulduar/halls_of_stone/halls_of_stone.cpp index 0f733c9..ede2a0b 100644 --- a/scripts/northrend/ulduar/halls_of_stone/halls_of_stone.cpp +++ b/scripts/northrend/ulduar/halls_of_stone/halls_of_stone.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or @@ -23,7 +23,7 @@ EndScriptData */ #include "precompiled.h" #include "escort_ai.h" -#include "def_halls_of_stone.h" +#include "halls_of_stone.h" enum { @@ -151,7 +151,7 @@ struct MANGOS_DLL_DECL mob_tribuna_controllerAI : public ScriptedAI ScriptedInstance* m_pInstance; bool m_bIsRegularMode; - std::list m_lKaddrakGUIDList; + std::list m_lKaddrakGUIDList; //std::list m_lMarnakGUIDList; //std::list m_lAbedneumGUIDList; @@ -179,17 +179,20 @@ struct MANGOS_DLL_DECL mob_tribuna_controllerAI : public ScriptedAI } void UpdateFacesList() - { - GetCreatureListWithEntryInGrid(m_lKaddrakGUIDList, m_creature, NPC_KADDRAK, 50.0f); + { + std::list m_lKaddrakList; + m_lKaddrakGUIDList.clear(); + GetCreatureListWithEntryInGrid(m_lKaddrakList, m_creature, NPC_KADDRAK, 50.0f); if (!m_lKaddrakGUIDList.empty()) { uint32 uiPositionCounter = 0; - for(std::list::iterator itr = m_lKaddrakGUIDList.begin(); itr != m_lKaddrakGUIDList.end(); ++itr) + for(std::list::iterator itr = m_lKaddrakList.begin(); itr != m_lKaddrakList.end(); ++itr) { if (!(*itr)) continue; if (Creature* c = (Creature *)(*itr)) { + m_lKaddrakGUIDList.push_back((*itr)->GetGUID()); if (c->isAlive()) { if (uiPositionCounter == 0) @@ -219,9 +222,10 @@ struct MANGOS_DLL_DECL mob_tribuna_controllerAI : public ScriptedAI { if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) if (!m_lKaddrakGUIDList.empty()) - for(std::list::iterator itr = m_lKaddrakGUIDList.begin(); itr != m_lKaddrakGUIDList.end(); ++itr) - if ((*itr)->isAlive()) - (*itr)->CastSpell(pTarget, m_bIsRegularMode ? SPELL_GLARE_OF_THE_TRIBUNAL_H : SPELL_GLARE_OF_THE_TRIBUNAL, true); + for(std::list::iterator itr = m_lKaddrakGUIDList.begin(); itr != m_lKaddrakGUIDList.end(); ++itr) + if (Creature* pCreature = m_creature->GetMap()->GetCreature(*itr)) + if (pCreature->isAlive()) + pCreature->CastSpell(pTarget, m_bIsRegularMode ? SPELL_GLARE_OF_THE_TRIBUNAL_H : SPELL_GLARE_OF_THE_TRIBUNAL, true); m_uiKaddrak_Encounter_timer = 1500; } diff --git a/scripts/northrend/ulduar/halls_of_stone/halls_of_stone.h b/scripts/northrend/ulduar/halls_of_stone/halls_of_stone.h new file mode 100644 index 0000000..34b4c6d --- /dev/null +++ b/scripts/northrend/ulduar/halls_of_stone/halls_of_stone.h @@ -0,0 +1,57 @@ +/* Copyright (C) 2006 - 2009 ScriptDev2 + * This program is free software licensed under GPL version 2 + * Please see the included DOCS/LICENSE.TXT for more information */ + +#ifndef DEF_HALLS_OF_STONE_H +#define DEF_HALLS_OF_STONE_H + +enum +{ + MAX_ENCOUNTER = 4, + + DATA_KRYSTALLUS = 1, + DATA_GRIEF = 2, + DATA_BRANN = 3, + DATA_SJONNIR = 4, + + DATA_KADDRAK = 5, + DATA_ABEDNEUM = 6, + DATA_MARNAK = 7, + + DATA_GO_TRIBUNAL_CONSOLE = 8, + DATA_GO_SKY_FLOOR = 9, + DATA_GO_KADDRAK = 10, + DATA_GO_ABEDNEUM = 11, + DATA_GO_MARNAK = 12, + + TYPE_KRYSTALLUS = 20, + TYPE_GRIEF = 21, + TYPE_BRANN = 22, + TYPE_SJONNIR = 23, + + NPC_KRYSTALLUS = 27977, + NPC_GRIEF = 27975, + NPC_BRANN = 28070, + NPC_SJONNIR = 27978, + + NPC_KADDRAK = 30898, // left + NPC_ABEDNEUM = 30899, // middle + NPC_MARNAK = 30897, // right + + GO_GRIEF_DOOR = 191292, + GO_BRANN_DOOR = 191293, + GO_SJONNIR_DOOR = 191296, + + GO_KADDRAK = 191671, // left + GO_ABEDNEUM = 191669, // middle + GO_MARNAK = 191670, // right + + GO_TRIBUNAL_CONSOLE = 193907, + GO_TRIBUNAL_CHEST = 190586, + GO_TRIBUNAL_CHEST_H = 193996, + GO_TRIBUNAL_SKY_FLOOR = 191527, + + GO_SJONNIR_CONSOLE = 193906 +}; + +#endif diff --git a/scripts/northrend/ulduar/halls_of_stone/instance_halls_of_stone.cpp b/scripts/northrend/ulduar/halls_of_stone/instance_halls_of_stone.cpp index 31ee069..889f095 100644 --- a/scripts/northrend/ulduar/halls_of_stone/instance_halls_of_stone.cpp +++ b/scripts/northrend/ulduar/halls_of_stone/instance_halls_of_stone.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or @@ -22,7 +22,7 @@ SDCategory: Halls of Stone EndScriptData */ #include "precompiled.h" -#include "def_halls_of_stone.h" +#include "halls_of_stone.h" /* Halls of Lightning encounters: 0 - Krystallus diff --git a/scripts/northrend/ulduar/ulduar/boss_algalon.cpp b/scripts/northrend/ulduar/ulduar/boss_algalon.cpp index 870307a..90bd8e0 100644 --- a/scripts/northrend/ulduar/ulduar/boss_algalon.cpp +++ b/scripts/northrend/ulduar/ulduar/boss_algalon.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or @@ -918,4 +918,4 @@ void AddSC_boss_algalon() newscript->Name = "go_celestial_acces"; newscript->pGOUse = &GOHello_go_celestial_acces; newscript->RegisterSelf(); -} \ No newline at end of file +} diff --git a/scripts/northrend/ulduar/ulduar/boss_hodir.cpp b/scripts/northrend/ulduar/ulduar/boss_hodir.cpp index 8f6d2bb..334c1b1 100644 --- a/scripts/northrend/ulduar/ulduar/boss_hodir.cpp +++ b/scripts/northrend/ulduar/ulduar/boss_hodir.cpp @@ -117,6 +117,92 @@ enum SPELL_DISPEL_MAGIC = 63499, //friendly }; +// Script for the Flash freeze which is enchasing the npcs in ice at the begginign of the fight +// this needs some fixing on spells +struct MANGOS_DLL_DECL mob_npc_flashFreezeAI : public ScriptedAI +{ + mob_npc_flashFreezeAI(Creature* pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (instance_ulduar*)pCreature->GetInstanceData(); + //pCreature->SetDisplayId(25865); // invisible + SetCombatMovement(false); + Reset(); + } + + instance_ulduar* m_pInstance; + uint64 m_uiVictimsGUID; + + uint64 m_uiFreezeTimer; + bool m_bIsFreeze; + uint32 m_uiCheckTimer; + + void Reset() + { + m_uiVictimsGUID = 0; + m_uiCheckTimer = 1000; + } + + void Aggro(Unit *who) + { + if (Creature* pHodir = GetClosestCreatureWithEntry(m_creature, NPC_HODIR, 100.0f)) + { + pHodir->AI()->AttackStart(who); + pHodir->AddThreat(who, 0.0f); + } + } + + void TeleportMeToCreature(Creature* pCreature) + { + m_creature->GetMap()->CreatureRelocation(m_creature, pCreature->GetPositionX(), pCreature->GetPositionY(), pCreature->GetPositionZ(), 0); + m_creature->Relocate(pCreature->GetPositionX(), pCreature->GetPositionY(), pCreature->GetPositionZ(), 0); + } + + void FreezeVictim(uint64 pVictimGUID) + { + if (!pVictimGUID) + return; + if (Map* pMap = m_creature->GetMap()) + { + if (Creature* pVictim = pMap->GetCreature(pVictimGUID)) + { + if (pVictim->isAlive() && !pVictim->HasAura(SPELL_FLASH_FREEZE_NPC_STUN, EFFECT_INDEX_0)) + { + TeleportMeToCreature(pVictim); + //DoCast(m_creature, SPELL_FLASH_FREEZE_NPC_STUN, true); + DoCast(pVictim, SPELL_FLASH_FREEZE_NPC_STUN, true); + m_uiVictimsGUID = pVictimGUID; + } + } + } + } + + void JustDied(Unit* Killer) + { + if (Creature* pVictim = m_creature->GetMap()->GetCreature(m_uiVictimsGUID)) + { + if (pVictim->isAlive() && pVictim->HasAura(SPELL_FLASH_FREEZE_NPC_STUN, EFFECT_INDEX_0)) + { + pVictim->RemoveAurasDueToSpell(SPELL_FLASH_FREEZE_NPC_STUN); + if (Creature* pHodir = m_creature->GetMap()->GetCreature(m_pInstance->GetData64(NPC_HODIR))) + pVictim->AddThreat(pHodir, 100.0f); + } + } + } + + void UpdateAI(const uint32 uiDiff) + { + if (m_uiCheckTimer <= uiDiff) + { + if (Unit* pVictim = m_creature->GetMap()->GetUnit(m_uiVictimsGUID)) + { + if (!pVictim->isAlive()) + m_creature->DealDamage(m_creature, m_creature->GetHealth(), 0, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, 0 , false); + } + m_uiCheckTimer = 1000; + }else m_uiCheckTimer -= uiDiff; + } +}; + // Hodir struct MANGOS_DLL_DECL boss_hodirAI : public ScriptedAI { @@ -143,10 +229,24 @@ struct MANGOS_DLL_DECL boss_hodirAI : public ScriptedAI uint32 m_uiOutroTimer; uint32 m_uiStep; - std::list lFriends; + uint64 m_uiHelperGUID[4]; + uint64 m_uiDruidHelperGUID; + uint64 m_uiMageHelperGUID; + uint64 m_uiPriestHelperGUID; + + + std::vector lHelperGUID; + std::vector lflashfreezeMobGUID; + void Reset() { + //respawn all npc's + if (m_pInstance) + for (std::list::iterator i = m_pInstance->m_lHodirMobsGUIDs.begin(); i != m_pInstance->m_lHodirMobsGUIDs.end(); i++) + if (Creature *pTmp = m_pInstance->instance->GetCreature(*i)) + if (!pTmp->isAlive()) + pTmp->Respawn(); m_uiSpeedKillTimer = 0; m_uiEnrageTimer = 480000; m_uiFlashFreezeTimer = 50000; @@ -154,47 +254,81 @@ struct MANGOS_DLL_DECL boss_hodirAI : public ScriptedAI m_uiFrozenBlowsTimer = 60000; m_uiFreezeTimer = urand(15000, 20000); m_uiOutroTimer = 10000; - //m_uiIcicleTimer = 2000; m_uiStep = 1; m_bIsOutro = false; + + lHelperGUID.clear(); + lflashfreezeMobGUID.clear(); + + if (lHelperGUID.empty()) + { + std::list lHelpers; + GetCreatureListWithEntryInGrid(lHelpers, m_creature, NPC_DRUID, DEFAULT_VISIBILITY_INSTANCE); + GetCreatureListWithEntryInGrid(lHelpers, m_creature, NPC_SHAMAN, DEFAULT_VISIBILITY_INSTANCE); + GetCreatureListWithEntryInGrid(lHelpers, m_creature, NPC_MAGE, DEFAULT_VISIBILITY_INSTANCE); + GetCreatureListWithEntryInGrid(lHelpers, m_creature, NPC_PRIEST, DEFAULT_VISIBILITY_INSTANCE); + if (!lHelpers.empty()) + { + + for(std::list::iterator iter = lHelpers.begin(); iter != lHelpers.end(); ++iter) + { + if ((*iter)) + { + (*iter)->RemoveAurasDueToSpell(SPELL_FLASH_FREEZE_NPC_STUN); + //(*iter)->MonsterYell("Ich bin Helfer und wurde erkannt", 0); + lHelperGUID.push_back((*iter)->GetGUID()); + } + } + } + } + if (lflashfreezeMobGUID.empty()) + { + std::list lFlashFreezeMobs; + GetCreatureListWithEntryInGrid(lFlashFreezeMobs, m_creature, NPC_FLASH_FREEZE_NPC, DEFAULT_VISIBILITY_INSTANCE); + if (!lFlashFreezeMobs.empty()) + { + for(std::list::iterator iter = lFlashFreezeMobs.begin(); iter != lFlashFreezeMobs.end(); ++iter) + { + if ((*iter)) + { + (*iter)->RemoveAurasDueToSpell(SPELL_FLASH_FREEZE_NPC_STUN); + //(*iter)->MonsterYell("Ich bin Blitzeis und wurde erkannt", 0); + lflashfreezeMobGUID.push_back((*iter)->GetGUID()); + } + } + } + } + FreezeAllHelper(); } void JustReachedHome() { if(m_pInstance) m_pInstance->SetData(TYPE_HODIR, FAIL); - - // respawn friendly npcs - // druids - GetCreatureListWithEntryInGrid(lFriends, m_creature, 33325, DEFAULT_VISIBILITY_INSTANCE); - GetCreatureListWithEntryInGrid(lFriends, m_creature, 32901, DEFAULT_VISIBILITY_INSTANCE); - GetCreatureListWithEntryInGrid(lFriends, m_creature, 32941, DEFAULT_VISIBILITY_INSTANCE); - GetCreatureListWithEntryInGrid(lFriends, m_creature, 33333, DEFAULT_VISIBILITY_INSTANCE); - // shamys - GetCreatureListWithEntryInGrid(lFriends, m_creature, 33328, DEFAULT_VISIBILITY_INSTANCE); - GetCreatureListWithEntryInGrid(lFriends, m_creature, 32900, DEFAULT_VISIBILITY_INSTANCE); - GetCreatureListWithEntryInGrid(lFriends, m_creature, 33332, DEFAULT_VISIBILITY_INSTANCE); - GetCreatureListWithEntryInGrid(lFriends, m_creature, 32950, DEFAULT_VISIBILITY_INSTANCE); - // mages - GetCreatureListWithEntryInGrid(lFriends, m_creature, 32893, DEFAULT_VISIBILITY_INSTANCE); - GetCreatureListWithEntryInGrid(lFriends, m_creature, 33327, DEFAULT_VISIBILITY_INSTANCE); - GetCreatureListWithEntryInGrid(lFriends, m_creature, 33331, DEFAULT_VISIBILITY_INSTANCE); - GetCreatureListWithEntryInGrid(lFriends, m_creature, 32946, DEFAULT_VISIBILITY_INSTANCE); - // priests - GetCreatureListWithEntryInGrid(lFriends, m_creature, 32897, DEFAULT_VISIBILITY_INSTANCE); - GetCreatureListWithEntryInGrid(lFriends, m_creature, 33326, DEFAULT_VISIBILITY_INSTANCE); - GetCreatureListWithEntryInGrid(lFriends, m_creature, 32948, DEFAULT_VISIBILITY_INSTANCE); - GetCreatureListWithEntryInGrid(lFriends, m_creature, 33330, DEFAULT_VISIBILITY_INSTANCE); - // flash freeze for them: - GetCreatureListWithEntryInGrid(lFriends, m_creature, 32938, DEFAULT_VISIBILITY_INSTANCE); - if (!lFriends.empty()) + } + + void FreezeAllHelper() + { + if (lHelperGUID.size() == lflashfreezeMobGUID.size()) { - for(std::list::iterator iter = lFriends.begin(); iter != lFriends.end(); ++iter) + if (Map* pMap = m_creature->GetMap()) { - if ((*iter) && !(*iter)->isAlive()) - (*iter)->Respawn(); + for (uint8 i = 0; i < lHelperGUID.size(); i++) + { + if (Creature* pFreezeMob = pMap->GetCreature(lflashfreezeMobGUID.at(i))) + { + if(mob_npc_flashFreezeAI* pFreezeMobAI = (mob_npc_flashFreezeAI*) pFreezeMob->AI()) + { + pFreezeMobAI->FreezeVictim(lHelperGUID.at(i)); + } + } + } } } + else + { + m_creature->MonsterYell("Die Anzahl der Helfer ist ungleich der FreezeMobs", 0); + } } void Aggro(Unit *who) @@ -204,8 +338,8 @@ struct MANGOS_DLL_DECL boss_hodirAI : public ScriptedAI DoScriptText(SAY_AGGRO, m_creature); - DoCastSpellIfCan(m_creature, SPELL_BITTER_COLD, CAST_TRIGGERED); - DoCastSpellIfCan(m_creature, SPELL_ICICLE_TARGETING_AURA, CAST_TRIGGERED); + DoCast(m_creature, SPELL_BITTER_COLD, true); + DoCast(m_creature, SPELL_ICICLE_TARGETING_AURA, true); } void DoOutro() @@ -252,15 +386,42 @@ struct MANGOS_DLL_DECL boss_hodirAI : public ScriptedAI { if (spellProto->Id == SPELL_FLASH_FREEZE) { - if (pTarget->GetTypeId() != TYPEID_PLAYER) - return; - if (!pTarget->HasAura(SPELL_SAFE_AREA_BUFF, EFFECT_INDEX_0)) { - if (pTarget->HasAura(SPELL_FLASH_FREEZE_DEBUFF, EFFECT_INDEX_0)) - DoCastSpellIfCan(pTarget, SPELL_FLASH_FREEZE_KILL, true); - else - pTarget->CastSpell(pTarget, SPELL_FLASH_FREEZE_SUMMON, true); + if (pTarget->GetTypeId() == TYPEID_PLAYER) + { + if (pTarget->HasAura(SPELL_FLASH_FREEZE_DEBUFF, EFFECT_INDEX_0)) + DoCastSpellIfCan(pTarget, SPELL_FLASH_FREEZE_KILL, true); + else + pTarget->CastSpell(pTarget, SPELL_FLASH_FREEZE_SUMMON, true); + } + if (pTarget->GetTypeId() == TYPEID_UNIT) + { + if (pTarget->HasAura(SPELL_FLASH_FREEZE_NPC_STUN, EFFECT_INDEX_0)) + DoCastSpellIfCan(pTarget, SPELL_FLASH_FREEZE_KILL, true); + else + { + for (uint8 i = 0; i < lHelperGUID.size(); i++) + { + if (pTarget->GetGUID() == lHelperGUID.at(i)) + { + if (Map* pMap = m_creature->GetMap()) + { + if (Creature* pFreezeMob = pMap->GetCreature(lflashfreezeMobGUID.at(i))) + { + if (!pFreezeMob->isAlive()) + pFreezeMob->Respawn(); + if(mob_npc_flashFreezeAI* pFreezeMobAI = (mob_npc_flashFreezeAI*) pFreezeMob->AI()) + { + pFreezeMobAI->FreezeVictim(lHelperGUID.at(i)); + } + } + } + break; + } + } + } + } } } } @@ -289,7 +450,6 @@ struct MANGOS_DLL_DECL boss_hodirAI : public ScriptedAI DoScriptText(EMOTE_FLASH_FREEZE, m_creature); DoScriptText(SAY_FLASH_FREEZE, m_creature); m_uiFlashFreezeTimer = 50000; - //m_uiIcicleTimer = 12000; } }else m_uiFlashFreezeTimer -= uiDiff; @@ -369,8 +529,6 @@ struct MANGOS_DLL_DECL mob_icicleAI : public ScriptedAI m_pInstance = (instance_ulduar*)pCreature->GetInstanceData(); m_bIsRegularMode = pCreature->GetMap()->IsRegularDifficulty(); - //pCreature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); - //pCreature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); SetCombatMovement(false); m_uiSpellId = 0; m_uiActionTimer = 10000; @@ -386,15 +544,10 @@ struct MANGOS_DLL_DECL mob_icicleAI : public ScriptedAI m_creature->SetDisplayId(28470); m_uiSpellId = SPELL_ICICLE_SNOW_DAMAGE; m_uiActionTimer = 3000; - // summon marker for Safe Area - //m_creature->GetPosition(x, y, z); - //m_creature->SummonCreature(NPC_SNOWDRIFT_TARGET, x, y, z, 0.0f, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 10000); break; case NPC_SNOWDRIFT_TARGET: - //m_creature->SetDisplayId(11686); // invinsible m_creature->SetDisplayId(15880); // invinsible DoCastSpellIfCan(m_creature, SPELL_SAFE_AREA_AURA, CAST_TRIGGERED); - //m_creature->ForcedDespawn(9000); break; default: break; @@ -409,7 +562,7 @@ struct MANGOS_DLL_DECL mob_icicleAI : public ScriptedAI float x, y, z; void Reset() {} - void AttackStart(Unit* pWho) {} + void AttackStart(Unit* pWho) {} void UpdateAI(const uint32 uiDiff) { @@ -496,6 +649,7 @@ struct MANGOS_DLL_DECL npc_hodir_helperAI : public ScriptedAI { m_uiSpellTimer = 5000; m_uiCreatureEntry = m_creature->GetEntry(); + m_creature->ApplySpellImmune(0, IMMUNITY_EFFECT, SPELL_EFFECT_KNOCK_BACK, true); } void AttackStart(Unit* pWho) @@ -514,9 +668,6 @@ struct MANGOS_DLL_DECL npc_hodir_helperAI : public ScriptedAI void UpdateAI(const uint32 uiDiff) { - if (pInstance->GetData(TYPE_HODIR) != IN_PROGRESS) - EnterEvadeMode(); - if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; @@ -542,29 +693,23 @@ struct MANGOS_DLL_DECL npc_hodir_helperAI : public ScriptedAI } break; case NPC_DRUID: // Druid - switch(urand(0, 1)) - { - case 0: - if(Creature *pHodir = m_creature->GetMap()->GetCreature(pInstance->GetData64(NPC_HODIR))) - DoCast(pHodir, SPELL_WRATH); - break; - case 1: - DoCast(m_creature, SPELL_STARLIGHT); - break; - } + if (roll_chance_i(80)) + if(Creature *pHodir = m_creature->GetMap()->GetCreature(pInstance->GetData64(NPC_HODIR))) + DoCast(pHodir, SPELL_WRATH); + else + DoCast(m_creature, SPELL_STARLIGHT); break; case NPC_SHAMAN: // Shaman - switch(urand(0, 1)) + if (roll_chance_i(70)) { - case 0: - if(Creature *pHodir = m_creature->GetMap()->GetCreature(pInstance->GetData64(NPC_HODIR))) - DoCast(pHodir, SPELL_LAVA_BURST); - break; - case 1: - Unit *pTemp = pInstance->GetPlayerInMap(1,1); - if (pTemp && m_creature->GetDistance(pTemp) < 40) - DoCast(pTemp, m_bIsRegularMode ? SPELL_STORM_CLOUD : SPELL_STORM_CLOUD_H); - break; + if(Creature *pHodir = m_creature->GetMap()->GetCreature(pInstance->GetData64(NPC_HODIR))) + DoCast(pHodir, SPELL_LAVA_BURST); + } + else + { + Unit *pTemp = pInstance->GetPlayerInMap(1,1); + if (pTemp && m_creature->GetDistance(pTemp) < 40) + DoCast(pTemp, m_bIsRegularMode ? SPELL_STORM_CLOUD : SPELL_STORM_CLOUD_H); } break; case NPC_MAGE: // Mage @@ -612,89 +757,6 @@ struct MANGOS_DLL_DECL mob_toasty_fireAI : public ScriptedAI void UpdateAI(const uint32 diff) {} }; -// Script for the Flash freeze which is enchasing the npcs in ice at the begginign of the fight -// this needs some fixing on spells -struct MANGOS_DLL_DECL mob_npc_flashFreezeAI : public ScriptedAI -{ - mob_npc_flashFreezeAI(Creature* pCreature) : ScriptedAI(pCreature) - { - m_pInstance = (instance_ulduar*)pCreature->GetInstanceData(); - pCreature->SetDisplayId(25865); // invisible - pCreature->GetMotionMaster()->MoveIdle(); - SetCombatMovement(false); - Reset(); - } - - instance_ulduar* m_pInstance; - std::list lVictims; - - void Reset() - { - lVictims.clear(); - SetVictim(); - DoCast(m_creature, SPELL_FLASH_FREEZE_NPC_STUN); - } - - void Aggro(Unit *who) - { - if (Creature* pHodir = GetClosestCreatureWithEntry(m_creature, NPC_HODIR, 100.0f)) - { - pHodir->AI()->AttackStart(who); - pHodir->AddThreat(who, 0.0f); - } - } - - void SetVictim() - { - // druids - //GetCreatureListWithEntryInGrid(lVictims, m_creature, 33325, 2.0f); - //GetCreatureListWithEntryInGrid(lVictims, m_creature, 32901, 2.0f); - GetCreatureListWithEntryInGrid(lVictims, m_creature, 32941, 2.0f); - //GetCreatureListWithEntryInGrid(lVictims, m_creature, 33333, 2.0f); - // shamys - //GetCreatureListWithEntryInGrid(lVictims, m_creature, 33328, 2.0f); - //GetCreatureListWithEntryInGrid(lVictims, m_creature, 32900, 2.0f); - //GetCreatureListWithEntryInGrid(lVictims, m_creature, 33332, 2.0f); - GetCreatureListWithEntryInGrid(lVictims, m_creature, 32950, 2.0f); - // mages - //GetCreatureListWithEntryInGrid(lVictims, m_creature, 32893, 2.0f); - //GetCreatureListWithEntryInGrid(lVictims, m_creature, 33327, 2.0f); - //GetCreatureListWithEntryInGrid(lVictims, m_creature, 33331, 2.0f); - GetCreatureListWithEntryInGrid(lVictims, m_creature, 32946, 2.0f); - // priests - //GetCreatureListWithEntryInGrid(lVictims, m_creature, 32897, 2.0f); - //GetCreatureListWithEntryInGrid(lVictims, m_creature, 33326, 2.0f); - GetCreatureListWithEntryInGrid(lVictims, m_creature, 32948, 2.0f); - //GetCreatureListWithEntryInGrid(lVictims, m_creature, 33330, 2.0f); - if (!lVictims.empty()) - { - for(std::list::iterator iter = lVictims.begin(); iter != lVictims.end(); ++iter) - { - if ((*iter) && (*iter)->isAlive() && !(*iter)->HasAura(SPELL_FLASH_FREEZE_NPC_STUN, EFFECT_INDEX_0)) - (*iter)->CastSpell((*iter), SPELL_FLASH_FREEZE_NPC_STUN, false); - } - } - } - - void JustDied(Unit* Killer) - { - if (!lVictims.empty()) - { - for(std::list::iterator iter = lVictims.begin(); iter != lVictims.end(); ++iter) - { - if ((*iter) && (*iter)->isAlive() && (*iter)->HasAura(SPELL_FLASH_FREEZE_NPC_STUN, EFFECT_INDEX_0)) - { - (*iter)->RemoveAurasDueToSpell(SPELL_FLASH_FREEZE_NPC_STUN); - if (Creature* pHodir = GetClosestCreatureWithEntry(m_creature, NPC_HODIR, 100.0f)) - (*iter)->AddThreat(pHodir, 100.0f); - } - } - } - } - - void UpdateAI(const uint32 uiDiff){} -}; - CreatureAI* GetAI_boss_hodir(Creature* pCreature) { return new boss_hodirAI(pCreature); diff --git a/scripts/northrend/ulduar/ulduar/boss_ignis.cpp b/scripts/northrend/ulduar/ulduar/boss_ignis.cpp index f941ef9..11e6dd4 100644 --- a/scripts/northrend/ulduar/ulduar/boss_ignis.cpp +++ b/scripts/northrend/ulduar/ulduar/boss_ignis.cpp @@ -337,8 +337,7 @@ struct MANGOS_DLL_DECL boss_ignisAI : public ScriptedAI if (Player *pTarget = pVictim->GetCharmerOrOwnerPlayerOrPlayerItself()) if (DoCastSpellIfCan(pTarget, m_bIsRegularMode ? SPELL_CHARGE_SLAG_POT : SPELL_CHARGE_SLAG_POT_H) == CAST_OK) { - if (m_creature->CreateVehicleKit(342)) - pTarget->EnterVehicle(m_creature->GetVehicleKit(), 0); + pTarget->EnterVehicle(m_creature->GetVehicleKit(), 0); pTarget->CastSpell(pTarget, m_bIsRegularMode ? SPELL_SLAG_POT_AURA : SPELL_SLAG_POT_AURA_H, true, 0,0, m_creature->GetObjectGuid()); m_bIsSlagPot = true; m_uiSlagPotSwitchTimer = 1500; diff --git a/scripts/northrend/ulduar/ulduar/boss_thorim.cpp b/scripts/northrend/ulduar/ulduar/boss_thorim.cpp index b8214d7..04574b8 100644 --- a/scripts/northrend/ulduar/ulduar/boss_thorim.cpp +++ b/scripts/northrend/ulduar/ulduar/boss_thorim.cpp @@ -827,12 +827,12 @@ struct MANGOS_DLL_DECL boss_thorimAI : public ScriptedAI switch(m_uiPhase) { // start the encounter when all the preadds have died - case PHASE_PREADDS: - if(m_uiPreAddsKilled == 4) - StartEncounter(); - break; + case PHASE_PREADDS: + if(m_uiPreAddsKilled == 4) + StartEncounter(); + break; // do intro - case PHASE_INTRO: + case PHASE_INTRO: { // intro if(m_bIsIntro) @@ -885,7 +885,7 @@ struct MANGOS_DLL_DECL boss_thorimAI : public ScriptedAI break; } // balcony phase - case PHASE_BALCONY: + case PHASE_BALCONY: { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; @@ -947,35 +947,9 @@ struct MANGOS_DLL_DECL boss_thorimAI : public ScriptedAI uint8 k; switch(urand(0, 4)) { - case 0: - i = urand(0, 5); - if(Creature* pTemp = m_creature->SummonCreature(MOB_DARK_RUNE_CHAMPION, ArenaLoc[i].x, ArenaLoc[i].y, LOC_Z, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30000)) - { - pTemp->GetMotionMaster()->MovePoint(0, 2134.72f, -263.148f, 419.846f); - if(pTemp->IsWithinLOSInMap(m_creature->getVictim())) - { - pTemp->AI()->AttackStart(m_creature->getVictim()); - pTemp->AddThreat(m_creature->getVictim(), 100.0f); - } - } - break; - case 1: - i = urand(0, 5); - if(Creature* pTemp = m_creature->SummonCreature(MOB_DARK_RUNE_EVOKER, ArenaLoc[i].x, ArenaLoc[i].y, LOC_Z, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30000)) - { - pTemp->GetMotionMaster()->MovePoint(0, 2134.72f, -263.148f, 419.846f); - if(pTemp->IsWithinLOSInMap(m_creature->getVictim())) - { - pTemp->AI()->AttackStart(m_creature->getVictim()); - pTemp->AddThreat(m_creature->getVictim(), 100.0f); - } - } - break; - case 2: - i = urand(5, 6); - for(uint8 j = 0; j < i; j++) - { - if(Creature* pTemp = m_creature->SummonCreature(MOB_DARK_RUNE_COMMONER, ArenaLoc[j].x, ArenaLoc[j].y, LOC_Z, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30000)) + case 0: + i = urand(0, 5); + if(Creature* pTemp = m_creature->SummonCreature(MOB_DARK_RUNE_CHAMPION, ArenaLoc[i].x, ArenaLoc[i].y, LOC_Z, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30000)) { pTemp->GetMotionMaster()->MovePoint(0, 2134.72f, -263.148f, 419.846f); if(pTemp->IsWithinLOSInMap(m_creature->getVictim())) @@ -984,14 +958,10 @@ struct MANGOS_DLL_DECL boss_thorimAI : public ScriptedAI pTemp->AddThreat(m_creature->getVictim(), 100.0f); } } - } - break; - case 3: - k = urand(0, 3); - i = urand(k + 1, k + 2); - for(uint8 j = k; j < i; j++) - { - if(Creature* pTemp = m_creature->SummonCreature(MOB_DARK_RUNE_WARBRINGER, ArenaLoc[j].x, ArenaLoc[j].y, LOC_Z, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30000)) + break; + case 1: + i = urand(0, 5); + if(Creature* pTemp = m_creature->SummonCreature(MOB_DARK_RUNE_EVOKER, ArenaLoc[i].x, ArenaLoc[i].y, LOC_Z, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30000)) { pTemp->GetMotionMaster()->MovePoint(0, 2134.72f, -263.148f, 419.846f); if(pTemp->IsWithinLOSInMap(m_creature->getVictim())) @@ -1000,20 +970,50 @@ struct MANGOS_DLL_DECL boss_thorimAI : public ScriptedAI pTemp->AddThreat(m_creature->getVictim(), 100.0f); } } - } - break; - case 4: - i = urand(0, 5); - if(Creature* pTemp = m_creature->SummonCreature(MOB_DARK_RUNE_ACOLYTE, ArenaLoc[i].x, ArenaLoc[i].y, LOC_Z, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30000)) - { - pTemp->GetMotionMaster()->MovePoint(0, 2134.72f, -263.148f, 419.846f); - if(pTemp->IsWithinLOSInMap(m_creature->getVictim())) + break; + case 2: + i = urand(5, 6); + for(uint8 j = 0; j < i; j++) { - pTemp->AI()->AttackStart(m_creature->getVictim()); - pTemp->AddThreat(m_creature->getVictim(), 100.0f); + if(Creature* pTemp = m_creature->SummonCreature(MOB_DARK_RUNE_COMMONER, ArenaLoc[j].x, ArenaLoc[j].y, LOC_Z, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30000)) + { + pTemp->GetMotionMaster()->MovePoint(0, 2134.72f, -263.148f, 419.846f); + if(pTemp->IsWithinLOSInMap(m_creature->getVictim())) + { + pTemp->AI()->AttackStart(m_creature->getVictim()); + pTemp->AddThreat(m_creature->getVictim(), 100.0f); + } + } } - } - break; + break; + case 3: + k = urand(0, 3); + i = urand(k + 1, k + 2); + for(uint8 j = k; j < i; j++) + { + if(Creature* pTemp = m_creature->SummonCreature(MOB_DARK_RUNE_WARBRINGER, ArenaLoc[j].x, ArenaLoc[j].y, LOC_Z, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30000)) + { + pTemp->GetMotionMaster()->MovePoint(0, 2134.72f, -263.148f, 419.846f); + if(pTemp->IsWithinLOSInMap(m_creature->getVictim())) + { + pTemp->AI()->AttackStart(m_creature->getVictim()); + pTemp->AddThreat(m_creature->getVictim(), 100.0f); + } + } + } + break; + case 4: + i = urand(0, 5); + if(Creature* pTemp = m_creature->SummonCreature(MOB_DARK_RUNE_ACOLYTE, ArenaLoc[i].x, ArenaLoc[i].y, LOC_Z, 0, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 30000)) + { + pTemp->GetMotionMaster()->MovePoint(0, 2134.72f, -263.148f, 419.846f); + if(pTemp->IsWithinLOSInMap(m_creature->getVictim())) + { + pTemp->AI()->AttackStart(m_creature->getVictim()); + pTemp->AddThreat(m_creature->getVictim(), 100.0f); + } + } + break; } m_uiSummonWavesTimer = urand (7000, 10000); } @@ -1072,7 +1072,7 @@ struct MANGOS_DLL_DECL boss_thorimAI : public ScriptedAI break; } // arena phase - case PHASE_ARENA: + case PHASE_ARENA: { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; @@ -1128,7 +1128,7 @@ struct MANGOS_DLL_DECL boss_thorimAI : public ScriptedAI break; } // outro - case PHASE_OUTRO: + case PHASE_OUTRO: { switch(m_uiOutroStep) { diff --git a/scripts/northrend/ulduar/ulduar/boss_xt_002.cpp b/scripts/northrend/ulduar/ulduar/boss_xt_002.cpp index 101cd9e..5b94e5e 100644 --- a/scripts/northrend/ulduar/ulduar/boss_xt_002.cpp +++ b/scripts/northrend/ulduar/ulduar/boss_xt_002.cpp @@ -663,7 +663,7 @@ struct MANGOS_DLL_DECL boss_xt_002AI : public ScriptedAI m_bHasMoreHealth = false; }else m_uiHpDelayTimer -= uiDiff; - if (m_uiLifeSparkTimer < uiDiff) + /*if (m_uiLifeSparkTimer < uiDiff) // Nun im Core { if (Unit* pTarget = m_creature->GetMap()->GetUnit( pLightBombTarGUID)) DoCast(pTarget, SPELL_LIFE_SPARK, true); @@ -675,7 +675,7 @@ struct MANGOS_DLL_DECL boss_xt_002AI : public ScriptedAI if (Unit* pTarget = m_creature->GetMap()->GetUnit( pGravityBombTarGUID)) DoCast(pTarget,m_bIsRegularMode ? SPELL_VOIDZONE : SPELL_VOIDZONE_H, true); m_uiVoidZoneTimer = 60000; - }else m_uiVoidZoneTimer -= uiDiff; + }else m_uiVoidZoneTimer -= uiDiff;*/ } if (m_creature->GetHealthPercent() < m_uiHealthPercent && !m_bIsHardMode) { diff --git a/scripts/northrend/ulduar/ulduar/boss_yogg_saron.cpp b/scripts/northrend/ulduar/ulduar/boss_yogg_saron.cpp index 6410352..efc241d 100644 --- a/scripts/northrend/ulduar/ulduar/boss_yogg_saron.cpp +++ b/scripts/northrend/ulduar/ulduar/boss_yogg_saron.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/scripts/northrend/ulduar/ulduar/instance_ulduar.cpp b/scripts/northrend/ulduar/ulduar/instance_ulduar.cpp index 3ca6846..4c80788 100644 --- a/scripts/northrend/ulduar/ulduar/instance_ulduar.cpp +++ b/scripts/northrend/ulduar/ulduar/instance_ulduar.cpp @@ -526,6 +526,17 @@ void instance_ulduar::OnObjectCreate(GameObject *pGo) } } +void instance_ulduar::OnCreatureDeath(Creature * pCreature) +{ + if (GetData(TYPE_HODIR) == IN_PROGRESS) // Hodir + m_lHodirMobsGUIDs.push_back(pCreature->GetGUID()); + else if (GetData(TYPE_THORIM) == IN_PROGRESS) // Thorim + { + if (pCreature->GetEntry() != 33125) + m_lThorimMobsGUIDs.push_back(pCreature->GetGUID()); + } +} + // functions to open or close some doors void instance_ulduar::OpenDoor(uint64 guid) { diff --git a/scripts/northrend/ulduar/ulduar/ulduar.h b/scripts/northrend/ulduar/ulduar/ulduar.h index 021f767..c0d5cfc 100644 --- a/scripts/northrend/ulduar/ulduar/ulduar.h +++ b/scripts/northrend/ulduar/ulduar/ulduar.h @@ -233,6 +233,7 @@ class MANGOS_DLL_DECL instance_ulduar : public ScriptedInstance bool IsEncounterInProgress() const; void OnCreatureCreate(Creature* pCreature); + void OnCreatureDeath(Creature * pCreature); void OnObjectCreate(GameObject* pGo); void SetData(uint32 uiType, uint32 uiData); @@ -255,6 +256,8 @@ class MANGOS_DLL_DECL instance_ulduar : public ScriptedInstance void SpawnFriendlyKeeper(uint32 uiWho); std::list m_lIronConstructsGUIDs; + std::list m_lHodirMobsGUIDs; + std::list m_lThorimMobsGUIDs; protected: diff --git a/scripts/northrend/utgarde_keep/utgarde_keep/boss_keleseth.cpp b/scripts/northrend/utgarde_keep/utgarde_keep/boss_keleseth.cpp index 13b9e81..3ef6d27 100644 --- a/scripts/northrend/utgarde_keep/utgarde_keep/boss_keleseth.cpp +++ b/scripts/northrend/utgarde_keep/utgarde_keep/boss_keleseth.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/scripts/northrend/utgarde_keep/utgarde_keep/boss_skarvald_and_dalronn.cpp b/scripts/northrend/utgarde_keep/utgarde_keep/boss_skarvald_and_dalronn.cpp index c505dac..6d20fd6 100644 --- a/scripts/northrend/utgarde_keep/utgarde_keep/boss_skarvald_and_dalronn.cpp +++ b/scripts/northrend/utgarde_keep/utgarde_keep/boss_skarvald_and_dalronn.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/scripts/northrend/utgarde_keep/utgarde_keep/instance_utgarde_keep.cpp b/scripts/northrend/utgarde_keep/utgarde_keep/instance_utgarde_keep.cpp index 37a6307..3cccba5 100644 --- a/scripts/northrend/utgarde_keep/utgarde_keep/instance_utgarde_keep.cpp +++ b/scripts/northrend/utgarde_keep/utgarde_keep/instance_utgarde_keep.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/scripts/northrend/utgarde_keep/utgarde_keep/utgarde_keep.cpp b/scripts/northrend/utgarde_keep/utgarde_keep/utgarde_keep.cpp index a75c669..77c8c85 100644 --- a/scripts/northrend/utgarde_keep/utgarde_keep/utgarde_keep.cpp +++ b/scripts/northrend/utgarde_keep/utgarde_keep/utgarde_keep.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/scripts/northrend/utgarde_keep/utgarde_keep/utgarde_keep.h b/scripts/northrend/utgarde_keep/utgarde_keep/utgarde_keep.h index 58d9d99..6ebce4e 100644 --- a/scripts/northrend/utgarde_keep/utgarde_keep/utgarde_keep.h +++ b/scripts/northrend/utgarde_keep/utgarde_keep/utgarde_keep.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_gortok.cpp b/scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_gortok.cpp index 5301482..d985bc2 100644 --- a/scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_gortok.cpp +++ b/scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_gortok.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_skadi.cpp b/scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_skadi.cpp index c891257..d52c7cf 100644 --- a/scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_skadi.cpp +++ b/scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_skadi.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_svala.cpp b/scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_svala.cpp index a349cc1..1adc2cb 100644 --- a/scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_svala.cpp +++ b/scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_svala.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_ymiron.cpp b/scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_ymiron.cpp index 1cee8c1..6603f08 100644 --- a/scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_ymiron.cpp +++ b/scripts/northrend/utgarde_keep/utgarde_pinnacle/boss_ymiron.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/scripts/northrend/utgarde_keep/utgarde_pinnacle/instance_utgarde_pinnacle.cpp b/scripts/northrend/utgarde_keep/utgarde_pinnacle/instance_utgarde_pinnacle.cpp index c1b0063..e33e146 100644 --- a/scripts/northrend/utgarde_keep/utgarde_pinnacle/instance_utgarde_pinnacle.cpp +++ b/scripts/northrend/utgarde_keep/utgarde_pinnacle/instance_utgarde_pinnacle.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/scripts/northrend/utgarde_keep/utgarde_pinnacle/utgarde_pinnacle.h b/scripts/northrend/utgarde_keep/utgarde_pinnacle/utgarde_pinnacle.h index 84aa2b2..56638e8 100644 --- a/scripts/northrend/utgarde_keep/utgarde_pinnacle/utgarde_pinnacle.h +++ b/scripts/northrend/utgarde_keep/utgarde_pinnacle/utgarde_pinnacle.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/scripts/northrend/vault_of_archavon/boss_archavon.cpp b/scripts/northrend/vault_of_archavon/boss_archavon.cpp index 471b3c5..a99bde5 100644 --- a/scripts/northrend/vault_of_archavon/boss_archavon.cpp +++ b/scripts/northrend/vault_of_archavon/boss_archavon.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/scripts/northrend/vault_of_archavon/boss_emalon.cpp b/scripts/northrend/vault_of_archavon/boss_emalon.cpp index 7f349c1..1f57998 100644 --- a/scripts/northrend/vault_of_archavon/boss_emalon.cpp +++ b/scripts/northrend/vault_of_archavon/boss_emalon.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/scripts/northrend/vault_of_archavon/boss_koralon.cpp b/scripts/northrend/vault_of_archavon/boss_koralon.cpp index 7d57234..a3e931d 100644 --- a/scripts/northrend/vault_of_archavon/boss_koralon.cpp +++ b/scripts/northrend/vault_of_archavon/boss_koralon.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or @@ -16,8 +16,8 @@ /* ScriptData SDName: boss_koralon -SD%Complete: 0 -SDComment: Placeholder +SD%Complete: 50% +SDComment: SDCategory: Vault of Archavon EndScriptData */ diff --git a/scripts/northrend/vault_of_archavon/boss_toravon.cpp b/scripts/northrend/vault_of_archavon/boss_toravon.cpp index 6897943..63ac3d1 100644 --- a/scripts/northrend/vault_of_archavon/boss_toravon.cpp +++ b/scripts/northrend/vault_of_archavon/boss_toravon.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/scripts/northrend/vault_of_archavon/instance_vault_of_archavon.cpp b/scripts/northrend/vault_of_archavon/instance_vault_of_archavon.cpp index ff31528..1aee00f 100644 --- a/scripts/northrend/vault_of_archavon/instance_vault_of_archavon.cpp +++ b/scripts/northrend/vault_of_archavon/instance_vault_of_archavon.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/scripts/northrend/vault_of_archavon/vault_of_archavon.h b/scripts/northrend/vault_of_archavon/vault_of_archavon.h index 05498f1..507cde4 100644 --- a/scripts/northrend/vault_of_archavon/vault_of_archavon.h +++ b/scripts/northrend/vault_of_archavon/vault_of_archavon.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/scripts/northrend/violet_hold/boss_cyanigosa.cpp b/scripts/northrend/violet_hold/boss_cyanigosa.cpp index d5e46b9..dcb0dd8 100644 --- a/scripts/northrend/violet_hold/boss_cyanigosa.cpp +++ b/scripts/northrend/violet_hold/boss_cyanigosa.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2009 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/scripts/northrend/zuldrak.cpp b/scripts/northrend/zuldrak.cpp index 7d528c0..6f6e86c 100644 --- a/scripts/northrend/zuldrak.cpp +++ b/scripts/northrend/zuldrak.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/scripts/outdoor_pvp/eastern_kingdoms/outdoor_pvp_eastern_plaguelands.cpp b/scripts/outdoor_pvp/eastern_kingdoms/outdoor_pvp_eastern_plaguelands.cpp new file mode 100644 index 0000000..6abf034 --- /dev/null +++ b/scripts/outdoor_pvp/eastern_kingdoms/outdoor_pvp_eastern_plaguelands.cpp @@ -0,0 +1,891 @@ +/* Copyright (C) 2006 - 2011 ScriptDev2 + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: outdoor_pvp_eastern_plaguelands +SD%Complete: +SDComment: +SDCategory: Outdoor PvP +EndScriptData */ + +#include "precompiled.h" +#include "outdoor_pvp_eastern_plaguelands.h" + +outdoor_pvp_eastern_plaguelands::outdoor_pvp_eastern_plaguelands(Map* pMap) : OutdoorPvP(pMap), + m_uiPlaguewoodController(0), + m_uiEastwallController(0), + m_uiNorthpassController(0), + m_uiCrownguardController(0), + m_uiTowersAly(0), + m_uiTowersHorde(0) { } + +void outdoor_pvp_eastern_plaguelands::OnPlayerEnterZone(Player* pPlayer, uint32 uiZoneId, uint32 uiAreaId) +{ + //if(pPlayer->GetTeam() == m_uiLastControllerFaction) + // pPlayer->CastSpell(pPlayer, SPELL_CENARION_FAVOR, false); + + // add to the player set + sPlaguelandsPlayers.insert(pPlayer->GetGUID()); + + // send actual world states + SendPlayerWorldState(pPlayer); +} + +void outdoor_pvp_eastern_plaguelands::OnPlayerLeaveZone(Player* pPlayer, uint32 uiZoneId) +{ + // remove from the player set + if (sPlaguelandsPlayers.find(pPlayer->GetGUID()) != sPlaguelandsPlayers.end()) + sPlaguelandsPlayers.erase(pPlayer->GetGUID()); +} + +void outdoor_pvp_eastern_plaguelands::SetData(uint32 uiType, uint32 uiData) +{ + switch(uiType) + { + case TYPE_CROWNGUARD_CONTROLLER: + m_uiCrownguardController = uiData; + break; + case TYPE_EASTWALL_CONTROLLER: + m_uiEastwallController = uiData; + break; + case TYPE_NORTHPASS_CONTROLLER: + m_uiNorthpassController = uiData; + break; + case TYPE_PLAGUEWOOD_CONTROLLER: + m_uiPlaguewoodController = uiData; + break; + } + + // update states + UpdateZoneWorldState(); + + if (uiData) + { + OUT_SAVE_PVP_DATA; + + std::ostringstream saveStream; + saveStream << m_uiCrownguardController << " " << m_uiEastwallController << " " << m_uiNorthpassController << " " << m_uiPlaguewoodController; + + strInstData = saveStream.str(); + + SaveToDB(); + OUT_SAVE_PVP_DATA_COMPLETE; + } +} + +uint32 outdoor_pvp_eastern_plaguelands::GetData(uint32 uiType) +{ + switch(uiType) + { + case TYPE_CROWNGUARD_CONTROLLER: + return m_uiCrownguardController; + case TYPE_EASTWALL_CONTROLLER: + return m_uiEastwallController; + case TYPE_NORTHPASS_CONTROLLER: + return m_uiNorthpassController; + case TYPE_PLAGUEWOOD_CONTROLLER: + return m_uiPlaguewoodController; + } + return 0; +} + +void outdoor_pvp_eastern_plaguelands::Load(const char* chrIn) +{ + if (!chrIn) + { + OUT_LOAD_PVP_DATA_FAIL; + return; + } + + OUT_LOAD_PVP_DATA(chrIn); + + std::istringstream loadStream(chrIn); + loadStream >> m_uiCrownguardController >> m_uiEastwallController >> m_uiNorthpassController >> m_uiPlaguewoodController; + + OUT_LOAD_PVP_DATA_COMPLETE; +} + +void outdoor_pvp_eastern_plaguelands::UpdateZoneWorldState() +{ + //DoUpdateWorldState(sSilithusPlayers, WORLD_STATE_SI_GATHERED_A, m_uiResourcesdAly); + //DoUpdateWorldState(sSilithusPlayers, WORLD_STATE_SI_GATHERED_H, m_uiResourcesHorde); +} + +void outdoor_pvp_eastern_plaguelands::SendPlayerWorldState(Player* pPlayer) +{ + //pPlayer->SendUpdateWorldState(WORLD_STATE_SI_GATHERED_A, m_uiResourcesdAly); + //pPlayer->SendUpdateWorldState(WORLD_STATE_SI_GATHERED_H, m_uiResourcesHorde); + //pPlayer->SendUpdateWorldState(WORLD_STATE_SI_SILITHYST_MAX, MAX_SILITHYST); +} + +InstanceData* GetInstanceData_outdoor_pvp_eastern_plaguelands(Map* pMap) +{ + return new outdoor_pvp_eastern_plaguelands(pMap); +} + +void AddSC_outdoor_pvp_eastern_plaguelands() +{ + Script* pNewScript; + + pNewScript = new Script; + pNewScript->Name = "outdoor_pvp_eastern_plaguelands"; + pNewScript->GetInstanceData = &GetInstanceData_outdoor_pvp_eastern_plaguelands; + pNewScript->RegisterSelf(); +} + + + + + + + +/* + +OPvPCapturePointEP_EWT::OPvPCapturePointEP_EWT(OutdoorPvP *pvp) +: OPvPCapturePoint(pvp), m_TowerState(EP_TS_N), m_UnitsSummonedSide(0) +{ + SetCapturePointData(EPCapturePoints[EP_EWT].entry,EPCapturePoints[EP_EWT].map,EPCapturePoints[EP_EWT].x,EPCapturePoints[EP_EWT].y,EPCapturePoints[EP_EWT].z,EPCapturePoints[EP_EWT].o,EPCapturePoints[EP_EWT].rot0,EPCapturePoints[EP_EWT].rot1,EPCapturePoints[EP_EWT].rot2,EPCapturePoints[EP_EWT].rot3); + AddObject(EP_EWT_FLAGS,EPTowerFlags[EP_EWT].entry,EPTowerFlags[EP_EWT].map,EPTowerFlags[EP_EWT].x,EPTowerFlags[EP_EWT].y,EPTowerFlags[EP_EWT].z,EPTowerFlags[EP_EWT].o,EPTowerFlags[EP_EWT].rot0,EPTowerFlags[EP_EWT].rot1,EPTowerFlags[EP_EWT].rot2,EPTowerFlags[EP_EWT].rot3); +} + +void OPvPCapturePointEP_EWT::ChangeState() +{ + if(fabs(m_value) == m_maxValue) // state won't change, only phase when maxed out! + { + // if changing from controlling alliance to horde or vice versa + if( m_OldState == OBJECTIVESTATE_ALLIANCE && m_OldState != m_State ) + { + sWorld.SendZoneText(EP_GraveYardZone,sObjectMgr.GetMangosStringForDBCLocale(LANG_OPVP_EP_LOOSE_EWT_A)); + ((OutdoorPvPEP*)m_PvP)->EP_Controls[EP_EWT] = 0; + } + else if ( m_OldState == OBJECTIVESTATE_HORDE && m_OldState != m_State ) + { + sWorld.SendZoneText(EP_GraveYardZone,sObjectMgr.GetMangosStringForDBCLocale(LANG_OPVP_EP_LOOSE_EWT_H)); + ((OutdoorPvPEP*)m_PvP)->EP_Controls[EP_EWT] = 0; + } + + uint32 artkit = 21; + + switch(m_State) + { + case OBJECTIVESTATE_ALLIANCE: + if(m_value == m_maxValue) + m_TowerState = EP_TS_A; + else + m_TowerState = EP_TS_A_P; + artkit = 2; + SummonSupportUnitAtNorthpassTower(ALLIANCE); + ((OutdoorPvPEP*)m_PvP)->EP_Controls[EP_EWT] = ALLIANCE; + if(m_OldState != m_State) sWorld.SendZoneText(EP_GraveYardZone,sObjectMgr.GetMangosStringForDBCLocale(LANG_OPVP_EP_CAPTURE_EWT_A)); + break; + case OBJECTIVESTATE_HORDE: + if(m_value == -m_maxValue) + m_TowerState = EP_TS_H; + else + m_TowerState = EP_TS_H_P; + artkit = 1; + SummonSupportUnitAtNorthpassTower(HORDE); + ((OutdoorPvPEP*)m_PvP)->EP_Controls[EP_EWT] = HORDE; + if(m_OldState != m_State) sWorld.SendZoneText(EP_GraveYardZone,sObjectMgr.GetMangosStringForDBCLocale(LANG_OPVP_EP_CAPTURE_EWT_H)); + break; + case OBJECTIVESTATE_NEUTRAL: + m_TowerState = EP_TS_N; + break; + case OBJECTIVESTATE_NEUTRAL_ALLIANCE_CHALLENGE: + case OBJECTIVESTATE_HORDE_ALLIANCE_CHALLENGE: + m_TowerState = EP_TS_N_A; + break; + case OBJECTIVESTATE_NEUTRAL_HORDE_CHALLENGE: + case OBJECTIVESTATE_ALLIANCE_HORDE_CHALLENGE: + m_TowerState = EP_TS_N_H; + break; + } + + GameObject* flag = ObjectAccessor::GetGameObjectInWorld(ObjectGuid(HIGHGUID_GAMEOBJECT, m_capturePointGUID)); + GameObject * flag2 = ObjectAccessor::GetGameObjectInWorld(ObjectGuid(HIGHGUID_GAMEOBJECT, m_Objects[EP_EWT_FLAGS])); + if(flag) + { + flag->SetGoArtKit(artkit); + } + if(flag2) + { + flag2->SetGoArtKit(artkit); + } + + UpdateTowerState(); + + // complete quest objective + if(m_TowerState == EP_TS_A || m_TowerState == EP_TS_H) + SendObjectiveComplete(EP_EWT_CM, 0); + } +} + +void OPvPCapturePointEP_EWT::SendChangePhase() +{ + // send this too, sometimes the slider disappears, dunno why :( + SendUpdateWorldState(EP_UI_TOWER_SLIDER_DISPLAY, 1); + // send these updates to only the ones in this objective + uint32 phase = (uint32)ceil(( m_value + m_maxValue) / ( 2 * m_maxValue ) * 100.0f); + SendUpdateWorldState(EP_UI_TOWER_SLIDER_POS, phase); + // send this too, sometimes it resets :S + SendUpdateWorldState(EP_UI_TOWER_SLIDER_N, m_neutralValuePct); +} + +void OPvPCapturePointEP_EWT::FillInitialWorldStates(WorldPacket& data, uint32& count) +{ + FillInitialWorldState(data, count, EP_EWT_A, bool(m_TowerState & EP_TS_A)); + FillInitialWorldState(data, count, EP_EWT_H, bool(m_TowerState & EP_TS_H)); + FillInitialWorldState(data, count, EP_EWT_A_P, bool(m_TowerState & EP_TS_A_P)); + FillInitialWorldState(data, count, EP_EWT_H_P, bool(m_TowerState & EP_TS_H_P)); + FillInitialWorldState(data, count, EP_EWT_N_A, bool(m_TowerState & EP_TS_N_A)); + FillInitialWorldState(data, count, EP_EWT_N_H, bool(m_TowerState & EP_TS_N_H)); + FillInitialWorldState(data, count, EP_EWT_N, bool(m_TowerState & EP_TS_N)); +} + +void OPvPCapturePointEP_EWT::UpdateTowerState() +{ + m_PvP->SendUpdateWorldState(EP_EWT_A , bool(m_TowerState & EP_TS_A)); + m_PvP->SendUpdateWorldState(EP_EWT_H , bool(m_TowerState & EP_TS_H)); + m_PvP->SendUpdateWorldState(EP_EWT_A_P , bool(m_TowerState & EP_TS_A_P)); + m_PvP->SendUpdateWorldState(EP_EWT_H_P , bool(m_TowerState & EP_TS_H_P)); + m_PvP->SendUpdateWorldState(EP_EWT_N_A , bool(m_TowerState & EP_TS_N_A)); + m_PvP->SendUpdateWorldState(EP_EWT_N_H , bool(m_TowerState & EP_TS_N_H)); + m_PvP->SendUpdateWorldState(EP_EWT_N , bool(m_TowerState & EP_TS_N)); +} + +bool OPvPCapturePointEP_EWT::HandlePlayerEnter(Player *plr) +{ + if(OPvPCapturePoint::HandlePlayerEnter(plr)) + { + plr->SendUpdateWorldState(EP_UI_TOWER_SLIDER_DISPLAY, 1); + uint32 phase = (uint32)ceil(( m_value + m_maxValue) / ( 2 * m_maxValue ) * 100.0f); + plr->SendUpdateWorldState(EP_UI_TOWER_SLIDER_POS, phase); + plr->SendUpdateWorldState(EP_UI_TOWER_SLIDER_N, m_neutralValuePct); + return true; + } + return false; +} + +void OPvPCapturePointEP_EWT::HandlePlayerLeave(Player *plr) +{ + plr->SendUpdateWorldState(EP_UI_TOWER_SLIDER_DISPLAY, 0); + OPvPCapturePoint::HandlePlayerLeave(plr); +} + +void OPvPCapturePointEP_EWT::SummonSupportUnitAtNorthpassTower(uint32 team) +{ + if(m_UnitsSummonedSide != team) + { + m_UnitsSummonedSide = team; + const creature_type * ct = NULL; + if(team == ALLIANCE) + ct=EP_EWT_Summons_A; + else + ct=EP_EWT_Summons_H; + + for (int i = 0; i < EP_EWT_NUM_CREATURES; ++i) + { + DelCreature(i); + AddCreature(i,ct[i].entry,ct[i].teamval,ct[i].map,ct[i].x,ct[i].y,ct[i].z,ct[i].o,1000000); + } + } +} + +// NPT +OPvPCapturePointEP_NPT::OPvPCapturePointEP_NPT(OutdoorPvP *pvp) +: OPvPCapturePoint(pvp), m_TowerState(EP_TS_N), m_SummonedGOSide(0) +{ + SetCapturePointData(EPCapturePoints[EP_NPT].entry,EPCapturePoints[EP_NPT].map,EPCapturePoints[EP_NPT].x,EPCapturePoints[EP_NPT].y,EPCapturePoints[EP_NPT].z,EPCapturePoints[EP_NPT].o,EPCapturePoints[EP_NPT].rot0,EPCapturePoints[EP_NPT].rot1,EPCapturePoints[EP_NPT].rot2,EPCapturePoints[EP_NPT].rot3); + AddObject(EP_NPT_FLAGS,EPTowerFlags[EP_NPT].entry,EPTowerFlags[EP_NPT].map,EPTowerFlags[EP_NPT].x,EPTowerFlags[EP_NPT].y,EPTowerFlags[EP_NPT].z,EPTowerFlags[EP_NPT].o,EPTowerFlags[EP_NPT].rot0,EPTowerFlags[EP_NPT].rot1,EPTowerFlags[EP_NPT].rot2,EPTowerFlags[EP_NPT].rot3); +} + +void OPvPCapturePointEP_NPT::ChangeState() +{ + if(fabs(m_value) == m_maxValue) // state won't change, only phase when maxed out! + { + // if changing from controlling alliance to horde or vice versa + if( m_OldState == OBJECTIVESTATE_ALLIANCE && m_OldState != m_State ) + { + sWorld.SendZoneText(EP_GraveYardZone,sObjectMgr.GetMangosStringForDBCLocale(LANG_OPVP_EP_LOOSE_NPT_A)); + ((OutdoorPvPEP*)m_PvP)->EP_Controls[EP_NPT] = 0; + } + else if ( m_OldState == OBJECTIVESTATE_HORDE && m_OldState != m_State ) + { + sWorld.SendZoneText(EP_GraveYardZone,sObjectMgr.GetMangosStringForDBCLocale(LANG_OPVP_EP_LOOSE_NPT_H)); + ((OutdoorPvPEP*)m_PvP)->EP_Controls[EP_NPT] = 0; + } + + uint32 artkit = 21; + + switch(m_State) + { + case OBJECTIVESTATE_ALLIANCE: + if(m_value == m_maxValue) + m_TowerState = EP_TS_A; + else + m_TowerState = EP_TS_A_P; + artkit = 2; + SummonGO(ALLIANCE); + ((OutdoorPvPEP*)m_PvP)->EP_Controls[EP_NPT] = ALLIANCE; + if(m_OldState != m_State) sWorld.SendZoneText(EP_GraveYardZone,sObjectMgr.GetMangosStringForDBCLocale(LANG_OPVP_EP_CAPTURE_NPT_A)); + break; + case OBJECTIVESTATE_HORDE: + if(m_value == -m_maxValue) + m_TowerState = EP_TS_H; + else + m_TowerState = EP_TS_H_P; + artkit = 1; + SummonGO(HORDE); + ((OutdoorPvPEP*)m_PvP)->EP_Controls[EP_NPT] = HORDE; + if(m_OldState != m_State) sWorld.SendZoneText(EP_GraveYardZone,sObjectMgr.GetMangosStringForDBCLocale(LANG_OPVP_EP_CAPTURE_NPT_H)); + break; + case OBJECTIVESTATE_NEUTRAL: + m_TowerState = EP_TS_N; + m_SummonedGOSide = 0; + DelObject(EP_NPT_BUFF); + break; + case OBJECTIVESTATE_NEUTRAL_ALLIANCE_CHALLENGE: + case OBJECTIVESTATE_HORDE_ALLIANCE_CHALLENGE: + m_TowerState = EP_TS_N_A; + break; + case OBJECTIVESTATE_NEUTRAL_HORDE_CHALLENGE: + case OBJECTIVESTATE_ALLIANCE_HORDE_CHALLENGE: + m_TowerState = EP_TS_N_H; + break; + } + + GameObject * flag = ObjectAccessor::GetGameObjectInWorld(ObjectGuid(HIGHGUID_GAMEOBJECT, m_capturePointGUID)); + GameObject * flag2 = ObjectAccessor::GetGameObjectInWorld(ObjectGuid(HIGHGUID_GAMEOBJECT, m_Objects[EP_NPT_FLAGS])); + if(flag) + { + flag->SetGoArtKit(artkit); + } + if(flag2) + { + flag2->SetGoArtKit(artkit); + } + + UpdateTowerState(); + + // complete quest objective + if(m_TowerState == EP_TS_A || m_TowerState == EP_TS_H) + SendObjectiveComplete(EP_NPT_CM, 0); + } +} + +void OPvPCapturePointEP_NPT::SendChangePhase() +{ + // send this too, sometimes the slider disappears, dunno why :( + SendUpdateWorldState(EP_UI_TOWER_SLIDER_DISPLAY, 1); + // send these updates to only the ones in this objective + uint32 phase = (uint32)ceil(( m_value + m_maxValue) / ( 2 * m_maxValue ) * 100.0f); + SendUpdateWorldState(EP_UI_TOWER_SLIDER_POS, phase); + // send this too, sometimes it resets :S + SendUpdateWorldState(EP_UI_TOWER_SLIDER_N, m_neutralValuePct); +} + +void OPvPCapturePointEP_NPT::FillInitialWorldStates(WorldPacket& data, uint32& count) +{ + FillInitialWorldState(data, count, EP_NPT_A, bool(m_TowerState & EP_TS_A)); + FillInitialWorldState(data, count, EP_NPT_H, bool(m_TowerState & EP_TS_H)); + FillInitialWorldState(data, count, EP_NPT_A_P, bool(m_TowerState & EP_TS_A_P)); + FillInitialWorldState(data, count, EP_NPT_H_P, bool(m_TowerState & EP_TS_H_P)); + FillInitialWorldState(data, count, EP_NPT_N_A, bool(m_TowerState & EP_TS_N_A)); + FillInitialWorldState(data, count, EP_NPT_N_H, bool(m_TowerState & EP_TS_N_H)); + FillInitialWorldState(data, count, EP_NPT_N, bool(m_TowerState & EP_TS_N)); +} + +void OPvPCapturePointEP_NPT::UpdateTowerState() +{ + m_PvP->SendUpdateWorldState(EP_NPT_A , bool(m_TowerState & EP_TS_A)); + m_PvP->SendUpdateWorldState(EP_NPT_H , bool(m_TowerState & EP_TS_H)); + m_PvP->SendUpdateWorldState(EP_NPT_A_P , bool(m_TowerState & EP_TS_A_P)); + m_PvP->SendUpdateWorldState(EP_NPT_H_P , bool(m_TowerState & EP_TS_H_P)); + m_PvP->SendUpdateWorldState(EP_NPT_N_A , bool(m_TowerState & EP_TS_N_A)); + m_PvP->SendUpdateWorldState(EP_NPT_N_H , bool(m_TowerState & EP_TS_N_H)); + m_PvP->SendUpdateWorldState(EP_NPT_N , bool(m_TowerState & EP_TS_N)); +} + +bool OPvPCapturePointEP_NPT::HandlePlayerEnter(Player *plr) +{ + if(OPvPCapturePoint::HandlePlayerEnter(plr)) + { + plr->SendUpdateWorldState(EP_UI_TOWER_SLIDER_DISPLAY, 1); + uint32 phase = (uint32)ceil(( m_value + m_maxValue) / ( 2 * m_maxValue ) * 100.0f); + plr->SendUpdateWorldState(EP_UI_TOWER_SLIDER_POS, phase); + plr->SendUpdateWorldState(EP_UI_TOWER_SLIDER_N, m_neutralValuePct); + return true; + } + return false; +} + +void OPvPCapturePointEP_NPT::HandlePlayerLeave(Player *plr) +{ + plr->SendUpdateWorldState(EP_UI_TOWER_SLIDER_DISPLAY, 0); + OPvPCapturePoint::HandlePlayerLeave(plr); +} + +void OPvPCapturePointEP_NPT::SummonGO(uint32 team) +{ + if(m_SummonedGOSide != team) + { + m_SummonedGOSide = team; + DelObject(EP_NPT_BUFF); + AddObject(EP_NPT_BUFF,EP_NPT_LordaeronShrine.entry,EP_NPT_LordaeronShrine.map,EP_NPT_LordaeronShrine.x,EP_NPT_LordaeronShrine.y,EP_NPT_LordaeronShrine.z,EP_NPT_LordaeronShrine.o,EP_NPT_LordaeronShrine.rot0,EP_NPT_LordaeronShrine.rot1,EP_NPT_LordaeronShrine.rot2,EP_NPT_LordaeronShrine.rot3); + GameObject * go = ObjectAccessor::GetGameObjectInWorld(m_Objects[EP_NPT_BUFF]); + if(go) + go->SetUInt32Value(GAMEOBJECT_FACTION,(team == ALLIANCE ? 84 : 83)); + } +} + +// CGT +OPvPCapturePointEP_CGT::OPvPCapturePointEP_CGT(OutdoorPvP *pvp) +: OPvPCapturePoint(pvp), m_TowerState(EP_TS_N), m_GraveyardSide(0) +{ + SetCapturePointData(EPCapturePoints[EP_CGT].entry,EPCapturePoints[EP_CGT].map,EPCapturePoints[EP_CGT].x,EPCapturePoints[EP_CGT].y,EPCapturePoints[EP_CGT].z,EPCapturePoints[EP_CGT].o,EPCapturePoints[EP_CGT].rot0,EPCapturePoints[EP_CGT].rot1,EPCapturePoints[EP_CGT].rot2,EPCapturePoints[EP_CGT].rot3); + AddObject(EP_CGT_FLAGS,EPTowerFlags[EP_CGT].entry,EPTowerFlags[EP_CGT].map,EPTowerFlags[EP_CGT].x,EPTowerFlags[EP_CGT].y,EPTowerFlags[EP_CGT].z,EPTowerFlags[EP_CGT].o,EPTowerFlags[EP_CGT].rot0,EPTowerFlags[EP_CGT].rot1,EPTowerFlags[EP_CGT].rot2,EPTowerFlags[EP_CGT].rot3); +} + +void OPvPCapturePointEP_CGT::ChangeState() +{ + if(fabs(m_value) == m_maxValue) // state won't change, only phase when maxed out! + { + // if changing from controlling alliance to horde or vice versa + if( m_OldState == OBJECTIVESTATE_ALLIANCE && m_OldState != m_State ) + { + sWorld.SendZoneText(EP_GraveYardZone,sObjectMgr.GetMangosStringForDBCLocale(LANG_OPVP_EP_LOOSE_CGT_A)); + ((OutdoorPvPEP*)m_PvP)->EP_Controls[EP_CGT] = 0; + } + else if ( m_OldState == OBJECTIVESTATE_HORDE && m_OldState != m_State ) + { + sWorld.SendZoneText(EP_GraveYardZone,sObjectMgr.GetMangosStringForDBCLocale(LANG_OPVP_EP_LOOSE_CGT_H)); + ((OutdoorPvPEP*)m_PvP)->EP_Controls[EP_CGT] = 0; + } + + uint32 artkit = 21; + + switch(m_State) + { + case OBJECTIVESTATE_ALLIANCE: + if(m_value == m_maxValue) + m_TowerState = EP_TS_A; + else + m_TowerState = EP_TS_A_P; + artkit = 2; + LinkGraveYard(ALLIANCE); + ((OutdoorPvPEP*)m_PvP)->EP_Controls[EP_CGT] = ALLIANCE; + if(m_OldState != m_State) sWorld.SendZoneText(EP_GraveYardZone,sObjectMgr.GetMangosStringForDBCLocale(LANG_OPVP_EP_CAPTURE_CGT_A)); + break; + case OBJECTIVESTATE_HORDE: + if(m_value == -m_maxValue) + m_TowerState = EP_TS_H; + else + m_TowerState = EP_TS_H_P; + artkit = 1; + LinkGraveYard(HORDE); + ((OutdoorPvPEP*)m_PvP)->EP_Controls[EP_CGT] = HORDE; + if(m_OldState != m_State) sWorld.SendZoneText(EP_GraveYardZone,sObjectMgr.GetMangosStringForDBCLocale(LANG_OPVP_EP_CAPTURE_CGT_H)); + break; + case OBJECTIVESTATE_NEUTRAL: + m_TowerState = EP_TS_N; + break; + case OBJECTIVESTATE_NEUTRAL_ALLIANCE_CHALLENGE: + case OBJECTIVESTATE_HORDE_ALLIANCE_CHALLENGE: + m_TowerState = EP_TS_N_A; + break; + case OBJECTIVESTATE_NEUTRAL_HORDE_CHALLENGE: + case OBJECTIVESTATE_ALLIANCE_HORDE_CHALLENGE: + m_TowerState = EP_TS_N_H; + break; + } + + GameObject* flag = ObjectAccessor::GetGameObjectInWorld(ObjectGuid(HIGHGUID_GAMEOBJECT, m_capturePointGUID)); + GameObject* flag2 = ObjectAccessor::GetGameObjectInWorld(ObjectGuid(HIGHGUID_GAMEOBJECT,m_Objects[EP_CGT_FLAGS])); + if(flag) + { + flag->SetGoArtKit(artkit); + } + if(flag2) + { + flag2->SetGoArtKit(artkit); + } + + UpdateTowerState(); + + // complete quest objective + if(m_TowerState == EP_TS_A || m_TowerState == EP_TS_H) + SendObjectiveComplete(EP_CGT_CM, 0); + } +} + +void OPvPCapturePointEP_CGT::SendChangePhase() +{ + // send this too, sometimes the slider disappears, dunno why :( + SendUpdateWorldState(EP_UI_TOWER_SLIDER_DISPLAY, 1); + // send these updates to only the ones in this objective + uint32 phase = (uint32)ceil(( m_value + m_maxValue) / ( 2 * m_maxValue ) * 100.0f); + SendUpdateWorldState(EP_UI_TOWER_SLIDER_POS, phase); + // send this too, sometimes it resets :S + SendUpdateWorldState(EP_UI_TOWER_SLIDER_N, m_neutralValuePct); +} + +void OPvPCapturePointEP_CGT::FillInitialWorldStates(WorldPacket& data, uint32& count) +{ + FillInitialWorldState(data, count, EP_CGT_A, bool(m_TowerState & EP_TS_A)); + FillInitialWorldState(data, count, EP_CGT_H, bool(m_TowerState & EP_TS_H)); + FillInitialWorldState(data, count, EP_CGT_A_P, bool(m_TowerState & EP_TS_A_P)); + FillInitialWorldState(data, count, EP_CGT_H_P, bool(m_TowerState & EP_TS_H_P)); + FillInitialWorldState(data, count, EP_CGT_N_A, bool(m_TowerState & EP_TS_N_A)); + FillInitialWorldState(data, count, EP_CGT_N_H, bool(m_TowerState & EP_TS_N_H)); + FillInitialWorldState(data, count, EP_CGT_N, bool(m_TowerState & EP_TS_N)); +} + +void OPvPCapturePointEP_CGT::UpdateTowerState() +{ + m_PvP->SendUpdateWorldState(EP_CGT_A , bool(m_TowerState & EP_TS_A)); + m_PvP->SendUpdateWorldState(EP_CGT_H , bool(m_TowerState & EP_TS_H)); + m_PvP->SendUpdateWorldState(EP_CGT_A_P , bool(m_TowerState & EP_TS_A_P)); + m_PvP->SendUpdateWorldState(EP_CGT_H_P , bool(m_TowerState & EP_TS_H_P)); + m_PvP->SendUpdateWorldState(EP_CGT_N_A , bool(m_TowerState & EP_TS_N_A)); + m_PvP->SendUpdateWorldState(EP_CGT_N_H , bool(m_TowerState & EP_TS_N_H)); + m_PvP->SendUpdateWorldState(EP_CGT_N , bool(m_TowerState & EP_TS_N)); +} + +bool OPvPCapturePointEP_CGT::HandlePlayerEnter(Player *plr) +{ + if(OPvPCapturePoint::HandlePlayerEnter(plr)) + { + plr->SendUpdateWorldState(EP_UI_TOWER_SLIDER_DISPLAY, 1); + uint32 phase = (uint32)ceil(( m_value + m_maxValue) / ( 2 * m_maxValue ) * 100.0f); + plr->SendUpdateWorldState(EP_UI_TOWER_SLIDER_POS, phase); + plr->SendUpdateWorldState(EP_UI_TOWER_SLIDER_N, m_neutralValuePct); + return true; + } + return false; +} + +void OPvPCapturePointEP_CGT::HandlePlayerLeave(Player *plr) +{ + plr->SendUpdateWorldState(EP_UI_TOWER_SLIDER_DISPLAY, 0); + OPvPCapturePoint::HandlePlayerLeave(plr); +} + +void OPvPCapturePointEP_CGT::LinkGraveYard(Team team) +{ + if(m_GraveyardSide != team) + { + m_GraveyardSide = team; + sObjectMgr.RemoveGraveYardLink(EP_GraveYardId,EP_GraveYardZone,team,false); + sObjectMgr.AddGraveYardLink(EP_GraveYardId,EP_GraveYardZone,team,false); + } +} + +// PWT +OPvPCapturePointEP_PWT::OPvPCapturePointEP_PWT(OutdoorPvP *pvp) +: OPvPCapturePoint(pvp), m_TowerState(EP_TS_N), m_FlightMasterSpawned(0) +{ + SetCapturePointData(EPCapturePoints[EP_PWT].entry,EPCapturePoints[EP_PWT].map,EPCapturePoints[EP_PWT].x,EPCapturePoints[EP_PWT].y,EPCapturePoints[EP_PWT].z,EPCapturePoints[EP_PWT].o,EPCapturePoints[EP_PWT].rot0,EPCapturePoints[EP_PWT].rot1,EPCapturePoints[EP_PWT].rot2,EPCapturePoints[EP_PWT].rot3); + AddObject(EP_PWT_FLAGS,EPTowerFlags[EP_PWT].entry,EPTowerFlags[EP_PWT].map,EPTowerFlags[EP_PWT].x,EPTowerFlags[EP_PWT].y,EPTowerFlags[EP_PWT].z,EPTowerFlags[EP_PWT].o,EPTowerFlags[EP_PWT].rot0,EPTowerFlags[EP_PWT].rot1,EPTowerFlags[EP_PWT].rot2,EPTowerFlags[EP_PWT].rot3); +} + +void OPvPCapturePointEP_PWT::ChangeState() +{ + if(fabs(m_value) == m_maxValue) // state won't change, only phase when maxed out! + { + // if changing from controlling alliance to horde or vice versa + if( m_OldState == OBJECTIVESTATE_ALLIANCE && m_OldState != m_State ) + { + sWorld.SendZoneText(EP_GraveYardZone,sObjectMgr.GetMangosStringForDBCLocale(LANG_OPVP_EP_LOOSE_PWT_A)); + ((OutdoorPvPEP*)m_PvP)->EP_Controls[EP_PWT] = 0; + } + else if ( m_OldState == OBJECTIVESTATE_HORDE && m_OldState != m_State ) + { + sWorld.SendZoneText(EP_GraveYardZone,sObjectMgr.GetMangosStringForDBCLocale(LANG_OPVP_EP_LOOSE_PWT_H)); + ((OutdoorPvPEP*)m_PvP)->EP_Controls[EP_PWT] = 0; + } + + uint32 artkit = 21; + + switch(m_State) + { + case OBJECTIVESTATE_ALLIANCE: + if(m_value == m_maxValue) + m_TowerState = EP_TS_A; + else + m_TowerState = EP_TS_A_P; + SummonFlightMaster(ALLIANCE); + artkit = 2; + ((OutdoorPvPEP*)m_PvP)->EP_Controls[EP_PWT] = ALLIANCE; + if(m_OldState != m_State) sWorld.SendZoneText(EP_GraveYardZone,sObjectMgr.GetMangosStringForDBCLocale(LANG_OPVP_EP_CAPTURE_PWT_A)); + break; + case OBJECTIVESTATE_HORDE: + if(m_value == -m_maxValue) + m_TowerState = EP_TS_H; + else + m_TowerState = EP_TS_H_P; + SummonFlightMaster(HORDE); + artkit = 1; + ((OutdoorPvPEP*)m_PvP)->EP_Controls[EP_PWT] = HORDE; + if(m_OldState != m_State) sWorld.SendZoneText(EP_GraveYardZone,sObjectMgr.GetMangosStringForDBCLocale(LANG_OPVP_EP_CAPTURE_PWT_H)); + break; + case OBJECTIVESTATE_NEUTRAL: + m_TowerState = EP_TS_N; + DelCreature(EP_PWT_FLIGHTMASTER); + m_FlightMasterSpawned = 0; + break; + case OBJECTIVESTATE_NEUTRAL_ALLIANCE_CHALLENGE: + case OBJECTIVESTATE_HORDE_ALLIANCE_CHALLENGE: + m_TowerState = EP_TS_N_A; + break; + case OBJECTIVESTATE_NEUTRAL_HORDE_CHALLENGE: + case OBJECTIVESTATE_ALLIANCE_HORDE_CHALLENGE: + m_TowerState = EP_TS_N_H; + break; + } + + GameObject * flag = ObjectAccessor::GetGameObjectInWorld(ObjectGuid(HIGHGUID_GAMEOBJECT, m_capturePointGUID)); + GameObject * flag2 = ObjectAccessor::GetGameObjectInWorld(ObjectGuid(HIGHGUID_GAMEOBJECT, m_Objects[EP_PWT_FLAGS])); + if(flag) + { + flag->SetGoArtKit(artkit); + } + if(flag2) + { + flag2->SetGoArtKit(artkit); + } + + UpdateTowerState(); + + // complete quest objective + if(m_TowerState == EP_TS_A || m_TowerState == EP_TS_H) + SendObjectiveComplete(EP_PWT_CM, 0); + } +} + +void OPvPCapturePointEP_PWT::SendChangePhase() +{ + // send this too, sometimes the slider disappears, dunno why :( + SendUpdateWorldState(EP_UI_TOWER_SLIDER_DISPLAY, 1); + // send these updates to only the ones in this objective + uint32 phase = (uint32)ceil(( m_value + m_maxValue) / ( 2 * m_maxValue ) * 100.0f); + SendUpdateWorldState(EP_UI_TOWER_SLIDER_POS, phase); + // send this too, sometimes it resets :S + SendUpdateWorldState(EP_UI_TOWER_SLIDER_N, m_neutralValuePct); +} + +void OPvPCapturePointEP_PWT::FillInitialWorldStates(WorldPacket& data, uint32& count) +{ + FillInitialWorldState(data, count, EP_PWT_A, bool(m_TowerState & EP_TS_A)); + FillInitialWorldState(data, count, EP_PWT_H, bool(m_TowerState & EP_TS_H)); + FillInitialWorldState(data, count, EP_PWT_A_P, bool(m_TowerState & EP_TS_A_P)); + FillInitialWorldState(data, count, EP_PWT_H_P, bool(m_TowerState & EP_TS_H_P)); + FillInitialWorldState(data, count, EP_PWT_N_A, bool(m_TowerState & EP_TS_N_A)); + FillInitialWorldState(data, count, EP_PWT_N_H, bool(m_TowerState & EP_TS_N_H)); + FillInitialWorldState(data, count, EP_PWT_N, bool(m_TowerState & EP_TS_N)); +} + +void OPvPCapturePointEP_PWT::UpdateTowerState() +{ + m_PvP->SendUpdateWorldState(EP_PWT_A , bool(m_TowerState & EP_TS_A)); + m_PvP->SendUpdateWorldState(EP_PWT_H , bool(m_TowerState & EP_TS_H)); + m_PvP->SendUpdateWorldState(EP_PWT_A_P , bool(m_TowerState & EP_TS_A_P)); + m_PvP->SendUpdateWorldState(EP_PWT_H_P , bool(m_TowerState & EP_TS_H_P)); + m_PvP->SendUpdateWorldState(EP_PWT_N_A , bool(m_TowerState & EP_TS_N_A)); + m_PvP->SendUpdateWorldState(EP_PWT_N_H , bool(m_TowerState & EP_TS_N_H)); + m_PvP->SendUpdateWorldState(EP_PWT_N , bool(m_TowerState & EP_TS_N)); +} + +bool OPvPCapturePointEP_PWT::HandlePlayerEnter(Player *plr) +{ + if(OPvPCapturePoint::HandlePlayerEnter(plr)) + { + plr->SendUpdateWorldState(EP_UI_TOWER_SLIDER_DISPLAY, 1); + uint32 phase = (uint32)ceil(( m_value + m_maxValue) / ( 2 * m_maxValue ) * 100.0f); + plr->SendUpdateWorldState(EP_UI_TOWER_SLIDER_POS, phase); + plr->SendUpdateWorldState(EP_UI_TOWER_SLIDER_N, m_neutralValuePct); + return true; + } + return false; +} + +void OPvPCapturePointEP_PWT::HandlePlayerLeave(Player *plr) +{ + plr->SendUpdateWorldState(EP_UI_TOWER_SLIDER_DISPLAY, 0); + OPvPCapturePoint::HandlePlayerLeave(plr); +} + +void OPvPCapturePointEP_PWT::SummonFlightMaster(uint32 team) +{ + if(m_FlightMasterSpawned != team) + { + m_FlightMasterSpawned = team; + DelCreature(EP_PWT_FLIGHTMASTER); + AddCreature(EP_PWT_FLIGHTMASTER,EP_PWT_FlightMaster.entry,team,EP_PWT_FlightMaster.map,EP_PWT_FlightMaster.x,EP_PWT_FlightMaster.y,EP_PWT_FlightMaster.z,EP_PWT_FlightMaster.o); + } +} + +// ep +OutdoorPvPEP::OutdoorPvPEP() +{ + m_TypeId = OUTDOOR_PVP_EP; + memset(EP_Controls,0,sizeof(EP_Controls)); + m_AllianceTowersControlled = 0; + m_HordeTowersControlled = 0; +} + +bool OutdoorPvPEP::SetupOutdoorPvP() +{ + for (int i = 0; i < EPBuffZonesNum; ++i) + RegisterZone(EPBuffZones[i]); + + AddCapturePoint(new OPvPCapturePointEP_EWT(this)); + AddCapturePoint(new OPvPCapturePointEP_PWT(this)); + AddCapturePoint(new OPvPCapturePointEP_CGT(this)); + AddCapturePoint(new OPvPCapturePointEP_NPT(this)); + return true; +} + +bool OutdoorPvPEP::Update(uint32 diff) +{ + if(OutdoorPvP::Update(diff)) + { + m_AllianceTowersControlled = 0; + m_HordeTowersControlled = 0; + for (int i = 0; i < EP_TOWER_NUM; ++i) + { + if(EP_Controls[i] == ALLIANCE) + ++m_AllianceTowersControlled; + else if(EP_Controls[i] == HORDE) + ++m_HordeTowersControlled; + SendUpdateWorldState(EP_UI_TOWER_COUNT_A,m_AllianceTowersControlled); + SendUpdateWorldState(EP_UI_TOWER_COUNT_H,m_HordeTowersControlled); + BuffTeams(); + } + return true; + } + return false; +} + +void OutdoorPvPEP::HandlePlayerEnterZone(Player * plr, uint32 zone) +{ + // add buffs + if(plr->GetTeam() == ALLIANCE) + { + if(m_AllianceTowersControlled && m_AllianceTowersControlled < 5) + plr->CastSpell(plr,EP_AllianceBuffs[m_AllianceTowersControlled-1],true); + } + else + { + if(m_HordeTowersControlled && m_HordeTowersControlled < 5) + plr->CastSpell(plr,EP_HordeBuffs[m_HordeTowersControlled-1],true); + } + OutdoorPvP::HandlePlayerEnterZone(plr,zone); +} + +void OutdoorPvPEP::HandlePlayerLeaveZone(Player * plr, uint32 zone) +{ + // remove buffs + if(plr->GetTeam() == ALLIANCE) + { + for (int i = 0; i < 4; ++i) + plr->RemoveAurasDueToSpell(EP_AllianceBuffs[i]); + } + else + { + for (int i = 0; i < 4; ++i) + plr->RemoveAurasDueToSpell(EP_HordeBuffs[i]); + } + OutdoorPvP::HandlePlayerLeaveZone(plr, zone); +} + +void OutdoorPvPEP::BuffTeams() +{ + for (PlayerSet::iterator itr = m_players[0].begin(); itr != m_players[0].end(); ++itr) + { + Player * plr = *itr; + { + for (int i = 0; i < 4; ++i) + plr->RemoveAurasDueToSpell(EP_AllianceBuffs[i]); + if(m_AllianceTowersControlled && m_AllianceTowersControlled < 5) + plr->CastSpell(plr,EP_AllianceBuffs[m_AllianceTowersControlled-1],true); + } + } + for (PlayerSet::iterator itr = m_players[1].begin(); itr != m_players[1].end(); ++itr) + { + Player * plr = *itr; + { + for (int i = 0; i < 4; ++i) + plr->RemoveAurasDueToSpell(EP_HordeBuffs[i]); + if(m_HordeTowersControlled && m_HordeTowersControlled < 5) + plr->CastSpell(plr,EP_HordeBuffs[m_HordeTowersControlled-1],true); + } + } +} + +void OutdoorPvPEP::FillInitialWorldStates(WorldPacket& data, uint32& count) +{ + FillInitialWorldState(data, count, EP_UI_TOWER_COUNT_A, m_AllianceTowersControlled); + FillInitialWorldState(data, count, EP_UI_TOWER_COUNT_H, m_HordeTowersControlled); + FillInitialWorldState(data, count, EP_UI_TOWER_SLIDER_DISPLAY, 0); + FillInitialWorldState(data, count, EP_UI_TOWER_SLIDER_POS, 50); + FillInitialWorldState(data, count, EP_UI_TOWER_SLIDER_N, 100); + for (OPvPCapturePointMap::iterator itr = m_capturePoints.begin(); itr != m_capturePoints.end(); ++itr) + { + itr->second->FillInitialWorldStates(data, count); + } +} + +void OutdoorPvPEP::SendRemoveWorldStates(Player *plr) +{ + plr->SendUpdateWorldState(EP_UI_TOWER_COUNT_A,0); + plr->SendUpdateWorldState(EP_UI_TOWER_COUNT_H,0); + plr->SendUpdateWorldState(EP_UI_TOWER_SLIDER_DISPLAY,0); + plr->SendUpdateWorldState(EP_UI_TOWER_SLIDER_POS,0); + plr->SendUpdateWorldState(EP_UI_TOWER_SLIDER_N,0); + + plr->SendUpdateWorldState(EP_EWT_A,0); + plr->SendUpdateWorldState(EP_EWT_H,0); + plr->SendUpdateWorldState(EP_EWT_N,0); + plr->SendUpdateWorldState(EP_EWT_A_P,0); + plr->SendUpdateWorldState(EP_EWT_H_P,0); + plr->SendUpdateWorldState(EP_EWT_N_A,0); + plr->SendUpdateWorldState(EP_EWT_N_H,0); + + plr->SendUpdateWorldState(EP_PWT_A,0); + plr->SendUpdateWorldState(EP_PWT_H,0); + plr->SendUpdateWorldState(EP_PWT_N,0); + plr->SendUpdateWorldState(EP_PWT_A_P,0); + plr->SendUpdateWorldState(EP_PWT_H_P,0); + plr->SendUpdateWorldState(EP_PWT_N_A,0); + plr->SendUpdateWorldState(EP_PWT_N_H,0); + + plr->SendUpdateWorldState(EP_NPT_A,0); + plr->SendUpdateWorldState(EP_NPT_H,0); + plr->SendUpdateWorldState(EP_NPT_N,0); + plr->SendUpdateWorldState(EP_NPT_A_P,0); + plr->SendUpdateWorldState(EP_NPT_H_P,0); + plr->SendUpdateWorldState(EP_NPT_N_A,0); + plr->SendUpdateWorldState(EP_NPT_N_H,0); + + plr->SendUpdateWorldState(EP_CGT_A,0); + plr->SendUpdateWorldState(EP_CGT_H,0); + plr->SendUpdateWorldState(EP_CGT_N,0); + plr->SendUpdateWorldState(EP_CGT_A_P,0); + plr->SendUpdateWorldState(EP_CGT_H_P,0); + plr->SendUpdateWorldState(EP_CGT_N_A,0); + plr->SendUpdateWorldState(EP_CGT_N_H,0); +} +*/ \ No newline at end of file diff --git a/scripts/outdoor_pvp/eastern_kingdoms/outdoor_pvp_eastern_plaguelands.h b/scripts/outdoor_pvp/eastern_kingdoms/outdoor_pvp_eastern_plaguelands.h new file mode 100644 index 0000000..3daccfc --- /dev/null +++ b/scripts/outdoor_pvp/eastern_kingdoms/outdoor_pvp_eastern_plaguelands.h @@ -0,0 +1,330 @@ +/* Copyright (C) 2006 - 2011 ScriptDev2 + * This program is free software licensed under GPL version 2 + * Please see the included DOCS/LICENSE.TXT for more information */ + +#ifndef OUTDOOR_PVP_EASTERN_PLAGUELANDS_H +#define OUTDOOR_PVP_EASTERN_PLAGUELANDS_H +#include "precompiled.h" + +enum +{ + MAX_VARIABLES = 4, + + TYPE_CROWNGUARD_CONTROLLER = 1, + TYPE_EASTWALL_CONTROLLER = 2, + TYPE_NORTHPASS_CONTROLLER = 3, + TYPE_PLAGUEWOOD_CONTROLLER = 4, + + // spells + // aly + SPELL_ECOES_OF_LORDAERON_ALY_1 = 11413, + SPELL_ECOES_OF_LORDAERON_ALY_2 = 11414, + SPELL_ECOES_OF_LORDAERON_ALY_3 = 11415, + SPELL_ECOES_OF_LORDAERON_ALY_4 = 1386, + + // horde + SPELL_ECOES_OF_LORDAERON_HORDE_1 = 30880, + SPELL_ECOES_OF_LORDAERON_HORDE_2 = 30683, + SPELL_ECOES_OF_LORDAERON_HORDE_3 = 30682, + SPELL_ECOES_OF_LORDAERON_HORDE_4 = 29520, + + // zone ids + ZONE_ID_EASTERN_PLAGUELANDS = 139, + ZONE_ID_STRATHOLME = 2017, + ZONE_ID_SCHOLOMANCE = 2057, + + // graveyards + GRAVEYARD_ZONE_EASTERN_PLAGUE = 139, + GRAVEYARD_ID_EASTERN_PLAGUE = 927, + + // taxi nodes + TAXI_NODE_PLAGUEWOOD_TOWER = 84, + TAXI_NODE_NORTHPASS_TOWER = 85, + TAXI_NODE_EASTWALL_TOWER = 86, + TAXI_NODE_CROWNGUARD_TOWER = 87, + + // npcs + NPC_SPECTRAL_FLIGHTMASTER = 17209, + + // quest + NPC_CROWNGUARD_TOWER_QUEST_DOODAD = 17689, + NPC_EASTWALL_TOWER_QUEST_DOODAD = 17690, + NPC_NORTHPASS_TOWER_QUEST_DOODAD = 17696, + NPC_PLAGUEWOOD_TOWER_QUEST_DOODAD = 17698, + + // aly + NPC_LORDAERON_COMMANDER = 17635, + NPC_LORDAERON_SOLDIER = 17647, + + // horde + NPC_LORDAERON_VETERAN = 17995, + NPC_LORDAERON_FIGHTER = 17996, + + // gameobjects + GO_LORDAERON_SHRINE = 181682, + GO_TOWER_FLAG = 182106, + + // capture points + GO_BATTLEFIELD_BANNER_PLAGUELANDS_1 = 181899, + GO_BATTLEFIELD_BANNER_PLAGUELANDS_2 = 182096, + GO_BATTLEFIELD_BANNER_PLAGUELANDS_3 = 182097, + GO_BATTLEFIELD_BANNER_PLAGUELANDS_4 = 182098, + + // world states + WORLD_STATE_TOWER_COUNT_ALY = 2327, + WORLD_STATE_TOWER_COUNT_HORDE = 2328, + WORLD_STATE_TOWER_SLIDER_DISPLAY = 2426, + WORLD_STATE_TOWER_SLIDER_POS = 2427, + WORLD_STATE_TOWER_SLIDER_NEUTRAL = 2428, + + // plaguewood tower + WORLD_STATE_PLAGUEWOOD_CONQ_ALY = 2366, + WORLD_STATE_PLAGUEWOOD_CONQ_HORDE = 2367, + WORLD_STATE_PLAGUEWOOD_PROG_ALY = 2368, + WORLD_STATE_PLAGUEWOOD_PROG_HORDE = 2369, + WORLD_STATE_PLAGUEWOOD_ALY = 2370, + WORLD_STATE_PLAGUEWOOD_HORDE = 2371, + WORLD_STATE_PLAGUEWOOD_NEUTRAL = 2353, + + // northpass tower + WORLD_STATE_NORTHPASS_CONQ_ALY = 2362, + WORLD_STATE_NORTHPASS_CONQ_HORDE = 2363, + WORLD_STATE_NORTHPASS_PROG_ALY = 2364, + WORLD_STATE_NORTHPASS_PROG_HORDE = 2365, + WORLD_STATE_NORTHPASS_ALY = 2372, + WORLD_STATE_NORTHPASS_HORDE = 2373, + WORLD_STATE_NORTHPASS_NEUTRAL = 2352, + + // eastwall tower + WORLD_STATE_EASTWALL_CONQ_ALY = 2359, + WORLD_STATE_EASTWALL_CONQ_HORDE = 2360, + WORLD_STATE_EASTWALL_PROG_ALY = 2357, + WORLD_STATE_EASTWALL_PROG_HORDE = 2358, + WORLD_STATE_EASTWALL_ALY = 2354, + WORLD_STATE_EASTWALL_HORDE = 2356, + WORLD_STATE_EASTWALL_NEUTRAL = 2361, + + // crownguard tower + WORLD_STATE_CROWNGUARD_CONQ_ALY = 2374, + WORLD_STATE_CROWNGUARD_CONQ_HORDE = 2375, + WORLD_STATE_CROWNGUARD_PROG_ALY = 2376, + WORLD_STATE_CROWNGUARD_PROG_HORDE = 2377, + WORLD_STATE_CROWNGUARD_ALY = 2378, + WORLD_STATE_CROWNGUARD_HORDE = 2379, + WORLD_STATE_CROWNGUARD_NEUTRAL = 2355, +}; + +/* +const uint32 EPTowerPlayerEnterEvents[EP_TOWER_NUM] = {10691,10699,10701,10705}; + +const uint32 EPTowerPlayerLeaveEvents[EP_TOWER_NUM] = {10692,10698,10700,10704}; + +/* +enum EP_Summons { + EP_EWT_COMMANDER = 0, + EP_EWT_SOLDIER1, + EP_EWT_SOLDIER2, + EP_EWT_SOLDIER3, + EP_EWT_SOLDIER4, + EP_PWT_FLIGHTMASTER, +}; + +enum EP_GoSummons { + EP_NPT_BUFF = 0, + EP_NPT_FLAGS, + EP_EWT_FLAGS, + EP_CGT_FLAGS, + EP_PWT_FLAGS +}; + +enum EP_Towers { + EP_EWT = 0, // plaguelands 03 + EP_NPT,// plaguelands 01 + EP_PWT,// plaguelands 04 + EP_CGT,// plaguelands 02 + EP_TOWER_NUM +}; + +const go_type EPCapturePoints[EP_TOWER_NUM] = { + {182097,0,2574.51f,-4794.89f,144.704f,-1.45003f,-0.097056f,0.095578f,-0.656229f,0.742165f}, + {181899,0,3181.08f,-4379.36f,174.123f,-2.03472f,-0.065392f,0.119494f,-0.842275f,0.521553f}, + {182098,0,2962.71f,-3042.31f,154.789f,2.08426f,-0.074807f,-0.113837f,0.855928f,0.49883f}, + {182096,0,1860.85f,-3731.23f,196.716f,-2.53214f,0.033967f,-0.131914f,0.944741f,-0.298177f} +}; + +const go_type EPTowerFlags[EP_TOWER_NUM] = { + {182106,0,2569.60f,-4772.93f,115.399f,2.72271f,0,0,0.978148f,0.207912f}, + {182106,0,3148.17f,-4365.51f,145.029f,1.53589f,0,0,0.694658f,0.71934f}, + {182106,0,2992.63f,-3022.95f,125.593f,3.03687f,0,0,0.99863f,0.052336f}, + {182106,0,1838.42f,-3703.56f,167.713f,0.890118f,0,0,0.430511f,0.902585f} +}; + +const uint32 EP_NUM_CREATURES = 6; +const uint32 EP_EWT_NUM_CREATURES = 5; + +// one lordaeron commander, 4 soldiers +// should be spawned at EWT and follow a path, but trans-grid pathing isn't safe, so summon them directly at NPT +const creature_type EP_EWT_Summons_A[EP_EWT_NUM_CREATURES] = { + {17635,469,0, 3167.61f,-4352.09f,138.20f,4.5811f}, + {17647,469,0, 3172.74f,-4352.99f,139.14f,4.9873f}, + {17647,469,0, 3165.89f,-4354.46f,138.67f,3.7244f}, + {17647,469,0, 3164.65f,-4350.26f,138.22f,2.4794f}, + {17647,469,0, 3169.91f,-4349.68f,138.37f,0.7444f} +}; + +const creature_type EP_EWT_Summons_H[EP_EWT_NUM_CREATURES] = { + {17995,67,0, 3167.61f,-4352.09f,138.20f,4.5811f}, + {17996,67,0, 3172.74f,-4352.99f,139.14f,4.9873f}, + {17996,67,0, 3165.89f,-4354.46f,138.67f,3.7244f}, + {17996,67,0, 3164.65f,-4350.26f,138.22f,2.4794f}, + {17996,67,0, 3169.91f,-4349.68f,138.37f,0.7444f} +}; + +enum EP_TowerStates { + EP_TS_N = 1, + EP_TS_N_A = 2, + EP_TS_N_H = 4, + EP_TS_A_P = 8, + EP_TS_H_P = 16, + EP_TS_A = 32, + EP_TS_H = 64 +}; + +// when spawning, pay attention at setting the faction manually! +const creature_type EP_PWT_FlightMaster = {17209,0,0,2987.5f,-3049.11f,120.126f,5.75959f}; + +// after spawning, modify the faction so that only the controller will be able to use it with SetUInt32Value(GAMEOBJECT_FACTION, faction_id); +const go_type EP_NPT_LordaeronShrine = {181682,0,3167.72f,-4355.91f,138.785f,1.69297f,0,0,0.748956f,0.66262f}; +*/ + +class MANGOS_DLL_DECL outdoor_pvp_eastern_plaguelands : public OutdoorPvP +{ + public: + outdoor_pvp_eastern_plaguelands(Map* pMap); + ~outdoor_pvp_eastern_plaguelands() {} + + void OnPlayerEnterZone(Player* pPlayer, uint32 uiZoneId, uint32 uiAreaId); + void OnPlayerLeaveZone(Player* pPlayer, uint32 uiZoneId); + + void SetData(uint32 uiType, uint32 uiData); + uint32 GetData(uint32 uiType); + + const char* Save() { return strInstData.c_str(); } + void Load(const char* chrIn); + + protected: + void UpdateZoneWorldState(); + void SendPlayerWorldState(Player* pPlayer); + + std::string strInstData; + + uint32 m_uiPlaguewoodController; + uint32 m_uiEastwallController; + uint32 m_uiNorthpassController; + uint32 m_uiCrownguardController; + uint32 m_uiTowersAly; + uint32 m_uiTowersHorde; + + PlayerSet sPlaguelandsPlayers; +}; + +/* +class OPvPCapturePointEP_EWT : public OPvPCapturePoint +{ +friend class OutdoorPvPEP; +public: + OPvPCapturePointEP_EWT(OutdoorPvP * pvp); + void ChangeState(); + void SendChangePhase(); + void FillInitialWorldStates(WorldPacket& data, uint32& count); + // used when player is activated/inactivated in the area + bool HandlePlayerEnter(Player * plr); + void HandlePlayerLeave(Player * plr); +protected: + void SummonSupportUnitAtNorthpassTower(uint32 team); + void UpdateTowerState(); +protected: + uint32 m_TowerState; + uint32 m_UnitsSummonedSide; +}; + +class OPvPCapturePointEP_NPT : public OPvPCapturePoint +{ +friend class OutdoorPvPEP; +public: + OPvPCapturePointEP_NPT(OutdoorPvP * pvp); + void ChangeState(); + void SendChangePhase(); + void FillInitialWorldStates(WorldPacket& data, uint32& count); + // used when player is activated/inactivated in the area + bool HandlePlayerEnter(Player * plr); + void HandlePlayerLeave(Player * plr); +protected: + void SummonGO(uint32 team); + void UpdateTowerState(); +protected: + uint32 m_TowerState; + uint32 m_SummonedGOSide; +}; + +class OPvPCapturePointEP_CGT : public OPvPCapturePoint +{ +friend class OutdoorPvPEP; +public: + OPvPCapturePointEP_CGT(OutdoorPvP * pvp); + void ChangeState(); + void SendChangePhase(); + void FillInitialWorldStates(WorldPacket& data, uint32& count); + // used when player is activated/inactivated in the area + bool HandlePlayerEnter(Player * plr); + void HandlePlayerLeave(Player * plr); +protected: + void LinkGraveYard(Team team); + void UpdateTowerState(); +protected: + uint32 m_TowerState; + uint32 m_GraveyardSide; +}; + +class OPvPCapturePointEP_PWT : public OPvPCapturePoint +{ +friend class OutdoorPvPEP; +public: + OPvPCapturePointEP_PWT(OutdoorPvP * pvp); + void ChangeState(); + void SendChangePhase(); + void FillInitialWorldStates(WorldPacket& data, uint32& count); + // used when player is activated/inactivated in the area + bool HandlePlayerEnter(Player * plr); + void HandlePlayerLeave(Player * plr); +protected: + void SummonFlightMaster(uint32 team); + void UpdateTowerState(); +protected: + uint32 m_FlightMasterSpawned; + uint32 m_TowerState; +}; + +class OutdoorPvPEP : public OutdoorPvP +{ +friend class OPvPCapturePointEP_EWT; +friend class OPvPCapturePointEP_NPT; +friend class OPvPCapturePointEP_PWT; +friend class OPvPCapturePointEP_CGT; +public: + OutdoorPvPEP(); + bool SetupOutdoorPvP(); + void HandlePlayerEnterZone(Player *plr, uint32 zone); + void HandlePlayerLeaveZone(Player *plr, uint32 zone); + bool Update(uint32 diff); + void FillInitialWorldStates(WorldPacket& data, uint32& count); + void SendRemoveWorldStates(Player * plr); + void BuffTeams(); +private: + // how many towers are controlled + uint32 EP_Controls[EP_TOWER_NUM]; + uint32 m_AllianceTowersControlled; + uint32 m_HordeTowersControlled; +}; +*/ +#endif \ No newline at end of file diff --git a/scripts/outdoor_pvp/kalimdor/outdoor_pvp_silithus.cpp b/scripts/outdoor_pvp/kalimdor/outdoor_pvp_silithus.cpp new file mode 100644 index 0000000..4298b07 --- /dev/null +++ b/scripts/outdoor_pvp/kalimdor/outdoor_pvp_silithus.cpp @@ -0,0 +1,278 @@ +/* Copyright (C) 2006 - 2011 ScriptDev2 + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: outdoor_pvp_silithus +SD%Complete: +SDComment: +SDCategory: Outdoor PvP +EndScriptData */ + +#include "precompiled.h" +#include "outdoor_pvp_silithus.h" + +outdoor_pvp_silithus::outdoor_pvp_silithus(Map* pMap) : OutdoorPvP(pMap), + m_uiResourcesAly(0), + m_uiResourcesHorde(0), + m_uiLastControllerFaction(0){ } + +void outdoor_pvp_silithus::OnPlayerEnterZone(Player* pPlayer, uint32 uiZoneId) +{ + if (uiZoneId == ZONE_ID_SILITHUS) + { + if(pPlayer->GetTeam() == m_uiLastControllerFaction) + pPlayer->CastSpell(pPlayer, SPELL_CENARION_FAVOR, false); + + // add to the player set + sSilithusPlayers.insert(pPlayer->GetGUID()); + + // send actual world states + SendPlayerWorldState(pPlayer); + } + else + { + if (pPlayer->HasAura(SPELL_CENARION_FAVOR)) + pPlayer->RemoveAurasDueToSpell(SPELL_CENARION_FAVOR); + + // remove from the player set + if (sSilithusPlayers.find(pPlayer->GetGUID()) != sSilithusPlayers.end()) + sSilithusPlayers.erase(pPlayer->GetGUID()); + } +} + +void outdoor_pvp_silithus::SetData(uint32 uiType, uint32 uiData) +{ + switch(uiType) + { + case TYPE_ALLIANCE_SILITHYSTS: + if (uiData) + m_uiResourcesAly += uiData; + else + m_uiResourcesAly = uiData; + + if (GetData(TYPE_ALLIANCE_SILITHYSTS) == MAX_SILITHYST) + { + SetData(TYPE_CONTROLLER_FACTION, ALLIANCE); + DoApplyTeamBuff(sSilithusPlayers, ALLIANCE, SPELL_CENARION_FAVOR); + + // send zone emote + //sWorld.SendZoneText(ZONE_ID_SILITHUS, ZONE_EMOTE_ALY_CAPTURE); + + // reset counters + SetData(TYPE_ALLIANCE_SILITHYSTS, 0); + SetData(TYPE_HORDE_SILITHYSTS, 0); + } + break; + case TYPE_HORDE_SILITHYSTS: + if (uiData) + m_uiResourcesHorde += uiData; + else + m_uiResourcesHorde = uiData; + + if (GetData(TYPE_HORDE_SILITHYSTS) == MAX_SILITHYST) + { + SetData(TYPE_CONTROLLER_FACTION, HORDE); + DoApplyTeamBuff(sSilithusPlayers, HORDE, SPELL_CENARION_FAVOR); + + // send zone emote + //sWorld.SendZoneText(ZONE_ID_SILITHUS, ZONE_EMOTE_HORDE_CAPTURE); + + // reset counters + SetData(TYPE_ALLIANCE_SILITHYSTS, 0); + SetData(TYPE_HORDE_SILITHYSTS, 0); + } + break; + case TYPE_CONTROLLER_FACTION: + m_uiLastControllerFaction = uiData; + break; + } + + // update states + UpdateZoneWorldState(); + + if (uiData) + { + OUT_SAVE_PVP_DATA; + + std::ostringstream saveStream; + saveStream << m_uiResourcesAly << " " << m_uiResourcesHorde << " " << m_uiLastControllerFaction; + + strInstData = saveStream.str(); + + SaveToDB(); + OUT_SAVE_PVP_DATA_COMPLETE; + } +} + +uint32 outdoor_pvp_silithus::GetData(uint32 uiType) +{ + switch(uiType) + { + case TYPE_ALLIANCE_SILITHYSTS: + return m_uiResourcesAly; + case TYPE_HORDE_SILITHYSTS: + return m_uiResourcesHorde; + case TYPE_CONTROLLER_FACTION: + return m_uiLastControllerFaction; + } + return 0; +} + +void outdoor_pvp_silithus::Load(const char* chrIn) +{ + if (!chrIn) + { + OUT_LOAD_PVP_DATA_FAIL; + return; + } + + OUT_LOAD_PVP_DATA(chrIn); + + std::istringstream loadStream(chrIn); + loadStream >> m_uiResourcesAly >> m_uiResourcesHorde >> m_uiLastControllerFaction; + + OUT_LOAD_PVP_DATA_COMPLETE; +} + +void outdoor_pvp_silithus::UpdateZoneWorldState() +{ + DoUpdateWorldState(sSilithusPlayers, WORLD_STATE_SI_GATHERED_A, m_uiResourcesAly); + DoUpdateWorldState(sSilithusPlayers, WORLD_STATE_SI_GATHERED_H, m_uiResourcesHorde); +} + +void outdoor_pvp_silithus::SendPlayerWorldState(Player* pPlayer) +{ + pPlayer->SendUpdateWorldState(WORLD_STATE_SI_GATHERED_A, m_uiResourcesAly); + pPlayer->SendUpdateWorldState(WORLD_STATE_SI_GATHERED_H, m_uiResourcesHorde); + pPlayer->SendUpdateWorldState(WORLD_STATE_SI_SILITHYST_MAX, MAX_SILITHYST); +} + +void outdoor_pvp_silithus::OnPlayerDroppedFlag(Player* pPlayer, uint32 uiSpellId) +{ + if (uiSpellId != SPELL_SILITHYST) + return; + + // ToDo + // * make it drop by damage - core issue + // * exclude the case when it's dropped near the area trigger + + //switch(pPlayer->GetTeam()) + //{ + // case ALLIANCE: + // if (AreaTriggerEntry const* atEntry = sAreaTriggerStore.LookupEntry(AREATRIGGER_SILITHUS_ALY)) + // { + // // 5.0f is safe-distance; else drop the flag + // if (pPlayer->GetDistance(atEntry->x, atEntry->y, atEntry->z) < 5.0f + atEntry->radius) + // return; + // } + // break; + // case HORDE: + // if (AreaTriggerEntry const* atEntry = sAreaTriggerStore.LookupEntry(AREATRIGGER_SILITHUS_HORDE)) + // { + // // 5.0f is safe-distance; else drop the flag + // if (pPlayer->GetDistance(atEntry->x, atEntry->y, atEntry->z) < 5.0f + atEntry->radius) + // return; + // } + // break; + //} + + // drop the flag if conditions are ok + pPlayer->CastSpell(pPlayer, SPELL_SILITHYST_FLAG_DROP, true); +} + +bool AreaTrigger_at_silithus(Player* pPlayer, AreaTriggerEntry const* pAt) +{ + if (pPlayer->isGameMaster() || pPlayer->isDead()) + return false; + + outdoor_pvp_silithus* pOutdoorPvp = (outdoor_pvp_silithus*)pPlayer->GetInstanceData(); + + if (!pOutdoorPvp) + return false; + + if (pAt->id == AREATRIGGER_SILITHUS_ALY) + { + if(pPlayer->GetTeam() == ALLIANCE && pPlayer->HasAura(SPELL_SILITHYST)) + { + // remove aura + pPlayer->RemoveAurasDueToSpell(SPELL_SILITHYST); + pOutdoorPvp->SetData(TYPE_ALLIANCE_SILITHYSTS, 1); + + // reward the player + pPlayer->CastSpell(pPlayer, SPELL_TRACES_OF_SILITHYST, false); + pPlayer->RewardHonor(NULL, 1, HONOR_REWARD_SILITHYST); + //pPlayer->GetReputationMgr().ModifyReputation(sFactionStore.LookupEntry(FACTION_CENARION_CIRCLE), REPUTATION_REWARD_SILITHYST); + + // complete quest + if (pPlayer->GetQuestStatus(QUEST_SCOURING_DESERT_ALY) == QUEST_STATUS_INCOMPLETE) + pPlayer->KilledMonsterCredit(NPC_SILITHUS_DUST_QUEST_ALY); + } + } + else if (pAt->id == AREATRIGGER_SILITHUS_HORDE) + { + if(pPlayer->GetTeam() == HORDE && pPlayer->HasAura(SPELL_SILITHYST)) + { + // remove aura + pPlayer->RemoveAurasDueToSpell(SPELL_SILITHYST); + pOutdoorPvp->SetData(TYPE_HORDE_SILITHYSTS, 1); + + // reward the player + pPlayer->CastSpell(pPlayer, SPELL_TRACES_OF_SILITHYST, false); + pPlayer->RewardHonor(NULL, 1, HONOR_REWARD_SILITHYST); + //pPlayer->GetReputationMgr().ModifyReputation(sFactionStore.LookupEntry(FACTION_CENARION_CIRCLE), REPUTATION_REWARD_SILITHYST); + + // complete quest + if (pPlayer->GetQuestStatus(QUEST_SCOURING_DESERT_HORDE) == QUEST_STATUS_INCOMPLETE) + pPlayer->KilledMonsterCredit(NPC_SILITHUS_DUST_QUEST_HORDE); + } + } + + return false; +} + +bool GOUse_go_silithyst(Player* pPlayer, GameObject* pGo) +{ + // ToDo - in the old DBCs this GO has a spell, so it doesn't need script + pPlayer->CastSpell(pPlayer, SPELL_SILITHYST, false); + pGo->Delete(); + + return true; +} + +InstanceData* GetInstanceData_outdoor_pvp_silithus(Map* pMap) +{ + return new outdoor_pvp_silithus(pMap); +} + +void AddSC_outdoor_pvp_silithus() +{ + Script* pNewScript; + + pNewScript = new Script; + pNewScript->Name = "at_silithus"; + pNewScript->pAreaTrigger = &AreaTrigger_at_silithus; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "go_silithyst"; + pNewScript->pGOUse = &GOUse_go_silithyst; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "outdoor_pvp_silithus"; + pNewScript->GetInstanceData = &GetInstanceData_outdoor_pvp_silithus; + pNewScript->RegisterSelf(); +} \ No newline at end of file diff --git a/scripts/outdoor_pvp/kalimdor/outdoor_pvp_silithus.h b/scripts/outdoor_pvp/kalimdor/outdoor_pvp_silithus.h new file mode 100644 index 0000000..c8c349a --- /dev/null +++ b/scripts/outdoor_pvp/kalimdor/outdoor_pvp_silithus.h @@ -0,0 +1,85 @@ +/* Copyright (C) 2006 - 2011 ScriptDev2 + * This program is free software licensed under GPL version 2 + * Please see the included DOCS/LICENSE.TXT for more information */ + +#ifndef OUTDOOR_PVP_SILITHUS_H +#define OUTDOOR_PVP_SILITHUS_H + +enum +{ + TYPE_ALLIANCE_SILITHYSTS = 1, + TYPE_HORDE_SILITHYSTS = 2, + TYPE_CONTROLLER_FACTION = 3, + + // npcs + NPC_SILITHUS_DUST_QUEST_ALY = 17090, // dummy npcs for quest credit + NPC_SILITHUS_DUST_QUEST_HORDE = 18199, + + // game objects + GO_SILITHYST_MOUND = 181597, // created when a player drops the flag + GO_SILITHYST_GEYSER = 181598, // spawn on the map by default + + // spells + SPELL_SILITHYST_OBJECT = 29518, // unk, related to the GO + SPELL_SILITHYST = 29519, // buff recieved when you are carrying a silithyst + SPELL_TRACES_OF_SILITHYST = 29534, // individual buff recieved when succesfully delivered a silithyst + SPELL_CENARION_FAVOR = 30754, // zone buff recieved when a faction gathers 200 silithysts + SPELL_SILITHYST_FLAG_DROP = 29533, + + // quests + QUEST_SCOURING_DESERT_ALY = 9419, + QUEST_SCOURING_DESERT_HORDE = 9422, + + // zone ids + ZONE_ID_SILITHUS = 1377, + ZONE_ID_TEMPLE_OF_AQ = 3428, // ToDo - research + ZONE_ID_RUINS_OF_AQ = 3429, // don't know yet how to handle the buff inside the instances + + // area triggers + AREATRIGGER_SILITHUS_ALY = 4162, // areatriggers ids + AREATRIGGER_SILITHUS_HORDE = 4168, + + // zone emotes + ZONE_EMOTE_HORDE_CAPTURE = -1001000, + ZONE_EMOTE_ALY_CAPTURE = -1001001, + + FACTION_CENARION_CIRCLE = 609, + HONOR_REWARD_SILITHYST = 19, + REPUTATION_REWARD_SILITHYST = 20, + MAX_SILITHYST = 200, + + // world states + WORLD_STATE_SI_GATHERED_A = 2313, // world state ids + WORLD_STATE_SI_GATHERED_H = 2314, + WORLD_STATE_SI_SILITHYST_MAX = 2317, +}; + +class MANGOS_DLL_DECL outdoor_pvp_silithus : public OutdoorPvP +{ + public: + outdoor_pvp_silithus(Map* pMap); + ~outdoor_pvp_silithus() {} + + void OnPlayerEnterZone(Player* pPlayer, uint32 uiZoneId); + void OnPlayerDroppedFlag(Player* pPlayer, uint32 uiSpellId); + + void SetData(uint32 uiType, uint32 uiData); + uint32 GetData(uint32 uiType); + + const char* Save() { return strInstData.c_str(); } + void Load(const char* chrIn); + + protected: + void UpdateZoneWorldState(); + void SendPlayerWorldState(Player* pPlayer); + + std::string strInstData; + + uint32 m_uiResourcesAly; + uint32 m_uiResourcesHorde; + uint32 m_uiLastControllerFaction; + + PlayerSet sSilithusPlayers; +}; + +#endif \ No newline at end of file diff --git a/scripts/outdoor_pvp/outdoor_pvp_eastern_kingdoms.cpp b/scripts/outdoor_pvp/outdoor_pvp_eastern_kingdoms.cpp new file mode 100644 index 0000000..f5ecc67 --- /dev/null +++ b/scripts/outdoor_pvp/outdoor_pvp_eastern_kingdoms.cpp @@ -0,0 +1,49 @@ +/* Copyright (C) 2006 - 2011 /dev/rsa for ScriptDev2 + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: outdoor_pvp_eastern_kingdoms +SD%Complete: who know? +SDComment: map script selector by /dev/rsa +SDCategory: Outdoor PvP +EndScriptData */ + +#include "precompiled.h" +#include "outdoor_pvp_eastern_kingdoms.h" + +struct MANGOS_DLL_DECL outdoor_pvp_eastern_kingdoms : public OutdoorPvP_ZoneSelector +{ + outdoor_pvp_eastern_kingdoms(Map* pMap) : OutdoorPvP_ZoneSelector(pMap) + { + LoadZoneScripts(pMap, ZoneScriptList); + }; +}; + + +InstanceData* GetInstanceData_outdoor_pvp_eastern_kingdoms(Map* pMap) +{ + return new outdoor_pvp_eastern_kingdoms(pMap); +} + +void AddSC_outdoor_pvp_eastern_kingdoms() +{ + Script *newscript; + newscript = new Script; + newscript->Name = "outdoor_pvp_eastern_kingdoms"; + newscript->GetInstanceData = &GetInstanceData_outdoor_pvp_eastern_kingdoms; + newscript->RegisterSelf(); +} + diff --git a/scripts/outdoor_pvp/outdoor_pvp_eastern_kingdoms.h b/scripts/outdoor_pvp/outdoor_pvp_eastern_kingdoms.h new file mode 100644 index 0000000..6ccff02 --- /dev/null +++ b/scripts/outdoor_pvp/outdoor_pvp_eastern_kingdoms.h @@ -0,0 +1,26 @@ +/* Copyright (C) 2006 - 2011 /dev/rsa for ScriptDev2 + * This program is free software licensed under GPL version 2 + * Please see the included DOCS/LICENSE.TXT for more information */ + +#ifndef OUTDOOR_PVP_EASTERN_KINGDOMS_H +#define OUTDOOR_PVP_EASTERN_KINGDOMS_H + +#include "precompiled.h" +#include "outdoor_pvp_zone_selector.h" + +enum Zones +{ + ZONE_ID_EASTERN_PLAGUELANDS = 139, + ZONE_ID_STRATHOLME = 2017, + ZONE_ID_SCHOLOMANCE = 2057 +}; + +static ZoneScriptEntry ZoneScriptList[] = +{ + { true, ZONE_ID_EASTERN_PLAGUELANDS, "outdoor_pvp_eastern_plaguelands" }, + { true, ZONE_ID_STRATHOLME, "outdoor_pvp_eastern_plaguelands" }, + { true, ZONE_ID_SCHOLOMANCE, "outdoor_pvp_eastern_plaguelands" }, + { false, 0, "" } +}; + +#endif diff --git a/scripts/outdoor_pvp/outdoor_pvp_kalimdor.cpp b/scripts/outdoor_pvp/outdoor_pvp_kalimdor.cpp new file mode 100644 index 0000000..667c096 --- /dev/null +++ b/scripts/outdoor_pvp/outdoor_pvp_kalimdor.cpp @@ -0,0 +1,49 @@ +/* Copyright (C) 2006 - 2011 /dev/rsa for ScriptDev2 + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: outdoor_pvp_kalimdor +SD%Complete: who know? +SDComment: map script selector by /dev/rsa +SDCategory: Outdoor PvP +EndScriptData */ + +#include "precompiled.h" +#include "outdoor_pvp_kalimdor.h" + +struct MANGOS_DLL_DECL outdoor_pvp_kalimdor : public OutdoorPvP_ZoneSelector +{ + outdoor_pvp_kalimdor(Map* pMap) : OutdoorPvP_ZoneSelector(pMap) + { + LoadZoneScripts(pMap, ZoneScriptList); + }; +}; + + +InstanceData* GetInstanceData_outdoor_pvp_kalimdor(Map* pMap) +{ + return new outdoor_pvp_kalimdor(pMap); +} + +void AddSC_outdoor_pvp_kalimdor() +{ + Script *newscript; + newscript = new Script; + newscript->Name = "outdoor_pvp_kalimdor"; + newscript->GetInstanceData = &GetInstanceData_outdoor_pvp_kalimdor; + newscript->RegisterSelf(); +} + diff --git a/scripts/outdoor_pvp/outdoor_pvp_kalimdor.h b/scripts/outdoor_pvp/outdoor_pvp_kalimdor.h new file mode 100644 index 0000000..eefb647 --- /dev/null +++ b/scripts/outdoor_pvp/outdoor_pvp_kalimdor.h @@ -0,0 +1,27 @@ +/* Copyright (C) 2006 - 2011 /dev/rsa for ScriptDev2 + * This program is free software licensed under GPL version 2 + * Please see the included DOCS/LICENSE.TXT for more information */ + +#ifndef OUTDOOR_PVP_KALIMDOR_H +#define OUTDOOR_PVP_KALIMDOR_H + +#include "precompiled.h" +#include "outdoor_pvp_zone_selector.h" + +enum Zones +{ + // zone ids + ZONE_ID_SILITHUS = 1377, + ZONE_ID_TEMPLE_OF_AQ = 3428, + ZONE_ID_RUINS_OF_AQ = 3429, +}; + +static ZoneScriptEntry ZoneScriptList[] = +{ + { true, ZONE_ID_SILITHUS, "outdoor_pvp_silithus" }, + { true, ZONE_ID_TEMPLE_OF_AQ, "outdoor_pvp_silithus" }, + { true, ZONE_ID_RUINS_OF_AQ, "outdoor_pvp_silithus" }, + { false, 0, "" } +}; + +#endif diff --git a/scripts/outdoor_pvp/outdoor_pvp_northrend.cpp b/scripts/outdoor_pvp/outdoor_pvp_northrend.cpp new file mode 100644 index 0000000..2b59226 --- /dev/null +++ b/scripts/outdoor_pvp/outdoor_pvp_northrend.cpp @@ -0,0 +1,49 @@ +/* Copyright (C) 2006 - 2011 /dev/rsa for ScriptDev2 + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: outdoor_pvp_northrend +SD%Complete: who know? +SDComment: map script selector by /dev/rsa +SDCategory: Outdoor PvP +EndScriptData */ + +#include "precompiled.h" +#include "outdoor_pvp_northrend.h" + +struct MANGOS_DLL_DECL outdoor_pvp_northrend : public OutdoorPvP_ZoneSelector +{ + outdoor_pvp_northrend(Map* pMap) : OutdoorPvP_ZoneSelector(pMap) + { + LoadZoneScripts(pMap, ZoneScriptList); + }; +}; + + +InstanceData* GetInstanceData_outdoor_pvp_northrend(Map* pMap) +{ + return new outdoor_pvp_northrend(pMap); +} + +void AddSC_outdoor_pvp_northrend() +{ + Script *newscript; + newscript = new Script; + newscript->Name = "outdoor_pvp_northrend"; + newscript->GetInstanceData = &GetInstanceData_outdoor_pvp_northrend; + newscript->RegisterSelf(); +} + diff --git a/scripts/outdoor_pvp/outdoor_pvp_northrend.h b/scripts/outdoor_pvp/outdoor_pvp_northrend.h new file mode 100644 index 0000000..16cb7ba --- /dev/null +++ b/scripts/outdoor_pvp/outdoor_pvp_northrend.h @@ -0,0 +1,22 @@ +/* Copyright (C) 2006 - 2011 /dev/rsa for ScriptDev2 + * This program is free software licensed under GPL version 2 + * Please see the included DOCS/LICENSE.TXT for more information */ + +#ifndef OUTDOOR_PVP_NORTHREND_H +#define OUTDOOR_PVP_NORTHREND_H + +#include "precompiled.h" +#include "outdoor_pvp_zone_selector.h" + +enum Zones +{ + // zone ids + ZONE_ID_WINTERGRASP = 9999, +}; + +static ZoneScriptEntry ZoneScriptList[] = +{ + { false, 0, "" } +}; + +#endif diff --git a/scripts/outdoor_pvp/outdoor_pvp_outland.cpp b/scripts/outdoor_pvp/outdoor_pvp_outland.cpp new file mode 100644 index 0000000..e438bf3 --- /dev/null +++ b/scripts/outdoor_pvp/outdoor_pvp_outland.cpp @@ -0,0 +1,49 @@ +/* Copyright (C) 2006 - 2011 /dev/rsa for ScriptDev2 + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + */ + +/* ScriptData +SDName: outdoor_pvp_outland +SD%Complete: who know? +SDComment: map script selector by /dev/rsa +SDCategory: Outdoor PvP +EndScriptData */ + +#include "precompiled.h" +#include "outdoor_pvp_outland.h" + +struct MANGOS_DLL_DECL outdoor_pvp_outland : public OutdoorPvP_ZoneSelector +{ + outdoor_pvp_outland(Map* pMap) : OutdoorPvP_ZoneSelector(pMap) + { + LoadZoneScripts(pMap, ZoneScriptList); + }; +}; + + +InstanceData* GetInstanceData_outdoor_pvp_outland(Map* pMap) +{ + return new outdoor_pvp_outland(pMap); +} + +void AddSC_outdoor_pvp_outland() +{ + Script *newscript; + newscript = new Script; + newscript->Name = "outdoor_pvp_outland"; + newscript->GetInstanceData = &GetInstanceData_outdoor_pvp_outland; + newscript->RegisterSelf(); +} + diff --git a/scripts/outdoor_pvp/outdoor_pvp_outland.h b/scripts/outdoor_pvp/outdoor_pvp_outland.h new file mode 100644 index 0000000..5e53be0 --- /dev/null +++ b/scripts/outdoor_pvp/outdoor_pvp_outland.h @@ -0,0 +1,21 @@ +/* Copyright (C) 2006 - 2011 /dev/rsa for ScriptDev2 + * This program is free software licensed under GPL version 2 + * Please see the included DOCS/LICENSE.TXT for more information */ + +#ifndef OUTDOOR_PVP_OUTLAND_H +#define OUTDOOR_PVP_OUTLAND_H + +#include "precompiled.h" +#include "outdoor_pvp_zone_selector.h" + +enum Zones +{ + ZONE_ID_1 = 9999, +}; + +static ZoneScriptEntry ZoneScriptList[] = +{ + { false, 0, "" } +}; + +#endif diff --git a/scripts/outdoor_pvp/outdoor_pvp_zone_selector.h b/scripts/outdoor_pvp/outdoor_pvp_zone_selector.h new file mode 100644 index 0000000..f5d8b74 --- /dev/null +++ b/scripts/outdoor_pvp/outdoor_pvp_zone_selector.h @@ -0,0 +1,209 @@ +/* Copyright (C) 2006 - 2011 /dev/rsa for ScriptDev2 + * This program is free software licensed under GPL version 2 + * Please see the included DOCS/LICENSE.TXT for more information */ + +/* +Usage: + - write and register script as always, but not assign scriptname in mangos DB; + - put script name in ZoneScriptList structure in map header file + - enjoy + + TODO: make save/load expression for map +*/ +#ifndef OUTDOOR_PVP_ZONE_SELECTOR_H +#define OUTDOOR_PVP_ZONE_SELECTOR_H +#include "precompiled.h" + +struct ZoneScriptEntry +{ + public: + bool active; + int zone; + std::string scriptName; +}; + +typedef UNORDERED_MAP ZoneScriptsMap; +typedef std::set< InstanceData* > ZoneScriptsSet; + +class OutdoorPvP_ZoneSelector : public OutdoorPvP +{ + public: + OutdoorPvP_ZoneSelector(Map* pMap) : OutdoorPvP(pMap) + {}; + + ~OutdoorPvP_ZoneSelector() + { + for (ZoneScriptsSet::iterator itr = m_scriptsSet.begin(); itr != m_scriptsSet.end();) + delete (*itr); + } + + ZoneScriptsMap m_scriptsMap; + ZoneScriptsSet m_scriptsSet; + std::string saveData; + + void LoadZoneScripts(Map* pMap, ZoneScriptEntry ZoneScriptList[]) + { + m_scriptsMap.clear(); + m_scriptsSet.clear(); + + for(uint16 i = 0; ZoneScriptList[i].zone != 0; ++i) + { + if (!ZoneScriptList[i].active) + continue; + + Script* pScript = GetScriptByName(ZoneScriptList[i].scriptName); + + if (!pScript || !pScript->GetInstanceData) + continue; + + InstanceData* pData = pScript->GetInstanceData(pMap); + + if (!pData) + continue; + + m_scriptsMap.insert(std::make_pair(ZoneScriptList[i].zone, pData)); + m_scriptsSet.insert(pData); + } + }; + + void Initialize() + { + for(ZoneScriptsSet::const_iterator itr = m_scriptsSet.begin(); itr != m_scriptsSet.end(); ++itr ) + (*itr)->Initialize(); + }; + + void Load(const char* data) + { + // need parser for data + for(ZoneScriptsSet::const_iterator itr = m_scriptsSet.begin(); itr != m_scriptsSet.end(); ++itr ) + (*itr)->Load(data); + }; + + void Update(uint32 diff) + { + for(ZoneScriptsSet::const_iterator itr = m_scriptsSet.begin(); itr != m_scriptsSet.end(); ++itr ) + (*itr)->Update(diff); + }; + + bool IsEncounterInProgress() const { return false; }; + + void OnPlayerEnter(Player* player) + { + if (!player) + return; + + ZoneScriptsMap::const_iterator itr = m_scriptsMap.find(player->GetZoneId()); + + if (itr != m_scriptsMap.end()) + itr->second->OnPlayerEnter(player); + }; + + void OnPlayerDeath(Player* player) + { + if (!player) + return; + + ZoneScriptsMap::const_iterator itr = m_scriptsMap.find(player->GetZoneId()); + + if (itr != m_scriptsMap.end()) + itr->second->OnPlayerDeath(player); + }; + + void OnPlayerLeave(Player* player) + { + if (!player) + return; + + ZoneScriptsMap::const_iterator itr = m_scriptsMap.find(player->GetZoneId()); + + if (itr != m_scriptsMap.end()) + itr->second->OnPlayerLeave(player); + }; + + void OnPlayerEnterZone(Player* player, uint32 uiNewZoneId, uint32 uiNewAreaId) + { + ZoneScriptsMap::const_iterator itr = m_scriptsMap.find(uiNewZoneId); + if (itr != m_scriptsMap.end()) + itr->second->OnPlayerEnterZone(player, uiNewZoneId, uiNewAreaId); + }; + + void OnPlayerLeaveZone(Player* player, uint32 uiOldZoneId) + { + ZoneScriptsMap::const_iterator itr = m_scriptsMap.find(uiOldZoneId); + if (itr != m_scriptsMap.end()) + itr->second->OnPlayerLeaveZone(player, uiOldZoneId); + }; + + void OnPlayerDroppedFlag(Player* player, uint32 uiSpellId) + { + if (!player) + return; + + ZoneScriptsMap::const_iterator itr = m_scriptsMap.find(player->GetZoneId()); + + if (itr != m_scriptsMap.end()) + itr->second->OnPlayerDroppedFlag(player, uiSpellId); + }; + + void OnObjectCreate(GameObject* pGO) + { + if (!pGO) + return; + + ZoneScriptsMap::const_iterator itr = m_scriptsMap.find(pGO->GetZoneId()); + + if (itr != m_scriptsMap.end()) + itr->second->OnObjectCreate(pGO); + }; + + void OnCreatureCreate(Creature* creature) + { + if (!creature) + return; + + ZoneScriptsMap::const_iterator itr = m_scriptsMap.find(creature->GetZoneId()); + + if (itr != m_scriptsMap.end()) + itr->second->OnCreatureCreate(creature); + }; + + void OnCreatureEnterCombat(Creature* creature) + { + if (!creature) + return; + + ZoneScriptsMap::const_iterator itr = m_scriptsMap.find(creature->GetZoneId()); + + if (itr != m_scriptsMap.end()) + itr->second->OnCreatureCreate(creature); + }; + + void OnCreatureEvade(Creature* creature) + { + if (!creature) + return; + + ZoneScriptsMap::const_iterator itr = m_scriptsMap.find(creature->GetZoneId()); + + if (itr != m_scriptsMap.end()) + itr->second->OnCreatureEvade(creature); + }; + + void OnCreatureDeath(Creature* creature) + { + if (!creature) + return; + + ZoneScriptsMap::const_iterator itr = m_scriptsMap.find(creature->GetZoneId()); + + if (itr != m_scriptsMap.end()) + itr->second->OnCreatureDeath(creature); + }; + + bool CheckAchievementCriteriaMeet(uint32 criteria_id, Player const* source, Unit const* target = NULL, uint32 miscvalue1 = 0) { return false; }; + + bool CheckConditionCriteriaMeet(Player const* source, uint32 map_id, uint32 instance_condition_id) { return false; }; + +}; + +#endif diff --git a/scripts/outland/auchindoun/auchenai_crypts/boss_exarch_maladaar.cpp b/scripts/outland/auchindoun/auchenai_crypts/boss_exarch_maladaar.cpp index 808bbcb..354d227 100644 --- a/scripts/outland/auchindoun/auchenai_crypts/boss_exarch_maladaar.cpp +++ b/scripts/outland/auchindoun/auchenai_crypts/boss_exarch_maladaar.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/scripts/outland/auchindoun/auchenai_crypts/boss_shirrak.cpp b/scripts/outland/auchindoun/auchenai_crypts/boss_shirrak.cpp index d75e9b5..7fcae2c 100644 --- a/scripts/outland/auchindoun/auchenai_crypts/boss_shirrak.cpp +++ b/scripts/outland/auchindoun/auchenai_crypts/boss_shirrak.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/scripts/outland/auchindoun/mana_tombs/boss_nexusprince_shaffar.cpp b/scripts/outland/auchindoun/mana_tombs/boss_nexusprince_shaffar.cpp index 5e5e5ec..c2b739f 100644 --- a/scripts/outland/auchindoun/mana_tombs/boss_nexusprince_shaffar.cpp +++ b/scripts/outland/auchindoun/mana_tombs/boss_nexusprince_shaffar.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/scripts/outland/auchindoun/mana_tombs/boss_pandemonius.cpp b/scripts/outland/auchindoun/mana_tombs/boss_pandemonius.cpp index 89f8d43..bf900b3 100644 --- a/scripts/outland/auchindoun/mana_tombs/boss_pandemonius.cpp +++ b/scripts/outland/auchindoun/mana_tombs/boss_pandemonius.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/scripts/outland/auchindoun/sethekk_halls/boss_anzu.cpp b/scripts/outland/auchindoun/sethekk_halls/boss_anzu.cpp index b363ccd..6a47b67 100644 --- a/scripts/outland/auchindoun/sethekk_halls/boss_anzu.cpp +++ b/scripts/outland/auchindoun/sethekk_halls/boss_anzu.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/scripts/outland/auchindoun/sethekk_halls/boss_darkweaver_syth.cpp b/scripts/outland/auchindoun/sethekk_halls/boss_darkweaver_syth.cpp index 97246e7..fa6109a 100644 --- a/scripts/outland/auchindoun/sethekk_halls/boss_darkweaver_syth.cpp +++ b/scripts/outland/auchindoun/sethekk_halls/boss_darkweaver_syth.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/scripts/outland/auchindoun/sethekk_halls/boss_talon_king_ikiss.cpp b/scripts/outland/auchindoun/sethekk_halls/boss_talon_king_ikiss.cpp index f88c1f3..3bb8759 100644 --- a/scripts/outland/auchindoun/sethekk_halls/boss_talon_king_ikiss.cpp +++ b/scripts/outland/auchindoun/sethekk_halls/boss_talon_king_ikiss.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/scripts/outland/auchindoun/sethekk_halls/instance_sethekk_halls.cpp b/scripts/outland/auchindoun/sethekk_halls/instance_sethekk_halls.cpp index 30d569b..f41b1c6 100644 --- a/scripts/outland/auchindoun/sethekk_halls/instance_sethekk_halls.cpp +++ b/scripts/outland/auchindoun/sethekk_halls/instance_sethekk_halls.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/scripts/outland/auchindoun/sethekk_halls/sethekk_halls.h b/scripts/outland/auchindoun/sethekk_halls/sethekk_halls.h index 8d51a58..52ab8d3 100644 --- a/scripts/outland/auchindoun/sethekk_halls/sethekk_halls.h +++ b/scripts/outland/auchindoun/sethekk_halls/sethekk_halls.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/scripts/outland/auchindoun/shadow_labyrinth/boss_ambassador_hellmaw.cpp b/scripts/outland/auchindoun/shadow_labyrinth/boss_ambassador_hellmaw.cpp index 113d402..e87c86e 100644 --- a/scripts/outland/auchindoun/shadow_labyrinth/boss_ambassador_hellmaw.cpp +++ b/scripts/outland/auchindoun/shadow_labyrinth/boss_ambassador_hellmaw.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/scripts/outland/auchindoun/shadow_labyrinth/boss_blackheart_the_inciter.cpp b/scripts/outland/auchindoun/shadow_labyrinth/boss_blackheart_the_inciter.cpp index bea06f3..688c3ce 100644 --- a/scripts/outland/auchindoun/shadow_labyrinth/boss_blackheart_the_inciter.cpp +++ b/scripts/outland/auchindoun/shadow_labyrinth/boss_blackheart_the_inciter.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/scripts/outland/auchindoun/shadow_labyrinth/boss_grandmaster_vorpil.cpp b/scripts/outland/auchindoun/shadow_labyrinth/boss_grandmaster_vorpil.cpp index 84ef3b9..12ac2e2 100644 --- a/scripts/outland/auchindoun/shadow_labyrinth/boss_grandmaster_vorpil.cpp +++ b/scripts/outland/auchindoun/shadow_labyrinth/boss_grandmaster_vorpil.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/scripts/outland/auchindoun/shadow_labyrinth/boss_murmur.cpp b/scripts/outland/auchindoun/shadow_labyrinth/boss_murmur.cpp index 8c5e042..10dfcf5 100644 --- a/scripts/outland/auchindoun/shadow_labyrinth/boss_murmur.cpp +++ b/scripts/outland/auchindoun/shadow_labyrinth/boss_murmur.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/scripts/outland/auchindoun/shadow_labyrinth/instance_shadow_labyrinth.cpp b/scripts/outland/auchindoun/shadow_labyrinth/instance_shadow_labyrinth.cpp index f815061..22b95e7 100644 --- a/scripts/outland/auchindoun/shadow_labyrinth/instance_shadow_labyrinth.cpp +++ b/scripts/outland/auchindoun/shadow_labyrinth/instance_shadow_labyrinth.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/scripts/outland/auchindoun/shadow_labyrinth/shadow_labyrinth.h b/scripts/outland/auchindoun/shadow_labyrinth/shadow_labyrinth.h index 548df00..4296a6d 100644 --- a/scripts/outland/auchindoun/shadow_labyrinth/shadow_labyrinth.h +++ b/scripts/outland/auchindoun/shadow_labyrinth/shadow_labyrinth.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/scripts/outland/black_temple/black_temple.cpp b/scripts/outland/black_temple/black_temple.cpp index f3b72e1..5a0731d 100644 --- a/scripts/outland/black_temple/black_temple.cpp +++ b/scripts/outland/black_temple/black_temple.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/scripts/outland/black_temple/black_temple.h b/scripts/outland/black_temple/black_temple.h index 5e60e29..2178fcd 100644 --- a/scripts/outland/black_temple/black_temple.h +++ b/scripts/outland/black_temple/black_temple.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ @@ -7,39 +7,90 @@ enum { - MAX_ENCOUNTER = 9, - - TYPE_NAJENTUS = 1, - TYPE_SUPREMUS = 2, - TYPE_SHADE = 3, - TYPE_GOREFIEND = 4, - TYPE_BLOODBOIL = 5, - TYPE_RELIQUIARY = 6, - TYPE_SHAHRAZ = 7, - TYPE_COUNCIL = 8, - TYPE_ILLIDAN = 9, - - DATA_HIGHWARLORDNAJENTUS = 10, - DATA_SUPREMUS = 11, - DATA_SHADEOFAKAMA = 12, - DATA_AKAMA_SHADE = 13, - DATA_ILLIDARICOUNCIL = 14, - DATA_BLOOD_ELF_COUNCIL_VOICE = 15, - DATA_LADYMALANDE = 16, - DATA_HIGHNETHERMANCERZEREVOR = 17, - DATA_GATHIOSTHESHATTERER = 18, - DATA_VERASDARKSHADOW = 19, - DATA_AKAMA = 20, - DATA_ILLIDANSTORMRAGE = 21, - - DATA_GAMEOBJECT_NAJENTUS_GATE = 22, - DATA_GAMEOBJECT_SUPREMUS_DOORS = 23, - DATA_GO_PRE_SHAHRAZ_DOOR = 24, - DATA_GO_POST_SHAHRAZ_DOOR = 25, - DATA_GO_COUNCIL_DOOR = 26, - DATA_GAMEOBJECT_ILLIDAN_GATE = 27, - DATA_GAMEOBJECT_ILLIDAN_DOOR_R = 28, - DATA_GAMEOBJECT_ILLIDAN_DOOR_L = 29 + MAX_ENCOUNTER = 9, + + TYPE_NAJENTUS = 0, + TYPE_SUPREMUS = 1, + TYPE_SHADE = 2, + TYPE_GOREFIEND = 3, + TYPE_BLOODBOIL = 4, + TYPE_RELIQUIARY = 5, + TYPE_SHAHRAZ = 6, + TYPE_COUNCIL = 7, + TYPE_ILLIDAN = 8, + + NPC_WARLORD_NAJENTUS = 22887, + NPC_SUPREMUS = 22898, + NPC_SHADE_OF_AKAMA = 22841, + NPC_AKAMA_SHADE = 22990, + NPC_ILLIDARI_COUNCIL = 23426, + NPC_COUNCIL_VOICE = 23499, + NPC_LADY_MALANDE = 22951, + NPC_ZEREVOR = 22950, + NPC_GATHIOS = 22949, + NPC_VERAS = 22952, + NPC_AKAMA = 23089, + NPC_ILLIDAN_STORMRAGE = 22917, + + GO_NAJENTUS_GATE = 185483, + GO_SUPREMUS_DOORS = 185882, + GO_SHADE_OF_AKAMA = 185478, + GO_PRE_SHAHRAZ_DOOR = 185479, + GO_POST_SHAHRAZ_DOOR = 185482, + GO_PRE_COUNCIL_DOOR = 185481, + GO_COUNCIL_DOOR = 186152, + GO_ILLIDAN_GATE = 185905, + GO_ILLIDAN_DOOR_R = 186261, + GO_ILLIDAN_DOOR_L = 186262, +}; + +class MANGOS_DLL_DECL instance_black_temple : public ScriptedInstance +{ + public: + instance_black_temple(Map* pMap); + + void Initialize(); + + bool IsEncounterInProgress() const; + + void OnCreatureCreate(Creature* pCreature); + void OnObjectCreate(GameObject* pGo); + + void SetData(uint32 uiType, uint32 uiData); + uint32 GetData(uint32 uiType); + uint64 GetData64(uint32 uiData); + + const char* Save() { return m_strInstData.c_str(); } + void Load(const char* chrIn); + + private: + bool CanPreMotherDoorOpen(); + + uint32 m_auiEncounter[MAX_ENCOUNTER]; + std::string m_strInstData; + + uint64 m_uiNajentusGUID; + uint64 m_uiAkamaGUID; // This is the Akama that starts the Illidan encounter. + uint64 m_uiAkama_ShadeGUID; // This is the Akama that starts the Shade of Akama encounter. + uint64 m_uiShadeOfAkamaGUID; + uint64 m_uiSupremusGUID; + uint64 m_uiLadyMalandeGUID; + uint64 m_uiGathiosTheShattererGUID; + uint64 m_uiHighNethermancerZerevorGUID; + uint64 m_uiVerasDarkshadowGUID; + uint64 m_uiIllidariCouncilGUID; + uint64 m_uiBloodElfCouncilVoiceGUID; + uint64 m_uiIllidanStormrageGUID; + + uint64 m_uiNajentusGateGUID; + uint64 m_uiMainTempleDoorsGUID; + uint64 m_uiShadeAkamaDoorGUID; + uint64 m_uiIllidanGateGUID; + uint64 m_uiIllidanDoorGUID[2]; + uint64 m_uiShahrazPreDoorGUID; + uint64 m_uiShahrazPostDoorGUID; + uint64 m_uiPreCouncilDoorGUID; + uint64 m_uiCouncilDoorGUID; }; #endif diff --git a/scripts/outland/black_temple/boss_bloodboil.cpp b/scripts/outland/black_temple/boss_bloodboil.cpp index b435e16..56e73f3 100644 --- a/scripts/outland/black_temple/boss_bloodboil.cpp +++ b/scripts/outland/black_temple/boss_bloodboil.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/scripts/outland/black_temple/boss_illidan.cpp b/scripts/outland/black_temple/boss_illidan.cpp index ca22719..6fad313 100644 --- a/scripts/outland/black_temple/boss_illidan.cpp +++ b/scripts/outland/black_temple/boss_illidan.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or @@ -342,9 +342,9 @@ struct MANGOS_DLL_DECL demonfireAI : public ScriptedAI { if (!IllidanGUID && m_pInstance) { - if (Creature* pIllidan = m_pInstance->instance->GetCreature(m_pInstance->GetData64(DATA_ILLIDANSTORMRAGE))) + if (Creature* pIllidan = m_pInstance->instance->GetCreature(m_pInstance->GetData64(NPC_ILLIDAN_STORMRAGE))) { - IllidanGUID = m_pInstance->GetData64(DATA_ILLIDANSTORMRAGE); + IllidanGUID = m_pInstance->GetData64(NPC_ILLIDAN_STORMRAGE); if (!pIllidan->HasSplineFlag(SPLINEFLAG_NO_SPLINE)) m_creature->SetDeathState(JUST_DIED); @@ -411,13 +411,13 @@ struct MANGOS_DLL_DECL npc_akama_illidanAI : public ScriptedAI if (m_pInstance) { m_pInstance->SetData(TYPE_ILLIDAN, NOT_STARTED); - GameObject* pGate = m_pInstance->instance->GetGameObject(m_pInstance->GetData64(DATA_GAMEOBJECT_ILLIDAN_GATE)); + GameObject* pGate = m_pInstance->instance->GetGameObject(m_pInstance->GetData64(GO_ILLIDAN_GATE)); // close door if already open (when raid wipes or something) if (pGate && !pGate->GetGoState()) pGate->SetGoState(GO_STATE_READY); - for(uint8 i = DATA_GAMEOBJECT_ILLIDAN_DOOR_R; i < DATA_GAMEOBJECT_ILLIDAN_DOOR_L + 1; ++i) + for(uint32 i = GO_ILLIDAN_DOOR_R; i < GO_ILLIDAN_DOOR_L + 1; ++i) { if (GameObject* pDoor = m_pInstance->instance->GetGameObject(m_pInstance->GetData64(i))) pDoor->SetGoState(GO_STATE_ACTIVE); @@ -503,13 +503,14 @@ struct MANGOS_DLL_DECL npc_akama_illidanAI : public ScriptedAI void BeginDoorEvent(Player* pPlayer) { - if (!m_pInstance) + // Requires Instance and this additional check to prevent exploits + if (!m_pInstance || m_pInstance->GetData(TYPE_COUNCIL) != DONE) return; debug_log("SD2: Akama - Door event initiated by player %s", pPlayer->GetName()); PlayerGUID = pPlayer->GetGUID(); - if (GameObject* pGate = m_pInstance->instance->GetGameObject(m_pInstance->GetData64(DATA_GAMEOBJECT_ILLIDAN_GATE))) + if (GameObject* pGate = m_pInstance->instance->GetGameObject(m_pInstance->GetData64(GO_ILLIDAN_GATE))) { float x,y,z; pGate->GetPosition(x, y, z); @@ -556,7 +557,7 @@ struct MANGOS_DLL_DECL npc_akama_illidanAI : public ScriptedAI if (!IsReturningToIllidan) { // open the doors that close the summit - for(uint32 i = DATA_GAMEOBJECT_ILLIDAN_DOOR_R; i < DATA_GAMEOBJECT_ILLIDAN_DOOR_L+1; ++i) + for(uint32 i = GO_ILLIDAN_DOOR_R; i < GO_ILLIDAN_DOOR_L+1; ++i) { if (GameObject* pDoor = m_pInstance->instance->GetGameObject(m_pInstance->GetData64(i))) pDoor->SetGoState(GO_STATE_ACTIVE); @@ -678,7 +679,7 @@ struct MANGOS_DLL_DECL npc_akama_illidanAI : public ScriptedAI }else { if (m_pInstance) - IllidanGUID = m_pInstance->GetData64(DATA_ILLIDANSTORMRAGE); + IllidanGUID = m_pInstance->GetData64(NPC_ILLIDAN_STORMRAGE); } if (IsWalking && WalkTimer) @@ -714,7 +715,7 @@ struct MANGOS_DLL_DECL npc_akama_illidanAI : public ScriptedAI } } - if (GameObject* pGate = m_pInstance->instance->GetGameObject(m_pInstance->GetData64(DATA_GAMEOBJECT_ILLIDAN_GATE))) + if (GameObject* pGate = m_pInstance->instance->GetGameObject(m_pInstance->GetData64(GO_ILLIDAN_GATE))) pGate->SetGoState(GO_STATE_ACTIVE); ++ChannelCount; @@ -1039,7 +1040,7 @@ struct MANGOS_DLL_DECL boss_illidan_stormrageAI : public ScriptedAI // Completed m_pInstance->SetData(TYPE_ILLIDAN, DONE); - for(uint8 i = DATA_GAMEOBJECT_ILLIDAN_DOOR_R; i < DATA_GAMEOBJECT_ILLIDAN_DOOR_L + 1; ++i) + for(uint32 i = GO_ILLIDAN_DOOR_R; i < GO_ILLIDAN_DOOR_L + 1; ++i) { // Open Doors if (GameObject* pDoor = m_pInstance->instance->GetGameObject(m_pInstance->GetData64(i))) @@ -1154,7 +1155,7 @@ struct MANGOS_DLL_DECL boss_illidan_stormrageAI : public ScriptedAI { if (m_pInstance) { - AkamaGUID = m_pInstance->GetData64(DATA_AKAMA); + AkamaGUID = m_pInstance->GetData64(NPC_AKAMA); if (!AkamaGUID) return; GUID = AkamaGUID; @@ -1900,13 +1901,13 @@ void npc_akama_illidanAI::BeginEvent(uint64 PlayerGUID) debug_log("SD2: Akama - Illidan Introduction started. Illidan event properly begun."); if (m_pInstance) { - IllidanGUID = m_pInstance->GetData64(DATA_ILLIDANSTORMRAGE); + IllidanGUID = m_pInstance->GetData64(NPC_ILLIDAN_STORMRAGE); m_pInstance->SetData(TYPE_ILLIDAN, IN_PROGRESS); } if (m_pInstance) { - for(uint8 i = DATA_GAMEOBJECT_ILLIDAN_DOOR_R; i < DATA_GAMEOBJECT_ILLIDAN_DOOR_L+1; ++i) + for(uint32 i = GO_ILLIDAN_DOOR_R; i < GO_ILLIDAN_DOOR_L+1; ++i) { if (GameObject* pDoor = m_pInstance->instance->GetGameObject(m_pInstance->GetData64(i))) pDoor->SetGoState(GO_STATE_READY); @@ -1961,6 +1962,7 @@ void npc_akama_illidanAI::BeginEvent(uint64 PlayerGUID) bool GossipHello_npc_akama_at_illidan(Player* pPlayer, Creature* pCreature) { + // TODO: Add gossip item only when Council is done? pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF); pPlayer->SEND_GOSSIP_MENU(10465, pCreature->GetGUID()); @@ -2003,7 +2005,7 @@ struct MANGOS_DLL_DECL boss_maievAI : public ScriptedAI if (!IllidanGUID) { if (m_pInstance) - IllidanGUID = m_pInstance->GetData64(DATA_ILLIDANSTORMRAGE); + IllidanGUID = m_pInstance->GetData64(NPC_ILLIDAN_STORMRAGE); }else { Creature* Illidan = m_creature->GetMap()->GetCreature(IllidanGUID); diff --git a/scripts/outland/black_temple/boss_mother_shahraz.cpp b/scripts/outland/black_temple/boss_mother_shahraz.cpp index 57d89ae..715cad2 100644 --- a/scripts/outland/black_temple/boss_mother_shahraz.cpp +++ b/scripts/outland/black_temple/boss_mother_shahraz.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/scripts/outland/black_temple/boss_reliquary_of_souls.cpp b/scripts/outland/black_temple/boss_reliquary_of_souls.cpp index 922ee3d..e76426c 100644 --- a/scripts/outland/black_temple/boss_reliquary_of_souls.cpp +++ b/scripts/outland/black_temple/boss_reliquary_of_souls.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or @@ -154,7 +154,6 @@ struct MANGOS_DLL_DECL boss_reliquary_of_soulsAI : public ScriptedAI uint32 SummonSoulTimer; uint32 AnimationTimer; - bool AlreadyStarted; bool IsDead; bool EndingPhase; @@ -170,13 +169,12 @@ struct MANGOS_DLL_DECL boss_reliquary_of_soulsAI : public ScriptedAI SummonSoulTimer = 1000; AnimationTimer = 8000; - AlreadyStarted = false; IsDead = false; EndingPhase = false; m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); - m_creature->SetUInt32Value(UNIT_NPC_EMOTESTATE,0); + m_creature->HandleEmote(EMOTE_ONESHOT_NONE); m_creature->GetMotionMaster()->Clear(false); } @@ -208,7 +206,7 @@ struct MANGOS_DLL_DECL boss_reliquary_of_soulsAI : public ScriptedAI if (who->isTargetableForAttack() && who->isInAccessablePlaceFor(m_creature) && m_creature->IsHostileTo(who)) { float attackRadius = m_creature->GetAttackDistance(who); - if (m_creature->IsWithinDistInMap(who, attackRadius) && m_creature->GetDistanceZ(who) <= CREATURE_Z_ATTACK_RANGE && m_creature->IsWithinLOSInMap(who) && !AlreadyStarted) + if (m_creature->IsWithinDistInMap(who, attackRadius) && m_creature->GetDistanceZ(who) <= CREATURE_Z_ATTACK_RANGE && m_creature->IsWithinLOSInMap(who)) { who->RemoveSpellsCausingAura(SPELL_AURA_MOD_STEALTH); @@ -218,10 +216,9 @@ struct MANGOS_DLL_DECL boss_reliquary_of_soulsAI : public ScriptedAI m_pInstance->SetData(TYPE_RELIQUIARY, IN_PROGRESS); Phase = 1; - AlreadyStarted = true; // I R ANNNGRRRY! - m_creature->SetUInt32Value(UNIT_NPC_EMOTESTATE,375); + m_creature->HandleEmote(EMOTE_STATE_READY2H); SummonEssenceTimer = 8000; AnimationTimer = 5100; m_creature->AddThreat(who); @@ -291,14 +288,14 @@ struct MANGOS_DLL_DECL boss_reliquary_of_soulsAI : public ScriptedAI if (AnimationTimer < diff) { // Release the cube - m_creature->SetUInt32Value(UNIT_NPC_EMOTESTATE,374); + m_creature->HandleEmote(EMOTE_ONESHOT_SUBMERGE); AnimationTimer = 8300; }else AnimationTimer -= diff; if (SummonEssenceTimer < diff) { // Ribs: open - m_creature->SetUInt32Value(UNIT_NPC_EMOTESTATE,373); + m_creature->HandleEmote(EMOTE_STATE_SUBMERGED); Creature* EssenceSuffering = m_creature->SummonCreature(23418, m_creature->GetPositionX(), m_creature->GetPositionY(), m_creature->GetPositionZ(), 1.57f, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 10000); @@ -353,7 +350,7 @@ struct MANGOS_DLL_DECL boss_reliquary_of_soulsAI : public ScriptedAI if (AnimationTimer < diff) { // Return - EssenceSuffering->SetUInt32Value(UNIT_NPC_EMOTESTATE,374); + EssenceSuffering->HandleEmote(EMOTE_ONESHOT_SUBMERGE); AnimationTimer = 10000; }else AnimationTimer -= diff; @@ -364,7 +361,7 @@ struct MANGOS_DLL_DECL boss_reliquary_of_soulsAI : public ScriptedAI EssenceSuffering->DeleteThreatList(); EssenceSuffering->SetDisplayId(11686); EssenceSuffering->setFaction(35); - m_creature->SetUInt32Value(UNIT_NPC_EMOTESTATE,0); + m_creature->HandleEmote(EMOTE_ONESHOT_NONE); SummonEssenceTimer = 20000; //60000; AnimationTimer = 18200; //58100; SoulDeathCount = 0; @@ -394,14 +391,14 @@ struct MANGOS_DLL_DECL boss_reliquary_of_soulsAI : public ScriptedAI if (AnimationTimer < diff) { // Release the cube - m_creature->SetUInt32Value(UNIT_NPC_EMOTESTATE,374); + m_creature->HandleEmote(EMOTE_ONESHOT_SUBMERGE); AnimationTimer = 10000; }else AnimationTimer -= diff; if (SummonEssenceTimer < diff) { // Ribs: open - m_creature->SetUInt32Value(UNIT_NPC_EMOTESTATE,373); + m_creature->HandleEmote(EMOTE_STATE_SUBMERGED); Creature* EssenceDesire = m_creature->SummonCreature(23419, m_creature->GetPositionX(), m_creature->GetPositionY(), m_creature->GetPositionZ(), 1.57f, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 10000); @@ -458,7 +455,7 @@ struct MANGOS_DLL_DECL boss_reliquary_of_soulsAI : public ScriptedAI if (AnimationTimer < diff) { // Return - EssenceDesire->SetUInt32Value(UNIT_NPC_EMOTESTATE,374); + EssenceDesire->HandleEmote(EMOTE_ONESHOT_SUBMERGE); AnimationTimer = 10000; }else AnimationTimer -= diff; @@ -470,7 +467,7 @@ struct MANGOS_DLL_DECL boss_reliquary_of_soulsAI : public ScriptedAI DoScriptText(DESI_SAY_AFTER, EssenceDesire); EssenceDesire->SetDisplayId(11686); - m_creature->SetUInt32Value(UNIT_NPC_EMOTESTATE,0); + m_creature->HandleEmote(EMOTE_ONESHOT_NONE); SummonEssenceTimer = 20000; AnimationTimer = 18200; SoulDeathCount = 0; @@ -501,14 +498,14 @@ struct MANGOS_DLL_DECL boss_reliquary_of_soulsAI : public ScriptedAI if (AnimationTimer < diff) { // Release the cube - m_creature->SetUInt32Value(UNIT_NPC_EMOTESTATE,374); + m_creature->HandleEmote(EMOTE_ONESHOT_SUBMERGE); AnimationTimer = 10000; }else AnimationTimer -= diff; if (SummonEssenceTimer < diff) { // Ribs: open - m_creature->SetUInt32Value(UNIT_NPC_EMOTESTATE,373); + m_creature->HandleEmote(EMOTE_STATE_SUBMERGED); Creature* EssenceAnger = m_creature->SummonCreature(23420, m_creature->GetPositionX(), m_creature->GetPositionY(), m_creature->GetPositionZ(), 1.57f, TEMPSUMMON_TIMED_OR_DEAD_DESPAWN, 45000); @@ -590,8 +587,7 @@ struct MANGOS_DLL_DECL boss_essence_of_sufferingAI : public ScriptedAI void Aggro(Unit* pWho) { - m_creature->SetInCombatWithZone(); - DoCast(m_creature, AURA_OF_SUFFERING); + DoCastSpellIfCan(pWho, AURA_OF_SUFFERING, CAST_TRIGGERED); DoCastSpellIfCan(m_creature, ESSENCE_OF_SUFFERING_PASSIVE, CAST_TRIGGERED); } @@ -678,14 +674,17 @@ struct MANGOS_DLL_DECL boss_essence_of_sufferingAI : public ScriptedAI if (EnrageTimer < diff) { - DoCastSpellIfCan(m_creature, SPELL_ENRAGE); - EnrageTimer = 60000; + if (DoCastSpellIfCan(m_creature, SPELL_ENRAGE) == CAST_OK) + { + DoScriptText(EMOTE_BOSS_GENERIC_ENRAGED, m_creature); + EnrageTimer = 60000; + } }else EnrageTimer -= diff; if (SoulDrainTimer < diff) { if (Unit* target = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) - DoCast(target, SPELL_SOUL_DRAIN); + DoCastSpellIfCan(target, SPELL_SOUL_DRAIN); SoulDrainTimer = 60000; }else SoulDrainTimer -= diff; @@ -724,11 +723,6 @@ struct MANGOS_DLL_DECL boss_essence_of_desireAI : public ScriptedAI } } - void Aggro(Unit* pWho) - { - m_creature->SetInCombatWithZone(); - } - void KilledUnit(Unit *victim) { switch(urand(0, 2)) @@ -826,8 +820,7 @@ struct MANGOS_DLL_DECL boss_essence_of_angerAI : public ScriptedAI void Aggro(Unit* pWho) { - m_creature->SetInCombatWithZone(); - DoCastSpellIfCan(m_creature, AURA_OF_ANGER, CAST_TRIGGERED); + DoCastSpellIfCan(m_creature->getVictim(), AURA_OF_ANGER, CAST_TRIGGERED); } void MoveInLineOfSight(Unit *who) @@ -895,7 +888,7 @@ struct MANGOS_DLL_DECL boss_essence_of_angerAI : public ScriptedAI if (SoulScreamTimer < diff) { - DoCastSpellIfCan(m_creature, SPELL_SOUL_SCREAM); + DoCastSpellIfCan(m_creature->getVictim(), SPELL_SOUL_SCREAM); SoulScreamTimer = 10000; }else SoulScreamTimer -= diff; diff --git a/scripts/outland/black_temple/boss_shade_of_akama.cpp b/scripts/outland/black_temple/boss_shade_of_akama.cpp index 38b9352..3c0fc3b 100644 --- a/scripts/outland/black_temple/boss_shade_of_akama.cpp +++ b/scripts/outland/black_temple/boss_shade_of_akama.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or @@ -52,7 +52,6 @@ enum SPELL_AKAMA_SOUL_CHANNEL = 40447, SPELL_AKAMA_SOUL_RETRIEVE = 40902, - NPC_AKAMA = 22990, NPC_ASH_CHANNELER = 23421, NPC_ASH_SORCERER = 23215, NPC_ASH_DEFENDER = 23216, @@ -158,7 +157,7 @@ struct MANGOS_DLL_DECL boss_shade_of_akamaAI : public ScriptedAI m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); - m_creature->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_STATE_STUN); + m_creature->HandleEmote(EMOTE_STATE_STUN); } void AttackStart(Unit* pWho) @@ -324,7 +323,7 @@ struct MANGOS_DLL_DECL boss_shade_of_akamaAI : public ScriptedAI m_afSpawnLoc[uiRand].m_fX, m_afSpawnLoc[uiRand].m_fY, m_afSpawnLoc[uiRand].m_fZ, m_afSpawnLoc[uiRand].m_fO, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 25000)) { - if (Creature* pAkama = m_creature->GetMap()->GetCreature(m_pInstance->GetData64(DATA_AKAMA_SHADE))) + if (Creature* pAkama = m_creature->GetMap()->GetCreature(m_pInstance->GetData64(NPC_AKAMA_SHADE))) pDefender->AI()->AttackStart(pAkama); } @@ -343,7 +342,7 @@ struct MANGOS_DLL_DECL boss_shade_of_akamaAI : public ScriptedAI if (m_uiDeathCount >= 6) { - if (Creature* pAkama = m_creature->GetMap()->GetCreature(m_pInstance->GetData64(DATA_AKAMA_SHADE))) + if (Creature* pAkama = m_creature->GetMap()->GetCreature(m_pInstance->GetData64(NPC_AKAMA_SHADE))) { if (pAkama && pAkama->isAlive()) { @@ -365,7 +364,7 @@ struct MANGOS_DLL_DECL boss_shade_of_akamaAI : public ScriptedAI { if (m_uiReduceHealthTimer < uiDiff) { - if (Creature* pAkama = m_creature->GetMap()->GetCreature(m_pInstance->GetData64(DATA_AKAMA_SHADE))) + if (Creature* pAkama = m_creature->GetMap()->GetCreature(m_pInstance->GetData64(NPC_AKAMA_SHADE))) { if (pAkama->isAlive()) { @@ -456,7 +455,7 @@ struct MANGOS_DLL_DECL npc_akamaAI : public ScriptedAI if (!m_pInstance) return; - if (Creature* pShade = m_pInstance->instance->GetCreature(m_pInstance->GetData64(DATA_SHADEOFAKAMA))) + if (Creature* pShade = m_pInstance->instance->GetCreature(m_pInstance->GetData64(NPC_SHADE_OF_AKAMA))) { if (boss_shade_of_akamaAI* pShadeAI = dynamic_cast(pShade->AI())) pShadeAI->PrepareChannelers(); @@ -470,7 +469,7 @@ struct MANGOS_DLL_DECL npc_akamaAI : public ScriptedAI pShade->SetInCombatWith(m_creature); m_creature->SetInCombatWith(pShade); - pShade->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_STATE_NONE); + pShade->HandleEmote(EMOTE_STATE_NONE); pShade->SetUInt64Value(UNIT_FIELD_TARGET, m_creature->GetGUID()); pShade->SetInCombatWithZone(); @@ -490,7 +489,7 @@ struct MANGOS_DLL_DECL npc_akamaAI : public ScriptedAI ++m_uiWayPointId; break; case 1: - if (Creature* pShade = m_creature->GetMap()->GetCreature(m_pInstance->GetData64(DATA_SHADEOFAKAMA))) + if (Creature* pShade = m_creature->GetMap()->GetCreature(m_pInstance->GetData64(NPC_SHADE_OF_AKAMA))) { DoCastSpellIfCan(pShade, SPELL_AKAMA_SOUL_RETRIEVE); m_uiEndingTalkCount = 0; @@ -512,7 +511,7 @@ struct MANGOS_DLL_DECL npc_akamaAI : public ScriptedAI if (!m_bCanStartCombat) { - if (Creature* pShade = m_pInstance->instance->GetCreature(m_pInstance->GetData64(DATA_SHADEOFAKAMA))) + if (Creature* pShade = m_pInstance->instance->GetCreature(m_pInstance->GetData64(NPC_SHADE_OF_AKAMA))) { if (!pShade->isAlive()) { @@ -551,7 +550,7 @@ struct MANGOS_DLL_DECL npc_akamaAI : public ScriptedAI { if (m_uiCheckTimer < uiDiff) { - if (Creature* pShade = m_creature->GetMap()->GetCreature(m_pInstance->GetData64(DATA_SHADEOFAKAMA))) + if (Creature* pShade = m_creature->GetMap()->GetCreature(m_pInstance->GetData64(NPC_SHADE_OF_AKAMA))) { if (!pShade->isAlive()) { @@ -678,7 +677,7 @@ struct MANGOS_DLL_DECL npc_akamaAI : public ScriptedAI if (m_uiDestructivePoisonTimer < uiDiff) { - if (Creature* pShade = m_creature->GetMap()->GetCreature(m_pInstance->GetData64(DATA_SHADEOFAKAMA))) + if (Creature* pShade = m_creature->GetMap()->GetCreature(m_pInstance->GetData64(NPC_SHADE_OF_AKAMA))) { if (pShade->isAlive()) DoCastSpellIfCan(pShade, SPELL_DESTRUCTIVE_POISON); @@ -756,7 +755,7 @@ struct MANGOS_DLL_DECL mob_ashtongue_channelerAI : public ScriptedAI if (!m_pInstance) return; - if (Creature* pShade = m_pInstance->instance->GetCreature(m_pInstance->GetData64(DATA_SHADEOFAKAMA))) + if (Creature* pShade = m_pInstance->instance->GetCreature(m_pInstance->GetData64(NPC_SHADE_OF_AKAMA))) { if (pShade->isAlive()) { @@ -776,7 +775,7 @@ struct MANGOS_DLL_DECL mob_ashtongue_channelerAI : public ScriptedAI //start channel (not nice way to start channeling) if (!m_creature->IsNonMeleeSpellCasted(false) && !m_creature->getVictim() && m_pInstance) { - if (Creature* pShade = m_pInstance->instance->GetCreature(m_pInstance->GetData64(DATA_SHADEOFAKAMA))) + if (Creature* pShade = m_pInstance->instance->GetCreature(m_pInstance->GetData64(NPC_SHADE_OF_AKAMA))) m_creature->CastSpell(pShade, SPELL_SHADE_SOUL_CHANNEL, false); } } @@ -809,7 +808,7 @@ struct MANGOS_DLL_DECL mob_ashtongue_sorcererAI : public ScriptedAI if (!m_pInstance) return; - if (Creature* pShade = m_pInstance->instance->GetCreature(m_pInstance->GetData64(DATA_SHADEOFAKAMA))) + if (Creature* pShade = m_pInstance->instance->GetCreature(m_pInstance->GetData64(NPC_SHADE_OF_AKAMA))) { if (pShade->isAlive()) { @@ -828,7 +827,7 @@ struct MANGOS_DLL_DECL mob_ashtongue_sorcererAI : public ScriptedAI if (m_uiCheckTimer < uiDiff) { - Creature* pShade = m_creature->GetMap()->GetCreature(m_pInstance->GetData64(DATA_SHADEOFAKAMA)); + Creature* pShade = m_creature->GetMap()->GetCreature(m_pInstance->GetData64(NPC_SHADE_OF_AKAMA)); if (pShade && pShade->isAlive() && m_creature->isAlive()) { diff --git a/scripts/outland/black_temple/boss_supremus.cpp b/scripts/outland/black_temple/boss_supremus.cpp index 818cb1d..868582e 100644 --- a/scripts/outland/black_temple/boss_supremus.cpp +++ b/scripts/outland/black_temple/boss_supremus.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or @@ -16,136 +16,69 @@ /* ScriptData SDName: Boss_Supremus -SD%Complete: 95 -SDComment: Need to implement molten punch +SD%Complete: 90 +SDComment: Fixating the target is hacky, unknown if other speed-changes happen, remove AI for trigger mobs in next step SDCategory: Black Temple EndScriptData */ #include "precompiled.h" #include "black_temple.h" -#define EMOTE_NEW_TARGET -1564010 -#define EMOTE_PUNCH_GROUND -1564011 //DoScriptText(EMOTE_PUNCH_GROUND, m_creature); -#define EMOTE_GROUND_CRACK -1564012 - -//Spells -#define SPELL_HURTFUL_STRIKE 41926 -#define SPELL_DEMON_FIRE 40029 -#define SPELL_MOLTEN_FLAME 40253 -#define SPELL_VOLCANIC_ERUPTION 40276 -#define SPELL_VOLCANIC_FIREBALL 40118 -#define SPELL_VOLCANIC_GEYSER 42055 -#define SPELL_MOLTEN_PUNCH 40126 -#define SPELL_BERSERK 45078 - -#define CREATURE_VOLCANO 23085 -#define CREATURE_STALKER 23095 - -struct MANGOS_DLL_DECL molten_flameAI : public ScriptedAI +enum { - molten_flameAI(Creature* pCreature) : ScriptedAI(pCreature) - { - Reset(); - } - - uint64 SupremusGUID; - bool TargetLocked; - uint32 CheckTimer; - - void Reset() - { - SupremusGUID = 0; - TargetLocked = false; - - CheckTimer = 1000; - } - - void AttackStart(Unit* who) {} - void MoveInLineOfSight(Unit *who) - { - if (TargetLocked) - return; - - // stop it from aggroing players who move in LOS if we have a target. - if (who && (who != m_creature) && (m_creature->IsWithinDistInMap(who, 10))) - StalkTarget(who); - } + EMOTE_NEW_TARGET = -1564010, + EMOTE_PUNCH_GROUND = -1564011, + EMOTE_GROUND_CRACK = -1564012, + + // Spells + SPELL_HATEFUL_STRIKE = 41926, + SPELL_CHARGE = 41581, + SPELL_MOLTEN_FLAME = 40980, + SPELL_VOLCANIC_ERUPTION_BOSS = 40276, + SPELL_VOLCANIC_ERUPTION_VOLCANO = 40117, + SPELL_MOLTEN_PUNCH = 40126, + SPELL_BERSERK = 45078, + SPELL_SLOW_SELF = 41922, + + NPC_VOLCANO = 23085, + NPC_STALKER = 23095, +}; - void SetSupremusGUID(uint64 GUID) { SupremusGUID = GUID; } +/* Non existed spells that were used in 3.2 + * Stalker: 40257 41930 + * Supremus: 33420 41582 41925 41951 + */ - void StalkTarget(Unit* target) - { - if (!target) - return; +const float RANGE_MOLTEN_PUNCH = 40.0; - m_creature->AddThreat(target, 50000000.0f); - m_creature->GetMotionMaster()->MoveChase(target); - DoCastSpellIfCan(m_creature, SPELL_DEMON_FIRE, CAST_TRIGGERED); - // DoCastSpellIfCan(m_creature, SPELL_MOLTEN_FLAME, CAST_TRIGGERED); // This spell damages self, so disabled for now - TargetLocked = true; - } +/* These floats are related to the speed-hack near end of script; + * Statet at wowwiki: "If the gaze target is further away than 40 yards, he dashes at about five times the normal run speed until the range is about 20 yards." + * TODO But this is currently not confirmed otherwise to be actually happening + * const float RANGE_MIN_DASHING = 20.0; + * const float SPEED_DASHING = 5.0; + * const float SPEED_CHASE = 0.9f; + */ - void UpdateAI(const uint32 diff) - { - if (!m_creature->SelectHostileTarget()) - return; +// TODO Remove this 'script' when combat movement can be proper prevented from core-side +struct MANGOS_DLL_DECL molten_flameAI : public Scripted_NoMovementAI +{ + molten_flameAI(Creature* pCreature) : Scripted_NoMovementAI(pCreature) { Reset(); } - if (m_creature->getVictim() && m_creature->isAlive()) - { - if (CheckTimer < diff) - { - if (SupremusGUID) - { - Unit* Supremus = m_creature->GetMap()->GetCreature(SupremusGUID); - if (Supremus && (!Supremus->isAlive())) - m_creature->DealDamage(m_creature, m_creature->GetHealth(), 0, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false); - } - CheckTimer = 2000; - }else CheckTimer -= diff; - } - } + void Reset() {} + void AttackStart(Unit* pWho) {} + void MoveInLineOfSight(Unit* pWho) {} + void UpdateAI(const uint32 uiDiff) {} }; -struct MANGOS_DLL_DECL npc_volcanoAI : public ScriptedAI +// TODO Remove this 'script' when combat movement can be proper prevented from core-side +struct MANGOS_DLL_DECL npc_volcanoAI : public Scripted_NoMovementAI { - npc_volcanoAI(Creature* pCreature) : ScriptedAI(pCreature) {Reset();} - - uint32 CheckTimer; - uint64 SupremusGUID; - uint32 FireballTimer; - uint32 GeyserTimer; - - void Reset() - { - CheckTimer = 1000; - SupremusGUID = 0; - FireballTimer = 500; - GeyserTimer = 2000; - } + npc_volcanoAI(Creature* pCreature) : Scripted_NoMovementAI(pCreature) { Reset(); } - void AttackStart(Unit* who) {} - void MoveInLineOfSight(Unit* who) {} - void SetSupremusGUID(uint64 guid) { SupremusGUID = guid; } - - void UpdateAI(const uint32 diff) - { - if (CheckTimer < diff) - { - if (SupremusGUID) - { - Unit* Supremus = m_creature->GetMap()->GetCreature(SupremusGUID); - if (Supremus && (!Supremus->isAlive())) - m_creature->DealDamage(m_creature, m_creature->GetHealth(), 0, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false); - } - CheckTimer = 2000; - }else CheckTimer -= diff; - - if (GeyserTimer < diff) - { - DoCastSpellIfCan(m_creature, SPELL_VOLCANIC_GEYSER); - GeyserTimer = 18000; - }else GeyserTimer -= diff; - } + void Reset() {} + void AttackStart(Unit* pWho) {} + void MoveInLineOfSight(Unit* pWho) {} + void UpdateAI(const uint32 uiDiff) {} }; struct MANGOS_DLL_DECL boss_supremusAI : public ScriptedAI @@ -158,25 +91,31 @@ struct MANGOS_DLL_DECL boss_supremusAI : public ScriptedAI ScriptedInstance* m_pInstance; - uint32 SummonFlameTimer; - uint32 SwitchTargetTimer; - uint32 PhaseSwitchTimer; - uint32 SummonVolcanoTimer; - uint32 HurtfulStrikeTimer; - uint32 BerserkTimer; + uint32 m_uiSummonFlameTimer; + uint32 m_uiSwitchTargetTimer; + uint32 m_uiPhaseSwitchTimer; + uint32 m_uiSummonVolcanoTimer; + uint32 m_uiHatefulStrikeTimer; + uint32 m_uiBerserkTimer; + uint32 m_uiMoltenPunchTimer; - bool Phase1; + uint64 m_uiLastGazeTargetGUID; + + bool m_bTankPhase; + + std::list m_lSummonedGUIDs; void Reset() { - HurtfulStrikeTimer = 5000; - SummonFlameTimer = 20000; - SwitchTargetTimer = 90000; - PhaseSwitchTimer = 60000; - SummonVolcanoTimer = 5000; - BerserkTimer = 900000; // 15 minute enrage - - Phase1 = true; + m_uiHatefulStrikeTimer = 5000; + m_uiSummonFlameTimer = 20000; + m_uiPhaseSwitchTimer = 60000; + m_uiMoltenPunchTimer = 8000; + m_uiBerserkTimer = 15*MINUTE*IN_MILLISECONDS; + + m_uiLastGazeTargetGUID = 0; + + m_bTankPhase = true; } void JustReachedHome() @@ -191,169 +130,176 @@ struct MANGOS_DLL_DECL boss_supremusAI : public ScriptedAI m_pInstance->SetData(TYPE_SUPREMUS, IN_PROGRESS); } - void JustDied(Unit *killer) + void JustDied(Unit* pKiller) { if (m_pInstance) m_pInstance->SetData(TYPE_SUPREMUS, DONE); - } - float CalculateRandomCoord(float initial) - { - float coord = 0; - - switch(urand(0, 1)) + for (std::list::const_iterator itr = m_lSummonedGUIDs.begin(); itr != m_lSummonedGUIDs.end(); ++itr) { - case 0: coord = initial + 20 + rand()%20; break; - case 1: coord = initial - 20 - rand()%20; break; + if (Creature* pSummoned = m_creature->GetMap()->GetCreature(*itr)) + pSummoned->ForcedDespawn(); } - - return coord; } - Creature* SummonCreature(uint32 entry, Unit* target) + void JustSummoned(Creature* pSummoned) { - if (target && entry) + if (pSummoned->GetEntry() == NPC_STALKER) { - Creature* Summon = m_creature->SummonCreature(entry, CalculateRandomCoord(target->GetPositionX()), CalculateRandomCoord(target->GetPositionY()), target->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN, 20000); - if (Summon) + Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 1); + if (!pTarget) + pTarget = m_creature->getVictim(); + + if (pTarget) { - Summon->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); - Summon->setFaction(m_creature->getFaction()); - return Summon; + pSummoned->GetMotionMaster()->Clear(); + pSummoned->GetMotionMaster()->MoveFollow(pTarget, 0.0f, 0.0f); + pSummoned->CastSpell(pSummoned, SPELL_MOLTEN_FLAME, false, NULL, NULL, m_creature->GetObjectGuid()); } } - return NULL; + + else if (pSummoned->GetEntry() == NPC_VOLCANO) + pSummoned->CastSpell(pSummoned, SPELL_VOLCANIC_ERUPTION_VOLCANO, false, NULL, NULL, m_creature->GetObjectGuid()); } - Unit* CalculateHurtfulStrikeTarget() + Unit* GetHatefulStrikeTarget() { - uint32 health = 0; - Unit* target = NULL; + uint32 uiHealth = 0; + Unit* pTarget = NULL; ThreatList const& tList = m_creature->getThreatManager().getThreatList(); - for (ThreatList::const_iterator i = tList.begin();i != tList.end(); ++i) + for (ThreatList::const_iterator iter = tList.begin(); iter != tList.end(); ++iter) { - Unit* pUnit = m_creature->GetMap()->GetUnit((*i)->getUnitGuid()); + Unit* pUnit = m_creature->GetMap()->GetUnit((*iter)->getUnitGuid()); if (pUnit && m_creature->CanReachWithMeleeAttack(pUnit)) { - if (pUnit->GetHealth() > health) + if (pUnit->GetHealth() > uiHealth) { - health = pUnit->GetHealth(); - target = pUnit; + uiHealth = pUnit->GetHealth(); + pTarget = pUnit; } } } - return target; + return pTarget; + } + + void KilledUnit(Unit* pKilled) + { + if (!m_bTankPhase && pKilled->GetGUID() == m_uiLastGazeTargetGUID) + m_uiSwitchTargetTimer = 0; } - void UpdateAI(const uint32 diff) + void UpdateAI(const uint32 uiDiff) { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; - if (!m_creature->HasAura(SPELL_BERSERK, EFFECT_INDEX_0)) + if (m_uiBerserkTimer) { - if (BerserkTimer < diff) - DoCastSpellIfCan(m_creature, SPELL_BERSERK); - else BerserkTimer -= diff; + if (m_uiBerserkTimer <= uiDiff) + { + if (DoCastSpellIfCan(m_creature, SPELL_BERSERK) == CAST_OK) + m_uiBerserkTimer = 0; + } + else + m_uiBerserkTimer -= uiDiff; } - if (SummonFlameTimer < diff) + if (m_uiSummonFlameTimer < uiDiff) { - Unit* target = NULL; - target = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 1); - - if (!target) // someone is trying to solo, set target as current victim. - target = m_creature->getVictim(); + // This currently is entirely screwed, because the npc is summoned somewhere far away as of big bounding box of supremus + if (DoCastSpellIfCan(m_creature, SPELL_MOLTEN_PUNCH) == CAST_OK) + m_uiSummonFlameTimer = 20000; + } + else + m_uiSummonFlameTimer -= uiDiff; - if (target) + if (m_uiPhaseSwitchTimer < uiDiff) + { + if (!m_bTankPhase) { - if (Creature* pMoltenFlame = SummonCreature(CREATURE_STALKER, target)) - { - // Invisible model - pMoltenFlame->SetDisplayId(11686); - - if (molten_flameAI* pMoltenAI = dynamic_cast(pMoltenFlame->AI())) - { - pMoltenAI->SetSupremusGUID(m_creature->GetGUID()); - pMoltenAI->StalkTarget(target); - } + m_bTankPhase = true; + m_creature->RemoveAurasDueToSpell(SPELL_SLOW_SELF); + } + else + { + m_bTankPhase = false; + m_uiSwitchTargetTimer = 0; + m_uiSummonVolcanoTimer = 2000; - SummonFlameTimer = 20000; - } + DoCastSpellIfCan(m_creature, SPELL_SLOW_SELF, CAST_INTERRUPT_PREVIOUS); } - }else SummonFlameTimer -= diff; - if (Phase1) + m_uiPhaseSwitchTimer = MINUTE*IN_MILLISECONDS; + DoResetThreat(); + } + else + m_uiPhaseSwitchTimer -= uiDiff; + + if (m_bTankPhase) { - if (HurtfulStrikeTimer < diff) + if (m_uiHatefulStrikeTimer < uiDiff) { - Unit* target = CalculateHurtfulStrikeTarget(); - if (target) + if (Unit* pTarget = GetHatefulStrikeTarget()) { - DoCastSpellIfCan(target, SPELL_HURTFUL_STRIKE); - HurtfulStrikeTimer = 5000; + if (DoCastSpellIfCan(pTarget, SPELL_HATEFUL_STRIKE) == CAST_OK) + m_uiHatefulStrikeTimer = 5000; } - }else HurtfulStrikeTimer -= diff; + } + else + m_uiHatefulStrikeTimer -= uiDiff; } - - if (!Phase1) + else // !m_bTankPhase { - if (SwitchTargetTimer < diff) + if (m_uiSwitchTargetTimer < uiDiff) { - if (Unit* target = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) { DoResetThreat(); - m_creature->AddThreat(target, 5000000.0f); + // This way to simulate some fixating is to be considered a hack + m_creature->AddThreat(pTarget, 5000000.0f); DoScriptText(EMOTE_NEW_TARGET, m_creature); - SwitchTargetTimer = 10000; + m_uiSwitchTargetTimer = 10000; + m_uiLastGazeTargetGUID = pTarget->GetGUID(); } - }else SwitchTargetTimer -= diff; + } + else + m_uiSwitchTargetTimer -= uiDiff; - if (SummonVolcanoTimer < diff) + if (m_uiSummonVolcanoTimer < uiDiff) { - Unit* target = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 1); - - if (!target) - target = m_creature->getVictim(); + Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 1); - if (target) + if (DoCastSpellIfCan(pTarget ? pTarget : m_creature->getVictim(), SPELL_VOLCANIC_ERUPTION_BOSS) == CAST_OK) { - if (Creature* pVolcano = SummonCreature(CREATURE_VOLCANO, target)) - { - DoCastSpellIfCan(target, SPELL_VOLCANIC_ERUPTION); - - if (npc_volcanoAI* pVolcanoAI = dynamic_cast(pVolcano->AI())) - pVolcanoAI->SetSupremusGUID(m_creature->GetGUID()); - } - DoScriptText(EMOTE_GROUND_CRACK, m_creature); - SummonVolcanoTimer = 10000; + m_uiSummonVolcanoTimer = 10000; } - }else SummonVolcanoTimer -= diff; - } - - if (PhaseSwitchTimer < diff) - { - if (!Phase1) - { - Phase1 = true; - DoResetThreat(); - PhaseSwitchTimer = 60000; - m_creature->SetSpeedRate(MOVE_RUN, 1.0f); } else + m_uiSummonVolcanoTimer -= uiDiff; + + if (m_uiMoltenPunchTimer < uiDiff) { - Phase1 = false; - DoResetThreat(); - SwitchTargetTimer = 10000; - SummonVolcanoTimer = 2000; - PhaseSwitchTimer = 60000; - m_creature->SetSpeedRate(MOVE_RUN, 0.9f); + if (m_creature->GetCombatDistance(m_creature->getVictim()) < RANGE_MOLTEN_PUNCH) + { + DoCastSpellIfCan(m_creature->getVictim(), SPELL_CHARGE); + DoScriptText(EMOTE_PUNCH_GROUND, m_creature); + } + m_uiMoltenPunchTimer = 8000; // might be better with small timer and some sort of cast-chance } - }else PhaseSwitchTimer -= diff; + else + m_uiMoltenPunchTimer -= uiDiff; + + /* Not understood how this really must work + * if (m_creature->GetSpeedRate(MOVE_RUN) > SPEED_CHASE && m_creature->GetCombatDistance(m_creature->getVictim()) < RANGE_MIN_DASHING) + * m_creature->SetSpeedRate(MOVE_RUN, SPEED_CHASE); + * else if (m_creature->GetCombatDistance(m_creature->getVictim()) > RANGE_MOLTEN_PUNCH) + * m_creature->SetSpeedRate(MOVE_RUN, SPEED_DASHING); + */ + } DoMeleeAttackIfReady(); } @@ -376,19 +322,20 @@ CreatureAI* GetAI_npc_volcano(Creature* pCreature) void AddSC_boss_supremus() { - Script *newscript; - newscript = new Script; - newscript->Name = "boss_supremus"; - newscript->GetAI = &GetAI_boss_supremus; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "molten_flame"; - newscript->GetAI = &GetAI_molten_flame; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "npc_volcano"; - newscript->GetAI = &GetAI_npc_volcano; - newscript->RegisterSelf(); + Script* pNewScript; + + pNewScript = new Script; + pNewScript->Name = "boss_supremus"; + pNewScript->GetAI = &GetAI_boss_supremus; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "molten_flame"; + pNewScript->GetAI = &GetAI_molten_flame; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "npc_volcano"; + pNewScript->GetAI = &GetAI_npc_volcano; + pNewScript->RegisterSelf(); } diff --git a/scripts/outland/black_temple/boss_teron_gorefiend.cpp b/scripts/outland/black_temple/boss_teron_gorefiend.cpp index efc9bf9..ed9fc37 100644 --- a/scripts/outland/black_temple/boss_teron_gorefiend.cpp +++ b/scripts/outland/black_temple/boss_teron_gorefiend.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or @@ -258,7 +258,7 @@ struct MANGOS_DLL_DECL boss_teron_gorefiendAI : public ScriptedAI DoScriptText(SAY_INTRO, m_creature); - m_creature->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_STATE_TALK); + m_creature->HandleEmote(EMOTE_STATE_TALK); m_uiAggroTargetGUID = pWho->GetGUID(); m_bIntro = true; } @@ -358,7 +358,7 @@ struct MANGOS_DLL_DECL boss_teron_gorefiendAI : public ScriptedAI DoScriptText(SAY_AGGRO, m_creature); - m_creature->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_STATE_NONE); + m_creature->HandleEmote(EMOTE_STATE_NONE); m_bIntro = false; if (m_uiAggroTargetGUID) { diff --git a/scripts/outland/black_temple/boss_warlord_najentus.cpp b/scripts/outland/black_temple/boss_warlord_najentus.cpp index 90cb34b..a4e54a8 100644 --- a/scripts/outland/black_temple/boss_warlord_najentus.cpp +++ b/scripts/outland/black_temple/boss_warlord_najentus.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or @@ -17,7 +17,7 @@ /* ScriptData SDName: Boss_Warlord_Najentus SD%Complete: 90 -SDComment: Does the GO need script? Uncomment code to test. +SDComment: Core spell support for Needle Spine (spells 39992, 39835) missing, no change from SD2 needed SDCategory: Black Temple EndScriptData */ @@ -38,10 +38,9 @@ enum SAY_DEATH = -1564009, SPELL_CRASHINGWAVE = 40100, - SPELL_NEEDLE_SPINE = 39835, - SPELL_NEEDLE_AOE = 39968, + SPELL_NEEDLE_SPINE = 39992, SPELL_TIDAL_BURST = 39878, - SPELL_TIDAL_SHIELD = 39872, // Not going to use this since Hurl Spine doesn't dispel it. + SPELL_TIDAL_SHIELD = 39872, SPELL_IMPALING_SPINE = 39837, SPELL_CREATE_NAJENTUS_SPINE = 39956, SPELL_HURL_SPINE = 39948, @@ -75,6 +74,8 @@ struct MANGOS_DLL_DECL boss_najentusAI : public ScriptedAI m_uiSpecialYellTimer = urand(45000, 120000); m_uiTidalShieldTimer = 60000; m_uiImpalingSpineTimer = 20000; + + SetCombatMovement(true); } void JustReachedHome() @@ -83,12 +84,12 @@ struct MANGOS_DLL_DECL boss_najentusAI : public ScriptedAI m_pInstance->SetData(TYPE_NAJENTUS, NOT_STARTED); } - void KilledUnit(Unit *victim) + void KilledUnit(Unit* pVictim) { DoScriptText(urand(0, 1) ? SAY_SLAY1 : SAY_SLAY2, m_creature); } - void JustDied(Unit *victim) + void JustDied(Unit* pKiller) { if (m_pInstance) m_pInstance->SetData(TYPE_NAJENTUS, DONE); @@ -96,18 +97,19 @@ struct MANGOS_DLL_DECL boss_najentusAI : public ScriptedAI DoScriptText(SAY_DEATH, m_creature); } - void SpellHit(Unit *caster, const SpellEntry *spell) + void SpellHit(Unit* pCaster, const SpellEntry* pSpell) { - if (m_bIsShielded) + if (m_bIsShielded && pSpell->Id == SPELL_HURL_SPINE) { - if (spell->Id == SPELL_HURL_SPINE) - { - if (m_creature->HasAura(SPELL_TIDAL_SHIELD, EFFECT_INDEX_0)) - m_creature->RemoveAurasDueToSpell(SPELL_TIDAL_SHIELD); + if (m_creature->HasAura(SPELL_TIDAL_SHIELD)) + m_creature->RemoveAurasDueToSpell(SPELL_TIDAL_SHIELD); - DoCastSpellIfCan(m_creature->getVictim(), SPELL_TIDAL_BURST); - m_bIsShielded = false; - } + DoCastSpellIfCan(m_creature, SPELL_TIDAL_BURST); + m_bIsShielded = false; + + SetCombatMovement(true); + if (m_creature->getVictim()) + m_creature->GetMotionMaster()->MoveChase(m_creature->getVictim()); } } @@ -119,79 +121,83 @@ struct MANGOS_DLL_DECL boss_najentusAI : public ScriptedAI DoScriptText(SAY_AGGRO, m_creature); } - void UpdateAI(const uint32 diff) + void UpdateAI(const uint32 uiDiff) { if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; - if (m_uiEnrageTimer < diff) + // If shield expired after 45s, attack again + if (m_bIsShielded && m_uiTidalShieldTimer < 16000 && !m_creature->HasAura(SPELL_TIDAL_SHIELD)) { - if (m_creature->IsNonMeleeSpellCasted(false)) - m_creature->InterruptNonMeleeSpells(false); - - DoScriptText(SAY_ENRAGE2, m_creature); - DoCastSpellIfCan(m_creature, SPELL_BERSERK); - m_uiEnrageTimer = MINUTE*8*IN_MILLISECONDS; - }else m_uiEnrageTimer -= diff; - - if (m_bIsShielded) - { - m_creature->GetMotionMaster()->Clear(false); - m_creature->GetMotionMaster()->MoveIdle(); + m_bIsShielded = false; - return; // Don't cast or do anything while Shielded + SetCombatMovement(true); + m_creature->GetMotionMaster()->MoveChase(m_creature->getVictim()); } - // Needle - if (m_uiNeedleSpineTimer < diff) + if (m_uiEnrageTimer < uiDiff) { - for(uint8 i = 0; i < 3; ++i) + if (DoCastSpellIfCan(m_creature, SPELL_BERSERK, CAST_INTERRUPT_PREVIOUS) == CAST_OK) { - Unit* target = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 1); - - if (!target) - target = m_creature->getVictim(); - - DoCastSpellIfCan(target, SPELL_NEEDLE_SPINE); - target->CastSpell(target, SPELL_NEEDLE_AOE, false); + m_uiEnrageTimer = MINUTE*8*IN_MILLISECONDS; + DoScriptText(SAY_ENRAGE2, m_creature); } + } + else + m_uiEnrageTimer -= uiDiff; - m_uiNeedleSpineTimer = 3000; - }else m_uiNeedleSpineTimer -= diff; - - if (m_uiSpecialYellTimer < diff) + if (m_uiSpecialYellTimer < uiDiff) { DoScriptText(urand(0, 1) ? SAY_SPECIAL1 : SAY_SPECIAL2, m_creature); m_uiSpecialYellTimer = urand(25000, 100000); - }else m_uiSpecialYellTimer -= diff; + } + else + m_uiSpecialYellTimer -= uiDiff; - if (m_uiImpalingSpineTimer < diff) + if (m_uiImpalingSpineTimer < uiDiff) { - Unit* target = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 1); + Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 1); - if (!target) - target = m_creature->getVictim(); + if (!pTarget) + pTarget = m_creature->getVictim(); - if (target && (target->GetTypeId() == TYPEID_PLAYER)) + if (pTarget && (pTarget->GetTypeId() == TYPEID_PLAYER)) { - DoCastSpellIfCan(target, SPELL_IMPALING_SPINE); + DoCastSpellIfCan(pTarget, SPELL_IMPALING_SPINE); m_uiImpalingSpineTimer = 20000; DoScriptText(urand(0, 1) ? SAY_NEEDLE1 : SAY_NEEDLE2, m_creature); } - }else m_uiImpalingSpineTimer -= diff; + } + else + m_uiImpalingSpineTimer -= uiDiff; - if (m_uiTidalShieldTimer < diff) + if (m_uiTidalShieldTimer < uiDiff) { - m_creature->InterruptNonMeleeSpells(false); - DoCastSpellIfCan(m_creature, SPELL_TIDAL_SHIELD, CAST_TRIGGERED); + DoCastSpellIfCan(m_creature, SPELL_TIDAL_SHIELD, CAST_INTERRUPT_PREVIOUS | CAST_TRIGGERED); m_creature->GetMotionMaster()->Clear(false); m_creature->GetMotionMaster()->MoveIdle(); + SetCombatMovement(false); m_bIsShielded = true; m_uiTidalShieldTimer = 60000; - }else m_uiTidalShieldTimer -= diff; + + // Skip needle splines for 10s + m_uiNeedleSpineTimer += 10000; + } + else + m_uiTidalShieldTimer -= uiDiff; + + // Needle + if (m_uiNeedleSpineTimer < uiDiff) + { + if (DoCastSpellIfCan(m_creature, SPELL_NEEDLE_SPINE) == CAST_OK) + m_uiNeedleSpineTimer = 3000; + } + else + m_uiNeedleSpineTimer -= uiDiff; + DoMeleeAttackIfReady(); } @@ -204,9 +210,10 @@ CreatureAI* GetAI_boss_najentus(Creature* pCreature) void AddSC_boss_najentus() { - Script *newscript; - newscript = new Script; - newscript->Name = "boss_najentus"; - newscript->GetAI = &GetAI_boss_najentus; - newscript->RegisterSelf(); + Script* pNewScript; + + pNewScript = new Script; + pNewScript->Name = "boss_najentus"; + pNewScript->GetAI = &GetAI_boss_najentus; + pNewScript->RegisterSelf(); } diff --git a/scripts/outland/black_temple/illidari_council.cpp b/scripts/outland/black_temple/illidari_council.cpp index e1d5f2c..8c76625 100644 --- a/scripts/outland/black_temple/illidari_council.cpp +++ b/scripts/outland/black_temple/illidari_council.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or @@ -137,10 +137,10 @@ struct MANGOS_DLL_DECL mob_blood_elf_council_voice_triggerAI : public ScriptedAI { if (ScriptedInstance* pInstance = (ScriptedInstance*)m_creature->GetInstanceData()) { - Council[0] = pInstance->GetData64(DATA_GATHIOSTHESHATTERER); - Council[1] = pInstance->GetData64(DATA_VERASDARKSHADOW); - Council[2] = pInstance->GetData64(DATA_LADYMALANDE); - Council[3] = pInstance->GetData64(DATA_HIGHNETHERMANCERZEREVOR); + Council[0] = pInstance->GetData64(NPC_GATHIOS); + Council[1] = pInstance->GetData64(NPC_VERAS); + Council[2] = pInstance->GetData64(NPC_LADY_MALANDE); + Council[3] = pInstance->GetData64(NPC_ZEREVOR); }else error_log(ERROR_INST_DATA); } @@ -242,7 +242,7 @@ struct MANGOS_DLL_DECL mob_illidari_councilAI : public ScriptedAI if (m_pInstance->GetData(TYPE_COUNCIL) == DONE) return; - if (Creature* VoiceTrigger = m_creature->GetMap()->GetCreature(m_pInstance->GetData64(DATA_BLOOD_ELF_COUNCIL_VOICE))) + if (Creature* VoiceTrigger = m_creature->GetMap()->GetCreature(m_pInstance->GetData64(NPC_COUNCIL_VOICE))) VoiceTrigger->AI()->EnterEvadeMode(); m_pInstance->SetData(TYPE_COUNCIL, NOT_STARTED); @@ -259,13 +259,16 @@ struct MANGOS_DLL_DECL mob_illidari_councilAI : public ScriptedAI if (target && target->isAlive() && !EventBegun) { - Council[0] = m_pInstance->GetData64(DATA_GATHIOSTHESHATTERER); - Council[1] = m_pInstance->GetData64(DATA_HIGHNETHERMANCERZEREVOR); - Council[2] = m_pInstance->GetData64(DATA_LADYMALANDE); - Council[3] = m_pInstance->GetData64(DATA_VERASDARKSHADOW); + // Prevent further handling for next council member aggroing + EventBegun = true; + + Council[0] = m_pInstance->GetData64(NPC_GATHIOS); + Council[1] = m_pInstance->GetData64(NPC_ZEREVOR); + Council[2] = m_pInstance->GetData64(NPC_LADY_MALANDE); + Council[3] = m_pInstance->GetData64(NPC_VERAS); // Start the event for the Voice Trigger - if (Creature* pVoiceTrigger = m_creature->GetMap()->GetCreature(m_pInstance->GetData64(DATA_BLOOD_ELF_COUNCIL_VOICE))) + if (Creature* pVoiceTrigger = m_creature->GetMap()->GetCreature(m_pInstance->GetData64(NPC_COUNCIL_VOICE))) { if (mob_blood_elf_council_voice_triggerAI* pVoiceAI = dynamic_cast(pVoiceTrigger->AI())) { @@ -279,14 +282,13 @@ struct MANGOS_DLL_DECL mob_illidari_councilAI : public ScriptedAI if (Council[i]) { Creature* pMember = m_creature->GetMap()->GetCreature(Council[i]); - if (pMember && pMember->isAlive()) + if (pMember && pMember->isAlive() && !pMember->isInCombat()) pMember->AI()->AttackStart(target); } } + // All are set into combat now, Set Instance Data m_pInstance->SetData(TYPE_COUNCIL, IN_PROGRESS); - - EventBegun = true; } } @@ -303,7 +305,7 @@ struct MANGOS_DLL_DECL mob_illidari_councilAI : public ScriptedAI { if (m_pInstance) { - if (Creature* VoiceTrigger = m_creature->GetMap()->GetCreature(m_pInstance->GetData64(DATA_BLOOD_ELF_COUNCIL_VOICE))) + if (Creature* VoiceTrigger = m_creature->GetMap()->GetCreature(m_pInstance->GetData64(NPC_COUNCIL_VOICE))) VoiceTrigger->DealDamage(VoiceTrigger, VoiceTrigger->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false); m_pInstance->SetData(TYPE_COUNCIL, DONE); @@ -346,7 +348,11 @@ struct MANGOS_DLL_DECL mob_illidari_councilAI : public ScriptedAI } if (EvadeCheck > 3) + { + if (m_pInstance) + m_pInstance->SetData(TYPE_COUNCIL, FAIL); Reset(); + } CheckTimer = 2000; }else CheckTimer -= diff; @@ -376,7 +382,7 @@ struct MANGOS_DLL_DECL boss_illidari_councilAI : public ScriptedAI { if (m_pInstance) { - if (Creature* pController = m_creature->GetMap()->GetCreature(m_pInstance->GetData64(DATA_ILLIDARICOUNCIL))) + if (Creature* pController = m_creature->GetMap()->GetCreature(m_pInstance->GetData64(NPC_ILLIDARI_COUNCIL))) { if (mob_illidari_councilAI* pControlAI = dynamic_cast(pController->AI())) pControlAI->StartEvent(pWho); @@ -388,8 +394,6 @@ struct MANGOS_DLL_DECL boss_illidari_councilAI : public ScriptedAI EnterEvadeMode(); } - m_creature->SetInCombatWithZone(); - // Load GUIDs on first aggro because the creature guids are only set as the creatures are created in world- // this means that for each creature, it will attempt to LoadGUIDs even though some of the other creatures are // not in world, and thus have no GUID set in the instance data system. Putting it in aggro ensures that all the creatures @@ -422,10 +426,10 @@ struct MANGOS_DLL_DECL boss_illidari_councilAI : public ScriptedAI return; } - Council[0] = m_pInstance->GetData64(DATA_LADYMALANDE); - Council[1] = m_pInstance->GetData64(DATA_HIGHNETHERMANCERZEREVOR); - Council[2] = m_pInstance->GetData64(DATA_GATHIOSTHESHATTERER); - Council[3] = m_pInstance->GetData64(DATA_VERASDARKSHADOW); + Council[0] = m_pInstance->GetData64(NPC_LADY_MALANDE); + Council[1] = m_pInstance->GetData64(NPC_ZEREVOR); + Council[2] = m_pInstance->GetData64(NPC_GATHIOS); + Council[3] = m_pInstance->GetData64(NPC_VERAS); LoadedGUIDs = true; } diff --git a/scripts/outland/black_temple/instance_black_temple.cpp b/scripts/outland/black_temple/instance_black_temple.cpp index a93dad8..6f28dc9 100644 --- a/scripts/outland/black_temple/instance_black_temple.cpp +++ b/scripts/outland/black_temple/instance_black_temple.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or @@ -36,286 +36,260 @@ EndScriptData */ 8 - Illidan Stormrage Event */ -struct MANGOS_DLL_DECL instance_black_temple : public ScriptedInstance +instance_black_temple::instance_black_temple(Map* pMap) : ScriptedInstance(pMap), + m_uiNajentusGUID(0), + m_uiAkamaGUID(0), + m_uiAkama_ShadeGUID(0), + m_uiShadeOfAkamaGUID(0), + m_uiSupremusGUID(0), + m_uiLadyMalandeGUID(0), + m_uiGathiosTheShattererGUID(0), + m_uiHighNethermancerZerevorGUID(0), + m_uiVerasDarkshadowGUID(0), + m_uiIllidariCouncilGUID(0), + m_uiBloodElfCouncilVoiceGUID(0), + m_uiIllidanStormrageGUID(0), + + m_uiNajentusGateGUID(0), + m_uiMainTempleDoorsGUID(0), + m_uiShadeAkamaDoorGUID(0), + m_uiIllidanGateGUID(0), + m_uiShahrazPreDoorGUID(0), + m_uiShahrazPostDoorGUID(0), + m_uiPreCouncilDoorGUID(0), + m_uiCouncilDoorGUID(0) { - instance_black_temple(Map* pMap) : ScriptedInstance(pMap) {Initialize();}; - - uint32 m_auiEncounter[MAX_ENCOUNTER]; - std::string strInstData; - - uint64 m_uiNajentusGUID; - uint64 m_uiAkamaGUID; // This is the Akama that starts the Illidan encounter. - uint64 m_uiAkama_ShadeGUID; // This is the Akama that starts the Shade of Akama encounter. - uint64 m_uiShadeOfAkamaGUID; - uint64 m_uiSupremusGUID; - uint64 m_uiLadyMalandeGUID; - uint64 m_uiGathiosTheShattererGUID; - uint64 m_uiHighNethermancerZerevorGUID; - uint64 m_uiVerasDarkshadowGUID; - uint64 m_uiIllidariCouncilGUID; - uint64 m_uiBloodElfCouncilVoiceGUID; - uint64 m_uiIllidanStormrageGUID; + Initialize(); +}; - uint64 m_uiNajentusGateGUID; - uint64 m_uiMainTempleDoorsGUID; - uint64 m_uiShadeAkamaDoorGUID; - uint64 m_uiIllidanGateGUID; - uint64 m_uiIllidanDoorGUID[2]; - uint64 m_uiShahrazPreDoorGUID; - uint64 m_uiShahrazPostDoorGUID; - uint64 m_uiCouncilDoorGUID; +void instance_black_temple::Initialize() +{ + memset(&m_auiEncounter, 0, sizeof(m_auiEncounter)); - void Initialize() - { - memset(&m_auiEncounter, 0, sizeof(m_auiEncounter)); + m_uiIllidanDoorGUID[0] = 0; + m_uiIllidanDoorGUID[1] = 0; +} - m_uiNajentusGUID = 0; - m_uiAkamaGUID = 0; - m_uiAkama_ShadeGUID = 0; - m_uiShadeOfAkamaGUID = 0; - m_uiSupremusGUID = 0; - m_uiLadyMalandeGUID = 0; - m_uiGathiosTheShattererGUID = 0; - m_uiHighNethermancerZerevorGUID = 0; - m_uiVerasDarkshadowGUID = 0; - m_uiIllidariCouncilGUID = 0; - m_uiBloodElfCouncilVoiceGUID = 0; - m_uiIllidanStormrageGUID = 0; +bool instance_black_temple::IsEncounterInProgress() const +{ + for(uint8 i = 0; i < MAX_ENCOUNTER; ++i) + if (m_auiEncounter[i] == IN_PROGRESS) return true; - m_uiNajentusGateGUID = 0; - m_uiMainTempleDoorsGUID = 0; - m_uiShadeAkamaDoorGUID = 0; - m_uiIllidanGateGUID = 0; - m_uiIllidanDoorGUID[0] = 0; - m_uiIllidanDoorGUID[1] = 0; - m_uiShahrazPreDoorGUID = 0; - m_uiShahrazPostDoorGUID = 0; - m_uiCouncilDoorGUID = 0; - } + return false; +} - bool IsEncounterInProgress() const +void instance_black_temple::OnCreatureCreate(Creature* pCreature) +{ + switch(pCreature->GetEntry()) { - for(uint8 i = 0; i < MAX_ENCOUNTER; ++i) - if (m_auiEncounter[i] == IN_PROGRESS) return true; - - return false; + case NPC_WARLORD_NAJENTUS: m_uiNajentusGUID = pCreature->GetGUID(); break; + case NPC_AKAMA: m_uiAkamaGUID = pCreature->GetGUID(); break; + case NPC_AKAMA_SHADE: m_uiAkama_ShadeGUID = pCreature->GetGUID(); break; + case NPC_SHADE_OF_AKAMA: m_uiShadeOfAkamaGUID = pCreature->GetGUID(); break; + case NPC_SUPREMUS: m_uiSupremusGUID = pCreature->GetGUID(); break; + case NPC_ILLIDAN_STORMRAGE: m_uiIllidanStormrageGUID = pCreature->GetGUID(); break; + case NPC_GATHIOS: m_uiGathiosTheShattererGUID = pCreature->GetGUID(); break; + case NPC_ZEREVOR: m_uiHighNethermancerZerevorGUID = pCreature->GetGUID(); break; + case NPC_LADY_MALANDE: m_uiLadyMalandeGUID = pCreature->GetGUID(); break; + case NPC_VERAS: m_uiVerasDarkshadowGUID = pCreature->GetGUID(); break; + case NPC_ILLIDARI_COUNCIL: m_uiIllidariCouncilGUID = pCreature->GetGUID(); break; + case NPC_COUNCIL_VOICE: m_uiBloodElfCouncilVoiceGUID = pCreature->GetGUID(); break; } +} - void OnCreatureCreate(Creature* pCreature) +void instance_black_temple::OnObjectCreate(GameObject* pGo) +{ + switch(pGo->GetEntry()) { - switch(pCreature->GetEntry()) - { - case 22887: m_uiNajentusGUID = pCreature->GetGUID(); break; - case 23089: m_uiAkamaGUID = pCreature->GetGUID(); break; - case 22990: m_uiAkama_ShadeGUID = pCreature->GetGUID(); break; - case 22841: m_uiShadeOfAkamaGUID = pCreature->GetGUID(); break; - case 22898: m_uiSupremusGUID = pCreature->GetGUID(); break; - case 22917: m_uiIllidanStormrageGUID = pCreature->GetGUID(); break; - case 22949: m_uiGathiosTheShattererGUID = pCreature->GetGUID(); break; - case 22950: m_uiHighNethermancerZerevorGUID = pCreature->GetGUID(); break; - case 22951: m_uiLadyMalandeGUID = pCreature->GetGUID(); break; - case 22952: m_uiVerasDarkshadowGUID = pCreature->GetGUID(); break; - case 23426: m_uiIllidariCouncilGUID = pCreature->GetGUID(); break; - case 23499: m_uiBloodElfCouncilVoiceGUID = pCreature->GetGUID(); break; - } + case GO_NAJENTUS_GATE: // Gate past Naj'entus (at the entrance to Supermoose's courtyards) + m_uiNajentusGateGUID = pGo->GetGUID(); + if (m_auiEncounter[TYPE_NAJENTUS] == DONE) + pGo->SetGoState(GO_STATE_ACTIVE); + break; + case GO_SUPREMUS_DOORS: // Main Temple Doors - right past Supermoose (Supremus) + m_uiMainTempleDoorsGUID = pGo->GetGUID(); + if (m_auiEncounter[TYPE_SUPREMUS] == DONE) + pGo->SetGoState(GO_STATE_ACTIVE); + break; + case GO_SHADE_OF_AKAMA: // Door close during encounter + m_uiShadeAkamaDoorGUID = pGo->GetGUID(); + break; + case GO_PRE_SHAHRAZ_DOOR: // Door leading to Mother Shahraz + m_uiShahrazPreDoorGUID = pGo->GetGUID(); + if (CanPreMotherDoorOpen()) + pGo->SetGoState(GO_STATE_ACTIVE); + break; + case GO_POST_SHAHRAZ_DOOR: // Door after shahraz + m_uiShahrazPostDoorGUID = pGo->GetGUID(); + if (m_auiEncounter[6] == DONE) + pGo->SetGoState(GO_STATE_ACTIVE); + break; + case GO_PRE_COUNCIL_DOOR: // Door leading to the Council (grand promenade) + m_uiPreCouncilDoorGUID = pGo->GetGUID(); + break; + case GO_COUNCIL_DOOR: // Door leading to the Council (inside) + m_uiCouncilDoorGUID = pGo->GetGUID(); + break; + case GO_ILLIDAN_GATE: // Gate leading to Temple Summit + m_uiIllidanGateGUID = pGo->GetGUID(); + // TODO - dependend on council state + break; + case GO_ILLIDAN_DOOR_R: // Right door at Temple Summit + m_uiIllidanDoorGUID[0] = pGo->GetGUID(); + break; + case GO_ILLIDAN_DOOR_L: // Left door at Temple Summit + m_uiIllidanDoorGUID[1] = pGo->GetGUID(); + break; } +} - void OnObjectCreate(GameObject* pGo) +bool instance_black_temple::CanPreMotherDoorOpen() +{ + if (m_auiEncounter[TYPE_SHADE] == DONE && m_auiEncounter[TYPE_GOREFIEND] == DONE && m_auiEncounter[TYPE_BLOODBOIL] == DONE && m_auiEncounter[TYPE_RELIQUIARY] == DONE) { - switch(pGo->GetEntry()) - { - case 185483: // Gate past Naj'entus (at the entrance to Supermoose's courtyards) - m_uiNajentusGateGUID = pGo->GetGUID(); - if (m_auiEncounter[0] == DONE) - pGo->SetGoState(GO_STATE_ACTIVE); - break; - case 185882: // Main Temple Doors - right past Supermoose (Supremus) - m_uiMainTempleDoorsGUID = pGo->GetGUID(); - if (m_auiEncounter[1] == DONE) - pGo->SetGoState(GO_STATE_ACTIVE); - break; - case 185478: - m_uiShadeAkamaDoorGUID = pGo->GetGUID(); // Door close during encounter - break; - case 185479: // Door leading to Mother Shahraz - m_uiShahrazPreDoorGUID = pGo->GetGUID(); - if (CanPreMotherDoorOpen()) - pGo->SetGoState(GO_STATE_ACTIVE); - break; - case 185481: // Door leading to the Council (grand promenade) - m_uiCouncilDoorGUID = pGo->GetGUID(); - if (m_auiEncounter[6] == DONE) - pGo->SetGoState(GO_STATE_ACTIVE); - break; - case 185482: // Door after shahraz - m_uiShahrazPostDoorGUID = pGo->GetGUID(); - if (m_auiEncounter[6] == DONE) - pGo->SetGoState(GO_STATE_ACTIVE); - break; - case 185905: // Gate leading to Temple Summit - m_uiIllidanGateGUID = pGo->GetGUID(); - break; - case 186261: // Right door at Temple Summit - m_uiIllidanDoorGUID[0] = pGo->GetGUID(); - break; - case 186262: // Left door at Temple Summit - m_uiIllidanDoorGUID[1] = pGo->GetGUID(); - break; - } + debug_log("SD2: Black Temple: door to Mother Shahraz can open"); + return true; } - bool CanPreMotherDoorOpen() - { - if (m_auiEncounter[2] == DONE && m_auiEncounter[3] == DONE && m_auiEncounter[4] == DONE && m_auiEncounter[5] == DONE) - { - debug_log("SD2: Black Temple: door to Mother Shahraz can open"); - return true; - } + debug_log("SD2: Black Temple: Door data to Mother Shahraz requested, cannot open yet (Encounter data: %u %u %u %u)",m_auiEncounter[2],m_auiEncounter[3],m_auiEncounter[4],m_auiEncounter[5]); + return false; +} - debug_log("SD2: Black Temple: Door data to Mother Shahraz requested, cannot open yet (Encounter data: %u %u %u %u)",m_auiEncounter[2],m_auiEncounter[3],m_auiEncounter[4],m_auiEncounter[5]); - return false; - } +void instance_black_temple::SetData(uint32 uiType, uint32 uiData) +{ + debug_log("SD2: Instance Black Temple: SetData received for type %u with data %u",uiType,uiData); - void SetData(uint32 uiType, uint32 uiData) + switch(uiType) { - debug_log("SD2: Instance Black Temple: SetData received for type %u with data %u",uiType,uiData); - - switch(uiType) - { - case TYPE_NAJENTUS: - m_auiEncounter[0] = uiData; - if (uiData == DONE) - DoUseDoorOrButton(m_uiNajentusGateGUID); - break; - case TYPE_SUPREMUS: - m_auiEncounter[1] = uiData; - if (uiData == DONE) - DoUseDoorOrButton(m_uiMainTempleDoorsGUID); - break; - case TYPE_SHADE: - m_auiEncounter[2] = uiData; - if (uiData == DONE && CanPreMotherDoorOpen()) - DoUseDoorOrButton(m_uiShahrazPreDoorGUID); - break; - case TYPE_GOREFIEND: - m_auiEncounter[3] = uiData; - if (uiData == DONE && CanPreMotherDoorOpen()) - DoUseDoorOrButton(m_uiShahrazPreDoorGUID); - break; - case TYPE_BLOODBOIL: - m_auiEncounter[4] = uiData; - if (uiData == DONE && CanPreMotherDoorOpen()) - DoUseDoorOrButton(m_uiShahrazPreDoorGUID); - break; - case TYPE_RELIQUIARY: - m_auiEncounter[5] = uiData; - if (uiData == DONE && CanPreMotherDoorOpen()) - DoUseDoorOrButton(m_uiShahrazPreDoorGUID); - break; - case TYPE_SHAHRAZ: - if (uiData == DONE) - { - DoUseDoorOrButton(m_uiCouncilDoorGUID); - DoUseDoorOrButton(m_uiShahrazPostDoorGUID); - } - m_auiEncounter[6] = uiData; - break; - case TYPE_COUNCIL: m_auiEncounter[7] = uiData; break; - case TYPE_ILLIDAN: m_auiEncounter[8] = uiData; break; - default: - error_log("SD2: Instance Black Temple: ERROR SetData = %u for type %u does not exist/not implemented.",uiType,uiData); - break; - } + case TYPE_NAJENTUS: + m_auiEncounter[uiType] = uiData; + if (uiData == DONE) + DoUseDoorOrButton(m_uiNajentusGateGUID); + break; + case TYPE_SUPREMUS: + m_auiEncounter[uiType] = uiData; + if (uiData == DONE) + DoUseDoorOrButton(m_uiMainTempleDoorsGUID); + break; + case TYPE_SHADE: + m_auiEncounter[uiType] = uiData; + if (uiData == DONE && CanPreMotherDoorOpen()) + DoUseDoorOrButton(m_uiShahrazPreDoorGUID); + break; + case TYPE_GOREFIEND: + m_auiEncounter[uiType] = uiData; + if (uiData == DONE && CanPreMotherDoorOpen()) + DoUseDoorOrButton(m_uiShahrazPreDoorGUID); + break; + case TYPE_BLOODBOIL: + m_auiEncounter[uiType] = uiData; + if (uiData == DONE && CanPreMotherDoorOpen()) + DoUseDoorOrButton(m_uiShahrazPreDoorGUID); + break; + case TYPE_RELIQUIARY: + m_auiEncounter[uiType] = uiData; + if (uiData == DONE && CanPreMotherDoorOpen()) + DoUseDoorOrButton(m_uiShahrazPreDoorGUID); + break; + case TYPE_SHAHRAZ: + if (uiData == DONE) + DoUseDoorOrButton(m_uiShahrazPostDoorGUID); + m_auiEncounter[uiType] = uiData; + break; + case TYPE_COUNCIL: + DoUseDoorOrButton(m_uiCouncilDoorGUID); + m_auiEncounter[uiType] = uiData; + break; + case TYPE_ILLIDAN: m_auiEncounter[uiType] = uiData; break; + default: + error_log("SD2: Instance Black Temple: ERROR SetData = %u for type %u does not exist/not implemented.", uiType, uiData); + break; + } - if (uiData == DONE) - { - OUT_SAVE_INST_DATA; + if (uiData == DONE) + { + OUT_SAVE_INST_DATA; - std::ostringstream saveStream; - saveStream << m_auiEncounter[0] << " " << m_auiEncounter[1] << " " << m_auiEncounter[2] << " " - << m_auiEncounter[3] << " " << m_auiEncounter[4] << " " << m_auiEncounter[5] << " " - << m_auiEncounter[6] << " " << m_auiEncounter[7] << " " << m_auiEncounter[8]; + std::ostringstream saveStream; + saveStream << m_auiEncounter[0] << " " << m_auiEncounter[1] << " " << m_auiEncounter[2] << " " + << m_auiEncounter[3] << " " << m_auiEncounter[4] << " " << m_auiEncounter[5] << " " + << m_auiEncounter[6] << " " << m_auiEncounter[7] << " " << m_auiEncounter[8]; - strInstData = saveStream.str(); + m_strInstData = saveStream.str(); - SaveToDB(); - OUT_SAVE_INST_DATA_COMPLETE; - } + SaveToDB(); + OUT_SAVE_INST_DATA_COMPLETE; } +} - uint32 GetData(uint32 uiType) +uint32 instance_black_temple::GetData(uint32 uiType) +{ + switch(uiType) { - switch(uiType) - { - case TYPE_NAJENTUS: return m_auiEncounter[0]; - case TYPE_SUPREMUS: return m_auiEncounter[1]; - case TYPE_SHADE: return m_auiEncounter[2]; - case TYPE_GOREFIEND: return m_auiEncounter[3]; - case TYPE_BLOODBOIL: return m_auiEncounter[4]; - case TYPE_RELIQUIARY: return m_auiEncounter[5]; - case TYPE_SHAHRAZ: return m_auiEncounter[6]; - case TYPE_COUNCIL: return m_auiEncounter[7]; - case TYPE_ILLIDAN: return m_auiEncounter[8]; - } - - return 0; + case TYPE_NAJENTUS: return m_auiEncounter[0]; + case TYPE_SUPREMUS: return m_auiEncounter[1]; + case TYPE_SHADE: return m_auiEncounter[2]; + case TYPE_GOREFIEND: return m_auiEncounter[3]; + case TYPE_BLOODBOIL: return m_auiEncounter[4]; + case TYPE_RELIQUIARY: return m_auiEncounter[5]; + case TYPE_SHAHRAZ: return m_auiEncounter[6]; + case TYPE_COUNCIL: return m_auiEncounter[7]; + case TYPE_ILLIDAN: return m_auiEncounter[8]; + default: + return 0; } +} - uint64 GetData64(uint32 uiData) +uint64 instance_black_temple::GetData64(uint32 uiData) +{ + switch(uiData) { - switch(uiData) - { - case DATA_HIGHWARLORDNAJENTUS: return m_uiNajentusGUID; - case DATA_AKAMA: return m_uiAkamaGUID; - case DATA_AKAMA_SHADE: return m_uiAkama_ShadeGUID; - case DATA_SHADEOFAKAMA: return m_uiShadeOfAkamaGUID; - case DATA_SUPREMUS: return m_uiSupremusGUID; - case DATA_ILLIDANSTORMRAGE: return m_uiIllidanStormrageGUID; - case DATA_GATHIOSTHESHATTERER: return m_uiGathiosTheShattererGUID; - case DATA_HIGHNETHERMANCERZEREVOR: return m_uiHighNethermancerZerevorGUID; - case DATA_LADYMALANDE: return m_uiLadyMalandeGUID; - case DATA_VERASDARKSHADOW: return m_uiVerasDarkshadowGUID; - case DATA_ILLIDARICOUNCIL: return m_uiIllidariCouncilGUID; - case DATA_GAMEOBJECT_NAJENTUS_GATE: return m_uiNajentusGateGUID; - case DATA_GAMEOBJECT_ILLIDAN_GATE: return m_uiIllidanGateGUID; - case DATA_GAMEOBJECT_ILLIDAN_DOOR_R: return m_uiIllidanDoorGUID[0]; - case DATA_GAMEOBJECT_ILLIDAN_DOOR_L: return m_uiIllidanDoorGUID[1]; - case DATA_GAMEOBJECT_SUPREMUS_DOORS: return m_uiMainTempleDoorsGUID; - case DATA_BLOOD_ELF_COUNCIL_VOICE: return m_uiBloodElfCouncilVoiceGUID; - case DATA_GO_PRE_SHAHRAZ_DOOR: return m_uiShahrazPreDoorGUID; - case DATA_GO_POST_SHAHRAZ_DOOR: return m_uiShahrazPostDoorGUID; - case DATA_GO_COUNCIL_DOOR: return m_uiCouncilDoorGUID; - } - - return 0; + case NPC_WARLORD_NAJENTUS: return m_uiNajentusGUID; + case NPC_AKAMA: return m_uiAkamaGUID; + case NPC_AKAMA_SHADE: return m_uiAkama_ShadeGUID; + case NPC_SHADE_OF_AKAMA: return m_uiShadeOfAkamaGUID; + case NPC_SUPREMUS: return m_uiSupremusGUID; + case NPC_ILLIDAN_STORMRAGE: return m_uiIllidanStormrageGUID; + case NPC_GATHIOS: return m_uiGathiosTheShattererGUID; + case NPC_ZEREVOR: return m_uiHighNethermancerZerevorGUID; + case NPC_LADY_MALANDE: return m_uiLadyMalandeGUID; + case NPC_VERAS: return m_uiVerasDarkshadowGUID; + case NPC_ILLIDARI_COUNCIL: return m_uiIllidariCouncilGUID; + case GO_NAJENTUS_GATE: return m_uiNajentusGateGUID; + case GO_ILLIDAN_GATE: return m_uiIllidanGateGUID; + case GO_ILLIDAN_DOOR_R: return m_uiIllidanDoorGUID[0]; + case GO_ILLIDAN_DOOR_L: return m_uiIllidanDoorGUID[1]; + case GO_SUPREMUS_DOORS: return m_uiMainTempleDoorsGUID; + case NPC_COUNCIL_VOICE: return m_uiBloodElfCouncilVoiceGUID; + case GO_PRE_SHAHRAZ_DOOR: return m_uiShahrazPreDoorGUID; + case GO_POST_SHAHRAZ_DOOR: return m_uiShahrazPostDoorGUID; + case GO_PRE_COUNCIL_DOOR: return m_uiPreCouncilDoorGUID; + case GO_COUNCIL_DOOR: return m_uiCouncilDoorGUID; + default: + return 0; } +} - const char* Save() +void instance_black_temple::Load(const char* chrIn) +{ + if (!chrIn) { - return strInstData.c_str(); + OUT_LOAD_INST_DATA_FAIL; + return; } - void Load(const char* chrIn) - { - if (!chrIn) - { - OUT_LOAD_INST_DATA_FAIL; - return; - } - - OUT_LOAD_INST_DATA(chrIn); + OUT_LOAD_INST_DATA(chrIn); - std::istringstream loadStream(chrIn); - loadStream >> m_auiEncounter[0] >> m_auiEncounter[1] >> m_auiEncounter[2] >> m_auiEncounter[3] - >> m_auiEncounter[4] >> m_auiEncounter[5] >> m_auiEncounter[6] >> m_auiEncounter[7] >> m_auiEncounter[8]; + std::istringstream loadStream(chrIn); + loadStream >> m_auiEncounter[0] >> m_auiEncounter[1] >> m_auiEncounter[2] >> m_auiEncounter[3] + >> m_auiEncounter[4] >> m_auiEncounter[5] >> m_auiEncounter[6] >> m_auiEncounter[7] >> m_auiEncounter[8]; - for(uint8 i = 0; i < MAX_ENCOUNTER; ++i) - if (m_auiEncounter[i] == IN_PROGRESS) // Do not load an encounter as "In Progress" - reset it instead. - m_auiEncounter[i] = NOT_STARTED; + for(uint8 i = 0; i < MAX_ENCOUNTER; ++i) + if (m_auiEncounter[i] == IN_PROGRESS) // Do not load an encounter as "In Progress" - reset it instead. + m_auiEncounter[i] = NOT_STARTED; - OUT_LOAD_INST_DATA_COMPLETE; - } -}; + OUT_LOAD_INST_DATA_COMPLETE; +} InstanceData* GetInstanceData_instance_black_temple(Map* pMap) { @@ -324,9 +298,10 @@ InstanceData* GetInstanceData_instance_black_temple(Map* pMap) void AddSC_instance_black_temple() { - Script* newscript; - newscript = new Script; - newscript->Name = "instance_black_temple"; - newscript->GetInstanceData = &GetInstanceData_instance_black_temple; - newscript->RegisterSelf(); + Script* pNewScript; + + pNewScript = new Script; + pNewScript->Name = "instance_black_temple"; + pNewScript->GetInstanceData = &GetInstanceData_instance_black_temple; + pNewScript->RegisterSelf(); } diff --git a/scripts/outland/blades_edge_mountains.cpp b/scripts/outland/blades_edge_mountains.cpp index 90f9261..db55d94 100644 --- a/scripts/outland/blades_edge_mountains.cpp +++ b/scripts/outland/blades_edge_mountains.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or @@ -251,7 +251,7 @@ struct MANGOS_DLL_DECL npc_daranelleAI : public ScriptedAI DoScriptText(SAY_SPELL_INFLUENCE, m_creature, pWho); //TODO: Move the below to updateAI and run if this statement == true - ((Player*)pWho)->KilledMonsterCredit(NPC_KALIRI_AURA_DISPEL, m_creature->GetGUID()); + ((Player*)pWho)->KilledMonsterCredit(NPC_KALIRI_AURA_DISPEL, m_creature->GetObjectGuid()); pWho->RemoveAurasDueToSpell(SPELL_LASHHAN_CHANNEL); } } diff --git a/scripts/outland/boss_doomlord_kazzak.cpp b/scripts/outland/boss_doomlord_kazzak.cpp index 6ae67f9..21dfc7e 100644 --- a/scripts/outland/boss_doomlord_kazzak.cpp +++ b/scripts/outland/boss_doomlord_kazzak.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/scripts/outland/boss_doomwalker.cpp b/scripts/outland/boss_doomwalker.cpp index a719f24..7d1b779 100644 --- a/scripts/outland/boss_doomwalker.cpp +++ b/scripts/outland/boss_doomwalker.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/scripts/outland/coilfang_reservoir/serpent_shrine/boss_fathomlord_karathress.cpp b/scripts/outland/coilfang_reservoir/serpent_shrine/boss_fathomlord_karathress.cpp index 8639580..9d2175e 100644 --- a/scripts/outland/coilfang_reservoir/serpent_shrine/boss_fathomlord_karathress.cpp +++ b/scripts/outland/coilfang_reservoir/serpent_shrine/boss_fathomlord_karathress.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or @@ -62,7 +62,7 @@ enum //Caribdis Spells SPELL_WATER_BOLT_VOLLEY = 38335, - SPELL_TIDAL_SURGE = 38353, // triggers 38357 + SPELL_TIDAL_SURGE = 38358, // triggers 38353 which then triggers 38357 SPELL_HEAL = 38330, SPELL_SUMMON_CYCLONE = 38337, // summons creature 22104 which uses spell 29538 @@ -87,8 +87,8 @@ struct MANGOS_DLL_DECL boss_fathomlord_karathressAI : public ScriptedAI ScriptedInstance* m_pInstance; // timers - uint32 m_uiCataclysmicBolt_Timer; - uint32 m_uiEnrage_Timer; + uint32 m_uiCataclysmicBoltTimer; + uint32 m_uiEnrageTimer; bool m_bBlessingOfTides_MobsChecked; @@ -96,8 +96,8 @@ struct MANGOS_DLL_DECL boss_fathomlord_karathressAI : public ScriptedAI void Reset() { - m_uiCataclysmicBolt_Timer = 10000; - m_uiEnrage_Timer = 600000; + m_uiCataclysmicBoltTimer = 10000; + m_uiEnrageTimer = 600000; m_bBlessingOfTides_MobsChecked = false; for(uint8 i = 0; i < MAX_ADVISORS; ++i) @@ -115,6 +115,7 @@ struct MANGOS_DLL_DECL boss_fathomlord_karathressAI : public ScriptedAI m_pInstance->SetData(TYPE_KARATHRESS_EVENT, NOT_STARTED); } + // TODO - unneeded workaround - the spell should be cast by adviser onto karathress; text can also be handled in their AI // select the spell and the text based on the advisor which died void EventAdvisorDeath(uint8 uiAdvisor) { @@ -140,7 +141,7 @@ struct MANGOS_DLL_DECL boss_fathomlord_karathressAI : public ScriptedAI break; default: error_log("SD2: invalid advisor (id %u) for karathress!", uiAdvisor); - break; + return; } DoScriptText(iSayGainAbility, m_creature); @@ -218,8 +219,8 @@ struct MANGOS_DLL_DECL boss_fathomlord_karathressAI : public ScriptedAI return; } - //m_uiCataclysmicBolt_Timer - if (m_uiCataclysmicBolt_Timer < uiDiff) + //m_uiCataclysmicBoltTimer + if (m_uiCataclysmicBoltTimer < uiDiff) { //select a random unit other than the main tank Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 1); @@ -228,10 +229,11 @@ struct MANGOS_DLL_DECL boss_fathomlord_karathressAI : public ScriptedAI if (!pTarget) pTarget = m_creature->getVictim(); - m_creature->CastSpell(pTarget, SPELL_CATACLYSMIC_BOLT, false); - - m_uiCataclysmicBolt_Timer = 10000; - }else m_uiCataclysmicBolt_Timer -= uiDiff; + if (DoCastSpellIfCan(pTarget, SPELL_CATACLYSMIC_BOLT) == CAST_OK) + m_uiCataclysmicBoltTimer = 10000; + } + else + m_uiCataclysmicBoltTimer -= uiDiff; //hp under 75% if (!m_bBlessingOfTides_MobsChecked && m_creature->GetHealthPercent() < 75.0f) @@ -256,12 +258,14 @@ struct MANGOS_DLL_DECL boss_fathomlord_karathressAI : public ScriptedAI m_bBlessingOfTides_MobsChecked = true; } - //m_uiEnrage_Timer - if (m_uiEnrage_Timer < uiDiff) + //m_uiEnrageTimer + if (m_uiEnrageTimer < uiDiff) { - DoCastSpellIfCan(m_creature, SPELL_ENRAGE); - m_uiEnrage_Timer = 90000; - }else m_uiEnrage_Timer -= uiDiff; + if (DoCastSpellIfCan(m_creature, SPELL_ENRAGE) == CAST_OK) + m_uiEnrageTimer = 90000; + } + else + m_uiEnrageTimer -= uiDiff; DoMeleeAttackIfReady(); } @@ -274,11 +278,12 @@ struct MANGOS_DLL_DECL Advisor_Base_AI : public ScriptedAI { m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); } + protected: - uint8 m_uiAdvisor; + uint8 m_uiAdvisor; public: - ScriptedInstance* m_pInstance; + ScriptedInstance* m_pInstance; void JustReachedHome() { @@ -321,21 +326,21 @@ struct MANGOS_DLL_DECL boss_fathomguard_sharkkisAI : public Advisor_Base_AI } // timers - uint32 m_uiHurlTrident_Timer; - uint32 m_uiLeechingThrow_Timer; - uint32 m_uiTheBeastWithin_Timer; - uint32 m_uiPet_Timer; + uint32 m_uiHurlTridentTimer; + uint32 m_uiLeechingThrowTimer; + uint32 m_uiTheBeastWithinTimer; + uint32 m_uiPetTimer; bool m_bIsPetCheckNeeded; void Reset() { - m_uiHurlTrident_Timer = 2500; - m_uiLeechingThrow_Timer = 20000; - m_uiTheBeastWithin_Timer = 30000; - m_uiPet_Timer = 10000; + m_uiHurlTridentTimer = 2500; + m_uiLeechingThrowTimer = 20000; + m_uiTheBeastWithinTimer = 30000; + m_uiPetTimer = 10000; - m_bIsPetCheckNeeded = true; + m_bIsPetCheckNeeded = true; } void AttackStart(Unit* pWho) @@ -358,7 +363,7 @@ struct MANGOS_DLL_DECL boss_fathomguard_sharkkisAI : public Advisor_Base_AI { if (pSummoned->IsPet()) { - m_uiPet_Timer = 10000; + m_uiPetTimer = 10000; m_bIsPetCheckNeeded = false; } } @@ -393,40 +398,46 @@ struct MANGOS_DLL_DECL boss_fathomguard_sharkkisAI : public Advisor_Base_AI //after 10 seconds: spawn pet if not exist if (m_bIsPetCheckNeeded) { - if (m_uiPet_Timer < uiDiff) + if (m_uiPetTimer < uiDiff) { if (!m_creature->GetPet()) DoCastSpellIfCan(m_creature, urand(0,1) ? SPELL_SUMMON_FATHOM_LURKER : SPELL_SUMMON_FATHOM_SPOREBAT); } else - m_uiPet_Timer -= uiDiff; + m_uiPetTimer -= uiDiff; } - //m_uiHurlTrident_Timer - if (m_uiHurlTrident_Timer < uiDiff) + //m_uiHurlTridentTimer + if (m_uiHurlTridentTimer < uiDiff) { - if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM,0)) + if (Unit* pTarget = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) { if (!m_creature->CanReachWithMeleeAttack(pTarget)) DoCastSpellIfCan(pTarget, SPELL_HURL_TRIDENT); } - m_uiHurlTrident_Timer = 5000; - }else m_uiHurlTrident_Timer -= uiDiff; + m_uiHurlTridentTimer = 5000; + } + else + m_uiHurlTridentTimer -= uiDiff; - //m_uiLeechingThrow_Timer - if (m_uiLeechingThrow_Timer < uiDiff) + //m_uiLeechingThrowTimer + if (m_uiLeechingThrowTimer < uiDiff) { - DoCastSpellIfCan(m_creature->getVictim(), SPELL_LEECHING_THROW); - m_uiLeechingThrow_Timer = 20000; - }else m_uiLeechingThrow_Timer -= uiDiff; + if (DoCastSpellIfCan(m_creature->getVictim(), SPELL_LEECHING_THROW) == CAST_OK) + m_uiLeechingThrowTimer = 20000; + } + else + m_uiLeechingThrowTimer -= uiDiff; - //m_uiTheBeastWithin_Timer - if (m_uiTheBeastWithin_Timer < uiDiff) + //m_uiTheBeastWithinTimer + if (m_uiTheBeastWithinTimer < uiDiff) { - DoCastSpellIfCan(m_creature, SPELL_THE_BEAST_WITHIN); - m_uiTheBeastWithin_Timer = 30000; - }else m_uiTheBeastWithin_Timer -= uiDiff; + if (DoCastSpellIfCan(m_creature, SPELL_THE_BEAST_WITHIN) == CAST_OK) + m_uiTheBeastWithinTimer = 30000; + } + else + m_uiTheBeastWithinTimer -= uiDiff; DoMeleeAttackIfReady(); } @@ -442,11 +453,11 @@ struct MANGOS_DLL_DECL boss_fathomguard_tidalvessAI : public Advisor_Base_AI } // timers - uint32 m_uiFrostShock_Timer; + uint32 m_uiFrostShockTimer; void Reset() { - m_uiFrostShock_Timer = 25000; + m_uiFrostShockTimer = 25000; } void UpdateAI(const uint32 uiDiff) @@ -470,12 +481,14 @@ struct MANGOS_DLL_DECL boss_fathomguard_tidalvessAI : public Advisor_Base_AI return; } - //m_uiFrostShock_Timer - if (m_uiFrostShock_Timer < uiDiff) + //m_uiFrostShockTimer + if (m_uiFrostShockTimer < uiDiff) { DoCastSpellIfCan(m_creature->getVictim(), SPELL_FROST_SHOCK); - m_uiFrostShock_Timer = urand(25000, 30000); - }else m_uiFrostShock_Timer -= uiDiff; + m_uiFrostShockTimer = urand(25000, 30000); + } + else + m_uiFrostShockTimer -= uiDiff; DoMeleeAttackIfReady(); } @@ -491,15 +504,15 @@ struct MANGOS_DLL_DECL boss_fathomguard_caribdisAI : public Advisor_Base_AI } // timers - uint32 m_uiWaterBoltVolley_Timer; - uint32 m_uiTidalSurge_Timer; - uint32 m_uiHeal_Timer; + uint32 m_uiWaterBoltVolleyTimer; + uint32 m_uiTidalSurgeTimer; + uint32 m_uiHealTimer; void Reset() { - m_uiWaterBoltVolley_Timer = 35000; - m_uiTidalSurge_Timer = urand(15000, 20000); - m_uiHeal_Timer = 55000; + m_uiWaterBoltVolleyTimer = 35000; + m_uiTidalSurgeTimer = urand(15000, 20000); + m_uiHealTimer = 55000; } void UpdateAI(const uint32 uiDiff) @@ -523,23 +536,26 @@ struct MANGOS_DLL_DECL boss_fathomguard_caribdisAI : public Advisor_Base_AI return; } - //m_uiWaterBoltVolley_Timer - if (m_uiWaterBoltVolley_Timer < uiDiff) + //m_uiWaterBoltVolleyTimer + if (m_uiWaterBoltVolleyTimer < uiDiff) { - DoCastSpellIfCan(m_creature->getVictim(), SPELL_WATER_BOLT_VOLLEY); - m_uiWaterBoltVolley_Timer = 30000; - }else m_uiWaterBoltVolley_Timer -= uiDiff; + if (DoCastSpellIfCan(m_creature, SPELL_WATER_BOLT_VOLLEY) == CAST_OK) + m_uiWaterBoltVolleyTimer = 30000; + } + else + m_uiWaterBoltVolleyTimer -= uiDiff; - //m_uiTidalSurge_Timer - if (m_uiTidalSurge_Timer < uiDiff) + //m_uiTidalSurgeTimer + if (m_uiTidalSurgeTimer < uiDiff) { - // the victim has to cast it on himself because in the spell.dbc the EffectImplicitTargetA1 is 1 (TARGET_SELF) - m_creature->getVictim()->CastSpell(m_creature->getVictim(), SPELL_TIDAL_SURGE, true); - m_uiTidalSurge_Timer = urand(15000, 20000); - }else m_uiTidalSurge_Timer -= uiDiff; + if (DoCastSpellIfCan(m_creature, SPELL_TIDAL_SURGE) == CAST_OK) + m_uiTidalSurgeTimer = urand(15000, 20000); + } + else + m_uiTidalSurgeTimer -= uiDiff; - //m_uiHeal_Timer - if (m_uiHeal_Timer < uiDiff) + //m_uiHealTimer + if (m_uiHealTimer < uiDiff) { // It can be cast on any of the mobs Unit* pUnit = NULL; @@ -554,14 +570,18 @@ struct MANGOS_DLL_DECL boss_fathomguard_caribdisAI : public Advisor_Base_AI case 3: pUnit = m_creature; break; } } - else - pUnit = m_creature; - if (pUnit && pUnit->isAlive()) - DoCastSpellIfCan(pUnit, SPELL_HEAL); + if (!pUnit) + pUnit = m_creature; - m_uiHeal_Timer = 60000; - }else m_uiHeal_Timer -= uiDiff; + if (pUnit->isAlive()) + { + if (DoCastSpellIfCan(pUnit, SPELL_HEAL) == CAST_OK) + m_uiHealTimer = 60000; + } + } + else + m_uiHealTimer -= uiDiff; DoMeleeAttackIfReady(); } @@ -589,24 +609,25 @@ CreatureAI* GetAI_boss_fathomguard_caribdis(Creature* pCreature) void AddSC_boss_fathomlord_karathress() { - Script *newscript; - newscript = new Script; - newscript->Name = "boss_fathomlord_karathress"; - newscript->GetAI = &GetAI_boss_fathomlord_karathress; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "boss_fathomguard_sharkkis"; - newscript->GetAI = &GetAI_boss_fathomguard_sharkkis; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "boss_fathomguard_tidalvess"; - newscript->GetAI = &GetAI_boss_fathomguard_tidalvess; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "boss_fathomguard_caribdis"; - newscript->GetAI = &GetAI_boss_fathomguard_caribdis; - newscript->RegisterSelf(); + Script* pNewScript; + + pNewScript = new Script; + pNewScript->Name = "boss_fathomlord_karathress"; + pNewScript->GetAI = &GetAI_boss_fathomlord_karathress; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "boss_fathomguard_sharkkis"; + pNewScript->GetAI = &GetAI_boss_fathomguard_sharkkis; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "boss_fathomguard_tidalvess"; + pNewScript->GetAI = &GetAI_boss_fathomguard_tidalvess; + pNewScript->RegisterSelf(); + + pNewScript = new Script; + pNewScript->Name = "boss_fathomguard_caribdis"; + pNewScript->GetAI = &GetAI_boss_fathomguard_caribdis; + pNewScript->RegisterSelf(); } diff --git a/scripts/outland/coilfang_reservoir/serpent_shrine/boss_hydross_the_unstable.cpp b/scripts/outland/coilfang_reservoir/serpent_shrine/boss_hydross_the_unstable.cpp index 2b6e114..e9daa90 100644 --- a/scripts/outland/coilfang_reservoir/serpent_shrine/boss_hydross_the_unstable.cpp +++ b/scripts/outland/coilfang_reservoir/serpent_shrine/boss_hydross_the_unstable.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/scripts/outland/coilfang_reservoir/serpent_shrine/boss_lady_vashj.cpp b/scripts/outland/coilfang_reservoir/serpent_shrine/boss_lady_vashj.cpp index dd55617..d119f64 100644 --- a/scripts/outland/coilfang_reservoir/serpent_shrine/boss_lady_vashj.cpp +++ b/scripts/outland/coilfang_reservoir/serpent_shrine/boss_lady_vashj.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/scripts/outland/coilfang_reservoir/serpent_shrine/boss_leotheras_the_blind.cpp b/scripts/outland/coilfang_reservoir/serpent_shrine/boss_leotheras_the_blind.cpp index 2c14893..9906985 100644 --- a/scripts/outland/coilfang_reservoir/serpent_shrine/boss_leotheras_the_blind.cpp +++ b/scripts/outland/coilfang_reservoir/serpent_shrine/boss_leotheras_the_blind.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/scripts/outland/coilfang_reservoir/serpent_shrine/boss_morogrim_tidewalker.cpp b/scripts/outland/coilfang_reservoir/serpent_shrine/boss_morogrim_tidewalker.cpp index 945445d..36b5833 100644 --- a/scripts/outland/coilfang_reservoir/serpent_shrine/boss_morogrim_tidewalker.cpp +++ b/scripts/outland/coilfang_reservoir/serpent_shrine/boss_morogrim_tidewalker.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/scripts/outland/coilfang_reservoir/serpent_shrine/boss_the_lurker_below.cpp b/scripts/outland/coilfang_reservoir/serpent_shrine/boss_the_lurker_below.cpp index 6857a53..82d5ddc 100644 --- a/scripts/outland/coilfang_reservoir/serpent_shrine/boss_the_lurker_below.cpp +++ b/scripts/outland/coilfang_reservoir/serpent_shrine/boss_the_lurker_below.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/scripts/outland/coilfang_reservoir/serpent_shrine/instance_serpent_shrine.cpp b/scripts/outland/coilfang_reservoir/serpent_shrine/instance_serpent_shrine.cpp index 76d4958..84326c0 100644 --- a/scripts/outland/coilfang_reservoir/serpent_shrine/instance_serpent_shrine.cpp +++ b/scripts/outland/coilfang_reservoir/serpent_shrine/instance_serpent_shrine.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/scripts/outland/coilfang_reservoir/serpent_shrine/serpent_shrine.h b/scripts/outland/coilfang_reservoir/serpent_shrine/serpent_shrine.h index 492d3f9..a87229f 100644 --- a/scripts/outland/coilfang_reservoir/serpent_shrine/serpent_shrine.h +++ b/scripts/outland/coilfang_reservoir/serpent_shrine/serpent_shrine.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/scripts/outland/coilfang_reservoir/slave_pens/boss_ahune.cpp b/scripts/outland/coilfang_reservoir/slave_pens/boss_ahune.cpp index 330acf6..fbb5c71 100644 --- a/scripts/outland/coilfang_reservoir/slave_pens/boss_ahune.cpp +++ b/scripts/outland/coilfang_reservoir/slave_pens/boss_ahune.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/scripts/outland/coilfang_reservoir/steam_vault/boss_hydromancer_thespia.cpp b/scripts/outland/coilfang_reservoir/steam_vault/boss_hydromancer_thespia.cpp index 4b58e0b..115b5fc 100644 --- a/scripts/outland/coilfang_reservoir/steam_vault/boss_hydromancer_thespia.cpp +++ b/scripts/outland/coilfang_reservoir/steam_vault/boss_hydromancer_thespia.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/scripts/outland/coilfang_reservoir/steam_vault/boss_mekgineer_steamrigger.cpp b/scripts/outland/coilfang_reservoir/steam_vault/boss_mekgineer_steamrigger.cpp index c684030..c494dd8 100644 --- a/scripts/outland/coilfang_reservoir/steam_vault/boss_mekgineer_steamrigger.cpp +++ b/scripts/outland/coilfang_reservoir/steam_vault/boss_mekgineer_steamrigger.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/scripts/outland/coilfang_reservoir/steam_vault/boss_warlord_kalithresh.cpp b/scripts/outland/coilfang_reservoir/steam_vault/boss_warlord_kalithresh.cpp index 300fa3b..feae1a4 100644 --- a/scripts/outland/coilfang_reservoir/steam_vault/boss_warlord_kalithresh.cpp +++ b/scripts/outland/coilfang_reservoir/steam_vault/boss_warlord_kalithresh.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/scripts/outland/coilfang_reservoir/steam_vault/instance_steam_vault.cpp b/scripts/outland/coilfang_reservoir/steam_vault/instance_steam_vault.cpp index aef9516..3b2b3ea 100644 --- a/scripts/outland/coilfang_reservoir/steam_vault/instance_steam_vault.cpp +++ b/scripts/outland/coilfang_reservoir/steam_vault/instance_steam_vault.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/scripts/outland/coilfang_reservoir/steam_vault/steam_vault.h b/scripts/outland/coilfang_reservoir/steam_vault/steam_vault.h index 05f1130..5514f10 100644 --- a/scripts/outland/coilfang_reservoir/steam_vault/steam_vault.h +++ b/scripts/outland/coilfang_reservoir/steam_vault/steam_vault.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/scripts/outland/coilfang_reservoir/underbog/boss_hungarfen.cpp b/scripts/outland/coilfang_reservoir/underbog/boss_hungarfen.cpp index b4ac235..d9e3d53 100644 --- a/scripts/outland/coilfang_reservoir/underbog/boss_hungarfen.cpp +++ b/scripts/outland/coilfang_reservoir/underbog/boss_hungarfen.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/scripts/outland/gruuls_lair/boss_gruul.cpp b/scripts/outland/gruuls_lair/boss_gruul.cpp index 1aba7b7..f1c59aa 100644 --- a/scripts/outland/gruuls_lair/boss_gruul.cpp +++ b/scripts/outland/gruuls_lair/boss_gruul.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/scripts/outland/gruuls_lair/boss_high_king_maulgar.cpp b/scripts/outland/gruuls_lair/boss_high_king_maulgar.cpp index e31e7fe..658c91e 100644 --- a/scripts/outland/gruuls_lair/boss_high_king_maulgar.cpp +++ b/scripts/outland/gruuls_lair/boss_high_king_maulgar.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/scripts/outland/gruuls_lair/gruuls_lair.h b/scripts/outland/gruuls_lair/gruuls_lair.h index 7a7c661..35d040b 100644 --- a/scripts/outland/gruuls_lair/gruuls_lair.h +++ b/scripts/outland/gruuls_lair/gruuls_lair.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/scripts/outland/gruuls_lair/instance_gruuls_lair.cpp b/scripts/outland/gruuls_lair/instance_gruuls_lair.cpp index b15cd59..6ce5cea 100644 --- a/scripts/outland/gruuls_lair/instance_gruuls_lair.cpp +++ b/scripts/outland/gruuls_lair/instance_gruuls_lair.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/scripts/outland/hellfire_citadel/blood_furnace/blood_furnace.h b/scripts/outland/hellfire_citadel/blood_furnace/blood_furnace.h index fa6cef0..82d5761 100644 --- a/scripts/outland/hellfire_citadel/blood_furnace/blood_furnace.h +++ b/scripts/outland/hellfire_citadel/blood_furnace/blood_furnace.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/scripts/outland/hellfire_citadel/blood_furnace/boss_broggok.cpp b/scripts/outland/hellfire_citadel/blood_furnace/boss_broggok.cpp index 77150ff..c86898c 100644 --- a/scripts/outland/hellfire_citadel/blood_furnace/boss_broggok.cpp +++ b/scripts/outland/hellfire_citadel/blood_furnace/boss_broggok.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/scripts/outland/hellfire_citadel/blood_furnace/boss_kelidan_the_breaker.cpp b/scripts/outland/hellfire_citadel/blood_furnace/boss_kelidan_the_breaker.cpp index 0c23c89..fbe058d 100644 --- a/scripts/outland/hellfire_citadel/blood_furnace/boss_kelidan_the_breaker.cpp +++ b/scripts/outland/hellfire_citadel/blood_furnace/boss_kelidan_the_breaker.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/scripts/outland/hellfire_citadel/blood_furnace/boss_the_maker.cpp b/scripts/outland/hellfire_citadel/blood_furnace/boss_the_maker.cpp index bba4eeb..75ea524 100644 --- a/scripts/outland/hellfire_citadel/blood_furnace/boss_the_maker.cpp +++ b/scripts/outland/hellfire_citadel/blood_furnace/boss_the_maker.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/scripts/outland/hellfire_citadel/blood_furnace/instance_blood_furnace.cpp b/scripts/outland/hellfire_citadel/blood_furnace/instance_blood_furnace.cpp index 2ea23f2..d8d48c9 100644 --- a/scripts/outland/hellfire_citadel/blood_furnace/instance_blood_furnace.cpp +++ b/scripts/outland/hellfire_citadel/blood_furnace/instance_blood_furnace.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/scripts/outland/hellfire_citadel/hellfire_ramparts/boss_nazan_and_vazruden.cpp b/scripts/outland/hellfire_citadel/hellfire_ramparts/boss_nazan_and_vazruden.cpp index 3c904ac..e33f289 100644 --- a/scripts/outland/hellfire_citadel/hellfire_ramparts/boss_nazan_and_vazruden.cpp +++ b/scripts/outland/hellfire_citadel/hellfire_ramparts/boss_nazan_and_vazruden.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or @@ -40,8 +40,8 @@ enum SPELL_REVENGE = 40392, //nazan - SPELL_FIREBALL = 30691, - SPELL_H_FIREBALL = 36920, + SPELL_FIREBALL = 30691, // TODO: IDs not verified + SPELL_FIREBALL_H = 36920, SPELL_CONE_OF_FIRE = 30926, SPELL_H_CONE_OF_FIRE = 36921, @@ -50,7 +50,7 @@ enum //misc POINT_ID_CENTER = 100, - POINT_ID_WAITING = 101, + POINT_ID_FLYING = 101, POINT_ID_COMBAT = 102, NPC_VAZRUDEN_HERALD = 17307, @@ -58,7 +58,7 @@ enum NPC_VAZRUDEN = 17537 }; -const float afCenterPos[3] = {-1399.401f, 1736.365f, 86.008f}; //moves here to drop off nazan +const float afCenterPos[3] = {-1399.401f, 1736.365f, 87.008f}; //moves here to drop off nazan const float afCombatPos[3] = {-1413.848f, 1754.019f, 83.146f}; //moves here when decending struct MANGOS_DLL_DECL boss_vazrudenAI : public ScriptedAI @@ -154,7 +154,12 @@ struct MANGOS_DLL_DECL boss_vazruden_heraldAI : public ScriptedAI ScriptedInstance* m_pInstance; bool m_bIsRegularMode; + bool m_bIsEventInProgress; uint32 m_uiMovementTimer; + uint32 m_uiFireballTimer; + + uint64 m_uiLastSeenPlayerGUID; + uint64 m_uiVazrudenGUID; void Reset() { @@ -164,10 +169,25 @@ struct MANGOS_DLL_DECL boss_vazruden_heraldAI : public ScriptedAI m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); m_uiMovementTimer = 0; + m_bIsEventInProgress = false; + m_uiLastSeenPlayerGUID = 0; + m_uiVazrudenGUID = 0; + m_uiFireballTimer = 0; + + // see boss_onyxia + // sort of a hack, it is unclear how this really work but the values appear to be valid + m_creature->SetByteValue(UNIT_FIELD_BYTES_1, 3, UNIT_BYTE1_FLAG_ALWAYS_STAND | UNIT_BYTE1_FLAG_UNK_2); + m_creature->AddSplineFlag(SPLINEFLAG_FLYING); } void MoveInLineOfSight(Unit* pWho) { + if (m_bIsEventInProgress && !m_uiLastSeenPlayerGUID && pWho->GetTypeId() == TYPEID_PLAYER && pWho->isAlive() && !((Player*)pWho)->isGameMaster()) + { + if (m_creature->IsWithinDistInMap(pWho, 40.0f)) + m_uiLastSeenPlayerGUID = pWho->GetGUID(); + } + if (m_pInstance && m_pInstance->GetData(TYPE_NAZAN) != IN_PROGRESS) return; @@ -181,24 +201,43 @@ struct MANGOS_DLL_DECL boss_vazruden_heraldAI : public ScriptedAI if (uiType == WAYPOINT_MOTION_TYPE) { - if (m_uiMovementTimer) + if (m_uiMovementTimer || m_bIsEventInProgress) return; if (m_pInstance->GetData(TYPE_NAZAN) == SPECIAL) { m_creature->SetCombatStartPosition(m_creature->GetPositionX(), m_creature->GetPositionY(), m_creature->GetPositionZ()); m_uiMovementTimer = 1000; + m_bIsEventInProgress = true; } } if (uiType == POINT_MOTION_TYPE) { - if (uiPointId == POINT_ID_CENTER) - DoSplit(); - else if (uiPointId == POINT_ID_COMBAT) + switch (uiPointId) { - m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); - m_pInstance->SetData(TYPE_NAZAN, IN_PROGRESS); + case POINT_ID_CENTER: + DoSplit(); + break; + case POINT_ID_COMBAT: + { + m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + m_pInstance->SetData(TYPE_NAZAN, IN_PROGRESS); + + // Landing + // undo flying + m_creature->SetByteValue(UNIT_FIELD_BYTES_1, 3, 0); + m_creature->RemoveSplineFlag(SPLINEFLAG_FLYING); + + Player* pPlayer = m_creature->GetMap()->GetPlayer(m_uiLastSeenPlayerGUID); + if (pPlayer && pPlayer->isAlive()) + AttackStart(pPlayer); + + break; + } + case POINT_ID_FLYING: + m_uiFireballTimer = 3000; + break; } } } @@ -206,22 +245,19 @@ struct MANGOS_DLL_DECL boss_vazruden_heraldAI : public ScriptedAI void DoMoveToCenter() { DoScriptText(SAY_INTRO, m_creature); - - if (m_creature->GetMotionMaster()->GetCurrentMovementGeneratorType() == WAYPOINT_MOTION_TYPE) - { - m_creature->GetMotionMaster()->MovementExpired(); - m_creature->GetMotionMaster()->MoveIdle(); - } - m_creature->GetMotionMaster()->MovePoint(POINT_ID_CENTER, afCenterPos[0], afCenterPos[1], afCenterPos[2]); } - void DoMoveToHold() + void DoMoveToAir() { float fX, fY, fZ; m_creature->GetCombatStartPosition(fX, fY, fZ); - m_creature->GetMotionMaster()->MovePoint(POINT_ID_WAITING, fX, fY, fZ); + // Remove Idle MMGen + if (m_creature->GetMotionMaster()->GetCurrentMovementGeneratorType() == IDLE_MOTION_TYPE) + m_creature->GetMotionMaster()->MovementExpired(false); + + m_creature->GetMotionMaster()->MovePoint(POINT_ID_FLYING, fX, fY, fZ); } void DoSplit() @@ -231,10 +267,21 @@ struct MANGOS_DLL_DECL boss_vazruden_heraldAI : public ScriptedAI m_creature->SummonCreature(NPC_VAZRUDEN, 0.0f, 0.0f, 0.0f, 0.0f, TEMPSUMMON_DEAD_DESPAWN, 0); m_uiMovementTimer = 3000; + + // Let him idle for now + m_creature->GetMotionMaster()->MoveIdle(); } void JustSummoned(Creature* pSummoned) { + if (pSummoned->GetEntry() != NPC_VAZRUDEN) + return; + + if (Player* pPlayer = m_creature->GetMap()->GetPlayer(m_uiLastSeenPlayerGUID)) + pSummoned->AI()->AttackStart(pPlayer); + + m_uiVazrudenGUID = pSummoned->GetGUID(); + if (m_pInstance) m_pInstance->SetData(TYPE_VAZRUDEN, IN_PROGRESS); } @@ -247,23 +294,42 @@ struct MANGOS_DLL_DECL boss_vazruden_heraldAI : public ScriptedAI void UpdateAI(const uint32 uiDiff) { - if (!m_creature->getVictim() && m_uiMovementTimer) + if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) { - if (m_uiMovementTimer <= uiDiff) + if (m_uiMovementTimer) { - if (m_pInstance) + if (m_uiMovementTimer <= uiDiff) { - if (m_pInstance->GetData(TYPE_VAZRUDEN) == IN_PROGRESS) - DoMoveToHold(); - else - DoMoveToCenter(); + if (m_pInstance) + { + if (m_pInstance->GetData(TYPE_VAZRUDEN) == IN_PROGRESS) + DoMoveToAir(); + else + DoMoveToCenter(); + } + m_uiMovementTimer = 0; } - m_uiMovementTimer = 0; - } else m_uiMovementTimer -= uiDiff; - } + else + m_uiMovementTimer -= uiDiff; + } + + if (m_uiVazrudenGUID && m_uiFireballTimer) + { + if (m_uiFireballTimer <= uiDiff) + { + if (Creature* pVazruden = m_creature->GetMap()->GetCreature(m_uiVazrudenGUID)) + { + if (Unit* pEnemy = pVazruden->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 0)) + DoCastSpellIfCan(pEnemy, m_bIsRegularMode ? SPELL_FIREBALL : SPELL_FIREBALL_H, 0, pVazruden->GetGUID()); + } + m_uiFireballTimer = urand(4000, 8000); + } + else + m_uiFireballTimer -= uiDiff; + } - if (!m_creature->SelectHostileTarget() || !m_creature->getVictim()) return; + } DoMeleeAttackIfReady(); } diff --git a/scripts/outland/hellfire_citadel/hellfire_ramparts/boss_omor_the_unscarred.cpp b/scripts/outland/hellfire_citadel/hellfire_ramparts/boss_omor_the_unscarred.cpp index c7e7c0a..1bba977 100644 --- a/scripts/outland/hellfire_citadel/hellfire_ramparts/boss_omor_the_unscarred.cpp +++ b/scripts/outland/hellfire_citadel/hellfire_ramparts/boss_omor_the_unscarred.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/scripts/outland/hellfire_citadel/hellfire_ramparts/boss_watchkeeper_gargolmar.cpp b/scripts/outland/hellfire_citadel/hellfire_ramparts/boss_watchkeeper_gargolmar.cpp index 34e6d61..2b3f04f 100644 --- a/scripts/outland/hellfire_citadel/hellfire_ramparts/boss_watchkeeper_gargolmar.cpp +++ b/scripts/outland/hellfire_citadel/hellfire_ramparts/boss_watchkeeper_gargolmar.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/scripts/outland/hellfire_citadel/hellfire_ramparts/hellfire_ramparts.h b/scripts/outland/hellfire_citadel/hellfire_ramparts/hellfire_ramparts.h index 81e7b03..493f406 100644 --- a/scripts/outland/hellfire_citadel/hellfire_ramparts/hellfire_ramparts.h +++ b/scripts/outland/hellfire_citadel/hellfire_ramparts/hellfire_ramparts.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/scripts/outland/hellfire_citadel/hellfire_ramparts/instance_hellfire_ramparts.cpp b/scripts/outland/hellfire_citadel/hellfire_ramparts/instance_hellfire_ramparts.cpp index 978d2fa..6455e30 100644 --- a/scripts/outland/hellfire_citadel/hellfire_ramparts/instance_hellfire_ramparts.cpp +++ b/scripts/outland/hellfire_citadel/hellfire_ramparts/instance_hellfire_ramparts.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/scripts/outland/hellfire_citadel/magtheridons_lair/boss_magtheridon.cpp b/scripts/outland/hellfire_citadel/magtheridons_lair/boss_magtheridon.cpp index 157b0a7..04cc188 100644 --- a/scripts/outland/hellfire_citadel/magtheridons_lair/boss_magtheridon.cpp +++ b/scripts/outland/hellfire_citadel/magtheridons_lair/boss_magtheridon.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/scripts/outland/hellfire_citadel/magtheridons_lair/instance_magtheridons_lair.cpp b/scripts/outland/hellfire_citadel/magtheridons_lair/instance_magtheridons_lair.cpp index a9e57fe..168ae2c 100644 --- a/scripts/outland/hellfire_citadel/magtheridons_lair/instance_magtheridons_lair.cpp +++ b/scripts/outland/hellfire_citadel/magtheridons_lair/instance_magtheridons_lair.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/scripts/outland/hellfire_citadel/magtheridons_lair/magtheridons_lair.h b/scripts/outland/hellfire_citadel/magtheridons_lair/magtheridons_lair.h index af88dab..971efcc 100644 --- a/scripts/outland/hellfire_citadel/magtheridons_lair/magtheridons_lair.h +++ b/scripts/outland/hellfire_citadel/magtheridons_lair/magtheridons_lair.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/scripts/outland/hellfire_citadel/shattered_halls/boss_nethekurse.cpp b/scripts/outland/hellfire_citadel/shattered_halls/boss_nethekurse.cpp index 01bf141..0b93c17 100644 --- a/scripts/outland/hellfire_citadel/shattered_halls/boss_nethekurse.cpp +++ b/scripts/outland/hellfire_citadel/shattered_halls/boss_nethekurse.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or @@ -74,7 +74,9 @@ enum SPELL_HEMORRHAGE = 30478, SPELL_CONSUMPTION = 30497, - SPELL_TEMPORARY_VISUAL = 39312 // this is wrong, a temporary solution. spell consumption already has the purple visual, but doesn't display as it should + SPELL_TEMPORARY_VISUAL = 39312, // this is wrong, a temporary solution. spell consumption already has the purple visual, but doesn't display as it should + + NPC_FEL_ORC_CONVERT = 17083, }; struct MANGOS_DLL_DECL boss_grand_warlock_nethekurseAI : public ScriptedAI @@ -83,6 +85,7 @@ struct MANGOS_DLL_DECL boss_grand_warlock_nethekurseAI : public ScriptedAI { m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); m_bIsRegularMode = pCreature->GetMap()->IsRegularDifficulty(); + m_bIntroOnce = false; Reset(); } @@ -104,12 +107,13 @@ struct MANGOS_DLL_DECL boss_grand_warlock_nethekurseAI : public ScriptedAI uint32 m_uiShadowFissureTimer; uint32 m_uiCleaveTimer; + uint64 m_uiLastEventInvokerGUID; + void Reset() { m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); m_bIsIntroEvent = false; - m_bIntroOnce = false; m_bIsMainEvent = false; //m_bHasTaunted = false; m_bSpinOnce = false; @@ -122,18 +126,23 @@ struct MANGOS_DLL_DECL boss_grand_warlock_nethekurseAI : public ScriptedAI m_uiDeathCoilTimer = 20000; m_uiShadowFissureTimer = 8000; m_uiCleaveTimer = 5000; + + m_uiLastEventInvokerGUID = 0; } - void DoYellForPeonAggro() + void DoYellForPeonAggro(Unit* pWho) { if (m_uiPeonEngagedCount >= 4) return; DoScriptText(PeonAttacked[m_uiPeonEngagedCount].id, m_creature); ++m_uiPeonEngagedCount; + + if (pWho) + m_uiLastEventInvokerGUID = pWho->GetGUID(); } - void DoYellForPeonDeath() + void DoYellForPeonDeath(Unit* pKiller) { if (m_uiPeonKilledCount >= 4) return; @@ -146,6 +155,10 @@ struct MANGOS_DLL_DECL boss_grand_warlock_nethekurseAI : public ScriptedAI m_bIsIntroEvent = false; m_bIsMainEvent = true; m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + + if (pKiller) + AttackStart(pKiller); + } } @@ -158,12 +171,19 @@ struct MANGOS_DLL_DECL boss_grand_warlock_nethekurseAI : public ScriptedAI case 2: DoScriptText(SAY_TAUNT_3, m_creature); break; } - // TODO: kill the peons first + std::list lFelConverts; + GetCreatureListWithEntryInGrid(lFelConverts, m_creature, NPC_FEL_ORC_CONVERT, 40.0f); + for (std::list::iterator itr = lFelConverts.begin(); itr != lFelConverts.end(); ++itr) + (*itr)->DealDamage(*itr, (*itr)->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false); + m_bIsIntroEvent = false; m_uiPeonEngagedCount = 4; m_uiPeonKilledCount = 4; m_bIsMainEvent = true; m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); + + if (Unit* pEnemy = m_creature->GetMap()->GetUnit(m_uiLastEventInvokerGUID)) + AttackStart(pEnemy); } void AttackStart(Unit* pWho) @@ -195,6 +215,8 @@ struct MANGOS_DLL_DECL boss_grand_warlock_nethekurseAI : public ScriptedAI m_bIntroOnce = true; m_bIsIntroEvent = true; + m_uiLastEventInvokerGUID = pWho->GetGUID(); + if (m_pInstance) m_pInstance->SetData(TYPE_NETHEKURSE, IN_PROGRESS); } @@ -241,6 +263,20 @@ struct MANGOS_DLL_DECL boss_grand_warlock_nethekurseAI : public ScriptedAI m_pInstance->SetData(TYPE_NETHEKURSE, DONE); } + void JustReachedHome() + { + if (m_pInstance) + m_pInstance->SetData(TYPE_NETHEKURSE, FAIL); + + std::list lFelConverts; + GetCreatureListWithEntryInGrid(lFelConverts, m_creature, NPC_FEL_ORC_CONVERT, 40.0f); + for (std::list::iterator itr = lFelConverts.begin(); itr != lFelConverts.end(); ++itr) + { + if (!(*itr)->isAlive()) + (*itr)->Respawn(); + } + } + void UpdateAI(const uint32 uiDiff) { if (m_bIsIntroEvent) @@ -337,7 +373,7 @@ struct MANGOS_DLL_DECL mob_fel_orc_convertAI : public ScriptedAI if (pKurse && m_creature->IsWithinDist(pKurse, 45.0f)) { if (boss_grand_warlock_nethekurseAI* pKurseAI = dynamic_cast(pKurse->AI())) - pKurseAI->DoYellForPeonAggro(); + pKurseAI->DoYellForPeonAggro(pWho); if (m_pInstance->GetData(TYPE_NETHEKURSE) == IN_PROGRESS) return; @@ -357,7 +393,7 @@ struct MANGOS_DLL_DECL mob_fel_orc_convertAI : public ScriptedAI if (Creature* pKurse = m_creature->GetMap()->GetCreature(m_pInstance->GetData64(NPC_NETHEKURSE))) { if (boss_grand_warlock_nethekurseAI* pKurseAI = dynamic_cast(pKurse->AI())) - pKurseAI->DoYellForPeonAggro(); + pKurseAI->DoYellForPeonDeath(pKiller); } } } diff --git a/scripts/outland/hellfire_citadel/shattered_halls/boss_warbringer_omrogg.cpp b/scripts/outland/hellfire_citadel/shattered_halls/boss_warbringer_omrogg.cpp index 7d74ec4..e2fc514 100644 --- a/scripts/outland/hellfire_citadel/shattered_halls/boss_warbringer_omrogg.cpp +++ b/scripts/outland/hellfire_citadel/shattered_halls/boss_warbringer_omrogg.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/scripts/outland/hellfire_citadel/shattered_halls/boss_warchief_kargath_bladefist.cpp b/scripts/outland/hellfire_citadel/shattered_halls/boss_warchief_kargath_bladefist.cpp index 1c23e33..e30c3e3 100644 --- a/scripts/outland/hellfire_citadel/shattered_halls/boss_warchief_kargath_bladefist.cpp +++ b/scripts/outland/hellfire_citadel/shattered_halls/boss_warchief_kargath_bladefist.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/scripts/outland/hellfire_citadel/shattered_halls/instance_shattered_halls.cpp b/scripts/outland/hellfire_citadel/shattered_halls/instance_shattered_halls.cpp index 55b3309..093fffe 100644 --- a/scripts/outland/hellfire_citadel/shattered_halls/instance_shattered_halls.cpp +++ b/scripts/outland/hellfire_citadel/shattered_halls/instance_shattered_halls.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or @@ -24,81 +24,112 @@ EndScriptData */ #include "precompiled.h" #include "shattered_halls.h" -struct MANGOS_DLL_DECL instance_shattered_halls : public ScriptedInstance +instance_shattered_halls::instance_shattered_halls(Map* pMap) : ScriptedInstance(pMap), + m_uiNethekurseGUID(0), + m_uiNethekurseDoorGUID(0), + m_uiNethekurseEnterDoorGUID(0) { - instance_shattered_halls(Map* pMap) : ScriptedInstance(pMap) {Initialize();}; + Initialize(); +} - uint32 m_auiEncounter[MAX_ENCOUNTER]; - uint64 m_uiNethekurseGUID; - uint64 m_uiNethekurseDoorGUID; +void instance_shattered_halls::Initialize() +{ + memset(&m_auiEncounter, 0, sizeof(m_auiEncounter)); +} - void Initialize() +void instance_shattered_halls::OnObjectCreate(GameObject* pGo) +{ + switch (pGo->GetEntry()) { - memset(&m_auiEncounter, 0, sizeof(m_auiEncounter)); - - m_uiNethekurseGUID = 0; - m_uiNethekurseDoorGUID = 0; + case GO_NETHEKURSE_DOOR: + m_uiNethekurseDoorGUID = pGo->GetGUID(); + if (m_auiEncounter[TYPE_NETHEKURSE] == DONE) + pGo->SetGoState(GO_STATE_ACTIVE); + break; + case GO_NETHERKURSE_ENTER_DOOR: + m_uiNethekurseEnterDoorGUID = pGo->GetGUID(); + if (m_auiEncounter[TYPE_NETHEKURSE] == DONE) + pGo->SetGoState(GO_STATE_ACTIVE); + break; } +} - bool IsEncounterInProgress() const - { - for(uint8 i = 0; i < MAX_ENCOUNTER; i++) - if (m_auiEncounter[i] == IN_PROGRESS) - return true; - return false; - } +void instance_shattered_halls::OnCreatureCreate(Creature* pCreature) +{ + if (pCreature->GetEntry() == NPC_NETHEKURSE) + m_uiNethekurseGUID = pCreature->GetGUID(); +} - void OnObjectCreate(GameObject* pGo) +void instance_shattered_halls::SetData(uint32 uiType, uint32 uiData) +{ + switch(uiType) { - if (pGo->GetEntry() == GO_NETHEKURSE_DOOR) - m_uiNethekurseDoorGUID = pGo->GetGUID(); + case TYPE_NETHEKURSE: + m_auiEncounter[uiType] = uiData; + if (uiData == DONE) + DoUseDoorOrButton(m_uiNethekurseDoorGUID); + break; + case TYPE_OMROGG: + m_auiEncounter[uiType] = uiData; + break; + case TYPE_BLADEFIST: + m_auiEncounter[uiType] = uiData; + break; } - void OnCreatureCreate(Creature* pCreature) + if (uiData == DONE) { - if (pCreature->GetEntry() == NPC_NETHEKURSE) - m_uiNethekurseGUID = pCreature->GetGUID(); - } + OUT_SAVE_INST_DATA; - void SetData(uint32 uiType, uint32 uiData) - { - switch(uiType) - { - case TYPE_NETHEKURSE: - m_auiEncounter[0] = uiData; - if (uiData == DONE) - DoUseDoorOrButton(m_uiNethekurseDoorGUID); - break; - case TYPE_OMROGG: - m_auiEncounter[1] = uiData; - break; - } + std::ostringstream saveStream; + + saveStream << m_auiEncounter[0] << " " << m_auiEncounter[1] << " " << m_auiEncounter[2]; + m_strInstData = saveStream.str(); + + SaveToDB(); + OUT_SAVE_INST_DATA_COMPLETE; } +} - uint32 GetData(uint32 uiType) +void instance_shattered_halls::Load(const char* chrIn) +{ + if (!chrIn) { - switch(uiType) - { - case TYPE_NETHEKURSE: - return m_auiEncounter[0]; - case TYPE_OMROGG: - return m_auiEncounter[1]; - } - return 0; + OUT_LOAD_INST_DATA_FAIL; + return; } - uint64 GetData64(uint32 uiData) + OUT_LOAD_INST_DATA(chrIn); + + std::istringstream loadStream(chrIn); + loadStream >> m_auiEncounter[0] >> m_auiEncounter[1] >> m_auiEncounter[2]; + + for(uint8 i = 0; i < MAX_ENCOUNTER; ++i) + if (m_auiEncounter[i] == IN_PROGRESS) + m_auiEncounter[i] = NOT_STARTED; + + OUT_LOAD_INST_DATA_COMPLETE; +} + +uint32 instance_shattered_halls::GetData(uint32 uiType) +{ + if (uiType < MAX_ENCOUNTER) + return m_auiEncounter[uiType]; + + return 0; +} + +uint64 instance_shattered_halls::GetData64(uint32 uiData) +{ + switch(uiData) { - switch(uiData) - { - case NPC_NETHEKURSE: - return m_uiNethekurseGUID; - case GO_NETHEKURSE_DOOR: - return m_uiNethekurseDoorGUID; - } - return 0; + case NPC_NETHEKURSE: return m_uiNethekurseGUID; + case GO_NETHEKURSE_DOOR: return m_uiNethekurseDoorGUID; + case GO_NETHERKURSE_ENTER_DOOR: return m_uiNethekurseEnterDoorGUID; + default: + return 0; } -}; +} InstanceData* GetInstanceData_instance_shattered_halls(Map* pMap) { diff --git a/scripts/outland/hellfire_citadel/shattered_halls/shattered_halls.h b/scripts/outland/hellfire_citadel/shattered_halls/shattered_halls.h index 422cdad..48dde86 100644 --- a/scripts/outland/hellfire_citadel/shattered_halls/shattered_halls.h +++ b/scripts/outland/hellfire_citadel/shattered_halls/shattered_halls.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ @@ -7,12 +7,43 @@ enum { - MAX_ENCOUNTER = 2, + MAX_ENCOUNTER = 3, - TYPE_NETHEKURSE = 0, - TYPE_OMROGG = 1, + TYPE_NETHEKURSE = 0, + TYPE_OMROGG = 1, + TYPE_BLADEFIST = 2, // TODO Currently unhandled - GO_NETHEKURSE_DOOR = 182540, - NPC_NETHEKURSE = 16807 + NPC_NETHEKURSE = 16807, + + GO_NETHEKURSE_DOOR = 182540, + GO_NETHERKURSE_ENTER_DOOR = 182539, // TODO Currently unhandled +}; + +class MANGOS_DLL_DECL instance_shattered_halls : public ScriptedInstance +{ + public: + instance_shattered_halls(Map* pMap); + + void Initialize(); + + void OnObjectCreate(GameObject* pGo); + void OnCreatureCreate(Creature* pCreature); + + void SetData(uint32 uiType, uint32 uiData); + uint32 GetData(uint32 uiType); + uint64 GetData64(uint32 uiData); + + const char* Save() { return m_strInstData.c_str(); } + void Load(const char* chrIn); + + private: + uint32 m_auiEncounter[MAX_ENCOUNTER]; + std::string m_strInstData; + + uint64 m_uiNethekurseGUID; + + uint64 m_uiNethekurseDoorGUID; + uint64 m_uiNethekurseEnterDoorGUID; }; + #endif diff --git a/scripts/outland/hellfire_peninsula.cpp b/scripts/outland/hellfire_peninsula.cpp index 459fdd0..2530e81 100644 --- a/scripts/outland/hellfire_peninsula.cpp +++ b/scripts/outland/hellfire_peninsula.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/scripts/outland/nagrand.cpp b/scripts/outland/nagrand.cpp index 3ea21d3..f68e2be 100644 --- a/scripts/outland/nagrand.cpp +++ b/scripts/outland/nagrand.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/scripts/outland/netherstorm.cpp b/scripts/outland/netherstorm.cpp index 549dba9..a96a184 100644 --- a/scripts/outland/netherstorm.cpp +++ b/scripts/outland/netherstorm.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or @@ -277,7 +277,7 @@ struct MANGOS_DLL_DECL npc_manaforge_control_consoleAI : public ScriptedAI break; case 5: DoScriptText(EMOTE_COMPLETE, m_creature, pPlayer); - pPlayer->KilledMonsterCredit(m_creature->GetEntry(), m_creature->GetGUID()); + pPlayer->KilledMonsterCredit(m_creature->GetEntry(), m_creature->GetObjectGuid()); DoCastSpellIfCan(m_creature, SPELL_DISABLE_VISUAL); if (m_uiConsoleGUID) { diff --git a/scripts/outland/shadowmoon_valley.cpp b/scripts/outland/shadowmoon_valley.cpp index eb3bd0f..28407d1 100644 --- a/scripts/outland/shadowmoon_valley.cpp +++ b/scripts/outland/shadowmoon_valley.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or @@ -24,6 +24,7 @@ EndScriptData */ /* ContentData mob_mature_netherwing_drake mob_enslaved_netherwing_drake +npc_dragonmaw_peon npc_drake_dealer_hurlunk npcs_flanis_swiftwing_and_kagrosh npc_murkblood_overseer @@ -117,7 +118,19 @@ struct MANGOS_DLL_DECL mob_mature_netherwing_drakeAI : public ScriptedAI { if (Player* pPlayer = m_creature->GetMap()->GetPlayer(uiPlayerGUID)) { - if (GameObject* pGo = pPlayer->GetGameObject(SPELL_PLACE_CARCASS)) + GameObject* pGo = pPlayer->GetGameObject(SPELL_PLACE_CARCASS); + + // Workaround for broken function GetGameObject + if (!pGo) + { + const SpellEntry* pSpell = GetSpellStore()->LookupEntry(SPELL_PLACE_CARCASS); + + uint32 uiGameobjectEntry = pSpell->EffectMiscValue[EFFECT_INDEX_0]; + + pGo = GetClosestGameObjectWithEntry(pPlayer, uiGameobjectEntry, 2*INTERACTION_DISTANCE); + } + + if (pGo) { if (m_creature->GetMotionMaster()->GetCurrentMovementGeneratorType() == WAYPOINT_MOTION_TYPE) m_creature->GetMotionMaster()->MovementExpired(); @@ -125,7 +138,10 @@ struct MANGOS_DLL_DECL mob_mature_netherwing_drakeAI : public ScriptedAI m_creature->GetMotionMaster()->MoveIdle(); m_creature->StopMoving(); - m_creature->GetMotionMaster()->MovePoint(POINT_ID, pGo->GetPositionX(), pGo->GetPositionY(), pGo->GetPositionZ()); + float fX, fY, fZ; + pGo->GetContactPoint(m_creature, fX, fY, fZ, CONTACT_DISTANCE); + + m_creature->GetMotionMaster()->MovePoint(POINT_ID, fX, fY, fZ); } } bCanEat = false; @@ -136,7 +152,7 @@ struct MANGOS_DLL_DECL mob_mature_netherwing_drakeAI : public ScriptedAI DoScriptText(SAY_JUST_EATEN, m_creature); if (Player* pPlayer = m_creature->GetMap()->GetPlayer(uiPlayerGUID)) - pPlayer->KilledMonsterCredit(NPC_EVENT_PINGER, m_creature->GetGUID()); + pPlayer->KilledMonsterCredit(NPC_EVENT_PINGER, m_creature->GetObjectGuid()); Reset(); m_creature->GetMotionMaster()->Clear(); @@ -277,49 +293,50 @@ CreatureAI* GetAI_mob_enslaved_netherwing_drake(Creature* pCreature) } /*##### -# mob_dragonmaw_peon +# npc_dragonmaw_peon #####*/ enum { + SAY_PEON_1 = -1000652, + SAY_PEON_2 = -1000653, + SAY_PEON_3 = -1000654, + SAY_PEON_4 = -1000655, + SAY_PEON_5 = -1000656, + SPELL_SERVING_MUTTON = 40468, NPC_DRAGONMAW_KILL_CREDIT = 23209, - QUEST_SLOW_DEATH = 11020, + EQUIP_ID_MUTTON = 2202, POINT_DEST = 1 }; -struct MANGOS_DLL_DECL mob_dragonmaw_peonAI : public ScriptedAI +struct MANGOS_DLL_DECL npc_dragonmaw_peonAI : public ScriptedAI { - mob_dragonmaw_peonAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset(); } + npc_dragonmaw_peonAI(Creature* pCreature) : ScriptedAI(pCreature) { Reset(); } uint64 m_uiPlayerGUID; - bool m_bIsTapped; uint32 m_uiPoisonTimer; + uint32 m_uiMoveTimer; + uint32 m_uiEatTimer; void Reset() { m_uiPlayerGUID = 0; - m_bIsTapped = false; m_uiPoisonTimer = 0; + m_uiMoveTimer = 0; + m_uiEatTimer = 0; + + SetEquipmentSlots(true); } - void SpellHit(Unit* pCaster, const SpellEntry* pSpell) + bool SetPlayerTarget(uint64 uiPlayerGUID) { - if (!pCaster) - return; - - if (pCaster->GetTypeId() == TYPEID_PLAYER && pSpell->Id == SPELL_SERVING_MUTTON && !m_bIsTapped) - { - m_uiPlayerGUID = pCaster->GetGUID(); + if (m_uiPlayerGUID) + return false; - m_bIsTapped = true; - - float fX, fY, fZ; - pCaster->GetClosePoint(fX, fY, fZ, m_creature->GetObjectBoundingRadius()); - - m_creature->RemoveSplineFlag(SPLINEFLAG_WALKMODE); - m_creature->GetMotionMaster()->MovePoint(POINT_DEST, fX, fY, fZ); - } + m_uiPlayerGUID = uiPlayerGUID; + m_uiMoveTimer = 500; + return true; } void MovementInform(uint32 uiType, uint32 uiPointId) @@ -329,25 +346,82 @@ struct MANGOS_DLL_DECL mob_dragonmaw_peonAI : public ScriptedAI if (uiPointId == POINT_DEST) { - m_creature->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_ONESHOT_EAT); - m_uiPoisonTimer = 15000; + m_uiEatTimer = 2000; + m_uiPoisonTimer = 3000; + + switch(urand(0, 4)) + { + case 0: DoScriptText(SAY_PEON_1, m_creature); break; + case 1: DoScriptText(SAY_PEON_2, m_creature); break; + case 2: DoScriptText(SAY_PEON_3, m_creature); break; + case 3: DoScriptText(SAY_PEON_4, m_creature); break; + case 4: DoScriptText(SAY_PEON_5, m_creature); break; + } } } void UpdateAI(const uint32 uiDiff) { - if (m_uiPoisonTimer) + if (!m_creature->isAlive()) + return; + + if (m_uiMoveTimer) { - if (m_uiPoisonTimer <= uiDiff) + if (m_uiMoveTimer <= uiDiff) { if (Player* pPlayer = m_creature->GetMap()->GetPlayer(m_uiPlayerGUID)) { - if (pPlayer->GetQuestStatus(QUEST_SLOW_DEATH) == QUEST_STATUS_INCOMPLETE) - pPlayer->KilledMonsterCredit(NPC_DRAGONMAW_KILL_CREDIT, m_creature->GetGUID()); + GameObject* pMutton = pPlayer->GetGameObject(SPELL_SERVING_MUTTON); + + // Workaround for broken function GetGameObject + if (!pMutton) + { + const SpellEntry* pSpell = GetSpellStore()->LookupEntry(SPELL_SERVING_MUTTON); + + uint32 uiGameobjectEntry = pSpell->EffectMiscValue[EFFECT_INDEX_0]; + + // this can fail, but very low chance + pMutton = GetClosestGameObjectWithEntry(pPlayer, uiGameobjectEntry, 2*INTERACTION_DISTANCE); + } + + if (pMutton) + { + float fX, fY, fZ; + pMutton->GetContactPoint(m_creature, fX, fY, fZ, CONTACT_DISTANCE); + + m_creature->RemoveSplineFlag(SPLINEFLAG_WALKMODE); + m_creature->GetMotionMaster()->MovePoint(POINT_DEST, fX, fY, fZ); + } } + m_uiMoveTimer = 0; + } + else + m_uiMoveTimer -= uiDiff; + } + else if (m_uiEatTimer) + { + if (m_uiEatTimer <= uiDiff) + { + SetEquipmentSlots(false, EQUIP_ID_MUTTON, EQUIP_UNEQUIP); + m_creature->HandleEmote(EMOTE_ONESHOT_EAT_NOSHEATHE); + m_uiEatTimer = 0; + } + else + m_uiEatTimer -= uiDiff; + } + else if (m_uiPoisonTimer) + { + if (m_uiPoisonTimer <= uiDiff) + { + if (Player* pPlayer = m_creature->GetMap()->GetPlayer(m_uiPlayerGUID)) + pPlayer->KilledMonsterCredit(NPC_DRAGONMAW_KILL_CREDIT, m_creature->GetObjectGuid()); + m_uiPoisonTimer = 0; - m_creature->DealDamage(m_creature, m_creature->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false); + + // dies + m_creature->SetDeathState(JUST_DIED); + m_creature->SetHealth(0); } else m_uiPoisonTimer -= uiDiff; @@ -355,6 +429,30 @@ struct MANGOS_DLL_DECL mob_dragonmaw_peonAI : public ScriptedAI } }; +CreatureAI* GetAI_npc_dragonmaw_peon(Creature* pCreature) +{ + return new npc_dragonmaw_peonAI(pCreature); +} + +bool EffectDummyCreature_npc_dragonmaw_peon(Unit* pCaster, uint32 uiSpellId, SpellEffectIndex uiEffIndex, Creature* pCreatureTarget) +{ + if (uiEffIndex != EFFECT_INDEX_1 || uiSpellId != SPELL_SERVING_MUTTON || pCaster->GetTypeId() != TYPEID_PLAYER) + return false; + + npc_dragonmaw_peonAI* pPeonAI = dynamic_cast(pCreatureTarget->AI()); + + if (!pPeonAI) + return false; + + if (pPeonAI->SetPlayerTarget(pCaster->GetGUID())) + { + pCreatureTarget->HandleEmote(EMOTE_ONESHOT_NONE); + return true; + } + + return false; +} + /*###### ## npc_drake_dealer_hurlunk ######*/ @@ -1431,7 +1529,7 @@ CreatureAI* GetAI_npc_lord_illidan_stormrage(Creature* (pCreature)) ######*/ bool GOQuestAccept_GO_crystal_prison(Player* pPlayer, GameObject* pGo, Quest const* pQuest) { - if (pQuest->GetQuestId() == QUEST_BATTLE_OF_THE_CRIMSON_WATCH ) + if (pQuest->GetQuestId() == QUEST_BATTLE_OF_THE_CRIMSON_WATCH) if (Creature* pLordIllidan = GetClosestCreatureWithEntry(pPlayer, NPC_LORD_ILLIDAN, 50.0)) if (npc_lord_illidan_stormrageAI* pIllidanAI = dynamic_cast(pLordIllidan->AI())) if (!pIllidanAI->m_bEventStarted) @@ -1454,6 +1552,12 @@ void AddSC_shadowmoon_valley() newscript->GetAI = &GetAI_mob_enslaved_netherwing_drake; newscript->RegisterSelf(); + newscript = new Script; + newscript->Name = "npc_dragonmaw_peon"; + newscript->GetAI = &GetAI_npc_dragonmaw_peon; + newscript->pEffectDummyNPC = &EffectDummyCreature_npc_dragonmaw_peon; + newscript->RegisterSelf(); + newscript = new Script; newscript->Name = "npc_drake_dealer_hurlunk"; newscript->pGossipHello = &GossipHello_npc_drake_dealer_hurlunk; diff --git a/scripts/outland/shattrath_city.cpp b/scripts/outland/shattrath_city.cpp index 6609389..4ad9a66 100644 --- a/scripts/outland/shattrath_city.cpp +++ b/scripts/outland/shattrath_city.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/scripts/outland/tempest_keep/arcatraz/arcatraz.cpp b/scripts/outland/tempest_keep/arcatraz/arcatraz.cpp index 4c28ee4..74042ec 100644 --- a/scripts/outland/tempest_keep/arcatraz/arcatraz.cpp +++ b/scripts/outland/tempest_keep/arcatraz/arcatraz.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/scripts/outland/tempest_keep/arcatraz/arcatraz.h b/scripts/outland/tempest_keep/arcatraz/arcatraz.h index 32fcb1a..a6be8fc 100644 --- a/scripts/outland/tempest_keep/arcatraz/arcatraz.h +++ b/scripts/outland/tempest_keep/arcatraz/arcatraz.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/scripts/outland/tempest_keep/arcatraz/boss_harbinger_skyriss.cpp b/scripts/outland/tempest_keep/arcatraz/boss_harbinger_skyriss.cpp index 783a6b7..fee4829 100644 --- a/scripts/outland/tempest_keep/arcatraz/boss_harbinger_skyriss.cpp +++ b/scripts/outland/tempest_keep/arcatraz/boss_harbinger_skyriss.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/scripts/outland/tempest_keep/arcatraz/instance_arcatraz.cpp b/scripts/outland/tempest_keep/arcatraz/instance_arcatraz.cpp index 0167526..c0332d6 100644 --- a/scripts/outland/tempest_keep/arcatraz/instance_arcatraz.cpp +++ b/scripts/outland/tempest_keep/arcatraz/instance_arcatraz.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/scripts/outland/tempest_keep/botanica/boss_high_botanist_freywinn.cpp b/scripts/outland/tempest_keep/botanica/boss_high_botanist_freywinn.cpp index 8240c07..031ad18 100644 --- a/scripts/outland/tempest_keep/botanica/boss_high_botanist_freywinn.cpp +++ b/scripts/outland/tempest_keep/botanica/boss_high_botanist_freywinn.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/scripts/outland/tempest_keep/botanica/boss_laj.cpp b/scripts/outland/tempest_keep/botanica/boss_laj.cpp index 96be482..90eba6c 100644 --- a/scripts/outland/tempest_keep/botanica/boss_laj.cpp +++ b/scripts/outland/tempest_keep/botanica/boss_laj.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/scripts/outland/tempest_keep/botanica/boss_warp_splinter.cpp b/scripts/outland/tempest_keep/botanica/boss_warp_splinter.cpp index 6a6415d..a485757 100644 --- a/scripts/outland/tempest_keep/botanica/boss_warp_splinter.cpp +++ b/scripts/outland/tempest_keep/botanica/boss_warp_splinter.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/scripts/outland/tempest_keep/the_eye/boss_astromancer.cpp b/scripts/outland/tempest_keep/the_eye/boss_astromancer.cpp index 3850ac6..d80a1f9 100644 --- a/scripts/outland/tempest_keep/the_eye/boss_astromancer.cpp +++ b/scripts/outland/tempest_keep/the_eye/boss_astromancer.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/scripts/outland/tempest_keep/the_eye/boss_kaelthas.cpp b/scripts/outland/tempest_keep/the_eye/boss_kaelthas.cpp index a265857..8345242 100644 --- a/scripts/outland/tempest_keep/the_eye/boss_kaelthas.cpp +++ b/scripts/outland/tempest_keep/the_eye/boss_kaelthas.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/scripts/outland/tempest_keep/the_eye/boss_void_reaver.cpp b/scripts/outland/tempest_keep/the_eye/boss_void_reaver.cpp index 385b6d1..a52984b 100644 --- a/scripts/outland/tempest_keep/the_eye/boss_void_reaver.cpp +++ b/scripts/outland/tempest_keep/the_eye/boss_void_reaver.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/scripts/outland/tempest_keep/the_eye/instance_the_eye.cpp b/scripts/outland/tempest_keep/the_eye/instance_the_eye.cpp index b973eba..9867e92 100644 --- a/scripts/outland/tempest_keep/the_eye/instance_the_eye.cpp +++ b/scripts/outland/tempest_keep/the_eye/instance_the_eye.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/scripts/outland/tempest_keep/the_eye/the_eye.cpp b/scripts/outland/tempest_keep/the_eye/the_eye.cpp index 6e2a815..bf56088 100644 --- a/scripts/outland/tempest_keep/the_eye/the_eye.cpp +++ b/scripts/outland/tempest_keep/the_eye/the_eye.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/scripts/outland/tempest_keep/the_eye/the_eye.h b/scripts/outland/tempest_keep/the_eye/the_eye.h index 27c15cf..8188329 100644 --- a/scripts/outland/tempest_keep/the_eye/the_eye.h +++ b/scripts/outland/tempest_keep/the_eye/the_eye.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/scripts/outland/tempest_keep/the_mechanar/boss_gatewatcher_ironhand.cpp b/scripts/outland/tempest_keep/the_mechanar/boss_gatewatcher_ironhand.cpp index bd0396c..b44d62b 100644 --- a/scripts/outland/tempest_keep/the_mechanar/boss_gatewatcher_ironhand.cpp +++ b/scripts/outland/tempest_keep/the_mechanar/boss_gatewatcher_ironhand.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/scripts/outland/tempest_keep/the_mechanar/boss_nethermancer_sepethrea.cpp b/scripts/outland/tempest_keep/the_mechanar/boss_nethermancer_sepethrea.cpp index 0ac526f..9285647 100644 --- a/scripts/outland/tempest_keep/the_mechanar/boss_nethermancer_sepethrea.cpp +++ b/scripts/outland/tempest_keep/the_mechanar/boss_nethermancer_sepethrea.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/scripts/outland/tempest_keep/the_mechanar/boss_pathaleon_the_calculator.cpp b/scripts/outland/tempest_keep/the_mechanar/boss_pathaleon_the_calculator.cpp index c7ae21d..0cc9f53 100644 --- a/scripts/outland/tempest_keep/the_mechanar/boss_pathaleon_the_calculator.cpp +++ b/scripts/outland/tempest_keep/the_mechanar/boss_pathaleon_the_calculator.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/scripts/outland/tempest_keep/the_mechanar/instance_mechanar.cpp b/scripts/outland/tempest_keep/the_mechanar/instance_mechanar.cpp index d0dce70..d3ebeac 100644 --- a/scripts/outland/tempest_keep/the_mechanar/instance_mechanar.cpp +++ b/scripts/outland/tempest_keep/the_mechanar/instance_mechanar.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/scripts/outland/tempest_keep/the_mechanar/mechanar.h b/scripts/outland/tempest_keep/the_mechanar/mechanar.h index 987a7f8..fe1faee 100644 --- a/scripts/outland/tempest_keep/the_mechanar/mechanar.h +++ b/scripts/outland/tempest_keep/the_mechanar/mechanar.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/scripts/outland/terokkar_forest.cpp b/scripts/outland/terokkar_forest.cpp index 9438a9c..a7b48dd 100644 --- a/scripts/outland/terokkar_forest.cpp +++ b/scripts/outland/terokkar_forest.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or @@ -250,7 +250,7 @@ struct MANGOS_DLL_DECL mob_netherweb_victimAI : public ScriptedAI if (!urand(0, 3)) { m_creature->SummonCreature(NPC_FREED_WARRIOR, 0.0f, 0.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 60000); - pPlayer->KilledMonsterCredit(NPC_FREED_WARRIOR, m_creature->GetGUID()); + pPlayer->KilledMonsterCredit(NPC_FREED_WARRIOR, m_creature->GetObjectGuid()); } else m_creature->SummonCreature(netherwebVictims[urand(0, 5)], 0.0f, 0.0f, 0.0f, 0.0f, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 60000); @@ -954,7 +954,7 @@ bool GOUse_go_veil_skith_cage(Player* pPlayer, GameObject* pGo) GetCreatureListWithEntryInGrid(lChildrenList, pGo, NPC_CAPTIVE_CHILD, INTERACTION_DISTANCE); for(std::list::const_iterator itr = lChildrenList.begin(); itr != lChildrenList.end(); ++itr) { - pPlayer->KilledMonsterCredit(NPC_CAPTIVE_CHILD, (*itr)->GetGUID()); + pPlayer->KilledMonsterCredit(NPC_CAPTIVE_CHILD, (*itr)->GetObjectGuid()); switch(urand(0,3)) { case 0: DoScriptText(SAY_THANKS_1, *itr); break; @@ -1068,7 +1068,7 @@ struct MANGOS_DLL_DECL npc_isla_starmaneAI : public npc_escortAI case 67: if (Player* pPlayer = GetPlayerForEscort()) m_creature->SetFacingToObject(pPlayer); - m_creature->HandleEmoteCommand(EMOTE_ONESHOT_WAVE); + m_creature->HandleEmote(EMOTE_ONESHOT_WAVE); break; } } diff --git a/scripts/outland/zangarmarsh.cpp b/scripts/outland/zangarmarsh.cpp index 6f5ba77..842d754 100644 --- a/scripts/outland/zangarmarsh.cpp +++ b/scripts/outland/zangarmarsh.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/scripts/world/areatrigger_scripts.cpp b/scripts/world/areatrigger_scripts.cpp index f951743..0878432 100644 --- a/scripts/world/areatrigger_scripts.cpp +++ b/scripts/world/areatrigger_scripts.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/scripts/world/boss_emeriss.cpp b/scripts/world/boss_emeriss.cpp index 28e0d06..8f8dee6 100644 --- a/scripts/world/boss_emeriss.cpp +++ b/scripts/world/boss_emeriss.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/scripts/world/boss_lethon.cpp b/scripts/world/boss_lethon.cpp index 3286783..097351a 100644 --- a/scripts/world/boss_lethon.cpp +++ b/scripts/world/boss_lethon.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/scripts/world/boss_taerar.cpp b/scripts/world/boss_taerar.cpp index e7afe21..7de8f9f 100644 --- a/scripts/world/boss_taerar.cpp +++ b/scripts/world/boss_taerar.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/scripts/world/boss_ysondre.cpp b/scripts/world/boss_ysondre.cpp index f493850..b5b6463 100644 --- a/scripts/world/boss_ysondre.cpp +++ b/scripts/world/boss_ysondre.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/scripts/world/go_scripts.cpp b/scripts/world/go_scripts.cpp index 52c87b6..afcfde0 100644 --- a/scripts/world/go_scripts.cpp +++ b/scripts/world/go_scripts.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or @@ -577,6 +577,30 @@ bool GOUse_go_lab_work_reagents(Player* pPlayer, GameObject* pGo) return false; } +/*###### +## go_hand_of_iruxos_crystal +######*/ + +/* TODO + * Actually this script is extremely vague, but as long as there is no valid information + * hidden in some dark places, this will be the best we can do here :( + * Do not consider this a well proven script. + */ + +enum +{ + // QUEST_HAND_OF_IRUXOS = 5381, + NPC_IRUXOS = 11876, +}; + +bool GOUse_go_hand_of_iruxos_crystal(Player* pPlayer, GameObject* pGo) +{ + if (Creature* pIruxos = pGo->SummonCreature(NPC_IRUXOS, 0.0f, 0.0f, 0.0f, pPlayer->GetOrientation() + M_PI_F, TEMPSUMMON_TIMED_DESPAWN_OUT_OF_COMBAT, 20000)) + pIruxos->AI()->AttackStart(pPlayer); + + return false; +} + void AddSC_go_scripts() { Script* pNewScript; @@ -696,4 +720,8 @@ void AddSC_go_scripts() pNewScript->pGOUse = &GOUse_go_lab_work_reagents; pNewScript->RegisterSelf(); + pNewScript = new Script; + pNewScript->Name = "go_hand_of_iruxos_crystal"; + pNewScript->pGOUse = &GOUse_go_hand_of_iruxos_crystal; + pNewScript->RegisterSelf(); } diff --git a/scripts/world/guards.cpp b/scripts/world/guards.cpp index da87b11..a89b7cd 100644 --- a/scripts/world/guards.cpp +++ b/scripts/world/guards.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/scripts/world/item_scripts.cpp b/scripts/world/item_scripts.cpp index 3aea4a0..aa7bfe3 100644 --- a/scripts/world/item_scripts.cpp +++ b/scripts/world/item_scripts.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/scripts/world/mob_generic_creature.cpp b/scripts/world/mob_generic_creature.cpp index 065af99..6b7d9cb 100644 --- a/scripts/world/mob_generic_creature.cpp +++ b/scripts/world/mob_generic_creature.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or diff --git a/scripts/world/npc_professions.cpp b/scripts/world/npc_professions.cpp index 7a5cb04..4e665a1 100644 --- a/scripts/world/npc_professions.cpp +++ b/scripts/world/npc_professions.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or @@ -811,138 +811,6 @@ bool GossipSelect_npc_prof_blacksmith(Player* pPlayer, Creature* pCreature, uint return true; }*/ -/*### -# engineering trinkets -###*/ - -enum -{ - NPC_ZAP = 14742, - NPC_JHORDY = 14743, - NPC_KABLAM = 21493, - NPC_SMILES = 21494, - - SPELL_LEARN_TO_EVERLOOK = 23490, - SPELL_LEARN_TO_GADGET = 23491, - SPELL_LEARN_TO_AREA52 = 36956, - SPELL_LEARN_TO_TOSHLEY = 36957, - - SPELL_TO_EVERLOOK = 23486, - SPELL_TO_GADGET = 23489, - SPELL_TO_AREA52 = 36954, - SPELL_TO_TOSHLEY = 36955, - - ITEM_GNOMISH_CARD = 10790, - ITEM_GOBLIN_CARD = 10791 -}; - -#define GOSSIP_ITEM_ZAP "[PH] Unknown" -#define GOSSIP_ITEM_JHORDY "I must build a beacon for this marvelous device!" -#define GOSSIP_ITEM_KABLAM "[PH] Unknown" -#define GOSSIP_ITEM_SMILES "[PH] Unknown" - -bool GossipHello_npc_engineering_tele_trinket(Player* pPlayer, Creature* pCreature) -{ - uint32 uiNpcTextId = 0; - std::string strGossipItem; - bool bCanLearn = false; - - if (pPlayer->HasSkill(SKILL_ENGINEERING)) - { - switch(pCreature->GetEntry()) - { - case NPC_ZAP: - uiNpcTextId = 7249; - if (pPlayer->GetBaseSkillValue(SKILL_ENGINEERING) >= 260 && pPlayer->HasSpell(S_GOBLIN)) - { - if (!pPlayer->HasSpell(SPELL_TO_EVERLOOK)) - { - bCanLearn = true; - strGossipItem = GOSSIP_ITEM_ZAP; - } - else if (pPlayer->HasSpell(SPELL_TO_EVERLOOK)) - uiNpcTextId = 0; - } - break; - case NPC_JHORDY: - uiNpcTextId = 7251; - if (pPlayer->GetBaseSkillValue(SKILL_ENGINEERING) >= 260 && pPlayer->HasSpell(S_GNOMISH)) - { - if (!pPlayer->HasSpell(SPELL_TO_GADGET)) - { - bCanLearn = true; - strGossipItem = GOSSIP_ITEM_JHORDY; - } - else if (pPlayer->HasSpell(SPELL_TO_GADGET)) - uiNpcTextId = 7252; - } - break; - case NPC_KABLAM: - uiNpcTextId = 10365; - if (pPlayer->GetBaseSkillValue(SKILL_ENGINEERING) >= 350 && pPlayer->HasSpell(S_GOBLIN)) - { - if (!pPlayer->HasSpell(SPELL_TO_AREA52)) - { - bCanLearn = true; - strGossipItem = GOSSIP_ITEM_KABLAM; - } - else if (pPlayer->HasSpell(SPELL_TO_AREA52)) - uiNpcTextId = 0; - } - break; - case NPC_SMILES: - uiNpcTextId = 10363; - if (pPlayer->GetBaseSkillValue(SKILL_ENGINEERING) >= 350 && pPlayer->HasSpell(S_GNOMISH)) - { - if (!pPlayer->HasSpell(SPELL_TO_TOSHLEY)) - { - bCanLearn = true; - strGossipItem = GOSSIP_ITEM_SMILES; - } - else if (pPlayer->HasSpell(SPELL_TO_TOSHLEY)) - uiNpcTextId = 0; - } - break; - } - } - - if (bCanLearn) - { - if (pPlayer->HasItemCount(ITEM_GOBLIN_CARD,1) || pPlayer->HasItemCount(ITEM_GNOMISH_CARD,1)) - pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, strGossipItem, pCreature->GetEntry(), GOSSIP_ACTION_INFO_DEF+1); - } - - pPlayer->SEND_GOSSIP_MENU(uiNpcTextId ? uiNpcTextId : pPlayer->GetGossipTextId(pCreature), pCreature->GetGUID()); - return true; -} - -bool GossipSelect_npc_engineering_tele_trinket(Player* pPlayer, Creature* pCreature, uint32 uiSender, uint32 uiAction) -{ - if (uiAction == GOSSIP_ACTION_INFO_DEF+1) - pPlayer->CLOSE_GOSSIP_MENU(); - - if (uiSender != pCreature->GetEntry()) - return true; - - switch(uiSender) - { - case NPC_ZAP: - pPlayer->CastSpell(pPlayer,SPELL_LEARN_TO_EVERLOOK,false); - break; - case NPC_JHORDY: - pPlayer->CastSpell(pPlayer,SPELL_LEARN_TO_GADGET,false); - break; - case NPC_KABLAM: - pPlayer->CastSpell(pPlayer,SPELL_LEARN_TO_AREA52,false); - break; - case NPC_SMILES: - pPlayer->CastSpell(pPlayer,SPELL_LEARN_TO_TOSHLEY,false); - break; - } - - return true; -} - /*### # start menues leatherworking ###*/ @@ -1315,12 +1183,6 @@ void AddSC_npc_professions() newscript->pGossipSelect = &GossipSelect_npc_prof_blacksmith; newscript->RegisterSelf(); - newscript = new Script; - newscript->Name = "npc_engineering_tele_trinket"; - newscript->pGossipHello = &GossipHello_npc_engineering_tele_trinket; - newscript->pGossipSelect = &GossipSelect_npc_engineering_tele_trinket; - newscript->RegisterSelf(); - newscript = new Script; newscript->Name = "npc_prof_leather"; newscript->pGossipHello = &GossipHello_npc_prof_leather; diff --git a/scripts/world/npcs_special.cpp b/scripts/world/npcs_special.cpp index 8fea3cf..7405b96 100644 --- a/scripts/world/npcs_special.cpp +++ b/scripts/world/npcs_special.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or @@ -35,7 +35,7 @@ npc_guardian 100% guardianAI used to prevent players from accessin npc_garments_of_quests 80% NPC's related to all Garments of-quests 5621, 5624, 5625, 5648, 5650 npc_injured_patient 100% patients for triage-quests (6622 and 6624) npc_doctor 100% Gustaf Vanhowzen and Gregory Victor, quest 6622 and 6624 (Triage) -npc_innkeeper 25% Innkeepers in general. A lot do be done here (misc options for events) +npc_innkeeper 25% ScriptName not assigned. Innkeepers in general. npc_kingdom_of_dalaran_quests Misc NPC's gossip option related to quests 12791, 12794 and 12796 npc_lunaclaw_spirit 100% Appears at two different locations, quest 6001/6002 npc_mount_vendor 100% Regular mount vendors all over the world. Display gossip if player doesn't meet the requirements to buy @@ -1061,17 +1061,6 @@ enum SPELL_TRICK_OR_TREAT = 24751, // create item or random buff SPELL_TRICK_OR_TREATED = 24755, // buff player get when tricked or treated - SPELL_TREAT = 24715, - SPELL_TRICK_NO_ATTACK = 24753, - SPELL_TRICK_GNOME = 24713, - SPELL_TRICK_GHOST_MALE = 24735, - SPELL_TRICK_GHOST_FEMALE = 24736, - SPELL_TRICK_NINJA_MALE = 24710, - SPELL_TRICK_NINJA_FEMALE = 24711, - SPELL_TRICK_PIRATE_MALE = 24708, - SPELL_TRICK_PIRATE_FEMALE = 24709, - SPELL_TRICK_SKELETON = 24723, - SPELL_TRICK_BAT = 24732 }; #define GOSSIP_ITEM_TRICK_OR_TREAT "Trick or Treat!" @@ -1079,7 +1068,7 @@ enum bool GossipHello_npc_innkeeper(Player* pPlayer, Creature* pCreature) { - pPlayer->PrepareGossipMenu(pCreature); + pPlayer->PrepareGossipMenu(pCreature, pPlayer->GetDefaultGossipMenuForSource(pCreature)); if (IsHolidayActive(HOLIDAY_HALLOWS_END) && !pPlayer->HasAura(SPELL_TRICK_OR_TREATED, EFFECT_INDEX_0)) pPlayer->ADD_GOSSIP_ITEM(GOSSIP_ICON_CHAT, GOSSIP_ITEM_TRICK_OR_TREAT, GOSSIP_SENDER_MAIN, GOSSIP_ACTION_INFO_DEF+2); @@ -1103,41 +1092,10 @@ bool GossipSelect_npc_innkeeper(Player* pPlayer, Creature* pCreature, uint32 uiS case GOSSIP_ACTION_INFO_DEF+1: pPlayer->SEND_GOSSIP_MENU(TEXT_ID_WHAT_TO_DO, pCreature->GetGUID()); break; - case GOSSIP_ACTION_INFO_DEF+2: - { pPlayer->CLOSE_GOSSIP_MENU(); - - // either trick or treat, 50% chance - if (urand(0, 1)) - { - pPlayer->CastSpell(pPlayer, SPELL_TREAT, true); - } - else - { - uint32 uiTrickSpell = 0; - - switch(urand(0, 9)) // note that female characters can get male costumes and vice versa - { - case 0: uiTrickSpell = SPELL_TRICK_NO_ATTACK; break; - case 1: uiTrickSpell = SPELL_TRICK_GNOME; break; - case 2: uiTrickSpell = SPELL_TRICK_GHOST_MALE; break; - case 3: uiTrickSpell = SPELL_TRICK_GHOST_FEMALE; break; - case 4: uiTrickSpell = SPELL_TRICK_NINJA_MALE; break; - case 5: uiTrickSpell = SPELL_TRICK_NINJA_FEMALE; break; - case 6: uiTrickSpell = SPELL_TRICK_PIRATE_MALE; break; - case 7: uiTrickSpell = SPELL_TRICK_PIRATE_FEMALE; break; - case 8: uiTrickSpell = SPELL_TRICK_SKELETON; break; - case 9: uiTrickSpell = SPELL_TRICK_BAT; break; - } - - pPlayer->CastSpell(pPlayer, uiTrickSpell, true); - } - - pPlayer->CastSpell(pPlayer, SPELL_TRICK_OR_TREATED, true); + pCreature->CastSpell(pPlayer, SPELL_TRICK_OR_TREAT, true); break; - } - case GOSSIP_OPTION_VENDOR: pPlayer->SEND_VENDORLIST(pCreature->GetGUID()); break; @@ -2440,7 +2398,7 @@ void AddSC_npcs_special() newscript->Name = "npc_innkeeper"; newscript->pGossipHello = &GossipHello_npc_innkeeper; newscript->pGossipSelect = &GossipSelect_npc_innkeeper; - newscript->RegisterSelf(); + newscript->RegisterSelf(false); // script and error report disabled, but script can be used for custom needs, adding ScriptName newscript = new Script; newscript->Name = "npc_kingdom_of_dalaran_quests"; diff --git a/scripts/world/spell_scripts.cpp b/scripts/world/spell_scripts.cpp index 2ef2290..8bb9964 100644 --- a/scripts/world/spell_scripts.cpp +++ b/scripts/world/spell_scripts.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or @@ -36,6 +36,9 @@ spell 45109 spell 45111 spell 39246 spell 52090 +spell 51331 +spell 51332 +spell 51366 EndContentData */ #include "precompiled.h" @@ -268,7 +271,40 @@ enum // quest 12659, item 38731 SPELL_AHUNAES_KNIFE = 52090, - NPC_SCALPS_KILL_CREDIT_BUNNY = 28622 + NPC_SCALPS_KILL_CREDIT_BUNNY = 28622, + + // quest 13549 + SPELL_TAILS_UP_GENDER_MASTER = 62110, + SPELL_TAILS_UP_AURA = 62109, + SPELL_FORCE_LEOPARD_SUMMON = 62117, + SPELL_FORCE_BEAR_SUMMON = 62118, + NPC_FROST_LEOPARD = 29327, + NPC_ICEPAW_BEAR = 29319, + NPC_LEOPARD_KILL_CREDIT = 33005, + NPC_BEAR_KILL_CREDIT = 33006, + SAY_ITS_FEMALE = -1000642, + SAY_ITS_MALE = -1000643, + + // quest 9849, item 24501 + SPELL_THROW_GORDAWG_BOULDER = 32001, + NPC_MINION_OF_GUROK = 18181, + + // quest 12589 + SPELL_HIT_APPLE = 51331, + SPELL_MISS_APPLE = 51332, + SPELL_MISS_APPLE_HIT_BIRD = 51366, + SPELL_APPLE_FALLS_TO_GROUND = 51371, + NPC_APPLE = 28053, + NPC_LUCKY_WILHELM = 28054, + NPC_DROSTAN = 28328, + SAY_LUCKY_HIT_1 = -1000644, + SAY_LUCKY_HIT_2 = -1000645, + SAY_LUCKY_HIT_3 = -1000646, + SAY_LUCKY_HIT_APPLE = -1000647, + SAY_DROSTAN_GOT_LUCKY_1 = -1000648, + SAY_DROSTAN_GOT_LUCKY_2 = -1000649, + SAY_DROSTAN_HIT_BIRD_1 = -1000650, + SAY_DROSTAN_HIT_BIRD_2 = -1000651, }; bool EffectAuraDummy_spell_aura_dummy_npc(const Aura* pAura, bool bApply) @@ -300,7 +336,7 @@ bool EffectAuraDummy_spell_aura_dummy_npc(const Aura* pAura, bool bApply) { if (Player* pPlayer = (Player*)pAura->GetCaster()) { - pPlayer->KilledMonsterCredit(NPC_FALLEN_HERO_SPIRIT_PROXY, pCreature->GetGUID()); + pPlayer->KilledMonsterCredit(NPC_FALLEN_HERO_SPIRIT_PROXY, pCreature->GetObjectGuid()); pCreature->ForcedDespawn(); } } @@ -507,7 +543,7 @@ bool EffectDummyCreature_spell_dummy_npc(Unit* pCaster, uint32 uiSpellId, SpellE } pCreatureTarget->SetStandState(UNIT_STAND_STATE_STAND); - pCreatureTarget->SetUInt32Value(UNIT_NPC_EMOTESTATE, EMOTE_STATE_WORK); + pCreatureTarget->HandleEmote(EMOTE_STATE_WORK); break; } } @@ -755,6 +791,118 @@ bool EffectDummyCreature_spell_dummy_npc(Unit* pCaster, uint32 uiSpellId, SpellE } return true; } + case SPELL_TAILS_UP_GENDER_MASTER: + { + if (uiEffIndex == EFFECT_INDEX_0) + { + bool isMale = urand(0,1); + Player* pPlayer = pCreatureTarget->GetLootRecipient(); + + if (!pPlayer) + return true; + + if (isMale) + DoScriptText(SAY_ITS_MALE, pCreatureTarget, pPlayer); + else + DoScriptText(SAY_ITS_FEMALE, pCreatureTarget, pPlayer); + + switch(pCreatureTarget->GetEntry()) + { + case NPC_FROST_LEOPARD: + { + if (isMale) + pCreatureTarget->CastSpell(pCreatureTarget, SPELL_TAILS_UP_AURA, true); + else + { + pPlayer->KilledMonsterCredit(NPC_LEOPARD_KILL_CREDIT, pCreatureTarget->GetObjectGuid()); + pCreatureTarget->CastSpell(pPlayer, SPELL_FORCE_LEOPARD_SUMMON, true); + pCreatureTarget->ForcedDespawn(); + } + + break; + } + case NPC_ICEPAW_BEAR: + { + if (isMale) + pCreatureTarget->CastSpell(pCreatureTarget, SPELL_TAILS_UP_AURA, true); + else + { + pPlayer->KilledMonsterCredit(NPC_BEAR_KILL_CREDIT, pCreatureTarget->GetObjectGuid()); + pCreatureTarget->CastSpell(pPlayer, SPELL_FORCE_BEAR_SUMMON, true); + pCreatureTarget->ForcedDespawn(); + } + + break; + } + } + return true; + } + return true; + } + case SPELL_THROW_GORDAWG_BOULDER: + { + if (uiEffIndex == EFFECT_INDEX_0) + { + for(int i = 0; i < 3; ++i) + { + if (irand(i, 2)) // 2-3 summons + pCreatureTarget->SummonCreature(NPC_MINION_OF_GUROK, 0.0f, 0.0f, 0.0f, 0.0f, TEMPSUMMON_CORPSE_DESPAWN, 5000); + } + + if (pCreatureTarget->getVictim()) + { + pCaster->DealDamage(pCreatureTarget, pCreatureTarget->GetMaxHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false); + return true; + } + + // If not in combat, no xp or loot + pCreatureTarget->SetDeathState(JUST_DIED); + pCreatureTarget->SetHealth(0); + return true; + } + return true; + } + case SPELL_HIT_APPLE: + { + if (uiEffIndex == EFFECT_INDEX_0) + { + if (pCaster->GetTypeId() == TYPEID_PLAYER) + ((Player*)pCaster)->KilledMonsterCredit(pCreatureTarget->GetEntry(), pCreatureTarget->GetObjectGuid()); + + pCreatureTarget->CastSpell(pCreatureTarget, SPELL_APPLE_FALLS_TO_GROUND, false); + + if (Creature* pLuckyWilhelm = GetClosestCreatureWithEntry(pCreatureTarget, NPC_LUCKY_WILHELM, 2*INTERACTION_DISTANCE)) + DoScriptText(SAY_LUCKY_HIT_APPLE, pLuckyWilhelm); + } + return true; + } + case SPELL_MISS_APPLE: + { + if (uiEffIndex == EFFECT_INDEX_0) + { + switch (urand(1, 3)) + { + case 1: DoScriptText(SAY_LUCKY_HIT_1, pCreatureTarget); break; + case 2: DoScriptText(SAY_LUCKY_HIT_2, pCreatureTarget); break; + case 3: DoScriptText(SAY_LUCKY_HIT_3, pCreatureTarget); break; + } + + if (Creature* pDrostan = GetClosestCreatureWithEntry(pCreatureTarget, NPC_DROSTAN, 4*INTERACTION_DISTANCE)) + DoScriptText(urand(0, 1) ? SAY_DROSTAN_GOT_LUCKY_1 : SAY_DROSTAN_GOT_LUCKY_2, pDrostan); + } + return true; + } + case SPELL_MISS_APPLE_HIT_BIRD: + { + if (uiEffIndex == EFFECT_INDEX_0) + { + if (Creature* pDrostan = GetClosestCreatureWithEntry(pCreatureTarget, NPC_DROSTAN, 5*INTERACTION_DISTANCE)) + DoScriptText(urand(0, 1) ? SAY_DROSTAN_HIT_BIRD_1 : SAY_DROSTAN_HIT_BIRD_2, pDrostan); + + pCreatureTarget->DealDamage(pCreatureTarget, pCreatureTarget->GetHealth(), NULL, DIRECT_DAMAGE, SPELL_SCHOOL_MASK_NORMAL, NULL, false); + } + return true; + } } return false; @@ -762,16 +910,16 @@ bool EffectDummyCreature_spell_dummy_npc(Unit* pCaster, uint32 uiSpellId, SpellE void AddSC_spell_scripts() { - Script* newscript; - - newscript = new Script; - newscript->Name = "spell_dummy_go"; - newscript->pEffectDummyGO = &EffectDummyGameObj_spell_dummy_go; - newscript->RegisterSelf(); - - newscript = new Script; - newscript->Name = "spell_dummy_npc"; - newscript->pEffectDummyNPC = &EffectDummyCreature_spell_dummy_npc; - newscript->pEffectAuraDummy = &EffectAuraDummy_spell_aura_dummy_npc; - newscript->RegisterSelf(); + Script* pNewscript; + + pNewscript = new Script; + pNewscript->Name = "spell_dummy_go"; + pNewscript->pEffectDummyGO = &EffectDummyGameObj_spell_dummy_go; + pNewscript->RegisterSelf(); + + pNewscript = new Script; + pNewscript->Name = "spell_dummy_npc"; + pNewscript->pEffectDummyNPC = &EffectDummyCreature_spell_dummy_npc; + pNewscript->pEffectAuraDummy = &EffectAuraDummy_spell_aura_dummy_npc; + pNewscript->RegisterSelf(); } diff --git a/sd2_revision_nr.h b/sd2_revision_nr.h new file mode 100644 index 0000000..7ef7e32 --- /dev/null +++ b/sd2_revision_nr.h @@ -0,0 +1,4 @@ +#ifndef __SD2_REVISION_NR_H__ +#define __SD2_REVISION_NR_H__ + #define SD2_REVISION_NR "2081" +#endif // __SD2_REVISION_NR_H__ diff --git a/sd2_revision_sql.h b/sd2_revision_sql.h new file mode 100644 index 0000000..5996dd2 --- /dev/null +++ b/sd2_revision_sql.h @@ -0,0 +1,5 @@ +#ifndef __SD2_REVISION_SQL_H__ +#define __SD2_REVISION_SQL_H__ + #define REVISION_DB_SCRIPTDEV2 "required__scriptdev2" + #define REVISION_DB_SD2_MANGOS "required__mangos" +#endif // __SD2_REVISION_SQL_H__ diff --git a/sql/Updates/0.0.4/r1516_scriptdev2.sql b/sql/Updates/0.0.4/r1516_scriptdev2.sql index 757891e..13360e1 100644 --- a/sql/Updates/0.0.4/r1516_scriptdev2.sql +++ b/sql/Updates/0.0.4/r1516_scriptdev2.sql @@ -1,2 +1 @@ UPDATE script_texts SET comment='sladran SAY_SUMMON_CONSTRICTOR' WHERE entry=-1604002; - \ No newline at end of file diff --git a/sql/Updates/r1647_scriptdev2.sql b/sql/Updates/r1647_scriptdev2.sql index 3138e02..1064672 100644 --- a/sql/Updates/r1647_scriptdev2.sql +++ b/sql/Updates/r1647_scriptdev2.sql @@ -7,7 +7,7 @@ INSERT INTO script_texts (entry,content_default,sound,type,language,emote,commen (-1000565,'Brave adventurer, thank you for rescuing me! I am sure Marshal Marris will reward your kind deed.',0,0,0,0,'SAY_CORPORAL_KEESHAN_5'); DELETE FROM script_waypoint WHERE entry = 349; -INSERT INTO script_waypoint VALUES +INSERT INTO script_waypoint VALUES (349, 01, -8769.591797, -2185.733643, 141.974564, 0, ''), (349, 02, -8776.540039, -2193.782959, 140.960159, 0, ''), (349, 03, -8783.289063, -2194.818604, 140.461731, 0, ''), @@ -26,7 +26,7 @@ INSERT INTO script_waypoint VALUES (349, 16, -8741.869141, -2250.997070, 154.485718, 0, ''), (349, 17, -8733.218750, -2251.010742, 154.360031, 0, ''), (349, 18, -8717.474609, -2245.044678, 154.68614, 0, ''), -(349, 19, -8712.240234, -2246.826172, 154.709473, 0, ''), +(349, 19, -8712.240234, -2246.826172, 154.709473, 0, ''), (349, 20, -8693.840820, -2240.410889, 152.909714, 0, ''), (349, 21, -8681.818359, -2245.332764, 155.517838, 0, ''), (349, 22, -8669.86, -2252.77, 154.854, 0, ''), diff --git a/sql/Updates/r1651_scriptdev2.sql b/sql/Updates/r1651_scriptdev2.sql index 7c9a03d..13a63f7 100644 --- a/sql/Updates/r1651_scriptdev2.sql +++ b/sql/Updates/r1651_scriptdev2.sql @@ -1,2 +1 @@ UPDATE script_texts SET content_default='Ah, fresh air, at last! I need a moment to rest.' WHERE entry=-1000562; - diff --git a/sql/Updates/r1652_scriptdev2.sql b/sql/Updates/r1652_scriptdev2.sql index c758f30..32c36f8 100644 --- a/sql/Updates/r1652_scriptdev2.sql +++ b/sql/Updates/r1652_scriptdev2.sql @@ -1,3 +1,2 @@ UPDATE script_texts SET content_default='%s raises more skeletons!' WHERE entry=-1533131; UPDATE script_texts SET content_default='%s teleports to the balcony above!' WHERE entry=-1533132; - diff --git a/sql/Updates/r1720_scriptdev2.sql b/sql/Updates/r1720_scriptdev2.sql index 6c4cfe1..1c9789e 100644 --- a/sql/Updates/r1720_scriptdev2.sql +++ b/sql/Updates/r1720_scriptdev2.sql @@ -1,5 +1,5 @@ DELETE FROM script_waypoint WHERE entry=20415; -INSERT INTO script_waypoint VALUES +INSERT INTO script_waypoint VALUES (20415, 0, 2488.77, 2184.89, 104.64, 0, ""), (20415, 1, 2478.72, 2184.77, 98.58, 0, ""), (20415, 2, 2473.52, 2184.71, 99.00, 0, ""), diff --git a/sql/Updates/r1946_scriptdev2.sql b/sql/Updates/r1946_scriptdev2.sql index 2eee553..3f446c6 100644 --- a/sql/Updates/r1946_scriptdev2.sql +++ b/sql/Updates/r1946_scriptdev2.sql @@ -1,6 +1,6 @@ UPDATE script_texts SET type=6 WHERE entry=-1409004; -DELETE FROM script_texts WHERE entry IN (-1409007, -1409020, -1409021, -1409022); +DELETE FROM script_texts WHERE entry IN (-1409007, -1409019, -1409020, -1409021, -1409022); INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES (-1409007,'Impossible! Stay your attack mortals! I submitt! I submitt!',8038,1,0,0,'majordomo SAY_DEFEAT_1'), (-1409019,'You think you\'ve won already? Perhaps you\'ll need another lesson in pain!',0,1,0,0,'majordomo SAY_LAST_ADD'), diff --git a/sql/Updates/r1962_mangos.sql b/sql/Updates/r1962_mangos.sql new file mode 100644 index 0000000..ffa8204 --- /dev/null +++ b/sql/Updates/r1962_mangos.sql @@ -0,0 +1 @@ +UPDATE creature_template SET ScriptName='npc_isla_starmane' WHERE entry=18760; diff --git a/sql/Updates/r1962_scriptdev2.sql b/sql/Updates/r1962_scriptdev2.sql new file mode 100644 index 0000000..ae3ded2 --- /dev/null +++ b/sql/Updates/r1962_scriptdev2.sql @@ -0,0 +1,79 @@ +DELETE FROM script_texts WHERE entry BETWEEN -1000634 AND -1000629; +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1000629,' Damsel in distress over here!',0,0,0,0,'isla starmane - SAY_ISLA_PERIODIC_1'), +(-1000630,'Hello? Help?',0,0,0,0,'isla starmane - SAY_ISLA_PERIODIC_2'), +(-1000631,'Don''t leave me in here! Cause if you do I will find you!',0,0,0,0,'isla starmane - SAY_ISLA_PERIODIC_3'), +(-1000632,'Ok, let''s get out of here!',0,0,0,0,'isla starmane - SAY_ISLA_START'), +(-1000633,'You sure you''re ready? Take a moment.',0,0,0,0,'isla starmane - SAY_ISLA_WAITING'), +(-1000634,'Alright, let''s do this!',0,0,0,0,'isla starmane - SAY_ISLA_LEAVE_BUILDING'); + +DELETE FROM script_waypoint WHERE entry = 18760; +INSERT INTO script_waypoint (entry, pointid, location_x, location_y, location_z, waittime, point_comment) VALUES +(18760, 01, -2267.07, 3091.46, 13.8271, 0, ''), +(18760, 02, -2270.92, 3094.19, 13.8271, 0, ''), +(18760, 03, -2279.08, 3100.04, 13.8271, 0, ''), +(18760, 04, -2290.05, 3105.07, 13.8271, 0, ''), +(18760, 05, -2297.64, 3112.32, 13.8271, 0, ''), +(18760, 06, -2303.89, 3118.22, 13.8231, 10000, 'building exit'), +(18760, 07, -2307.77, 3123.47, 13.7257, 0, ''), +(18760, 08, -2310.67, 3126.2, 12.5841, 0, ''), +(18760, 09, -2311.48, 3126.98, 12.2769, 0, ''), +(18760, 10, -2316.91, 3132.13, 11.9261, 0, ''), +(18760, 11, -2320.43, 3135.54, 11.7436, 0, ''), +(18760, 12, -2327.38, 3139.36, 10.9431, 0, ''), +(18760, 13, -2332.02, 3142.05, 9.81277, 0, ''), +(18760, 14, -2338.21, 3145.32, 9.31001, 0, ''), +(18760, 15, -2343.1, 3148.91, 8.84879, 0, ''), +(18760, 16, -2347.76, 3153.15, 7.71049, 0, ''), +(18760, 17, -2351.04, 3156.12, 6.66476, 0, ''), +(18760, 18, -2355.15, 3163.18, 5.11997, 0, ''), +(18760, 19, -2359.01, 3169.83, 3.64343, 0, ''), +(18760, 20, -2364.85, 3176.81, 2.32802, 0, ''), +(18760, 21, -2368.77, 3181.69, 1.53285, 0, ''), +(18760, 22, -2371.76, 3185.11, 0.979932, 0, ''), +(18760, 23, -2371.85, 3191.89, -0.293048, 0, ''), +(18760, 24, -2370.99, 3199.6, -1.10504, 0, 'turn left 1'), +(18760, 25, -2376.24, 3205.54, -1.04152, 0, ''), +(18760, 26, -2380.99, 3211.61, -1.16891, 0, ''), +(18760, 27, -2384.04, 3218.4, -1.15279, 0, ''), +(18760, 28, -2385.41, 3226.22, -1.23403, 0, ''), +(18760, 29, -2386.02, 3233.89, -1.31723, 0, ''), +(18760, 30, -2384.7, 3239.82, -1.51903, 0, ''), +(18760, 31, -2382.98, 3247.94, -1.39163, 0, ''), +(18760, 32, -2379.68, 3254.22, -1.25927, 0, ''), +(18760, 33, -2375.27, 3259.69, -1.22925, 0, ''), +(18760, 34, -2369.62, 3264.55, -1.1879, 0, ''), +(18760, 35, -2364.01, 3268.32, -1.48348, 0, ''), +(18760, 36, -2356.61, 3272.31, -1.5505, 0, ''), +(18760, 37, -2352.3, 3274.63, -1.35693, 0, ''), +(18760, 38, -2348.54, 3278.04, -1.04161, 0, 'turn left 2'), +(18760, 39, -2347.56, 3282.41, -0.75979, 0, ''), +(18760, 40, -2348.29, 3288.91, -0.63215, 0, ''), +(18760, 41, -2349.68, 3298.84, -1.07864, 0, ''), +(18760, 42, -2351.15, 3308.52, -1.38864, 0, ''), +(18760, 43, -2352.2, 3317.14, -1.59873, 0, ''), +(18760, 44, -2351.59, 3325.51, -1.92624, 0, ''), +(18760, 45, -2350.88, 3333.38, -2.32506, 0, ''), +(18760, 46, -2350.05, 3342.68, -2.51886, 0, ''), +(18760, 47, -2350.12, 3347.32, -2.57528, 0, ''), +(18760, 48, -2348.72, 3353.7, -2.72689, 0, ''), +(18760, 49, -2346.53, 3360.85, -2.9756, 0, ''), +(18760, 50, -2344.83, 3365.46, -3.3311, 0, ''), +(18760, 51, -2342.68, 3368.91, -3.74526, 0, ''), +(18760, 52, -2340.25, 3371.44, -4.10499, 0, ''), +(18760, 53, -2337.4, 3373.47, -4.44362, 0, ''), +(18760, 54, -2332.68, 3376.02, -5.19648, 0, ''), +(18760, 55, -2326.69, 3379.64, -6.24757, 0, ''), +(18760, 56, -2321.2, 3383.98, -7.28247, 0, ''), +(18760, 57, -2317.81, 3387.78, -8.40093, 0, ''), +(18760, 58, -2315.3, 3392.47, -9.63431, 0, ''), +(18760, 59, -2314.69, 3396.6, -10.2031, 0, ''), +(18760, 60, -2315.48, 3402.35, -10.8211, 0, 'gate'), +(18760, 61, -2317.55, 3409.27, -11.3309, 5000, 'Firewing point exit'), +(18760, 62, -2320.69, 3412.99, -11.5207, 0, ''), +(18760, 63, -2326.88, 3417.89, -11.6105, 0, ''), +(18760, 64, -2332.73, 3421.74, -11.5659, 0, ''), +(18760, 65, -2337.23, 3424.89, -11.496, 0, ''), +(18760, 66, -2339.57, 3429.17, -11.3782, 0, ''), +(18760, 67, -2341.66, 3435.86, -11.3746, 5000, 'Wave and transform'), +(18760, 68, -2342.15, 3443.94, -11.2562, 2000, 'final destination'); diff --git a/sql/Updates/r1963_scriptdev2.sql b/sql/Updates/r1963_scriptdev2.sql new file mode 100644 index 0000000..370df9a --- /dev/null +++ b/sql/Updates/r1963_scriptdev2.sql @@ -0,0 +1 @@ +UPDATE sd2_db_version SET version='ScriptDev2 (for MaNGOS 11105+) '; diff --git a/sql/Updates/r1965_mangos.sql b/sql/Updates/r1965_mangos.sql new file mode 100644 index 0000000..0420f75 --- /dev/null +++ b/sql/Updates/r1965_mangos.sql @@ -0,0 +1 @@ +UPDATE creature_template SET ScriptName='npc_blastmaster_emi_shortfuse' WHERE entry=7998; diff --git a/sql/Updates/r1965_scriptdev2.sql b/sql/Updates/r1965_scriptdev2.sql new file mode 100644 index 0000000..769c441 --- /dev/null +++ b/sql/Updates/r1965_scriptdev2.sql @@ -0,0 +1,52 @@ +DELETE FROM script_texts WHERE entry BETWEEN -1090023 AND -1090000 OR entry=-1090028; +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1090000,'With your help, I can evaluate these tunnels.',0,0,0,1,'emi shortfuse SAY_START'), +(-1090001,'Let\'s see if we can find out where these Troggs are coming from.... and put a stop to the invasion!',0,0,0,1,'emi shortfuse SAY_INTRO_1'), +(-1090002,'Such devastation... what a horrible mess...',0,0,0,5,'emi shortfuse SAY_INTRO_2'), +(-1090003,'It\'s quiet here....',0,0,0,1,'emi shortfuse SAY_INTRO_3'), +(-1090004,'...too quiet.',0,0,0,1,'emi shortfuse SAY_INTRO_4'), +(-1090005,'Look! Over there at the tunnel wall!',0,0,0,25,'emi shortfuse SAY_LOOK_1'), +(-1090006,'Trogg incursion! Defend me while I blast the hole closed!',0,0,0,5,'emi shortfuse SAY_HEAR_1'), +(-1090007,'Get this, $n off of me!',0,0,0,0,'emi shortfuse SAY_AGGRO_1'), +(-1090008,'I don\'t think one charge is going to cut it. Keep fending them off!',0,0,0,0,'emi shortfuse SAY_CHARGE_1'), +(-1090009,'The charges are set. Get back before they blow!',0,0,0,5,'emi shortfuse SAY_CHARGE_2'), +(-1090010,'Incoming blast in 10 seconds!',0,1,0,5,'emi shortfuse SAY_BLOW_1_10'), +(-1090011,'Incoming blast in 5 seconds. Clear the tunnel! Stay back!',0,1,0,5,'emi shortfuse SAY_BLOW_1_5'), +(-1090012,'FIRE IN THE HOLE!',0,1,0,25,'emi shortfuse SAY_BLOW_1'), +(-1090013,'Well done! Without your help I would have never been able to thwart that wave of troggs.',0,0,0,4,'emi shortfuse SAY_FINISH_1'), +(-1090014,'Did you hear something?',0,0,0,6,'emi shortfuse SAY_LOOK_2'), +(-1090015,'I heard something over there.',0,0,0,25,'emi shortfuse SAY_HEAR_2'), +(-1090016,'More troggs! Ward them off as I prepare the explosives!',0,0,0,0,'emi shortfuse SAY_CHARGE_3'), +(-1090017,'The final charge is set. Stand back!',0,0,0,1,'emi shortfuse SAY_CHARGE_4'), +(-1090018,'10 seconds to blast! Stand back!!!',0,1,0,5,'emi shortfuse SAY_BLOW_2_10'), +(-1090019,'5 seconds until detonation!!!!!',0,1,0,5,'emi shortfuse SAY_BLOW_2_5'), +(-1090020,'Nice work! I\'ll set off the charges to prevent any more troggs from making it to the surface.',0,0,0,1,'emi shortfuse SAY_BLOW_SOON'), +(-1090021,'FIRE IN THE HOLE!',0,1,0,0,'emi shortfuse SAY_BLOW_2'), +(-1090022,'Superb! Because of your help, my people stand a chance of re-taking our beloved city. Three cheers to you!',0,0,0,0,'emi shortfuse SAY_FINISH_2'), + +(-1090023,'We come from below! You can never stop us!',0,1,0,1,'grubbis SAY_GRUBBIS_SPAWN'), + +(-1090028,'$n attacking! Help!',0,0,0,0,'emi shortfuse SAY_AGGRO_2'); + + +DELETE FROM script_waypoint WHERE entry=7998; +INSERT INTO script_waypoint VALUES +(7998, 01, -510.1305, -132.6899, -152.5, 0, ''), +(7998, 02, -511.0994, -129.74, -153.8453, 0, ''), +(7998, 03, -511.7897, -127.4764, -155.5505, 0, ''), +(7998, 04, -512.9688, -124.926, -156.1146, 5000, ''), +(7998, 05, -513.9719, -120.2358, -156.1161, 0, ''), +(7998, 06, -514.3875, -115.1896, -156.1165, 0, ''), +(7998, 07, -514.3039, -111.4777, -155.5205, 0, ''), +(7998, 08, -514.8401, -107.6633, -154.8925, 0, ''), +(7998, 09, -518.9943, -101.4161, -154.6482, 27000, ''), +(7998, 10, -526.9984, -98.14884, -155.6253, 0, ''), +(7998, 11, -534.5686, -105.4101, -155.989, 30000, ''), +(7998, 12, -535.5336, -104.6947, -155.9713, 0, ''), +(7998, 13, -541.6304, -98.6583, -155.8584, 25000, ''), +(7998, 14, -535.0923, -99.91748, -155.9742, 0, ''), +(7998, 15, -519.0099, -101.5097, -154.6766, 3000, ''), +(7998, 16, -504.4659, -97.84802, -150.9554, 30000, ''), +(7998, 17, -506.9069, -89.14736, -151.083, 23000, ''), +(7998, 18, -512.7576, -101.9025, -153.198, 0, ''), +(7998, 19, -519.9883, -124.8479, -156.128, 86400000, 'this npc should not reset on wp end'); diff --git a/sql/Updates/r1968_scriptdev2.sql b/sql/Updates/r1968_scriptdev2.sql new file mode 100644 index 0000000..d11d861 --- /dev/null +++ b/sql/Updates/r1968_scriptdev2.sql @@ -0,0 +1 @@ +UPDATE sd2_db_version SET version='ScriptDev2 (for MaNGOS 11109+) '; diff --git a/sql/Updates/r1972_scriptdev2.sql b/sql/Updates/r1972_scriptdev2.sql new file mode 100644 index 0000000..9cff54d --- /dev/null +++ b/sql/Updates/r1972_scriptdev2.sql @@ -0,0 +1 @@ +UPDATE sd2_db_version SET version='ScriptDev2 (for MaNGOS 11126+) '; diff --git a/sql/Updates/r1973_mangos.sql b/sql/Updates/r1973_mangos.sql new file mode 100644 index 0000000..d0aaab2 --- /dev/null +++ b/sql/Updates/r1973_mangos.sql @@ -0,0 +1 @@ +UPDATE creature_template SET ScriptName='spell_dummy_npc' WHERE entry IN (28465,28600); diff --git a/sql/Updates/r1974_mangos.sql b/sql/Updates/r1974_mangos.sql new file mode 100644 index 0000000..e15146e --- /dev/null +++ b/sql/Updates/r1974_mangos.sql @@ -0,0 +1 @@ +UPDATE creature_template SET ScriptName='npc_theldren_trigger' WHERE entry=16079; diff --git a/sql/Updates/r1975_scriptdev2.sql b/sql/Updates/r1975_scriptdev2.sql new file mode 100644 index 0000000..77bfd68 --- /dev/null +++ b/sql/Updates/r1975_scriptdev2.sql @@ -0,0 +1 @@ +UPDATE sd2_db_version SET version='ScriptDev2 (for MaNGOS 11136+) '; diff --git a/sql/Updates/r1987_mangos.sql b/sql/Updates/r1987_mangos.sql new file mode 100644 index 0000000..f899d46 --- /dev/null +++ b/sql/Updates/r1987_mangos.sql @@ -0,0 +1 @@ +UPDATE creature_template SET ScriptName='' WHERE npcflag=npcflag|65536; diff --git a/sql/Updates/r1990_mangos.sql b/sql/Updates/r1990_mangos.sql new file mode 100644 index 0000000..c1f9bfe --- /dev/null +++ b/sql/Updates/r1990_mangos.sql @@ -0,0 +1,4 @@ +DELETE FROM scripted_areatrigger WHERE entry=4778; +INSERT INTO scripted_areatrigger VALUES (4778,'at_ancient_male_vrykul'); + +UPDATE creature_template SET ScriptName='npc_ancient_male_vrykul' WHERE entry=24314; diff --git a/sql/Updates/r1990_scriptdev2.sql b/sql/Updates/r1990_scriptdev2.sql new file mode 100644 index 0000000..e3810c0 --- /dev/null +++ b/sql/Updates/r1990_scriptdev2.sql @@ -0,0 +1,9 @@ +DELETE FROM script_texts WHERE entry BETWEEN -1000641 AND -1000635; +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1000635,'So then we too are cursed?',0,0,0,0,'ancient vrykul SAY_VRYKUL_CURSED'), +(-1000636,'%s points to the infant.',0,2,0,0,'ancient vrykul EMOTE_VRYKUL_POINT'), +(-1000637,'%s sobs.',0,2,0,0,'ancient vrykul EMOTE_VRYKUL_SOB'), +(-1000638,'The gods have forsaken us! We must dispose of it before Ymiron is notified!',0,0,0,0,'ancient vrykul SAY_VRYKUL_DISPOSE'), +(-1000639,'NO! You cannot! I beg of you! It is our child!',0,0,0,0,'ancient vrykul SAY_VRYKUL_BEG'), +(-1000640,'Then what are we to do, wife? The others cannot find out. Should they learn of this aberration, we will all be executed.',0,0,0,0,'ancient vrykul SAY_VRYKUL_WHAT'), +(-1000641,'I... I will hide it. I will hide it until I find it a home, far away from here...',0,0,0,0,'ancient vrykul SAY_VRYKUL_HIDE'); diff --git a/sql/Updates/r1992_mangos.sql b/sql/Updates/r1992_mangos.sql new file mode 100644 index 0000000..34b61ee --- /dev/null +++ b/sql/Updates/r1992_mangos.sql @@ -0,0 +1 @@ +UPDATE gameobject_template SET ScriptName='go_service_gate' WHERE entry=175368; diff --git a/sql/Updates/r1992_scriptdev2.sql b/sql/Updates/r1992_scriptdev2.sql new file mode 100644 index 0000000..4e5521f --- /dev/null +++ b/sql/Updates/r1992_scriptdev2.sql @@ -0,0 +1,10 @@ +DELETE FROM script_texts WHERE entry BETWEEN -1329015 AND -1329008; +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1329008,'Intruders at the Service Gate! Lord Rivendare must be warned!',0,6,0,0,'barthilas SAY_WARN_BARON'), +(-1329009,'Intruders! More pawns of the Argent Dawn, no doubt. I already count one of their number among my prisoners. Withdraw from my domain before she is executed!',0,6,0,0,'baron rivendare SAY_ANNOUNCE_RUN_START'), +(-1329010,'You\'re still here? Your foolishness is amusing! The Argent Dawn wench needn\'t suffer in vain. Leave at once and she shall be spared!',0,6,0,0,'baron rivendare SAY_ANNOUNCE_RUN_10_MIN'), +(-1329011,'I shall take great pleasure in taking this poor wretch\'s life! It\'s not too late, she needn\'t suffer in vain. Turn back and her death shall be merciful!',0,6,0,0,'baron rivendare SAY_ANNOUNCE_RUN_5_MIN'), +(-1329012,'May this prisoner\'s death serve as a warning. None shall defy the Scourge and live!',0,6,0,0,'baron rivendare SAY_ANNOUNCE_RUN_FAIL'), +(-1329013,'So you see fit to toy with the Lich King\'s creations? Ramstein, be sure to give the intruders a proper greeting.',0,6,0,0,'baron rivendare SAY_ANNOUNCE_RAMSTEIN'), +(-1329014,'Time to take matters into my own hands. Come. Enter my domain and challenge the might of the Scourge!',0,6,0,0,'baron rivendare SAY_UNDEAD_DEFEAT'), +(-1329015,'You did it... you\'ve slain Baron Rivendare! The Argent Dawn shall hear of your valiant deeds!',0,0,0,0,'ysida SAY_EPILOGUE'); diff --git a/sql/Updates/r1993_mangos.sql b/sql/Updates/r1993_mangos.sql new file mode 100644 index 0000000..aa80f3d --- /dev/null +++ b/sql/Updates/r1993_mangos.sql @@ -0,0 +1 @@ +UPDATE instance_template SET ScriptName='instance_dire_maul' WHERE map=429; diff --git a/sql/Updates/r1993_scriptdev2.sql b/sql/Updates/r1993_scriptdev2.sql new file mode 100644 index 0000000..f5f498e --- /dev/null +++ b/sql/Updates/r1993_scriptdev2.sql @@ -0,0 +1,4 @@ +DELETE FROM script_texts WHERE entry IN (-1429000, -1429001); +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1429000,'The demon is loose! Quickly we must restrain him!',0,6,0,0,'highborne summoner SAY_FREE_IMMOLTHAR'), +(-1429001,'Who dares disrupt the sanctity of Eldre\'Thalas? Face me, cowards!',0,6,0,0,'prince tortheldrin SAY_KILL_IMMOLTHAR'); diff --git a/sql/Updates/r2004_mangos.sql b/sql/Updates/r2004_mangos.sql new file mode 100644 index 0000000..9b7b12e --- /dev/null +++ b/sql/Updates/r2004_mangos.sql @@ -0,0 +1 @@ +UPDATE creature_template SET ScriptName='boss_forgemaster_garfrost' WHERE entry=36494; diff --git a/sql/Updates/r2008_mangos.sql b/sql/Updates/r2008_mangos.sql new file mode 100644 index 0000000..917e4ed --- /dev/null +++ b/sql/Updates/r2008_mangos.sql @@ -0,0 +1,4 @@ +DELETE FROM scripted_areatrigger WHERE entry IN (3958, 3960); +INSERT INTO scripted_areatrigger VALUES +(3958, 'at_zulgurub'), +(3960, 'at_zulgurub'); diff --git a/sql/Updates/r2008_scriptdev2.sql b/sql/Updates/r2008_scriptdev2.sql new file mode 100644 index 0000000..8ce43e2 --- /dev/null +++ b/sql/Updates/r2008_scriptdev2.sql @@ -0,0 +1 @@ +UPDATE script_texts SET type=6 WHERE entry IN (-1309022, -1309023); diff --git a/sql/Updates/r2009_mangos.sql b/sql/Updates/r2009_mangos.sql new file mode 100644 index 0000000..cb757f7 --- /dev/null +++ b/sql/Updates/r2009_mangos.sql @@ -0,0 +1 @@ +UPDATE creature_template SET ScriptName='npc_dalinda_malem' WHERE entry=5644; diff --git a/sql/Updates/r2009_scriptdev2.sql b/sql/Updates/r2009_scriptdev2.sql new file mode 100644 index 0000000..6dd9e77 --- /dev/null +++ b/sql/Updates/r2009_scriptdev2.sql @@ -0,0 +1,21 @@ +DELETE FROM script_waypoint WHERE entry=5644; +INSERT INTO script_waypoint (entry, pointid, location_x, location_y, location_z, waittime, point_comment) VALUES +(5644, 1, -339.679, 1752.04, 139.482, 0, ''), +(5644, 2, -328.957, 1734.95, 139.327, 0, ''), +(5644, 3, -338.29, 1731.36, 139.327, 0, ''), +(5644, 4, -350.747, 1731.12, 139.338, 0, ''), +(5644, 5, -365.064, 1739.04, 139.376, 0, ''), +(5644, 6, -371.105, 1746.03, 139.374, 0, ''), +(5644, 7, -383.141, 1738.62, 138.93, 0, ''), +(5644, 8, -390.445, 1733.98, 136.353, 0, ''), +(5644, 9, -401.368, 1726.77, 131.071, 0, ''), +(5644, 10, -416.016, 1721.19, 129.807, 0, ''), +(5644, 11, -437.139, 1709.82, 126.342, 0, ''), +(5644, 12, -455.83, 1695.61, 119.305, 0, ''), +(5644, 13, -459.862, 1687.92, 116.059, 0, ''), +(5644, 14, -463.565, 1679.1, 111.653, 0, ''), +(5644, 15, -461.485, 1670.94, 109.033, 0, ''), +(5644, 16, -471.786, 1647.34, 102.862, 0, ''), +(5644, 17, -477.146, 1625.69, 98.342, 0, ''), +(5644, 18, -475.815, 1615.815, 97.07, 0, ''), +(5644, 19, -474.329, 1590.01, 94.4982, 0, ''); diff --git a/sql/Updates/r2010_mangos.sql b/sql/Updates/r2010_mangos.sql new file mode 100644 index 0000000..77adc93 --- /dev/null +++ b/sql/Updates/r2010_mangos.sql @@ -0,0 +1 @@ +UPDATE gameobject_template SET ScriptName='go_hand_of_iruxos_crystal' WHERE entry=176581; diff --git a/sql/Updates/r2013_mangos.sql b/sql/Updates/r2013_mangos.sql new file mode 100644 index 0000000..7bf379c --- /dev/null +++ b/sql/Updates/r2013_mangos.sql @@ -0,0 +1,2 @@ +UPDATE creature_template SET ScriptName='spell_dummy_npc' WHERE entry=29327; +UPDATE creature_template SET ScriptName='spell_dummy_npc' WHERE entry=29319; diff --git a/sql/Updates/r2013_scriptdev2.sql b/sql/Updates/r2013_scriptdev2.sql new file mode 100644 index 0000000..c28b692 --- /dev/null +++ b/sql/Updates/r2013_scriptdev2.sql @@ -0,0 +1,4 @@ +DELETE FROM script_texts WHERE entry IN (-1000642, -1000643); +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1000642,'It\'s a female.',0,5,0,0,'leopard icepaw SAY_ITS_FEMALE'), +(-1000643,'It\'s an angry male!',0,5,0,0,'leopard icepaw SAY_ITS_MALE'); diff --git a/sql/Updates/r2015_mangos.sql b/sql/Updates/r2015_mangos.sql new file mode 100644 index 0000000..af7f259 --- /dev/null +++ b/sql/Updates/r2015_mangos.sql @@ -0,0 +1 @@ +UPDATE creature_template SET ScriptName='spell_dummy_npc' WHERE entry=17157; diff --git a/sql/Updates/r2017_mangos.sql b/sql/Updates/r2017_mangos.sql new file mode 100644 index 0000000..3b83695 --- /dev/null +++ b/sql/Updates/r2017_mangos.sql @@ -0,0 +1 @@ +UPDATE creature_template SET ScriptName='' WHERE entry=6497; diff --git a/sql/Updates/r2018_scriptdev2.sql b/sql/Updates/r2018_scriptdev2.sql new file mode 100644 index 0000000..317df05 --- /dev/null +++ b/sql/Updates/r2018_scriptdev2.sql @@ -0,0 +1 @@ +UPDATE sd2_db_version SET version='ScriptDev2 (for MaNGOS 11316+) '; diff --git a/sql/Updates/r2020_scriptdev2.sql b/sql/Updates/r2020_scriptdev2.sql new file mode 100644 index 0000000..71730c7 --- /dev/null +++ b/sql/Updates/r2020_scriptdev2.sql @@ -0,0 +1,10 @@ +DELETE FROM script_texts WHERE entry IN (-1409023, -1409024); +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1409023,'Very well, $N.',0,0,0,0,'majordomo SAY_SUMMON_0'), +(-1409024,'Impudent whelps! You''ve rushed headlong to your own deaths! See now, the master stirs!',0,1,0,0,'majordomo SAY_SUMMON_1'); + +DELETE FROM gossip_texts WHERE entry IN (-3409000, -3409001, -3409002); +INSERT INTO gossip_texts (entry,content_default,comment) VALUES +(-3409000,'Tell me more.','majordomo_executus GOSSIP_ITEM_SUMMON_1'), +(-3409001,'What else do you have to say?','majordomo_executus GOSSIP_ITEM_SUMMON_2'), +(-3409002,'You challenged us and we have come. Where is this master you speak of?','majordomo_executus GOSSIP_ITEM_SUMMON_3'); diff --git a/sql/Updates/r2021_mangos.sql b/sql/Updates/r2021_mangos.sql new file mode 100644 index 0000000..2d1d00d --- /dev/null +++ b/sql/Updates/r2021_mangos.sql @@ -0,0 +1,8 @@ +UPDATE creature_template SET ScriptName='boss_thaddius' WHERE entry=15928; +UPDATE creature_template SET ScriptName='boss_stalagg' WHERE entry=15929; +UPDATE creature_template SET ScriptName='boss_feugen' WHERE entry=15930; +UPDATE creature_template SET ScriptName='npc_tesla_coil' WHERE entry=16218; + +DELETE FROM scripted_areatrigger WHERE entry=4113; +INSERT INTO scripted_areatrigger VALUES +(4113,'at_naxxramas'); diff --git a/sql/Updates/r2024_mangos.sql b/sql/Updates/r2024_mangos.sql new file mode 100644 index 0000000..52c9cc8 --- /dev/null +++ b/sql/Updates/r2024_mangos.sql @@ -0,0 +1,3 @@ +UPDATE gameobject_template SET ScriptName='' WHERE entry=164955; +UPDATE gameobject_template SET ScriptName='' WHERE entry=164956; +UPDATE gameobject_template SET ScriptName='' WHERE entry=164957; diff --git a/sql/Updates/r2025_mangos.sql b/sql/Updates/r2025_mangos.sql new file mode 100644 index 0000000..166dbc6 --- /dev/null +++ b/sql/Updates/r2025_mangos.sql @@ -0,0 +1 @@ +UPDATE creature_template SET ScriptName='' WHERE entry=18240; diff --git a/sql/Updates/r2028_scriptdev2.sql b/sql/Updates/r2028_scriptdev2.sql new file mode 100644 index 0000000..262629c --- /dev/null +++ b/sql/Updates/r2028_scriptdev2.sql @@ -0,0 +1 @@ +UPDATE script_texts SET type=3 WHERE entry IN (-1533082,-1533083); diff --git a/sql/Updates/r2031_mangos.sql b/sql/Updates/r2031_mangos.sql new file mode 100644 index 0000000..df236db --- /dev/null +++ b/sql/Updates/r2031_mangos.sql @@ -0,0 +1 @@ +UPDATE creature_template SET ScriptName='spell_dummy_npc' WHERE entry IN (28053, 28054, 28093); diff --git a/sql/Updates/r2031_scriptdev2.sql b/sql/Updates/r2031_scriptdev2.sql new file mode 100644 index 0000000..9981273 --- /dev/null +++ b/sql/Updates/r2031_scriptdev2.sql @@ -0,0 +1,10 @@ +DELETE FROM script_texts WHERE entry BETWEEN -1000651 AND -1000644; +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1000644,'Ouch! That\'s it, I quit the target business!',0,0,0,0,'SAY_LUCKY_HIT_1'), +(-1000645,'My ear! You grazed my ear!',0,0,0,0,'SAY_LUCKY_HIT_2'), +(-1000646,'Not the \'stache! Now I\'m asymmetrical!',0,0,0,0,'SAY_LUCKY_HIT_3'), +(-1000647,'Good shot!',0,0,0,0,'SAY_LUCKY_HIT_APPLE'), +(-1000648,'Stop whining. You\'ve still got your luck.',0,0,0,0,'SAY_DROSTAN_GOT_LUCKY_1'), +(-1000649,'Bah, it\'s an improvement.',0,0,0,0,'SAY_DROSTAN_GOT_LUCKY_2'), +(-1000650,'Calm down lad, it\'s just a birdshot!',0,0,0,0,'SAY_DROSTAN_HIT_BIRD_1'), +(-1000651,'The only thing hurt is your pride, lad! Buck up!',0,0,0,0,'SAY_DROSTAN_HIT_BIRD_2'); diff --git a/sql/Updates/r2033_scriptdev2.sql b/sql/Updates/r2033_scriptdev2.sql new file mode 100644 index 0000000..5a0a8a3 --- /dev/null +++ b/sql/Updates/r2033_scriptdev2.sql @@ -0,0 +1,11 @@ +DELETE FROM script_texts WHERE entry=-1469031; +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1469031,'Death Knights, get over here!',0,1,0,0,'nefarian SAY_DEATH_KNIGHT'); + +DELETE FROM gossip_texts WHERE entry IN (-3469000, -3469001, -3469002); +INSERT INTO gossip_texts (entry,content_default,comment) VALUES +(-3469000,'I\'ve made no mistakes.','victor_nefarius GOSSIP_ITEM_NEFARIUS_1'), +(-3469001,'You have lost your mind, Nefarius. You speak in riddles.','victor_nefarius GOSSIP_ITEM_NEFARIUS_2'), +(-3469002,'Please do.','victor_nefarius GOSSIP_ITEM_NEFARIUS_3'); + +UPDATE script_texts SET comment='victor_nefarius SAY_NEFARIUS_CORRUPT' WHERE entry=-1469006; diff --git a/sql/Updates/r2036_scriptdev2.sql b/sql/Updates/r2036_scriptdev2.sql new file mode 100644 index 0000000..16ea54c --- /dev/null +++ b/sql/Updates/r2036_scriptdev2.sql @@ -0,0 +1,3 @@ +UPDATE script_texts SET emote=5 WHERE entry=-1000646; +UPDATE script_texts SET emote=4 WHERE entry=-1000647; +UPDATE script_texts SET emote=11 WHERE entry=-1000649; diff --git a/sql/Updates/r2037_mangos.sql b/sql/Updates/r2037_mangos.sql new file mode 100644 index 0000000..03c33a9 --- /dev/null +++ b/sql/Updates/r2037_mangos.sql @@ -0,0 +1 @@ +UPDATE creature_template SET ScriptName='' WHERE entry=29344; diff --git a/sql/Updates/r2038_mangos.sql b/sql/Updates/r2038_mangos.sql new file mode 100644 index 0000000..8de6597 --- /dev/null +++ b/sql/Updates/r2038_mangos.sql @@ -0,0 +1 @@ +UPDATE creature_template SET ScriptName='' WHERE entry IN (14742,14743,21493,21494); diff --git a/sql/Updates/r2039_mangos.sql b/sql/Updates/r2039_mangos.sql new file mode 100644 index 0000000..fa19bfb --- /dev/null +++ b/sql/Updates/r2039_mangos.sql @@ -0,0 +1 @@ +UPDATE creature_template SET ScriptName='' WHERE entry=24040; diff --git a/sql/Updates/r2043_scriptdev2.sql b/sql/Updates/r2043_scriptdev2.sql new file mode 100644 index 0000000..95563df --- /dev/null +++ b/sql/Updates/r2043_scriptdev2.sql @@ -0,0 +1 @@ +UPDATE script_texts SET content_default='You there, check out that noise.' WHERE entry=-1036000; diff --git a/sql/Updates/r2044_mangos.sql b/sql/Updates/r2044_mangos.sql new file mode 100644 index 0000000..fd89ecb --- /dev/null +++ b/sql/Updates/r2044_mangos.sql @@ -0,0 +1 @@ +UPDATE creature_template SET ScriptName='boss_mr_smite' WHERE entry=646; diff --git a/sql/Updates/r2044_scriptdev2.sql b/sql/Updates/r2044_scriptdev2.sql new file mode 100644 index 0000000..c1c29eb --- /dev/null +++ b/sql/Updates/r2044_scriptdev2.sql @@ -0,0 +1,4 @@ +DELETE FROM script_texts WHERE entry IN (-1036002, -1036003); +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1036002,'You land lubbers are tougher than I thought! I\'ll have to improvise!',5778,0,0,21,'smite SAY_PHASE_2'), +(-1036003,'D\'ah! Now you\'re making me angry!',5779,0,0,15,'smite SAY_PHASE_3'); diff --git a/sql/Updates/r2050_mangos.sql b/sql/Updates/r2050_mangos.sql new file mode 100644 index 0000000..a8b796a --- /dev/null +++ b/sql/Updates/r2050_mangos.sql @@ -0,0 +1 @@ +UPDATE creature_template SET ScriptName='npc_dragonmaw_peon' WHERE entry=22252; diff --git a/sql/Updates/r2051_scriptdev2.sql b/sql/Updates/r2051_scriptdev2.sql new file mode 100644 index 0000000..67d265c --- /dev/null +++ b/sql/Updates/r2051_scriptdev2.sql @@ -0,0 +1,7 @@ +DELETE FROM script_texts WHERE entry BETWEEN -1000656 AND -1000652; +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1000652,'Me so hungry! YUM!',0,0,0,71,'dragonmaw peon SAY_PEON_1'), +(-1000653,'Hey... me not feel so good.',0,0,0,0,'dragonmaw peon SAY_PEON_2'), +(-1000654,'You is bad orc... baaad... or... argh!',0,0,0,0,'dragonmaw peon SAY_PEON_3'), +(-1000655,'Time for eating!?',0,0,0,71,'dragonmaw peon SAY_PEON_4'), +(-1000656,'It put the mutton in the stomach!',0,0,0,71,'dragonmaw peon SAY_PEON_5'); diff --git a/sql/Updates/r2057_scriptdev2.sql b/sql/Updates/r2057_scriptdev2.sql new file mode 100644 index 0000000..77d4e45 --- /dev/null +++ b/sql/Updates/r2057_scriptdev2.sql @@ -0,0 +1,5 @@ +DELETE FROM script_texts WHERE entry BETWEEN 1329018 AND 1329016; +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1329016,'Today you have unmade what took me years to create! For this you shall all die by my hand!',0,1,0,0,'dathrohan SAY_AGGRO'), +(-1329017,'You fools think you can defeat me so easily? Face the true might of the Nathrezim!',0,1,0,0,'dathrohan SAY_TRANSFORM'), +(-1329018,'Damn you mortals! All my plans of revenge, all my hate... all burned to ash...',0,0,0,0,'dathrohan SAY_DEATH'); diff --git a/sql/Updates/r2059_mangos.sql b/sql/Updates/r2059_mangos.sql new file mode 100644 index 0000000..4ba35d0 --- /dev/null +++ b/sql/Updates/r2059_mangos.sql @@ -0,0 +1 @@ +UPDATE creature_template SET ScriptName='npc_helice' WHERE entry=28787; diff --git a/sql/Updates/r2059_scriptdev2.sql b/sql/Updates/r2059_scriptdev2.sql new file mode 100644 index 0000000..2083316 --- /dev/null +++ b/sql/Updates/r2059_scriptdev2.sql @@ -0,0 +1,34 @@ +DELETE FROM script_texts WHERE entry BETWEEN -1000663 AND -1000657; +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1000657,'Let\'s get the hell out of here.',0,0,0,5,'helice SAY_HELICE_ACCEPT'), +(-1000658,'Listen up, Venture Company goons! Rule #1: Never keep the prisoner near the explosives.',0,0,0,25,'helice SAY_HELICE_EXPLOSIVES_1'), +(-1000659,'Or THIS is what you get.',0,0,0,0,'helice SAY_HELICE_EXPLODE_1'), +(-1000660,'It\'s getting a little hot over here. Shall we move on?',0,0,0,11,'helice SAY_HELICE_MOVE_ON'), +(-1000661,'Oh, look, it\'s another cartload of explosives! Let\'s help them dispose of it.',0,0,0,25,'helice SAY_HELICE_EXPLOSIVES_2'), +(-1000662,'You really shouldn\'t play with this stuff. Someone could get hurt.',0,0,0,5,'helice SAY_HELICE_EXPLODE_2'), +(-1000663,'We made it! Thank you for getting me out of that hell hole. Tell Hemet to expect me!',0,0,0,4,'helice SAY_HELICE_COMPLETE'); + +DELETE FROM script_waypoint WHERE entry=28787; +INSERT INTO script_waypoint (entry, pointid, location_x, location_y, location_z, waittime, point_comment) VALUES +(28787, 1, 5913.516113, 5379.034668, -98.896118, 0, ''), +(28787, 2, 5917.750977, 5374.519043, -98.869781, 0, 'SAY_HELICE_EXPLOSIVES_1'), +(28787, 3, 5926.428711, 5372.145020, -98.884453, 0, ''), +(28787, 4, 5929.214844, 5377.803223, -99.020065, 0, ''), +(28787, 5, 5927.621582, 5378.564941, -99.047890, 0, ''), +(28787, 6, 5917.622070, 5383.494629, -106.310204, 0, ''), +(28787, 7, 5908.991211, 5387.655762, -106.310204, 0, ''), +(28787, 8, 5906.287109, 5390.496582, -106.041801, 0, ''), +(28787, 9, 5902.415039, 5399.741211, -99.306595, 0, ''), +(28787, 10, 5901.444336, 5404.593262, -96.759636, 0, ''), +(28787, 11, 5897.860352, 5406.656250, -96.029709, 0, ''), +(28787, 12, 5892.254395, 5401.291504, -95.848808, 0, ''), +(28787, 13, 5887.421875, 5386.701172, -95.400146, 0, 'SAY_HELICE_EXPLOSIVES_2'), +(28787, 14, 5883.308105, 5385.057617, -94.423698, 0, ''), +(28787, 15, 5879.180664, 5375.897461, -95.088066, 0, ''), +(28787, 16, 5872.613281, 5363.473633, -97.703575, 0, ''), +(28787, 17, 5857.971191, 5354.929688, -98.586090, 0, ''), +(28787, 18, 5848.729004, 5345.326660, -99.428978, 0, ''), +(28787, 19, 5842.330566, 5335.018555, -100.421455, 0, ''), +(28787, 20, 5832.164551, 5323.145020, -98.703285, 0, ''), +(28787, 21, 5824.738770, 5315.712891, -97.758018, 0, ''), +(28787, 22, 5819.650879, 5305.409668, -97.481796, 10000, 'SAY_HELICE_COMPLETE'); diff --git a/sql/Updates/r2061_mangos.sql b/sql/Updates/r2061_mangos.sql new file mode 100644 index 0000000..e894552 --- /dev/null +++ b/sql/Updates/r2061_mangos.sql @@ -0,0 +1 @@ +UPDATE creature_template SET ScriptName='npc_oil_stained_wolf' WHERE entry=25791; diff --git a/sql/Updates/r2064_mangos.sql b/sql/Updates/r2064_mangos.sql new file mode 100644 index 0000000..5a8f5dd --- /dev/null +++ b/sql/Updates/r2064_mangos.sql @@ -0,0 +1 @@ +UPDATE creature_template SET ScriptName='npc_sinkhole_kill_credit' WHERE entry IN (26248,26249); diff --git a/sql/Updates/r2064_scriptdev2.sql b/sql/Updates/r2064_scriptdev2.sql new file mode 100644 index 0000000..2c19146 --- /dev/null +++ b/sql/Updates/r2064_scriptdev2.sql @@ -0,0 +1 @@ +UPDATE sd2_db_version SET version='ScriptDev2 (for MaNGOS 11421+) '; diff --git a/sql/Updates/r2070_mangos.sql b/sql/Updates/r2070_mangos.sql new file mode 100644 index 0000000..2dec5ac --- /dev/null +++ b/sql/Updates/r2070_mangos.sql @@ -0,0 +1,8 @@ +DELETE FROM scripted_event_id WHERE id IN (5618, 5619, 5620, 5621, 5622, 5623); +INSERT INTO scripted_event_id VALUES +(5618,'event_spell_gandling_shadow_portal'), +(5619,'event_spell_gandling_shadow_portal'), +(5620,'event_spell_gandling_shadow_portal'), +(5621,'event_spell_gandling_shadow_portal'), +(5622,'event_spell_gandling_shadow_portal'), +(5623,'event_spell_gandling_shadow_portal'); diff --git a/sql/Updates/r2072_scriptdev2.sql b/sql/Updates/r2072_scriptdev2.sql new file mode 100644 index 0000000..58d6f98 --- /dev/null +++ b/sql/Updates/r2072_scriptdev2.sql @@ -0,0 +1 @@ +UPDATE script_texts SET type=6 WHERE entry=-1509022; diff --git a/sql/Updates/r2073_mangos.sql b/sql/Updates/r2073_mangos.sql new file mode 100644 index 0000000..c5b1c6c --- /dev/null +++ b/sql/Updates/r2073_mangos.sql @@ -0,0 +1 @@ +UPDATE creature_template SET ScriptName='npc_destructive_ward' WHERE entry=27430; diff --git a/sql/Updates/r2073_scriptdev2.sql b/sql/Updates/r2073_scriptdev2.sql new file mode 100644 index 0000000..92c5981 --- /dev/null +++ b/sql/Updates/r2073_scriptdev2.sql @@ -0,0 +1,4 @@ +DELETE FROM script_texts WHERE entry IN (-1000664, -1000665); +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1000664,'The Destructive Ward gains in power.',0,5,0,0,'destructive ward SAY_WARD_POWERUP'), +(-1000665,'The Destructive Ward is fully charged!',0,5,0,0,'destructive ward SAY_WARD_CHARGED'); diff --git a/sql/Updates/r2074_scriptdev2.sql b/sql/Updates/r2074_scriptdev2.sql new file mode 100644 index 0000000..9282104 --- /dev/null +++ b/sql/Updates/r2074_scriptdev2.sql @@ -0,0 +1,3 @@ +DELETE FROM script_texts WHERE entry=-1109005; +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1109005,'The shield be down! Rise up Atal\'ai! Rise up!',5861,6,0,0,'jammalan SAY_JAMMALAN_INTRO'); diff --git a/sql/Updates/r2075_mangos.sql b/sql/Updates/r2075_mangos.sql new file mode 100644 index 0000000..cd3c166 --- /dev/null +++ b/sql/Updates/r2075_mangos.sql @@ -0,0 +1,8 @@ +DELETE FROM scripted_event_id WHERE id IN (3094,3095,3097,3098,3099,3100); +INSERT INTO scripted_event_id VALUES +(3094,'event_antalarion_statue_activation'), +(3095,'event_antalarion_statue_activation'), +(3097,'event_antalarion_statue_activation'), +(3098,'event_antalarion_statue_activation'), +(3099,'event_antalarion_statue_activation'), +(3100,'event_antalarion_statue_activation'); diff --git a/sql/Updates/r2076_scriptdev2.sql b/sql/Updates/r2076_scriptdev2.sql new file mode 100644 index 0000000..99cbae3 --- /dev/null +++ b/sql/Updates/r2076_scriptdev2.sql @@ -0,0 +1,3 @@ +DELETE FROM script_texts WHERE entry=-1429002; +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1429002,'At last... Freed from his cursed grasp!',0,6,0,0,'old ironbark SAY_IRONBARK_REDEEM'); diff --git a/sql/Updates/r2077_mangos.sql b/sql/Updates/r2077_mangos.sql new file mode 100644 index 0000000..55c46bf --- /dev/null +++ b/sql/Updates/r2077_mangos.sql @@ -0,0 +1 @@ +UPDATE creature_template SET ScriptName='npc_willix_the_importer' WHERE entry=4508; diff --git a/sql/Updates/r2077_scriptdev2.sql b/sql/Updates/r2077_scriptdev2.sql new file mode 100644 index 0000000..fec448a --- /dev/null +++ b/sql/Updates/r2077_scriptdev2.sql @@ -0,0 +1,65 @@ +DELETE FROM script_texts WHERE entry BETWEEN -1047012 AND -1047000; +INSERT INTO script_texts (entry,content_default,sound,type,LANGUAGE,emote,comment) VALUES +(-1047000,'Woo hoo! Finally getting out of here. It\'s going to be rough though. Keep your eyes peeled for trouble.',0,0,0,0,'willix SAY_READY'), +(-1047001,'Up there is where Charlga Razorflank resides. Blasted old crone.',0,0,0,25,'willix SAY_1'), +(-1047002,'There\'s blueleaf tuber in this trench! It\'s like gold waiting to be mined I tell you!',0,0,0,0,'willix SAY_2'), +(-1047003,'There could be danger around every corner here.',0,0,0,0,'willix SAY_3'), +(-1047004,'I don\'t see how these foul animals live in this place... sheesh it smells!',0,0,0,0,'willix SAY_4'), +(-1047005,'I think I see a way for us to get out of this big twisted mess of a bramble.',0,0,0,0,'willix SAY_5'), +(-1047006,'Glad to be out of that wretched trench. Not much nicer up here though!',0,0,0,0,'willix SAY_6'), +(-1047007,'Finally! I\'ll be glad to get out of this place.',0,0,0,0,'willix SAY_7'), +(-1047008,'I think I\'ll rest a moment and catch my breath before heading back to Ratchet. Thanks for all the help!',0,0,0,0,'willix SAY_END'), +(-1047009,'$N heading this way fast! To arms!',0,0,0,0,'willix SAY_AGGRO_1'), +(-1047010,'Eek! $N coming right at us!',0,0,0,0,'willix SAY_AGGRO_2'), +(-1047011,'Egads! $N on me!',0,0,0,0,'willix SAY_AGGRO_3'), +(-1047012,'Help! Get this $N off of me!',0,0,0,0,'willix SAY_AGGRO_4'); + +DELETE FROM script_waypoint WHERE entry=4508; +INSERT INTO script_waypoint VALUES +(4508, 0, 2194.38, 1791.65, 65.48, 5000, ''), +(4508, 1, 2188.56, 1805.87, 64.45, 0, ''), +(4508, 2, 2186.2, 1836.278, 59.859, 5000, 'SAY_WILLIX_1'), +(4508, 3, 2163.27, 1851.67, 56.73, 0, ''), +(4508, 4, 2140.22, 1845.02, 48.32, 0, ''), +(4508, 5, 2131.5, 1804.29, 46.85, 0, ''), +(4508, 6, 2096.18, 1789.03, 51.13, 3000, 'SAY_WILLIX_2'), +(4508, 7, 2074.46, 1780.09, 55.64, 0, ''), +(4508, 8, 2055.12, 1768.67, 58.46, 0, ''), +(4508, 9, 2037.83, 1748.62, 60.27, 5000, 'SAY_WILLIX_3'), +(4508, 10, 2037.51, 1728.94, 60.85, 0, ''), +(4508, 11, 2044.7, 1711.71, 59.71, 0, ''), +(4508, 12, 2067.66, 1701.84, 57.77, 0, ''), +(4508, 13, 2078.91, 1704.54, 56.77, 0, ''), +(4508, 14, 2097.65, 1715.24, 54.74, 3000, 'SAY_WILLIX_4'), +(4508, 15, 2106.44, 1720.98, 54.41, 0, ''), +(4508, 16, 2123.96, 1732.56, 52.27, 0, ''), +(4508, 17, 2153.82, 1728.73, 51.92, 0, ''), +(4508, 18, 2163.49, 1706.33, 54.42, 0, ''), +(4508, 19, 2158.75, 1695.98, 55.70, 0, ''), +(4508, 20, 2142.6, 1680.72, 58.24, 0, ''), +(4508, 21, 2118.31, 1671.54, 59.21, 0, ''), +(4508, 22, 2086.02, 1672.04, 61.24, 0, ''), +(4508, 23, 2068.81, 1658.93, 61.24, 0, ''), +(4508, 24, 2062.82, 1633.31, 64.35, 0, ''), +(4508, 25, 2060.92, 1600.11, 62.41, 3000, 'SAY_WILLIX_5'), +(4508, 26, 2063.05, 1589.16, 63.26, 0, ''), +(4508, 27, 2063.67, 1577.22, 65.89, 0, ''), +(4508, 28, 2057.94, 1560.68, 68.40, 0, ''), +(4508, 29, 2052.56, 1548.05, 73.35, 0, ''), +(4508, 30, 2045.22, 1543.4, 76.65, 0, ''), +(4508, 31, 2034.35, 1543.01, 79.70, 0, ''), +(4508, 32, 2029.95, 1542.94, 80.79, 0, ''), +(4508, 33, 2021.34, 1538.67, 80.8, 0, 'SAY_WILLIX_6'), +(4508, 34, 2012.45, 1549.48, 79.93, 0, ''), +(4508, 35, 2008.05, 1554.92, 80.44, 0, ''), +(4508, 36, 2006.54, 1562.72, 81.11, 0, ''), +(4508, 37, 2003.8, 1576.43, 81.57, 0, ''), +(4508, 38, 2000.57, 1590.06, 80.62, 0, ''), +(4508, 39, 1998.96, 1596.87, 80.22, 0, ''), +(4508, 40, 1991.19, 1600.82, 79.39, 0, ''), +(4508, 41, 1980.71, 1601.44, 79.77, 0, ''), +(4508, 42, 1967.22, 1600.18, 80.62, 0, ''), +(4508, 43, 1956.43, 1596.97, 81.75, 0, ''), +(4508, 44, 1954.87, 1592.02, 82.18, 3000, 'SAY_WILLIX_7'), +(4508, 45, 1948.35, 1571.35, 80.96, 30000, 'SAY_WILLIX_END'), +(4508, 46, 1947.02, 1566.42, 81.80, 30000, ''); diff --git a/sql/Updates/r2080_scriptdev2.sql b/sql/Updates/r2080_scriptdev2.sql new file mode 100644 index 0000000..4235401 --- /dev/null +++ b/sql/Updates/r2080_scriptdev2.sql @@ -0,0 +1 @@ +UPDATE sd2_db_version SET version='ScriptDev2 (for MaNGOS 11432+) '; diff --git a/sql/custom/ready for DB/mangos_Naxxramas.sql b/sql/custom/ready for DB/mangos_Naxxramas.sql index a0f79b4..97d0bda 100644 --- a/sql/custom/ready for DB/mangos_Naxxramas.sql +++ b/sql/custom/ready for DB/mangos_Naxxramas.sql @@ -48,4 +48,4 @@ INSERT INTO `achievement_criteria_requirement` VALUES -- ********PORTALS************* DELETE FROM spell_target_position WHERE id = 28444; INSERT INTO spell_target_position VALUES (28444, 533, 2956.474609, -3434.322266,299.549896, 0.068890); -UPDATE gameobject SET spawnMask = 3 WHERE gameobject.id IN (181575,181576,181577,181578); \ No newline at end of file +UPDATE gameobject SET spawnMask = 3, flags = 48WHERE gameobject.id IN (181575,181576,181577,181578); \ No newline at end of file diff --git a/sql/mangos_scriptname_full.sql b/sql/mangos_scriptname_full.sql index fefb13f..9a19baa 100644 --- a/sql/mangos_scriptname_full.sql +++ b/sql/mangos_scriptname_full.sql @@ -22,8 +22,10 @@ INSERT INTO scripted_areatrigger VALUES (5285,'at_aldurthar_gate'), (5286,'at_aldurthar_gate'), (5287,'at_aldurthar_gate'); -DELETE FROM scripted_areatrigger WHERE entry=4112; -INSERT INTO scripted_areatrigger VALUES (4112,'at_naxxramas'); +DELETE FROM scripted_areatrigger WHERE entry IN (4112, 4113); +INSERT INTO scripted_areatrigger VALUES +(4112,'at_naxxramas'), +(4113,'at_naxxramas'); DELETE FROM scripted_areatrigger WHERE entry=5108; INSERT INTO scripted_areatrigger VALUES (5108,'at_stormwright_shelf'); DELETE FROM scripted_areatrigger WHERE entry IN (3546, 3547, 3548, 3549, 3550, 3552); @@ -40,6 +42,11 @@ INSERT INTO scripted_areatrigger VALUES (2046, 'at_blackrock_spire'); DELETE FROM scripted_areatrigger WHERE entry=5030; INSERT INTO scripted_areatrigger VALUES (5030,'at_spearborn_encampment'); +DELETE FROM scripted_areatrigger WHERE entry IN (3958, 3960); +INSERT INTO scripted_areatrigger VALUES +(3958, 'at_zulgurub'), +(3960, 'at_zulgurub'); + /* BATTLEGROUNDS */ UPDATE creature_template SET ScriptName='npc_spirit_guide' WHERE entry IN (13116, 13117); @@ -55,9 +62,6 @@ UPDATE creature_template SET ScriptName='mob_dementeddruids' WHERE entry=15260; /* GO */ UPDATE gameobject_template SET ScriptName='go_cat_figurine' WHERE entry=13873; -UPDATE gameobject_template SET ScriptName='go_northern_crystal_pylon' WHERE entry=164955; -UPDATE gameobject_template SET ScriptName='go_western_crystal_pylon' WHERE entry=164956; -UPDATE gameobject_template SET ScriptName='go_eastern_crystal_pylon' WHERE entry=164957; UPDATE gameobject_template SET ScriptName='go_barov_journal' WHERE entry=180794; UPDATE gameobject_template SET ScriptName='go_ethereum_prison' WHERE entry BETWEEN 184418 AND 184431; UPDATE gameobject_template SET ScriptName='go_ethereum_stasis' WHERE entry BETWEEN 185465 AND 185467; @@ -80,6 +84,7 @@ UPDATE gameobject_template SET ScriptName='go_andorhal_tower' WHERE entry IN (17 UPDATE gameobject_template SET ScriptName='go_scourge_enclosure' WHERE entry=191548; UPDATE gameobject_template SET ScriptName='go_veil_skith_cage' WHERE entry IN (185202,185203,185204,185205); UPDATE gameobject_template SET ScriptName='go_lab_work_reagents' WHERE entry IN (190462, 190473, 190478, 190459); +UPDATE gameobject_template SET ScriptName='go_hand_of_iruxos_crystal' WHERE entry=176581; /* GUARD */ UPDATE creature_template SET ScriptName='guard_azuremyst' WHERE entry=18038; @@ -122,20 +127,20 @@ UPDATE creature_template SET ScriptName='npc_lunaclaw_spirit' WHERE entry=12144; UPDATE creature_template SET ScriptName='npc_mount_vendor' WHERE entry IN (384,1261,1460,2357,3362,3685,4730,4731,4885,7952,7955,16264,17584); UPDATE creature_template SET ScriptName='npc_doctor' WHERE entry IN (12939,12920); UPDATE creature_template SET ScriptName='npc_injured_patient' WHERE entry IN (12936,12937,12938,12923,12924,12925); -UPDATE creature_template SET ScriptName='' WHERE npcflag!=npcflag|65536 AND ScriptName='npc_innkeeper'; -UPDATE creature_template SET ScriptName='npc_innkeeper' WHERE npcflag=npcflag|65536; UPDATE creature_template SET ScriptName='npc_prof_alchemy' WHERE entry IN (17909,19052,22427); UPDATE creature_template SET ScriptName='npc_prof_blacksmith' WHERE entry IN (5164,11145,11146,11176,11177,11178,11191,11192,11193); -UPDATE creature_template SET ScriptName='npc_engineering_tele_trinket' WHERE entry IN (14742,14743,21493,21494); UPDATE creature_template SET ScriptName='npc_prof_leather' WHERE entry IN (7866,7867,7868,7869,7870,7871); UPDATE creature_template SET ScriptName='npc_prof_tailor' WHERE entry IN (22208,22212,22213); UPDATE creature_template SET ScriptName='npc_rogue_trainer' WHERE entry IN (918,4163,3328,4583,5165,5167,13283,16684); UPDATE creature_template SET ScriptName='npc_sayge' WHERE entry=14822; UPDATE creature_template SET ScriptName='npc_tabard_vendor' WHERE entry=28776; UPDATE creature_template SET ScriptName='npc_locksmith' WHERE entry IN (29665,29725,29728); +-- disabled, but can be used for custom +-- UPDATE creature_template SET ScriptName='' WHERE npcflag!=npcflag|65536 AND ScriptName='npc_innkeeper'; +-- UPDATE creature_template SET ScriptName='npc_innkeeper' WHERE npcflag=npcflag|65536; /* SPELL */ -UPDATE creature_template SET ScriptName='spell_dummy_npc' WHERE entry IN (16880,1200,26616,26643,16518,25793,25758,25752,25792,25753,26421,26841,27808,27122,28068,12298,12296,24918,17326,17654,16847,18879,26270,26268,30146,25084,25085,32149,22105,29330,29338,29329,28465,28600); +UPDATE creature_template SET ScriptName='spell_dummy_npc' WHERE entry IN (16880,1200,26616,26643,16518,25793,25758,25752,25792,25753,26421,26841,27808,27122,28068,12298,12296,24918,17157,17326,17654,16847,18879,26270,26268,30146,25084,25085,32149,22105,29330,29338,29329,28465,28600,29327,29319,28053,28054,28093); UPDATE gameobject_template SET ScriptName='spell_dummy_go' WHERE entry IN (181616,186949); /* */ @@ -349,7 +354,9 @@ UPDATE creature_template SET ScriptName='npc_fizzcrank_fullthrottle' WHERE entry UPDATE creature_template SET ScriptName='npc_iruk' WHERE entry=26219; UPDATE creature_template SET ScriptName='npc_kara_thricestar' WHERE entry=26602; UPDATE creature_template SET ScriptName='npc_nesingwary_trapper' WHERE entry=25835; +UPDATE creature_template SET ScriptName='npc_oil_stained_wolf' WHERE entry=25791; UPDATE gameobject_template SET ScriptName='go_caribou_trap' WHERE entry IN (187982,187995,187996,187997,187998,187999,188000,188001,188002,188003,188004,188005,188006,188007,188008); +UPDATE creature_template SET ScriptName='npc_sinkhole_kill_credit' WHERE entry IN (26248,26249); UPDATE creature_template SET ScriptName='npc_surristrasz' WHERE entry=24795; UPDATE creature_template SET ScriptName='npc_tiare' WHERE entry=30051; UPDATE creature_template SET ScriptName='npc_lurgglbr' WHERE entry=25208; @@ -472,6 +479,7 @@ UPDATE creature_template SET ScriptName='npc_threshwackonator' WHERE entry=6669; /* DEADMINES */ +UPDATE creature_template SET ScriptName='boss_mr_smite' WHERE entry=646; UPDATE instance_template SET ScriptName='instance_deadmines' WHERE map=36; UPDATE gameobject_template SET ScriptName='go_defias_cannon' WHERE entry=16398; UPDATE gameobject_template SET ScriptName='go_door_lever_dm' WHERE entry=101833; @@ -481,13 +489,15 @@ UPDATE gameobject_template SET ScriptName='go_door_lever_dm' WHERE entry=101833; /* DESOLACE */ UPDATE creature_template SET ScriptName='npc_aged_dying_ancient_kodo' WHERE entry IN (4700, 4701, 4702, 11627); +UPDATE creature_template SET ScriptName='npc_dalinda_malem' WHERE entry=5644; /* DIRE MAUL */ - +UPDATE instance_template SET ScriptName='instance_dire_maul' WHERE map=429; /* DRAGONBLIGHT */ UPDATE creature_template SET ScriptName='npc_afrasastrasz' WHERE entry=27575; UPDATE creature_template SET ScriptName='npc_alexstrasza_wr_gate' WHERE entry=31333; +UPDATE creature_template SET ScriptName='npc_destructive_ward' WHERE entry=27430; UPDATE creature_template SET ScriptName='npc_tariolstrasz' WHERE entry=26443; UPDATE creature_template SET ScriptName='npc_torastrasza' WHERE entry=26949; @@ -654,11 +664,13 @@ UPDATE creature_template SET ScriptName='npc_00x09hl' WHERE entry=7806; UPDATE creature_template SET ScriptName='npc_rinji' WHERE entry=7780; /* HOWLING FJORD */ +DELETE FROM scripted_areatrigger WHERE entry=4778; +INSERT INTO scripted_areatrigger VALUES (4778,'at_ancient_male_vrykul'); +UPDATE creature_template SET ScriptName='npc_ancient_male_vrykul' WHERE entry=24314; UPDATE creature_template SET ScriptName='npc_daegarn' WHERE entry=24151; UPDATE creature_template SET ScriptName='npc_deathstalker_razael' WHERE entry=23998; UPDATE creature_template SET ScriptName='npc_dark_ranger_lyana' WHERE entry=23778; UPDATE creature_template SET ScriptName='npc_greer_orehammer' WHERE entry=23859; -UPDATE creature_template SET ScriptName='npc_mcgoyver' WHERE entry=24040; UPDATE creature_template SET ScriptName='npc_silvermoon_harry' WHERE entry=24539; /* */ @@ -674,9 +686,9 @@ UPDATE instance_template SET ScriptName='instance_forge_of_souls' WHERE map=632; /* PIT OF SARON */ UPDATE instance_template SET ScriptName='instance_pit_of_saron' WHERE map=658; +UPDATE creature_template SET ScriptName='boss_forgemaster_garfrost' WHERE entry=36494; /* ICECROWN */ -UPDATE creature_template SET ScriptName='npc_arete' WHERE entry=29344; UPDATE creature_template SET ScriptName='npc_dame_evniki_kapsalis' WHERE entry=34885; /* IRONFORGE */ @@ -781,8 +793,6 @@ UPDATE creature_template SET ScriptName='npc_skorn_whitecloud' WHERE entry=3052; /* NAGRAND */ UPDATE creature_template SET ScriptName='mob_lump' WHERE entry=18351; -UPDATE creature_template SET ScriptName='mob_shattered_rumbler' WHERE entry=17157; -UPDATE creature_template SET ScriptName='mob_sunspring_villager' WHERE entry=18240; UPDATE creature_template SET ScriptName='npc_altruis_the_sufferer' WHERE entry=18417; UPDATE creature_template SET ScriptName='npc_greatmother_geyah' WHERE entry=18141; UPDATE creature_template SET ScriptName='npc_lantresor_of_the_blade' WHERE entry=18261; @@ -808,9 +818,10 @@ UPDATE creature_template SET ScriptName='boss_rivendare_naxx' WHERE entry=30549; UPDATE creature_template SET ScriptName='boss_patchwerk' WHERE entry=16028; UPDATE creature_template SET ScriptName='boss_grobbulus' WHERE entry=15931; UPDATE creature_template SET ScriptName='boss_gluth' WHERE entry=15932; --- UPDATE creature_template SET ScriptName='boss_thaddius' WHERE entry=15928; --- UPDATE creature_template SET ScriptName='boss_stalagg' WHERE entry=15929; --- UPDATE creature_template SET ScriptName='boss_feugen' WHERE entry=15930; +UPDATE creature_template SET ScriptName='boss_thaddius' WHERE entry=15928; +UPDATE creature_template SET ScriptName='boss_stalagg' WHERE entry=15929; +UPDATE creature_template SET ScriptName='boss_feugen' WHERE entry=15930; +UPDATE creature_template SET ScriptName='npc_tesla_coil' WHERE entry=16218; UPDATE creature_template SET ScriptName='boss_sapphiron' WHERE entry=15989; UPDATE creature_template SET ScriptName='boss_kelthuzad' WHERE entry=15990; @@ -873,6 +884,7 @@ UPDATE creature_template SET ScriptName='npc_henry_stern' WHERE entry=8696; /* RAZORFEN KRAUL */ UPDATE instance_template SET ScriptName='instance_razorfen_kraul' WHERE map=47; +UPDATE creature_template SET ScriptName='npc_willix_the_importer' WHERE entry=4508; /* REDRIDGE MOUNTAINS */ UPDATE creature_template SET ScriptName='npc_corporal_keeshan' WHERE entry=349; @@ -907,6 +919,14 @@ UPDATE creature_template SET ScriptName='boss_vectus' WHERE entry=10432; UPDATE creature_template SET ScriptName='boss_jandice_barov' WHERE entry=10503; UPDATE creature_template SET ScriptName='boss_kormok' WHERE entry=16118; UPDATE creature_template SET ScriptName='mob_illusionofjandicebarov' WHERE entry=11439; +DELETE FROM scripted_event_id WHERE id IN (5618, 5619, 5620, 5621, 5622, 5623); +INSERT INTO scripted_event_id VALUES +(5618,'event_spell_gandling_shadow_portal'), +(5619,'event_spell_gandling_shadow_portal'), +(5620,'event_spell_gandling_shadow_portal'), +(5621,'event_spell_gandling_shadow_portal'), +(5622,'event_spell_gandling_shadow_portal'), +(5623,'event_spell_gandling_shadow_portal'); /* SEARING GORGE */ UPDATE creature_template SET ScriptName='npc_kalaran_windblade' WHERE entry=8479; @@ -924,6 +944,7 @@ UPDATE creature_template SET ScriptName='boss_arugal' WHERE entry=4275; /* SHADOWMOON VALLEY */ UPDATE creature_template SET ScriptName='boss_doomwalker' WHERE entry=17711; UPDATE creature_template SET ScriptName='npc_drake_dealer_hurlunk' WHERE entry=23489; +UPDATE creature_template SET ScriptName='npc_dragonmaw_peon' WHERE entry=22252; UPDATE creature_template SET ScriptName='npcs_flanis_swiftwing_and_kagrosh' WHERE entry IN (21725,21727); UPDATE creature_template SET ScriptName='npc_murkblood_overseer' WHERE entry=23309; UPDATE creature_template SET ScriptName='npc_neltharaku' WHERE entry=21657; @@ -954,6 +975,7 @@ UPDATE creature_template SET ScriptName='npc_shattrathflaskvendors' WHERE entry UPDATE creature_template SET ScriptName='npc_zephyr' WHERE entry=25967; /* SHOLAZAR BASIN */ +UPDATE creature_template SET ScriptName='npc_helice' WHERE entry=28787; UPDATE creature_template SET ScriptName='npc_injured_rainspeaker' WHERE entry=28217; UPDATE creature_template SET ScriptName='npc_mosswalker_victim' WHERE entry=28113; UPDATE creature_template SET ScriptName='npc_vekjik' WHERE entry=28315; @@ -966,7 +988,6 @@ UPDATE creature_template SET ScriptName='npcs_rutgar_and_frankal' WHERE entry IN UPDATE creature_template SET ScriptName='npc_blood_knight_stillblade' WHERE entry=17768; /* SILVERPINE FOREST */ -UPDATE creature_template SET ScriptName='npc_astor_hadren' WHERE entry=6497; UPDATE creature_template SET ScriptName='npc_deathstalker_erland' WHERE entry=1978; UPDATE creature_template SET ScriptName='npc_deathstalker_faerleia' WHERE entry=2058; @@ -1008,12 +1029,21 @@ UPDATE creature_template SET ScriptName='mobs_spectral_ghostly_citizen' WHERE en UPDATE creature_template SET ScriptName='mob_restless_soul' WHERE entry=11122; UPDATE creature_template SET ScriptName='mob_freed_soul' WHERE entry=11136; UPDATE gameobject_template SET ScriptName='go_gauntlet_gate' WHERE entry=175357; +UPDATE gameobject_template SET ScriptName='go_service_gate' WHERE entry=175368; /* SUNKEN TEMPLE */ UPDATE instance_template SET ScriptName='instance_sunken_temple' WHERE map=109; DELETE FROM scripted_areatrigger WHERE entry=4016; INSERT INTO scripted_areatrigger VALUES (4016,'at_shade_of_eranikus'); UPDATE creature_template SET ScriptName='npc_malfurion_stormrage' WHERE entry=15362; +DELETE FROM scripted_event_id WHERE id IN (3094,3095,3097,3098,3099,3100); +INSERT INTO scripted_event_id VALUES +(3094,'event_antalarion_statue_activation'), +(3095,'event_antalarion_statue_activation'), +(3097,'event_antalarion_statue_activation'), +(3098,'event_antalarion_statue_activation'), +(3099,'event_antalarion_statue_activation'), +(3100,'event_antalarion_statue_activation'); /* SUNWELL PLATEAU */ UPDATE instance_template SET ScriptName='instance_sunwell_plateau' WHERE map=580; diff --git a/sql/scriptdev2_script_full.sql b/sql/scriptdev2_script_full.sql index 93e06b3..1c2e3b2 100644 --- a/sql/scriptdev2_script_full.sql +++ b/sql/scriptdev2_script_full.sql @@ -3,7 +3,7 @@ -- DELETE FROM sd2_db_version; -INSERT INTO sd2_db_version (version) VALUES ('ScriptDev2 (for MaNGOS 11167+) '); +INSERT INTO sd2_db_version (version) VALUES ('ScriptDev2 (for MaNGOS 11432+) '); -- -- Below contains data for table `script_texts` mainly used in C++ parts. @@ -584,9 +584,9 @@ INSERT INTO script_texts (entry,content_default,sound,type,language,emote,commen (-1000559,'I\'d rather die fighting than live like a slave.',0,0,0,0,'exhausted vrykul SAY_RAND_ATTACK2'), (-1000560,'Enough! I will teach you some manners, wench!',0,0,0,0,'exhausted vrykul SAY_RAND_ATTACK3'), -(-1000561,'My wounds are grave. Forgive my slow pace but my injuries won''t allow me to walk any faster.',0,0,0,0,'SAY_CORPORAL_KEESHAN_1'), +(-1000561,'My wounds are grave. Forgive my slow pace but my injuries won\'t allow me to walk any faster.',0,0,0,0,'SAY_CORPORAL_KEESHAN_1'), (-1000562,'Ah, fresh air, at last! I need a moment to rest.',0,0,0,0,'SAY_CORPORAL_KEESHAN_2'), -(-1000563,'The Blackrock infestation is thick in these parts. I will do my best to keep the pace. Let''s go!',0,0,0,0,'SAY_CORPORAL_KEESHAN_3'), +(-1000563,'The Blackrock infestation is thick in these parts. I will do my best to keep the pace. Let\'s go!',0,0,0,0,'SAY_CORPORAL_KEESHAN_3'), (-1000564,'Marshal Marris, sir. Corporal Keeshan of the 12th Sabre Regiment returned from battle and reporting for duty!',0,0,0,0,'SAY_CORPORAL_KEESHAN_4'), (-1000565,'Brave adventurer, thank you for rescuing me! I am sure Marshal Marris will reward your kind deed.',0,0,0,0,'SAY_CORPORAL_KEESHAN_5'), @@ -674,10 +674,47 @@ INSERT INTO script_texts (entry,content_default,sound,type,language,emote,commen (-1000629,' Damsel in distress over here!',0,0,0,0,'isla starmane - SAY_ISLA_PERIODIC_1'), (-1000630,'Hello? Help?',0,0,0,0,'isla starmane - SAY_ISLA_PERIODIC_2'), -(-1000631,'Don''t leave me in here! Cause if you do I will find you!',0,0,0,0,'isla starmane - SAY_ISLA_PERIODIC_3'), -(-1000632,'Ok, let''s get out of here!',0,0,0,0,'isla starmane - SAY_ISLA_START'), -(-1000633,'You sure you''re ready? Take a moment.',0,0,0,0,'isla starmane - SAY_ISLA_WAITING'), -(-1000634,'Alright, let''s do this!',0,0,0,0,'isla starmane - SAY_ISLA_LEAVE_BUILDING'); +(-1000631,'Don\'t leave me in here! Cause if you do I will find you!',0,0,0,0,'isla starmane - SAY_ISLA_PERIODIC_3'), +(-1000632,'Ok, let\'s get out of here!',0,0,0,0,'isla starmane - SAY_ISLA_START'), +(-1000633,'You sure you\'re ready? Take a moment.',0,0,0,0,'isla starmane - SAY_ISLA_WAITING'), +(-1000634,'Alright, let\'s do this!',0,0,0,0,'isla starmane - SAY_ISLA_LEAVE_BUILDING'), + +(-1000635,'So then we too are cursed?',0,0,0,0,'ancient vrykul SAY_VRYKUL_CURSED'), +(-1000636,'%s points to the infant.',0,2,0,0,'ancient vrykul EMOTE_VRYKUL_POINT'), +(-1000637,'%s sobs.',0,2,0,0,'ancient vrykul EMOTE_VRYKUL_SOB'), +(-1000638,'The gods have forsaken us! We must dispose of it before Ymiron is notified!',0,0,0,0,'ancient vrykul SAY_VRYKUL_DISPOSE'), +(-1000639,'NO! You cannot! I beg of you! It is our child!',0,0,0,0,'ancient vrykul SAY_VRYKUL_BEG'), +(-1000640,'Then what are we to do, wife? The others cannot find out. Should they learn of this aberration, we will all be executed.',0,0,0,0,'ancient vrykul SAY_VRYKUL_WHAT'), +(-1000641,'I... I will hide it. I will hide it until I find it a home, far away from here...',0,0,0,0,'ancient vrykul SAY_VRYKUL_HIDE'), + +(-1000642,'It\'s a female.',0,5,0,0,'leopard icepaw SAY_ITS_FEMALE'), +(-1000643,'It\'s an angry male!',0,5,0,0,'leopard icepaw SAY_ITS_MALE'), + +(-1000644,'Ouch! That\'s it, I quit the target business!',0,0,0,0,'SAY_LUCKY_HIT_1'), +(-1000645,'My ear! You grazed my ear!',0,0,0,0,'SAY_LUCKY_HIT_2'), +(-1000646,'Not the \'stache! Now I\'m asymmetrical!',0,0,0,5,'SAY_LUCKY_HIT_3'), +(-1000647,'Good shot!',0,0,0,4,'SAY_LUCKY_HIT_APPLE'), +(-1000648,'Stop whining. You\'ve still got your luck.',0,0,0,0,'SAY_DROSTAN_GOT_LUCKY_1'), +(-1000649,'Bah, it\'s an improvement.',0,0,0,11,'SAY_DROSTAN_GOT_LUCKY_2'), +(-1000650,'Calm down lad, it\'s just a birdshot!',0,0,0,0,'SAY_DROSTAN_HIT_BIRD_1'), +(-1000651,'The only thing hurt is your pride, lad! Buck up!',0,0,0,0,'SAY_DROSTAN_HIT_BIRD_2'), + +(-1000652,'Me so hungry! YUM!',0,0,0,71,'dragonmaw peon SAY_PEON_1'), +(-1000653,'Hey... me not feel so good.',0,0,0,0,'dragonmaw peon SAY_PEON_2'), +(-1000654,'You is bad orc... baaad... or... argh!',0,0,0,0,'dragonmaw peon SAY_PEON_3'), +(-1000655,'Time for eating!?',0,0,0,71,'dragonmaw peon SAY_PEON_4'), +(-1000656,'It put the mutton in the stomach!',0,0,0,71,'dragonmaw peon SAY_PEON_5'), + +(-1000657,'Let\'s get the hell out of here.',0,0,0,5,'helice SAY_HELICE_ACCEPT'), +(-1000658,'Listen up, Venture Company goons! Rule #1: Never keep the prisoner near the explosives.',0,0,0,25,'helice SAY_HELICE_EXPLOSIVES_1'), +(-1000659,'Or THIS is what you get.',0,0,0,0,'helice SAY_HELICE_EXPLODE_1'), +(-1000660,'It\'s getting a little hot over here. Shall we move on?',0,0,0,11,'helice SAY_HELICE_MOVE_ON'), +(-1000661,'Oh, look, it\'s another cartload of explosives! Let\'s help them dispose of it.',0,0,0,25,'helice SAY_HELICE_EXPLOSIVES_2'), +(-1000662,'You really shouldn\'t play with this stuff. Someone could get hurt.',0,0,0,5,'helice SAY_HELICE_EXPLODE_2'), +(-1000663,'We made it! Thank you for getting me out of that hell hole. Tell Hemet to expect me!',0,0,0,4,'helice SAY_HELICE_COMPLETE'), + +(-1000664,'The Destructive Ward gains in power.',0,5,0,0,'destructive ward SAY_WARD_POWERUP'), +(-1000665,'The Destructive Ward is fully charged!',0,5,0,0,'destructive ward SAY_WARD_CHARGED'); -- -1 033 000 SHADOWFANG KEEP INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES @@ -710,8 +747,10 @@ INSERT INTO script_texts (entry,content_default,sound,type,language,emote,commen -- -1 036 000 DEADMINES INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES -(-1036000,'You there, check out that noise!',5775,1,7,0,'smite INST_SAY_ALARM1'), -(-1036001,'We\'re under attack! A vast, ye swabs! Repel the invaders!',5777,1,7,0,'smite INST_SAY_ALARM2'); +(-1036000,'You there, check out that noise.',5775,1,7,0,'smite INST_SAY_ALARM1'), +(-1036001,'We\'re under attack! A vast, ye swabs! Repel the invaders!',5777,1,7,0,'smite INST_SAY_ALARM2'), +(-1036002,'You land lubbers are tougher than I thought! I\'ll have to improvise!',5778,0,0,21,'smite SAY_PHASE_2'), +(-1036003,'D\'ah! Now you\'re making me angry!',5779,0,0,15,'smite SAY_PHASE_3'); -- -1 043 000 WAILING CAVERNS INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES @@ -720,7 +759,7 @@ INSERT INTO script_texts (entry,content_default,sound,type,language,emote,commen (-1043002,'These caverns were once a temple of promise for regrowth in the Barrens. Now, they are the halls of nightmares.',0,0,0,0,'Disciple of Naralex - SAY_FIRST_CORNER'), (-1043003,'Come. We must continue. There is much to be done before we can pull Naralex from his nightmare.',0,0,0,0,'Disciple of Naralex - SAY_CONTINUE'), (-1043004,'Within this circle of fire I must cast the spell to banish the spirits of the slain Fanglords.',0,0,0,0,'Disciple of Naralex - SAY_CIRCLE_BANISH'), -(-1043005,'The caverns have been purified. To Naralex''s chamber we go!',0,0,0,0,'Disciple of Naralex - SAY_PURIFIED'), +(-1043005,'The caverns have been purified. To Naralex\'s chamber we go!',0,0,0,0,'Disciple of Naralex - SAY_PURIFIED'), (-1043006,'Beyond this corridor, Naralex lies in fitful sleep. Let us go awaken him before it is too late.',0,0,0,0,'Disciple of Naralex - SAY_NARALEX_CHAMBER'), (-1043007,'Protect me brave souls as I delve into the Emerald Dream to rescue Naralex and put an end to this corruption!',0,1,0,0,'Disciple of Naralex - SAY_BEGIN_RITUAL'), (-1043008,'%s begins to perform the awakening ritual on Naralex.',0,2,0,0,'Disciple of Naralex - EMOTE_RITUAL_BEGIN'), @@ -737,6 +776,20 @@ INSERT INTO script_texts (entry,content_default,sound,type,language,emote,commen (-1043019,'Deal with this $N! I need to prepare to awake Naralex!',0,0,0,0,'Disciple of Naralex - SAY_AGGRO_3'); -- -1 047 000 RAZORFEN KRAUL +INSERT INTO script_texts (entry,content_default,sound,type,LANGUAGE,emote,comment) VALUES +(-1047000,'Woo hoo! Finally getting out of here. It\'s going to be rough though. Keep your eyes peeled for trouble.',0,0,0,0,'willix SAY_READY'), +(-1047001,'Up there is where Charlga Razorflank resides. Blasted old crone.',0,0,0,25,'willix SAY_1'), +(-1047002,'There\'s blueleaf tuber in this trench! It\'s like gold waiting to be mined I tell you!',0,0,0,0,'willix SAY_2'), +(-1047003,'There could be danger around every corner here.',0,0,0,0,'willix SAY_3'), +(-1047004,'I don\'t see how these foul animals live in this place... sheesh it smells!',0,0,0,0,'willix SAY_4'), +(-1047005,'I think I see a way for us to get out of this big twisted mess of a bramble.',0,0,0,0,'willix SAY_5'), +(-1047006,'Glad to be out of that wretched trench. Not much nicer up here though!',0,0,0,0,'willix SAY_6'), +(-1047007,'Finally! I\'ll be glad to get out of this place.',0,0,0,0,'willix SAY_7'), +(-1047008,'I think I\'ll rest a moment and catch my breath before heading back to Ratchet. Thanks for all the help!',0,0,0,0,'willix SAY_END'), +(-1047009,'$N heading this way fast! To arms!',0,0,0,0,'willix SAY_AGGRO_1'), +(-1047010,'Eek! $N coming right at us!',0,0,0,0,'willix SAY_AGGRO_2'), +(-1047011,'Egads! $N on me!',0,0,0,0,'willix SAY_AGGRO_3'), +(-1047012,'Help! Get this $N off of me!',0,0,0,0,'willix SAY_AGGRO_4'); -- -1 048 000 BLACKFATHOM DEEPS @@ -789,7 +842,9 @@ INSERT INTO script_texts (entry,content_default,sound,type,language,emote,commen (-1109001,'Be steadfast, champion. I know why it is that you are here and I know what it is that you seek. Eranikus will not give up the shard freely. He has been twisted... twisted by the same force that you seek to destroy.',0,0,0,0,'malfurion stormrge SAY_MALFURION1'), (-1109002,'Are you really surprised? Is it hard to believe that the power of an Old God could reach even inside the Dream? It is true - Eranikus, Tyrant of the Dream, wages a battle against us all. The Nightmare follows in his wake of destruction.',0,0,0,0,'malfurion stormrge SAY_MALFURION2'), (-1109003,'Understand this, Eranikus wants nothing more than to be brought to Azeroth from the Dream. Once he is out, he will stop at nothing to destroy my physical manifestation. This, however, is the only way in which you could recover the scepter shard.',0,0,0,0,'malfurion stormrge SAY_MAFLURION3'), -(-1109004,'You will bring him back into this world, champion.',0,0,0,0,'malfurion Stormrge SAY_MALFURION4'); +(-1109004,'You will bring him back into this world, champion.',0,0,0,0,'malfurion Stormrge SAY_MALFURION4'), + +(-1109005,'The shield be down! Rise up Atal\'ai! Rise up!',5861,6,0,0,'jammalan SAY_JAMMALAN_INTRO'); -- -1 129 000 RAZORFEN DOWNS INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES @@ -943,8 +998,8 @@ INSERT INTO script_texts (entry,content_default,sound,type,language,emote,commen (-1309020,'PRIDE HERALDS THE END OF YOUR WORLD. COME, MORTALS! FACE THE WRATH OF THE SOULFLAYER!',8414,1,0,0,'hakkar SAY_AGGRO'), (-1309021,'Fleeing will do you no good, mortals!',0,1,0,0,'hakkar SAY_FLEEING'), -(-1309022,'You dare set foot upon Hakkari holy ground? Minions of Hakkar, destroy the infidels!',0,1,0,0,'hakkar SAY_MINION_DESTROY'), -(-1309023,'Minions of Hakkar, hear your God. The sanctity of this temple has been compromised. Invaders encroach upon holy ground! The Altar of Blood must be protected. Kill them all!',0,1,0,0,'hakkar SAY_PROTECT_ALTAR'), +(-1309022,'You dare set foot upon Hakkari holy ground? Minions of Hakkar, destroy the infidels!',0,6,0,0,'hakkar SAY_MINION_DESTROY'), +(-1309023,'Minions of Hakkar, hear your God. The sanctity of this temple has been compromised. Invaders encroach upon holy ground! The Altar of Blood must be protected. Kill them all!',0,6,0,0,'hakkar SAY_PROTECT_ALTAR'), (-1309024,'%s goes into a rage after seeing his raptor fall in battle!',0,2,0,0,'mandokir EMOTE_RAGE'); @@ -958,7 +1013,20 @@ INSERT INTO script_texts (entry,content_default,sound,type,language,emote,commen (-1329004,'An Ash\'ari Crystal has fallen! Stay true to the Lich King, my brethren, and attempt to resummon it.',0,6,0,0,'thuzadin acolyte SAY_ANNOUNCE_ZIGGURAT_1'), (-1329005,'One of the Ash\'ari Crystals has been destroyed! Slay the intruders!',0,6,0,0,'thuzadin acolyte SAY_ANNOUNCE_ZIGGURAT_2'), (-1329006,'An Ash\'ari Crystal has been toppled! Restore the ziggurat before the Necropolis is vulnerable!',0,6,0,0,'thuzadin acolyte SAY_ANNOUNCE_ZIGGURAT_3'), -(-1329007,'The Ash\'ari Crystals have been destroyed! The Slaughterhouse is vulnerable!',0,6,0,0,'baron rivendare SAY_ANNOUNCE_RIVENDARE'); +(-1329007,'The Ash\'ari Crystals have been destroyed! The Slaughterhouse is vulnerable!',0,6,0,0,'baron rivendare SAY_ANNOUNCE_RIVENDARE'), + +(-1329008,'Intruders at the Service Gate! Lord Rivendare must be warned!',0,6,0,0,'barthilas SAY_WARN_BARON'), +(-1329009,'Intruders! More pawns of the Argent Dawn, no doubt. I already count one of their number among my prisoners. Withdraw from my domain before she is executed!',0,6,0,0,'baron rivendare SAY_ANNOUNCE_RUN_START'), +(-1329010,'You\'re still here? Your foolishness is amusing! The Argent Dawn wench needn\'t suffer in vain. Leave at once and she shall be spared!',0,6,0,0,'baron rivendare SAY_ANNOUNCE_RUN_10_MIN'), +(-1329011,'I shall take great pleasure in taking this poor wretch\'s life! It\'s not too late, she needn\'t suffer in vain. Turn back and her death shall be merciful!',0,6,0,0,'baron rivendare SAY_ANNOUNCE_RUN_5_MIN'), +(-1329012,'May this prisoner\'s death serve as a warning. None shall defy the Scourge and live!',0,6,0,0,'baron rivendare SAY_ANNOUNCE_RUN_FAIL'), +(-1329013,'So you see fit to toy with the Lich King\'s creations? Ramstein, be sure to give the intruders a proper greeting.',0,6,0,0,'baron rivendare SAY_ANNOUNCE_RAMSTEIN'), +(-1329014,'Time to take matters into my own hands. Come. Enter my domain and challenge the might of the Scourge!',0,6,0,0,'baron rivendare SAY_UNDEAD_DEFEAT'), +(-1329015,'You did it... you\'ve slain Baron Rivendare! The Argent Dawn shall hear of your valiant deeds!',0,0,0,0,'ysida SAY_EPILOGUE'), + +(-1329016,'Today you have unmade what took me years to create! For this you shall all die by my hand!',0,1,0,0,'dathrohan SAY_AGGRO'), +(-1329017,'You fools think you can defeat me so easily? Face the true might of the Nathrezim!',0,1,0,0,'dathrohan SAY_TRANSFORM'), +(-1329018,'Damn you mortals! All my plans of revenge, all my hate... all burned to ash...',0,0,0,0,'dathrohan SAY_DEATH'); -- -1 349 000 MARAUDON @@ -992,9 +1060,16 @@ INSERT INTO script_texts (entry,content_default,sound,type,language,emote,commen (-1409019,'You think you\'ve won already? Perhaps you\'ll need another lesson in pain!',0,1,0,0,'majordomo SAY_LAST_ADD'), (-1409020,'Brashly you have come to rest the secrets of the living flame. You will soon regret the recklessness of your quest.',0,1,0,0,'majordomo SAY_DEFEAT_2'), (-1409021,'I go now to summon the lord whos house this is. Should you seek an audiance with him your paltry lives will surly be forfit. Nevertheless seek out his lair if you dare!',0,1,0,0,'majordomo SAY_DEFEAT_3'), -(-1409022,'My flame! Please don\'t take away my flame... ',8042,1,0,0,'ragnaros SAY_ARRIVAL4_MAJ'); +(-1409022,'My flame! Please don\'t take away my flame... ',8042,1,0,0,'ragnaros SAY_ARRIVAL4_MAJ'), +(-1409023,'Very well, $N.',0,0,0,0,'majordomo SAY_SUMMON_0'), +(-1409024,'Impudent whelps! You''ve rushed headlong to your own deaths! See now, the master stirs!',0,1,0,0,'majordomo SAY_SUMMON_1'); -- -1 429 000 DIRE MAUL +INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES +(-1429000,'The demon is loose! Quickly we must restrain him!',0,6,0,0,'highborne summoner SAY_FREE_IMMOLTHAR'), +(-1429001,'Who dares disrupt the sanctity of Eldre\'Thalas? Face me, cowards!',0,6,0,0,'prince tortheldrin SAY_KILL_IMMOLTHAR'), + +(-1429002,'At last... Freed from his cursed grasp!',0,6,0,0,'old ironbark SAY_IRONBARK_REDEEM'); -- -1 469 000 BLACKWING LAIR INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES @@ -1006,7 +1081,7 @@ INSERT INTO script_texts (entry,content_default,sound,type,language,emote,commen (-1469004,'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...',0,0,0,0,'victor_nefarius SAY_GAMESBEGIN_1'), (-1469005,'Let the games begin!',8280,1,0,0,'victor_nefarius SAY_GAMESBEGIN_2'), -(-1469006,'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!',8279,1,0,0,'victor_nefarius SAY_VAEL_INTRO'), +(-1469006,'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!',8279,1,0,0,'victor_nefarius SAY_NEFARIUS_CORRUPT'), (-1469007,'Well done, my minions. The mortals\' courage begins to wane! Now, let\'s see how they contend with the true Lord of Blackrock Spire!',8288,1,0,0,'nefarian SAY_AGGRO'), (-1469008,'Enough! Now you vermin shall feel the force of my birthright, the fury of the earth itself.',8289,1,0,0,'nefarian SAY_XHEALTH'), @@ -1035,7 +1110,7 @@ INSERT INTO script_texts (entry,content_default,sound,type,language,emote,commen (-1469029,'Nefarius\' hate has made me stronger than ever before. You should have fled, while you could, mortals! The fury of Blackrock courses through my veins!',8285,1,0,0,'vaelastrasz SAY_HALFLIFE'), (-1469030,'Forgive me $N, your death only adds to my failure.',8284,1,0,0,'vaelastrasz SAY_KILLTARGET'), -(-1469031,'REUSE ME',0,0,0,0,'REUSE ME'); +(-1469031,'Death Knights, get over here!',0,1,0,0,'nefarian SAY_DEATH_KNIGHT'); -- -1 509 000 RUINS OF AHN'QIRAJ INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES @@ -1066,7 +1141,7 @@ INSERT INTO script_texts (entry,content_default,sound,type,language,emote,commen (-1509019,'My powers are renewed!',8595,1,0,0,'ossirian SAY_SURPREME2'), (-1509020,'My powers return!',8596,1,0,0,'ossirian SAY_SURPREME3'), (-1509021,'Protect the city at all costs!',8597,1,0,0,'ossirian SAY_RAND_INTRO1'), -(-1509022,'The walls have been breached!',8599,1,0,0,'ossirian SAY_RAND_INTRO2'), +(-1509022,'The walls have been breached!',8599,6,0,0,'ossirian SAY_RAND_INTRO2'), (-1509023,'To your posts. Defend the city.',8600,1,0,0,'ossirian SAY_RAND_INTRO3'), (-1509024,'Tresspassers will be terminated.',8601,1,0,0,'ossirian SAY_RAND_INTRO4'), (-1509025,'Sands of the desert rise and block out the sun!',8598,1,0,0,'ossirian SAY_AGGRO'), @@ -1321,8 +1396,8 @@ INSERT INTO script_texts (entry,content_default,sound,type,language,emote,commen (-1533080,'Breathe no more!',8850,1,0,0,'noth SAY_SLAY2'), (-1533081,'I will serve the master... in... death!',8848,1,0,0,'noth SAY_DEATH'), -(-1533082,'%s takes in a deep breath...',0,2,0,0,'sapphiron EMOTE_BREATH'), -(-1533083,'%s resumes his attacks!',0,2,0,0,'sapphiron EMOTE_GROUND'), +(-1533082,'%s takes in a deep breath...',0,3,0,0,'sapphiron EMOTE_BREATH'), +(-1533083,'%s resumes his attacks!',0,3,0,0,'sapphiron EMOTE_GROUND'), (-1533084,'Our preparations continue as planned, master.',14467,1,0,0,'kelthuzad SAY_SAPP_DIALOG1'), (-1533085,'It is good that you serve me so faithfully. Soon, all will serve the Lich King and in the end, you shall be rewarded...so long as you do not falter.',8881,1,0,0,'kelthuzad SAY_SAPP_DIALOG2_LICH'), @@ -1778,12 +1853,12 @@ INSERT INTO script_texts (entry,content_default,sound,type,language,emote,commen -- -1 554 000 THE MECHANAR INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES -(-1554000,'I predict a painful death.',11101,1,0,0,'gyro SAY_AGGRO'), -(-1554001,'Measure twice; cut once!',11104,1,0,0,'gyro SAY_SAW_ATTACK1'), -(-1554002,'If my division is correct, you should be quite dead.',11105,1,0,0,'gyro SAY_SAW_ATTACK2'), -(-1554003,'Your strategy was flawed!',11102,1,0,0,'gyro SAY_SLAY1'), -(-1554004,'Yes, the only logical outcome.',11103,1,0,0,'gyro SAY_SLAY2'), -(-1554005,'An unforseen... contingency',11106,1,0,0,'gyro SAY_DEATH'), +(-1554000,'REUSE_ME',0,0,0,0,'REUSE_ME'), +(-1554001,'REUSE_ME',0,0,0,0,'REUSE_ME'), +(-1554002,'REUSE_ME',0,0,0,0,'REUSE_ME'), +(-1554003,'REUSE_ME',0,0,0,0,'REUSE_ME'), +(-1554004,'REUSE_ME',0,0,0,0,'REUSE_ME'), +(-1554005,'REUSE_ME',0,0,0,0,'REUSE_ME'), (-1554006,'You have approximately five seconds to live.',11109,1,0,0,'ironhand SAY_AGGRO_1'), (-1554007,'With the precise angle and velocity...',11112,1,0,0,'ironhand SAY_HAMMER_1'), @@ -3197,7 +3272,7 @@ INSERT INTO script_texts (entry,content_default,sound,type,language,emote,commen -- -1 649 000 TRIAL OF THE CRUSADER INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES -(-1649000,'Welcome champions, you have heard the call of the argent crusade and you have boldly answered. It is here in the crusaders coliseum that you will face your greatest challenges. Those of you who survive the rigors of the coliseum will join the Argent Crusade on it''s marsh to ice crown citadel.',16036,1,0,0,'tirion SAY_TIRION_RAID_INTRO_LONG'), +(-1649000,'Welcome champions, you have heard the call of the argent crusade and you have boldly answered. It is here in the crusaders coliseum that you will face your greatest challenges. Those of you who survive the rigors of the coliseum will join the Argent Crusade on it\'s marsh to ice crown citadel.',16036,1,0,0,'tirion SAY_TIRION_RAID_INTRO_LONG'), (-1649001,'Welcome to the trials of the crusader. Only the most powerful combatants of azeroth are allowed to undergo these trials. You are among the worthy few.',16053,1,0,0,'tirion SAY_RAID_TRIALS_INTRO'), (-1649002,'Hailing from the deepest, darkest carverns of the storm peaks, Gormok the Impaler! Battle on, heroes!',16038,1,0,0,'tirion SAY_TIRION_BEAST_1'), @@ -3213,26 +3288,26 @@ INSERT INTO script_texts (entry,content_default,sound,type,language,emote,commen (-1649011,'Prepare for oblivion!',16269,1,0,0,'wilfred SAY_WILFRED_JARAXXUS_INTRO_2'), (-1649012,'Ah ha! Behold the absolute power of Wilfred Fizzlebang, master summoner! You are bound to ME, demon!',16270,1,0,0,'wilfred SAY_WILFRED_JARAXXUS_INTRO_3'), (-1649013,'Trifling gnome, your arrogance will be your undoing!',16143,1,0,0,'jaraxxus SAY_JARAXXUS_JARAXXAS_INTRO_1'), -(-1649014,'But I''m in charge her-',16271,1,0,0,'wilfred SAY_WILFRED_DEATH'), +(-1649014,'But I\'m in charge her-',16271,1,0,0,'wilfred SAY_WILFRED_DEATH'), (-1649015,'Quickly, heroes! Destroy the demon lord before it can open a portal to its twisted demonic realm!',16044,1,0,0,'tirion SAY_TIRION_JARAXXUS_INTRO_2'), (-1649016,'The loss of Wilfred Fizzlebang, while unfortunate, should be a lesson to those that dare dabble in dark magic. Alas, you are victorious and must now face the next challenge.',16045,1,0,0,'tirion SAY_TIRION_JARAXXUS_EXIT_1'), (-1649017,'Treacherous Alliance dogs! You summon a demon lord against warriors of the Horde!? Your deaths will be swift!',16021,1,0,0,'garrosh SAY_GARROSH_JARAXXUS_EXIT_1'), -(-1649018,'The Alliance doesn''t need the help of a demon lord to deal with Horde filth. Come, pig!',16064,1,0,0,'varian SAY_VARIAN_JARAXXUS_SLAY'), +(-1649018,'The Alliance doesn\'t need the help of a demon lord to deal with Horde filth. Come, pig!',16064,1,0,0,'varian SAY_VARIAN_JARAXXUS_SLAY'), (-1649019,'Everyone, calm down! Compose yourselves! There is no conspiracy at play here. The warlock acted on his own volition - outside of influences from the Alliance. The tournament must go on!',16046,1,0,0,'tirion SAY_TIRION_JARAXXUS_EXIT_2'), -(-1649020,'The next battle will be against the Argent Crusade''s most powerful knights! Only by defeating them will you be deemed worthy...',16047,1,0,0,'tirion SAY_TIRION_PVP_INTRO_1'), +(-1649020,'The next battle will be against the Argent Crusade\'s most powerful knights! Only by defeating them will you be deemed worthy...',16047,1,0,0,'tirion SAY_TIRION_PVP_INTRO_1'), (-1649021,'The Horde demands justice! We challenge the Alliance. Allow us to battle in place of your knights, paladin. We will show these dogs what it means to insult the Horde!',16023,1,0,0,'garrosh SAY_GARROSH_PVP_A_INTRO_1'), (-1649022,'Our honor has been besmirched! They make wild claims and false accusations against us. I demand justice! Allow my champions to fight in place of your knights, Tirion. We challenge the Horde!',16066,1,0,0,'varian SAY_VARIAN_PVP_H_INTRO_1'), (-1649023,'Very well, I will allow it. Fight with honor!',16048,1,0,0,'tirion SAY_TIRION_PVP_INTRO_2'), (-1649024,'Fight for the glory of the Alliance, heroes! Honor your king and your people!',16065,1,0,0,'varian SAY_VARIAN_PVP_A_INTRO_2'), -(-1649025,'Show them no mercy, Horde champions! LOK''TAR OGAR!',16022,1,0,0,'garrosh SAY_GARROSH_PVP_H_INTRO_2'), +(-1649025,'Show them no mercy, Horde champions! LOK\'TAR OGAR!',16022,1,0,0,'garrosh SAY_GARROSH_PVP_H_INTRO_2'), (-1649026,'Glory to the alliance.',16067,1,0,0,'varian SAY_VARIAN_PVP_A_WIN'), (-1649027,'That was just a taste of what the future brings. FOR THE HORDE!',16024,1,0,0,'garrosh SAY_GARROSH_PVP_H_WIN'), (-1649028,'A shallow and tragic victory. We are weaker as a whole from the losses suffered today. Who but the Lich King could benefit from such foolishness? Great warriors have lost their lives. And for what? The true threat looms ahead - the Lich King awaits us all in death.',16049,1,0,0,'tirion SAY_TIRION_PVP_WIN'), -(-1649029,'Only by working together will you overcome the final challenge. From the depths of Icecrown come two of the Scourge''s most powerful lieutenants: fearsome val''kyr, winged harbingers of the Lich King!',16050,1,0,0,'tirion SAY_TIRION_TWINS_INTRO'), +(-1649029,'Only by working together will you overcome the final challenge. From the depths of Icecrown come two of the Scourge\'s most powerful lieutenants: fearsome val\'kyr, winged harbingers of the Lich King!',16050,1,0,0,'tirion SAY_TIRION_TWINS_INTRO'), (-1649030,'Let the games begin!',16037,1,0,0,'tirion SAY_RAID_INTRO_SHORT'), -(-1649031,'Not even the lich king''s most powerful minions could stand against the alliance. All hail our victors.',16068,1,0,0,'varian SAY_VARIAN_TWINS_A_WIN'), +(-1649031,'Not even the lich king\'s most powerful minions could stand against the alliance. All hail our victors.',16068,1,0,0,'varian SAY_VARIAN_TWINS_A_WIN'), (-1649032,'Do you still question the might of the Horde, paladin? We will take on all comers!',16025,1,0,0,'garrosh SAY_GARROSH_TWINS_H_WIN'), (-1649033,'A mighty blow has been dealt to the Lich King! You have proven yourselves able bodied champions of the Argent Crusade. Together we will strike at Icecrown Citadel and destroy what remains of the Scourge! There is no challenge that we cannot face united!',16051,1,0,0,'tirion SAY_TIRION_TWINS_WIN'), @@ -3256,7 +3331,7 @@ INSERT INTO script_texts (entry,content_default,sound,type,language,emote,commen (-1649048,'Weakling!',16017,1,0,0,'garrosh SAY_GARROSH_PVP_A_SLAY_1'), (-1649049,'Pathetic!',16018,1,0,0,'garrosh SAY_GARROSH_PVP_A_SLAY_2'), (-1649050,'Overpowered.',16019,1,0,0,'garrosh SAY_GARROSH_PVP_A_SLAY_3'), -(-1649051,'Lok''tar!',16020,1,0,0,'garrosh SAY_GARROSH_PVP_A_SLAY_4'), +(-1649051,'Lok\'tar!',16020,1,0,0,'garrosh SAY_GARROSH_PVP_A_SLAY_4'), (-1649052,'Hah!',16060,1,0,0,'varian SAY_VARIAN_PVP_H_SLAY_1'), (-1649053,'Hardly a challenge!',16061,1,0,0,'varian SAY_VARIAN_PVP_H_SLAY_2'), (-1649054,'Worthless scrub.',16062,1,0,0,'varian SAY_VARIAN_PVP_H_SLAY_3'), @@ -3420,13 +3495,25 @@ INSERT INTO gossip_texts (entry,content_default,comment) VALUES (-3000107,'[PH] Get Presicion Bombs','greer orehammer GOSSIP_ITEM_GET_BOMBS'), (-3000108,'[PH] Start bombing mission','greer orehammer GOSSIP_ITEM_FLIGHT'); +-- -3 043 000 WAILING CAVERNS +INSERT INTO gossip_texts (entry,content_default,comment) VALUES +(-3043000,'Let the event begin!','Disciple of Naralex - GOSSIP_ITEM_BEGIN'); + -- -3 090 000 GNOMEREGAN INSERT INTO gossip_texts (entry,content_default,comment) VALUES (-3090000,'I am ready to begin.','emi shortfuse GOSSIP_ITEM_START'); --- -3 043 000 WAILING CAVERNS +-- -3 409 000 MOLTEN CORE INSERT INTO gossip_texts (entry,content_default,comment) VALUES -(-3043000,'Let the event begin!','Disciple of Naralex - GOSSIP_ITEM_BEGIN'); +(-3409000,'Tell me more.','majordomo_executus GOSSIP_ITEM_SUMMON_1'), +(-3409001,'What else do you have to say?','majordomo_executus GOSSIP_ITEM_SUMMON_2'), +(-3409002,'You challenged us and we have come. Where is this master you speak of?','majordomo_executus GOSSIP_ITEM_SUMMON_3'); + +-- -3 469 000 BLACKWING LAIR +INSERT INTO gossip_texts (entry,content_default,comment) VALUES +(-3469000,'I\'ve made no mistakes.','victor_nefarius GOSSIP_ITEM_NEFARIUS_1'), +(-3469001,'You have lost your mind, Nefarius. You speak in riddles.','victor_nefarius GOSSIP_ITEM_NEFARIUS_2'), +(-3469002,'Please do.','victor_nefarius GOSSIP_ITEM_NEFARIUS_3'); -- -3 560 000 ESCAPE FROM DURNHOLDE (OLD HILLSBRAD) INSERT INTO gossip_texts (entry,content_default,comment) VALUES @@ -4852,7 +4939,7 @@ INSERT INTO script_waypoint VALUES (20129, 25, -8375.42,-4250.41, -205.14,5000, ''); DELETE FROM script_waypoint WHERE entry=20415; -INSERT INTO script_waypoint VALUES +INSERT INTO script_waypoint VALUES (20415, 0, 2488.77, 2184.89, 104.64, 0, ""), (20415, 1, 2478.72, 2184.77, 98.58, 0, ""), (20415, 2, 2473.52, 2184.71, 99.00, 0, ""), @@ -5163,6 +5250,31 @@ INSERT INTO script_waypoint VALUES (28217,23, 5638.541504, 4594.924805, -137.495117, 0, 'summon'), (28217,24, 5638.061523, 4579.945801, -138.029465, 0, ''); +DELETE FROM script_waypoint WHERE entry=28787; +INSERT INTO script_waypoint (entry, pointid, location_x, location_y, location_z, waittime, point_comment) VALUES +(28787, 1, 5913.516113, 5379.034668, -98.896118, 0, ''), +(28787, 2, 5917.750977, 5374.519043, -98.869781, 0, 'SAY_HELICE_EXPLOSIVES_1'), +(28787, 3, 5926.428711, 5372.145020, -98.884453, 0, ''), +(28787, 4, 5929.214844, 5377.803223, -99.020065, 0, ''), +(28787, 5, 5927.621582, 5378.564941, -99.047890, 0, ''), +(28787, 6, 5917.622070, 5383.494629, -106.310204, 0, ''), +(28787, 7, 5908.991211, 5387.655762, -106.310204, 0, ''), +(28787, 8, 5906.287109, 5390.496582, -106.041801, 0, ''), +(28787, 9, 5902.415039, 5399.741211, -99.306595, 0, ''), +(28787, 10, 5901.444336, 5404.593262, -96.759636, 0, ''), +(28787, 11, 5897.860352, 5406.656250, -96.029709, 0, ''), +(28787, 12, 5892.254395, 5401.291504, -95.848808, 0, ''), +(28787, 13, 5887.421875, 5386.701172, -95.400146, 0, 'SAY_HELICE_EXPLOSIVES_2'), +(28787, 14, 5883.308105, 5385.057617, -94.423698, 0, ''), +(28787, 15, 5879.180664, 5375.897461, -95.088066, 0, ''), +(28787, 16, 5872.613281, 5363.473633, -97.703575, 0, ''), +(28787, 17, 5857.971191, 5354.929688, -98.586090, 0, ''), +(28787, 18, 5848.729004, 5345.326660, -99.428978, 0, ''), +(28787, 19, 5842.330566, 5335.018555, -100.421455, 0, ''), +(28787, 20, 5832.164551, 5323.145020, -98.703285, 0, ''), +(28787, 21, 5824.738770, 5315.712891, -97.758018, 0, ''), +(28787, 22, 5819.650879, 5305.409668, -97.481796, 10000, 'SAY_HELICE_COMPLETE'); + DELETE FROM script_waypoint WHERE entry=28912; INSERT INTO script_waypoint VALUES (28912, 0, 1653.518, -6038.374, 127.585, 0, 'Jump off'), @@ -5436,5 +5548,76 @@ INSERT INTO script_waypoint VALUES (3678, 40, 27.174, 201.064, -72.31, 0, ''), (3678, 41, -41.114, 204.149, -78.94, 0, ''); --- EOF +DELETE FROM script_waypoint WHERE entry=5644; +INSERT INTO script_waypoint (entry, pointid, location_x, location_y, location_z, waittime, point_comment) VALUES +(5644, 1, -339.679, 1752.04, 139.482, 0, ''), +(5644, 2, -328.957, 1734.95, 139.327, 0, ''), +(5644, 3, -338.29, 1731.36, 139.327, 0, ''), +(5644, 4, -350.747, 1731.12, 139.338, 0, ''), +(5644, 5, -365.064, 1739.04, 139.376, 0, ''), +(5644, 6, -371.105, 1746.03, 139.374, 0, ''), +(5644, 7, -383.141, 1738.62, 138.93, 0, ''), +(5644, 8, -390.445, 1733.98, 136.353, 0, ''), +(5644, 9, -401.368, 1726.77, 131.071, 0, ''), +(5644, 10, -416.016, 1721.19, 129.807, 0, ''), +(5644, 11, -437.139, 1709.82, 126.342, 0, ''), +(5644, 12, -455.83, 1695.61, 119.305, 0, ''), +(5644, 13, -459.862, 1687.92, 116.059, 0, ''), +(5644, 14, -463.565, 1679.1, 111.653, 0, ''), +(5644, 15, -461.485, 1670.94, 109.033, 0, ''), +(5644, 16, -471.786, 1647.34, 102.862, 0, ''), +(5644, 17, -477.146, 1625.69, 98.342, 0, ''), +(5644, 18, -475.815, 1615.815, 97.07, 0, ''), +(5644, 19, -474.329, 1590.01, 94.4982, 0, ''); + +DELETE FROM script_waypoint WHERE entry=4508; +INSERT INTO script_waypoint VALUES +(4508, 0, 2194.38, 1791.65, 65.48, 5000, ''), +(4508, 1, 2188.56, 1805.87, 64.45, 0, ''), +(4508, 2, 2186.2, 1836.278, 59.859, 5000, 'SAY_WILLIX_1'), +(4508, 3, 2163.27, 1851.67, 56.73, 0, ''), +(4508, 4, 2140.22, 1845.02, 48.32, 0, ''), +(4508, 5, 2131.5, 1804.29, 46.85, 0, ''), +(4508, 6, 2096.18, 1789.03, 51.13, 3000, 'SAY_WILLIX_2'), +(4508, 7, 2074.46, 1780.09, 55.64, 0, ''), +(4508, 8, 2055.12, 1768.67, 58.46, 0, ''), +(4508, 9, 2037.83, 1748.62, 60.27, 5000, 'SAY_WILLIX_3'), +(4508, 10, 2037.51, 1728.94, 60.85, 0, ''), +(4508, 11, 2044.7, 1711.71, 59.71, 0, ''), +(4508, 12, 2067.66, 1701.84, 57.77, 0, ''), +(4508, 13, 2078.91, 1704.54, 56.77, 0, ''), +(4508, 14, 2097.65, 1715.24, 54.74, 3000, 'SAY_WILLIX_4'), +(4508, 15, 2106.44, 1720.98, 54.41, 0, ''), +(4508, 16, 2123.96, 1732.56, 52.27, 0, ''), +(4508, 17, 2153.82, 1728.73, 51.92, 0, ''), +(4508, 18, 2163.49, 1706.33, 54.42, 0, ''), +(4508, 19, 2158.75, 1695.98, 55.70, 0, ''), +(4508, 20, 2142.6, 1680.72, 58.24, 0, ''), +(4508, 21, 2118.31, 1671.54, 59.21, 0, ''), +(4508, 22, 2086.02, 1672.04, 61.24, 0, ''), +(4508, 23, 2068.81, 1658.93, 61.24, 0, ''), +(4508, 24, 2062.82, 1633.31, 64.35, 0, ''), +(4508, 25, 2060.92, 1600.11, 62.41, 3000, 'SAY_WILLIX_5'), +(4508, 26, 2063.05, 1589.16, 63.26, 0, ''), +(4508, 27, 2063.67, 1577.22, 65.89, 0, ''), +(4508, 28, 2057.94, 1560.68, 68.40, 0, ''), +(4508, 29, 2052.56, 1548.05, 73.35, 0, ''), +(4508, 30, 2045.22, 1543.4, 76.65, 0, ''), +(4508, 31, 2034.35, 1543.01, 79.70, 0, ''), +(4508, 32, 2029.95, 1542.94, 80.79, 0, ''), +(4508, 33, 2021.34, 1538.67, 80.8, 0, 'SAY_WILLIX_6'), +(4508, 34, 2012.45, 1549.48, 79.93, 0, ''), +(4508, 35, 2008.05, 1554.92, 80.44, 0, ''), +(4508, 36, 2006.54, 1562.72, 81.11, 0, ''), +(4508, 37, 2003.8, 1576.43, 81.57, 0, ''), +(4508, 38, 2000.57, 1590.06, 80.62, 0, ''), +(4508, 39, 1998.96, 1596.87, 80.22, 0, ''), +(4508, 40, 1991.19, 1600.82, 79.39, 0, ''), +(4508, 41, 1980.71, 1601.44, 79.77, 0, ''), +(4508, 42, 1967.22, 1600.18, 80.62, 0, ''), +(4508, 43, 1956.43, 1596.97, 81.75, 0, ''), +(4508, 44, 1954.87, 1592.02, 82.18, 3000, 'SAY_WILLIX_7'), +(4508, 45, 1948.35, 1571.35, 80.96, 30000, 'SAY_WILLIX_END'), +(4508, 46, 1947.02, 1566.42, 81.80, 30000, ''); +-- EOF diff --git a/system/MangosdRev.cpp b/system/MangosdRev.cpp index 42cc189..7220d38 100644 --- a/system/MangosdRev.cpp +++ b/system/MangosdRev.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/system/ScriptLoader.cpp b/system/ScriptLoader.cpp index a161d67..9158342 100644 --- a/system/ScriptLoader.cpp +++ b/system/ScriptLoader.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ @@ -8,12 +8,20 @@ extern void AddSC_battleground(); //custom -extern void AddSC_boss_pusillin(); -extern void AddSC_instance_dire_maul(); extern void AddSC_custom_cybernetic(); extern void AddSC_npc_arena_honor(); extern void AddSC_mob_teleguy(); +// OutdoorPvP +extern void AddSC_outdoor_pvp_eastern_kingdoms(); +extern void AddSC_outdoor_pvp_kalimdor(); +extern void AddSC_outdoor_pvp_northrend(); +extern void AddSC_outdoor_pvp_outland(); + +// OutdoorPvP zone scripts +extern void AddSC_outdoor_pvp_eastern_plaguelands(); +extern void AddSC_outdoor_pvp_silithus(); + //examples extern void AddSC_example_creature(); extern void AddSC_example_escort(); @@ -217,12 +225,14 @@ extern void AddSC_boss_onyxia(); //onyxias_lair extern void AddSC_instance_onyxias_lair(); extern void AddSC_boss_amnennar_the_coldbringer(); //razorfen_downs extern void AddSC_razorfen_downs(); -extern void AddSC_instance_razorfen_kraul(); //razorfen_kraul -extern void AddSC_boss_ayamiss(); //ruins_of_ahnqiraj +extern void AddSC_instance_razorfen_kraul(); // razorfen_kraul +extern void AddSC_razorfen_kraul(); +extern void AddSC_boss_ayamiss(); // ruins_of_ahnqiraj extern void AddSC_boss_kurinnaxx(); extern void AddSC_boss_moam(); extern void AddSC_ruins_of_ahnqiraj(); -extern void AddSC_boss_cthun(); //temple_of_ahnqiraj +extern void AddSC_instance_ruins_of_ahnqiraj(); +extern void AddSC_boss_cthun(); // temple_of_ahnqiraj extern void AddSC_boss_fankriss(); extern void AddSC_boss_huhuran(); extern void AddSC_bug_trio(); @@ -431,7 +441,6 @@ extern void AddSC_boss_lich_king_icc(); extern void AddSC_instance_forge_of_souls(); extern void AddSC_boss_devourer_of_souls(); extern void AddSC_boss_bronjahm(); -extern void AddSC_trash_forge_of_souls(); extern void AddSC_forge_of_souls(); extern void AddSC_instance_halls_of_reflection(); @@ -532,12 +541,21 @@ void AddScripts() AddSC_battleground(); //custom - AddSC_boss_pusillin(); - AddSC_instance_dire_maul(); AddSC_custom_cybernetic(); AddSC_npc_arena_honor(); AddSC_mob_teleguy(); + // OutdoorPvP zone scripts + // Must be _before_ map scripts call! + AddSC_outdoor_pvp_eastern_plaguelands(); + AddSC_outdoor_pvp_silithus(); + + // OutdoorPvP + AddSC_outdoor_pvp_eastern_kingdoms(); + AddSC_outdoor_pvp_kalimdor(); + AddSC_outdoor_pvp_northrend(); + AddSC_outdoor_pvp_outland(); + //examples AddSC_example_creature(); AddSC_example_escort(); @@ -741,12 +759,14 @@ void AddScripts() AddSC_instance_onyxias_lair(); AddSC_boss_amnennar_the_coldbringer(); //razorfen_downs AddSC_razorfen_downs(); - AddSC_instance_razorfen_kraul(); //razorfen_kraul - AddSC_boss_ayamiss(); //ruins_of_ahnqiraj + AddSC_instance_razorfen_kraul(); // razorfen_kraul + AddSC_razorfen_kraul(); + AddSC_boss_ayamiss(); // ruins_of_ahnqiraj AddSC_boss_kurinnaxx(); AddSC_boss_moam(); AddSC_ruins_of_ahnqiraj(); - AddSC_boss_cthun(); //temple_of_ahnqiraj + AddSC_instance_ruins_of_ahnqiraj(); + AddSC_boss_cthun(); // temple_of_ahnqiraj AddSC_boss_fankriss(); AddSC_boss_huhuran(); AddSC_bug_trio(); @@ -943,7 +963,6 @@ void AddScripts() AddSC_instance_forge_of_souls(); AddSC_boss_devourer_of_souls(); AddSC_boss_bronjahm(); - AddSC_trash_forge_of_souls(); AddSC_forge_of_souls(); AddSC_instance_halls_of_reflection(); diff --git a/system/ScriptLoader.h b/system/ScriptLoader.h index 3eeb0cb..8aad8d9 100644 --- a/system/ScriptLoader.h +++ b/system/ScriptLoader.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/system/system.cpp b/system/system.cpp index a9fb789..ed192e0 100644 --- a/system/system.cpp +++ b/system/system.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */ diff --git a/system/system.h b/system/system.h index 2b716c1..d5f08f9 100644 --- a/system/system.h +++ b/system/system.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2006 - 2011 ScriptDev2 +/* Copyright (C) 2006 - 2011 ScriptDev2 * This program is free software licensed under GPL version 2 * Please see the included DOCS/LICENSE.TXT for more information */