diff options
-rw-r--r-- | sql/FULL/world_script_texts.sql | 44 | ||||
-rw-r--r-- | sql/FULL/world_scripts_full.sql | 14 | ||||
-rw-r--r-- | sql/updates/4877_world_scripts.sql | 18 | ||||
-rw-r--r-- | src/bindings/scripts/ScriptMgr.cpp | 2 | ||||
-rw-r--r-- | src/bindings/scripts/scripts/zone/ulduar/halls_of_lightning/boss_loken.cpp | 244 |
5 files changed, 252 insertions, 70 deletions
diff --git a/sql/FULL/world_script_texts.sql b/sql/FULL/world_script_texts.sql index 6307f74e747..dc2638a057e 100644 --- a/sql/FULL/world_script_texts.sql +++ b/sql/FULL/world_script_texts.sql @@ -1788,6 +1788,36 @@ INSERT INTO `script_texts` (`entry`, `content_default`, `content_loc1`, `content (-1615042,'%s begins to open a Twilight Portal!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,0,5,0,0,'sartharion drake WHISPER_OPEN_PORTAL'); +-- 1 602 000 HALLS OF LIGHTNING +/* Bjarngrim */ +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 +(-1602000,'I am the greatest of my father\'s sons! Your end has come!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,14149,1,0,0,'bjarngrim SAY_AGGRO'), +(-1602001,'So ends your curse!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,14153,1,0,0,'bjarngrim SAY_SLAY_1'), +(-1602002,'Flesh... is... weak!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,14154,1,0,0,'bjarngrim SAY_SLAY_2'), +(-1602003,'...', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,14155,1,0,0,'bjarngrim SAY_SLAY_3'), +(-1602004,'How can it be...? Flesh is not... stronger!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,14156,1,0,0,'bjarngrim SAY_DEATH'), +(-1602005,'Defend yourself, for all the good it will do!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,14151,1,0,0,'bjarngrim SAY_BATTLE_STANCE'), +(-1602006,'%s switches to Battle Stance!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,0,3,0,0,'bjarngrim EMOTE_BATTLE_STANCE'), +(-1602007,'GRAAAAAH! Behold the fury of iron and steel!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,14152,1,0,0,'bjarngrim SAY_BERSEKER_STANCE'), +(-1602008,'%s switches to Berserker Stance!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,0,3,0,0,'bjarngrim EMOTE_BERSEKER_STANCE'), +(-1602009,'Give me your worst!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,14150,1,0,0,'bjarngrim SAY_DEFENSIVE_STANCE'), +(-1602010,'%s switches to Defensive Stance!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,0,3,0,0,'bjarngrim EMOTE_DEFENSIVE_STANCE'), +/* Loken */ +(-1602018,'What hope is there for you? None!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,14162,1,0,0,'loken SAY_AGGRO0'), +(-1602019,'I have witnessed the rise and fall of empires. The birth and extinction of entire species. Over countless millennia the foolishness of mortals has remained beyond a constant. Your presence here confirms this.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,14160,1,0,0,'loken SAY_INTRO_1'), +(-1602020,'My master has shown me the future, and you have no place in it. Azeroth will be reborn in darkness. Yogg-Saron shall be released! The Pantheon shall fall!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,14162,1,0,0,'loken SAY_INTRO_2'), +(-1602021,'Only mortal...', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,14166,1,0,0,'loken SAY_SLAY_1'), +(-1602022,'I... am... FOREVER!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,14167,1,0,0,'loken SAY_SLAY_2'), +(-1602023,'What little time you had, you wasted!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,14168,1,0,0,'loken SAY_SLAY_3'), +(-1602024,'My death... heralds the end of this world.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,14172,1,0,0,'loken SAY_DEATH'), +(-1602025,'You cannot hide from fate!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,14163,1,0,0,'loken SAY_NOVA_1'), +(-1602026,'Come closer. I will make it quick.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,14164,1,0,0,'loken SAY_NOVA_2'), +(-1602027,'Your flesh cannot hold out for long.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,14165,1,0,0,'loken SAY_NOVA_3'), +(-1602028,'You stare blindly into the abyss!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,14169,1,0,0,'loken SAY_75HEALTH'), +(-1602029,'Your ignorance is profound. Can you not see where this path leads?', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,14170,1,0,0,'loken SAY_50HEALTH'), +(-1602030,'You cross the precipice of oblivion!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,14171,1,0,0,'loken SAY_25HEALTH'), +(-1602031,'%s begins to cast Lightning Nova!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,0,3,0,0,'loken EMOTE_NOVA'); + -- -1 645 000 ??? 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 (-1645006, 'Let the trial begin, Bloodwrath, attack!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0, 1, 0, 0, 'master_kelerun_bloodmourn YELL_PHASE'), @@ -1969,17 +1999,3 @@ REPLACE INTO `script_texts` (`entry`, `content_default`, `sound`, `type`, `langu (-1576043,'Dragonqueen... Life-Binder... preserve... me.',13454,1,0,0,'keristrasza SAY_DEATH'), (-1576044,'Stay. Enjoy your final moments.',13451,1,0,0,'keristrasza SAY_CRYSTAL_NOVA'); --- boss_bjarngrim -DELETE FROM script_texts where entry IN (-1602001,-1602000,-1602002,-1602003,-1602004,-1602005,-1602006,-1602007,-1602008,-1602009,-1602010); -INSERT INTO script_texts (entry,content_default,sound,type,language,emote,comment) VALUES -(-1602000,'I am the greatest of my father\'s sons! Your end has come!',14149,1,0,0,'bjarngrim SAY_AGGRO'), -(-1602001,'So ends your curse!',14153,1,0,0,'bjarngrim SAY_SLAY_1'), -(-1602002,'Flesh... is... weak!',14154,1,0,0,'bjarngrim SAY_SLAY_2'), -(-1602003,'...',14155,1,0,0,'bjarngrim SAY_SLAY_3'), -(-1602004,'How can it be...? Flesh is not... stronger!',14156,1,0,0,'bjarngrim SAY_DEATH'), -(-1602005,'Defend yourself, for all the good it will do!',14151,1,0,0,'bjarngrim SAY_BATTLE_STANCE'), -(-1602006,'%s switches to Battle Stance!',0,3,0,0,'bjarngrim EMOTE_BATTLE_STANCE'), -(-1602007,'GRAAAAAH! Behold the fury of iron and steel!',14152,1,0,0,'bjarngrim SAY_BERSEKER_STANCE'), -(-1602008,'%s switches to Berserker Stance!',0,3,0,0,'bjarngrim EMOTE_BERSEKER_STANCE'), -(-1602009,'Give me your worst!',14150,1,0,0,'bjarngrim SAY_DEFENSIVE_STANCE'), -(-1602010,'%s switches to Defensive Stance!',0,3,0,0,'bjarngrim EMOTE_DEFENSIVE_STANCE'); diff --git a/sql/FULL/world_scripts_full.sql b/sql/FULL/world_scripts_full.sql index 79a6f5b3122..dc062de27d3 100644 --- a/sql/FULL/world_scripts_full.sql +++ b/sql/FULL/world_scripts_full.sql @@ -475,7 +475,7 @@ UPDATE `gameobject_template` SET `ScriptName`='go_gilded_brazier' WHERE `entry`= /* GNOMEREGAN */ /* GRUUL'S LAIR */ -UPDATE `instance_template` SET `script`='instance_gruuls_lair' WHERE `map` =565; +UPDATE `instance_template` SET `script`='instance_gruuls_lair' WHERE `map`=565; UPDATE `creature_template` SET `ScriptName`='boss_gruul' WHERE `entry`=19044; /* Maulgar and Event */ UPDATE `creature_template` SET `ScriptName`='boss_high_king_maulgar' WHERE `entry`=18831; @@ -484,6 +484,14 @@ UPDATE `creature_template` SET `ScriptName`='boss_blindeye_the_seer' WHERE `entr UPDATE `creature_template` SET `ScriptName`='boss_olm_the_summoner' WHERE `entry`=18834; UPDATE `creature_template` SET `ScriptName`='boss_krosh_firehand' WHERE `entry`=18832; +/* HALLS OF LIGHTNING */ +UPDATE `instance_template` SET `script`='instance_halls_of_lightning' WHERE `map`=602; +/* Bjarngrim */ +UPDATE `creature_template` SET `ScriptName`='boss_bjarngrim' WHERE `entry`=28586; +UPDATE `creature_template` SET `ScriptName`='mob_stormforged_lieutenant' WHERE `entry`=29240; +/* Loken */ +UPDATE `creature_template` SET `ScriptName`='boss_loken' WHERE `entry`=28923; + /* HELLFIRE CITADEL */ /* BLOOD FURNACE */ @@ -1163,7 +1171,3 @@ INSERT INTO `creature_ai_scripts` VALUES ( 3375000, 33750, 1, 0, 100, 0, 1, 1, 0, 0, 11, 63587, 0, 2, 11, 63583, 0, 2, 0, 0, 0, 0, 'Desecration'); /* EOF */ -UPDATE creature_template set ScriptName = 'boss_bjarngrim' where entry =28586; -UPDATE creature_template set ScriptName = 'mob_stormforged_lieutenant' where entry =29240; -UPDATE `creature_template` SET `ScriptName` = npc_skywing WHERE `entry` = 22424; -- script quest Skywing - diff --git a/sql/updates/4877_world_scripts.sql b/sql/updates/4877_world_scripts.sql new file mode 100644 index 00000000000..3efb7ca1373 --- /dev/null +++ b/sql/updates/4877_world_scripts.sql @@ -0,0 +1,18 @@ +DELETE FROM `script_texts` WHERE `entry` IN (-1602018,-1602019,-1602020,-1602021,-1602022,-1602023,-1602024,-1602025,-1602026,-1602027,-1602028,-1602029,-1602030,-1602031); +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 +(-1602018,'What hope is there for you? None!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,14162,1,0,0,'loken SAY_AGGRO0'), +(-1602019,'I have witnessed the rise and fall of empires. The birth and extinction of entire species. Over countless millennia the foolishness of mortals has remained beyond a constant. Your presence here confirms this.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,14160,1,0,0,'loken SAY_INTRO_1'), +(-1602020,'My master has shown me the future, and you have no place in it. Azeroth will be reborn in darkness. Yogg-Saron shall be released! The Pantheon shall fall!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,14162,1,0,0,'loken SAY_INTRO_2'), +(-1602021,'Only mortal...', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,14166,1,0,0,'loken SAY_SLAY_1'), +(-1602022,'I... am... FOREVER!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,14167,1,0,0,'loken SAY_SLAY_2'), +(-1602023,'What little time you had, you wasted!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,14168,1,0,0,'loken SAY_SLAY_3'), +(-1602024,'My death... heralds the end of this world.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,14172,1,0,0,'loken SAY_DEATH'), +(-1602025,'You cannot hide from fate!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,14163,1,0,0,'loken SAY_NOVA_1'), +(-1602026,'Come closer. I will make it quick.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,14164,1,0,0,'loken SAY_NOVA_2'), +(-1602027,'Your flesh cannot hold out for long.', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,14165,1,0,0,'loken SAY_NOVA_3'), +(-1602028,'You stare blindly into the abyss!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,14169,1,0,0,'loken SAY_75HEALTH'), +(-1602029,'Your ignorance is profound. Can you not see where this path leads?', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,14170,1,0,0,'loken SAY_50HEALTH'), +(-1602030,'You cross the precipice of oblivion!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,14171,1,0,0,'loken SAY_25HEALTH'), +(-1602031,'%s begins to cast Lightning Nova!', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,0,3,0,0,'loken EMOTE_NOVA'); + +UPDATE `creature_template` SET `ScriptName`='boss_loken' WHERE `entry`=28923;
\ No newline at end of file diff --git a/src/bindings/scripts/ScriptMgr.cpp b/src/bindings/scripts/ScriptMgr.cpp index d2857501705..1cf4a27915a 100644 --- a/src/bindings/scripts/ScriptMgr.cpp +++ b/src/bindings/scripts/ScriptMgr.cpp @@ -661,6 +661,7 @@ extern void AddSC_boss_razorscale(); //Halls of lightning extern void AddSC_boss_bjarngrim(); +extern void AddSC_boss_loken(); //Region extern void AddSC_wintergrasp(); @@ -1580,6 +1581,7 @@ void ScriptsInit(char const* cfg_file = "trinitycore.conf") //Halls of lightning AddSC_boss_bjarngrim(); + AddSC_boss_loken(); //Region AddSC_wintergrasp(); diff --git a/src/bindings/scripts/scripts/zone/ulduar/halls_of_lightning/boss_loken.cpp b/src/bindings/scripts/scripts/zone/ulduar/halls_of_lightning/boss_loken.cpp index 9459587e3c1..8316c466d9b 100644 --- a/src/bindings/scripts/scripts/zone/ulduar/halls_of_lightning/boss_loken.cpp +++ b/src/bindings/scripts/scripts/zone/ulduar/halls_of_lightning/boss_loken.cpp @@ -1,66 +1,113 @@ -/* Script Data Start -SDName: Boss loken -SDAuthor: LordVanMartin -SD%Complete: -SDComment: -SDCategory: -Script Data End */ - -/*** SQL START *** -update creature_template set scriptname = 'boss_loken' where entry = ''; -*** SQL END ***/ +/* Copyright (C) 2006 - 2009 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> + * This program is free software; you can redistribute it and/or modify + * 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: Boss Loken +SD%Complete: 60% +SDComment: Missing intro. Remove hack of Pulsing Shockwave when core supports. Aura is not working (59414) +SDCategory: Halls of Lightning +EndScriptData */ + #include "precompiled.h" +#include "def_halls_of_lightning.h" + +enum +{ + SAY_AGGRO = -1602018, + SAY_INTRO_1 = -1602019, + SAY_INTRO_2 = -1602020, + SAY_SLAY_1 = -1602021, + SAY_SLAY_2 = -1602022, + SAY_SLAY_3 = -1602023, + SAY_DEATH = -1602024, + SAY_NOVA_1 = -1602025, + SAY_NOVA_2 = -1602026, + SAY_NOVA_3 = -1602027, + SAY_75HEALTH = -1602028, + SAY_50HEALTH = -1602029, + SAY_25HEALTH = -1602030, + EMOTE_NOVA = -1602031, + + SPELL_ARC_LIGHTNING = 52921, + SPELL_LIGHTNING_NOVA_N = 52960, + SPELL_LIGHTNING_NOVA_H = 59835, + + SPELL_PULSING_SHOCKWAVE_N = 52961, + SPELL_PULSING_SHOCKWAVE_H = 59836, + SPELL_PULSING_SHOCKWAVE_AURA = 59414 +}; -//Spells -#define SPELL_ARC_NOVA 52921 -//Effect #1 School Damage (Nature), Value: 3238 to 3762 -//Effect #2 Apply Aura: Dummy, Value: 3238 to 3762, Server-side script - -#define SPELL_LIGHTNING_NOVA 52960 -#define SPELL_LIGHTNING_NOVA_2 59835 - -//Yell -#define SAY_AGGRO -1602015 -#define SAY_INTRO_1 -1602016 -#define SAY_INTRO_2 -1602017 -#define SAY_SLAY_1 -1602018 -#define SAY_SLAY_2 -1602019 -#define SAY_SLAY_3 -1602020 -#define SAY_DEATH -1602021 -#define SAY_NOVA_1 -1602022 -#define SAY_NOVA_2 -1602023 -#define SAY_NOVA_3 -1602024 -#define SAY_75HEALTH -1602025 -#define SAY_50HEALTH -1602026 -#define SAY_25HEALTH -1602027 +/*###### +## Boss Loken +######*/ struct TRINITY_DLL_DECL boss_lokenAI : public ScriptedAI { - boss_lokenAI(Creature *c) : ScriptedAI(c) {} + boss_lokenAI(Creature *pCreature) : ScriptedAI(pCreature) + { + m_pInstance = (ScriptedInstance*)pCreature->GetInstanceData(); + m_bIsHeroic = pCreature->GetMap()->IsHeroic(); + Reset(); + } + + ScriptedInstance* m_pInstance; + + bool m_bIsHeroic; + bool m_bIsAura; - void Reset() {} - void EnterCombat(Unit* who) + uint32 m_uiArcLightning_Timer; + uint32 m_uiLightningNova_Timer; + uint32 m_uiPulsingShockwave_Timer; + uint32 m_uiResumePulsingShockwave_Timer; + + uint32 m_uiHealthAmountModifier; + + void Reset() { - DoScriptText(SAY_AGGRO, m_creature); + m_bIsAura = false; + + m_uiArcLightning_Timer = 15000; + m_uiLightningNova_Timer = 20000; + m_uiPulsingShockwave_Timer = 2000; + m_uiResumePulsingShockwave_Timer = 15000; + + m_uiHealthAmountModifier = 1; + + if (m_pInstance) + m_pInstance->SetData(TYPE_LOKEN, NOT_STARTED); } - void AttackStart(Unit* who) {} - void MoveInLineOfSight(Unit* who) {} - void UpdateAI(const uint32 diff) + + void EnterCombat(Unit* pWho) { - //Return since we have no target - if(!UpdateVictim()) - return; + DoScriptText(SAY_AGGRO, m_creature); - DoMeleeAttackIfReady(); + if (m_pInstance) + m_pInstance->SetData(TYPE_LOKEN, IN_PROGRESS); } - void JustDied(Unit* killer) + + void JustDied(Unit* pKiller) { DoScriptText(SAY_DEATH, m_creature); + + if (m_pInstance) + m_pInstance->SetData(TYPE_LOKEN, DONE); } - void KilledUnit(Unit *victim) + + void KilledUnit(Unit* pVictim) { - if(victim == m_creature) - return; switch(rand()%3) { case 0: DoScriptText(SAY_SLAY_1, m_creature);break; @@ -68,11 +115,106 @@ struct TRINITY_DLL_DECL boss_lokenAI : public ScriptedAI case 2: DoScriptText(SAY_SLAY_3, m_creature);break; } } + + void UpdateAI(const uint32 uiDiff) + { + //Return since we have no target + if(!UpdateVictim()) + return; + + if (m_bIsAura) + { + // workaround for PULSING_SHOCKWAVE + if (m_uiPulsingShockwave_Timer < uiDiff) + { + Map *map = m_creature->GetMap(); + if (map->IsDungeon()) + { + Map::PlayerList const &PlayerList = map->GetPlayers(); + + if (PlayerList.isEmpty()) + return; + + for (Map::PlayerList::const_iterator i = PlayerList.begin(); i != PlayerList.end(); ++i) + if (i->getSource()->isAlive() && i->getSource()->isTargetableForAttack()) + { + int32 dmg; + float m_fDist = m_creature->GetDistance(i->getSource()); + + if (m_fDist <= 1.0f) // Less than 1 yard + dmg = (m_bIsHeroic ? 850 : 800); // need to correct damage + else // Further from 1 yard + dmg = ((m_bIsHeroic ? 250 : 200) * m_fDist) + (m_bIsHeroic ? 850 : 800); // need to correct damage + + m_creature->CastCustomSpell(i->getSource(), (m_bIsHeroic ? 59837 : 52942), &dmg, 0, 0, false); + } + } + m_uiPulsingShockwave_Timer = 2000; + }else m_uiPulsingShockwave_Timer -= uiDiff; + } + else + { + if (m_uiResumePulsingShockwave_Timer < uiDiff) + { + //breaks at movement, can we assume when it's time, this spell is casted and also must stop movement? + m_creature->CastSpell(m_creature, SPELL_PULSING_SHOCKWAVE_AURA, true); + + DoCast(m_creature, m_bIsHeroic ? SPELL_PULSING_SHOCKWAVE_H : SPELL_PULSING_SHOCKWAVE_N); // need core support + m_bIsAura = true; + m_uiResumePulsingShockwave_Timer = 0; + } + else + m_uiResumePulsingShockwave_Timer -= uiDiff; + } + + if (m_uiArcLightning_Timer < uiDiff) + { + if (Unit* pTarget = SelectUnit(SELECT_TARGET_RANDOM, 0)) + DoCast(pTarget, SPELL_ARC_LIGHTNING); + + m_uiArcLightning_Timer = 15000 + rand()%1000; + } + else + m_uiArcLightning_Timer -= uiDiff; + + if (m_uiLightningNova_Timer < uiDiff) + { + switch(rand()%3) + { + case 0: DoScriptText(SAY_NOVA_1, m_creature);break; + case 1: DoScriptText(SAY_NOVA_2, m_creature);break; + case 2: DoScriptText(SAY_NOVA_3, m_creature);break; + } + + DoCast(m_creature, m_bIsHeroic ? SPELL_LIGHTNING_NOVA_H : SPELL_LIGHTNING_NOVA_N); + + m_bIsAura = false; + m_uiResumePulsingShockwave_Timer = (m_bIsHeroic ? 4000 : 5000); // Pause Pulsing Shockwave aura + m_uiLightningNova_Timer = 20000 + rand()%1000; + } + else + m_uiLightningNova_Timer -= uiDiff; + + // Health check + if ((m_creature->GetHealth()*100 / m_creature->GetMaxHealth()) < (100-(25*m_uiHealthAmountModifier))) + { + switch(m_uiHealthAmountModifier) + { + case 1: DoScriptText(SAY_75HEALTH, m_creature); break; + case 2: DoScriptText(SAY_50HEALTH, m_creature); break; + case 3: DoScriptText(SAY_25HEALTH, m_creature); break; + } + + ++m_uiHealthAmountModifier; + } + + DoMeleeAttackIfReady(); + } }; -CreatureAI* GetAI_boss_loken(Creature *_Creature) +CreatureAI* GetAI_boss_loken(Creature* pCreature) { - return new boss_lokenAI (_Creature); + return new boss_lokenAI(pCreature); } void AddSC_boss_loken() @@ -80,7 +222,7 @@ void AddSC_boss_loken() Script *newscript; newscript = new Script; - newscript->Name="boss_loken"; + newscript->Name = "boss_loken"; newscript->GetAI = &GetAI_boss_loken; newscript->RegisterSelf(); } |