- Timestamp:
- 11/19/08 13:42:20 (17 years ago)
- Location:
- trunk/src/bindings/scripts/scripts/zone
- Files:
-
- 11 modified
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/bindings/scripts/scripts/zone/coilfang_resevoir/steam_vault/boss_hydromancer_thespia.cpp
r90 r166 18 18 SDName: Boss_Hydromancer_Thespia 19 19 SD%Complete: 80 20 SDComment: N ormal/heroic mode: to be tested. Needs additional adjustments (when instance script is adjusted)20 SDComment: Needs additional adjustments (when instance script is adjusted) 21 21 SDCategory: Coilfang Resevoir, The Steamvault 22 22 EndScriptData */ … … 30 30 #include "def_steam_vault.h" 31 31 32 #define SAY_SUMMON "Surge forth my pets!" 33 #define SOUND_SUMMON 10360 34 35 #define SAY_AGGRO_1 "The depths will consume you!" 36 #define SOUND_AGGRO_1 10361 37 #define SAY_AGGRO_2 "Meet your doom, surface dwellers!" 38 #define SOUND_AGGRO_2 10362 39 #define SAY_AGGRO_3 "You will drown in blood!" 40 #define SOUND_AGGRO_3 10363 41 42 #define SAY_SLAY_1 "To the depths of oblivion with you!" 43 #define SOUND_SLAY_1 10364 44 #define SAY_SLAY_2 "For my lady and master!" 45 #define SOUND_SLAY_2 10365 46 47 #define SAY_DEAD "Our matron will be.. the end of.. you.." 48 #define SOUND_DEAD 10366 32 #define SAY_SUMMON -1545000 33 #define SAY_AGGRO_1 -1545001 34 #define SAY_AGGRO_2 -1545002 35 #define SAY_AGGRO_3 -1545003 36 #define SAY_SLAY_1 -1545004 37 #define SAY_SLAY_2 -1545005 38 #define SAY_DEAD -1545006 49 39 50 40 #define SPELL_LIGHTNING_CLOUD 25033 … … 57 47 { 58 48 pInstance = ((ScriptedInstance*)c->GetInstanceData()); 49 HeroicMode = m_creature->GetMap()->IsHeroic(); 59 50 Reset(); 60 51 } … … 69 60 void Reset() 70 61 { 71 HeroicMode = m_creature->GetMap()->IsHeroic();72 73 62 LightningCloud_Timer = 28000; 74 63 LungBurst_Timer = 7000; 75 64 EnvelopingWinds_Timer = 9000; 76 65 77 if( pInstance ) pInstance->SetData(TYPE_HYDROMANCER_THESPIA, NOT_STARTED); 66 if (pInstance) 67 pInstance->SetData(TYPE_HYDROMANCER_THESPIA, NOT_STARTED); 78 68 } 79 69 80 70 void JustDied(Unit* Killer) 81 71 { 82 DoYell(SAY_DEAD, LANG_UNIVERSAL, NULL); 83 DoPlaySoundToSet(m_creature,SOUND_DEAD); 72 DoScriptText(SAY_DEAD, m_creature); 84 73 85 if( pInstance ) pInstance->SetData(TYPE_HYDROMANCER_THESPIA, DONE); 74 if (pInstance) 75 pInstance->SetData(TYPE_HYDROMANCER_THESPIA, DONE); 86 76 } 87 77 … … 90 80 switch(rand()%2) 91 81 { 92 case 0: 93 DoYell(SAY_SLAY_1, LANG_UNIVERSAL, NULL); 94 DoPlaySoundToSet(m_creature,SOUND_SLAY_1); 95 break; 96 case 1: 97 DoYell(SAY_SLAY_2, LANG_UNIVERSAL, NULL); 98 DoPlaySoundToSet(m_creature,SOUND_SLAY_2); 99 break; 82 case 0: DoScriptText(SAY_SLAY_1, m_creature); break; 83 case 1: DoScriptText(SAY_SLAY_2, m_creature); break; 100 84 } 101 85 } … … 105 89 switch(rand()%3) 106 90 { 107 case 0: 108 DoYell(SAY_AGGRO_1, LANG_UNIVERSAL, NULL); 109 DoPlaySoundToSet(m_creature,SOUND_AGGRO_1); 110 break; 111 case 1: 112 DoYell(SAY_AGGRO_2, LANG_UNIVERSAL, NULL); 113 DoPlaySoundToSet(m_creature,SOUND_AGGRO_2); 114 break; 115 case 2: 116 DoYell(SAY_AGGRO_3, LANG_UNIVERSAL, NULL); 117 DoPlaySoundToSet(m_creature,SOUND_AGGRO_3); 118 break; 91 case 0: DoScriptText(SAY_AGGRO_1, m_creature); break; 92 case 1: DoScriptText(SAY_AGGRO_2, m_creature); break; 93 case 2: DoScriptText(SAY_AGGRO_3, m_creature); break; 119 94 } 120 95 121 if( pInstance ) pInstance->SetData(TYPE_HYDROMANCER_THESPIA, IN_PROGRESS); 96 if (pInstance) 97 pInstance->SetData(TYPE_HYDROMANCER_THESPIA, IN_PROGRESS); 122 98 } 123 99 … … 128 104 129 105 //LightningCloud_Timer 130 if ( LightningCloud_Timer < diff)106 if (LightningCloud_Timer < diff) 131 107 { 132 108 //cast twice in Heroic mode 133 if ( Unit* target = SelectUnit(SELECT_TARGET_RANDOM,0))109 if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM,0)) 134 110 DoCast(target, SPELL_LIGHTNING_CLOUD); 135 if ( HeroicMode)136 if ( Unit* target = SelectUnit(SELECT_TARGET_RANDOM,0))111 if (HeroicMode) 112 if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM,0)) 137 113 DoCast(target, SPELL_LIGHTNING_CLOUD); 138 114 LightningCloud_Timer = 28000; … … 140 116 141 117 //LungBurst_Timer 142 if ( LungBurst_Timer < diff)118 if (LungBurst_Timer < diff) 143 119 { 144 if ( Unit* target = SelectUnit(SELECT_TARGET_RANDOM,0))120 if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM,0)) 145 121 DoCast(target, SPELL_LUNG_BURST); 146 122 LungBurst_Timer = 10000+rand()%5000; … … 148 124 149 125 //EnvelopingWinds_Timer 150 if ( EnvelopingWinds_Timer < diff)126 if (EnvelopingWinds_Timer < diff) 151 127 { 152 128 //cast twice in Heroic mode 153 if ( Unit* target = SelectUnit(SELECT_TARGET_RANDOM,0))129 if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM,0)) 154 130 DoCast(target, SPELL_ENVELOPING_WINDS); 155 if ( HeroicMode)156 if ( Unit* target = SelectUnit(SELECT_TARGET_RANDOM,0))131 if (HeroicMode) 132 if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM,0)) 157 133 DoCast(target, SPELL_ENVELOPING_WINDS); 158 134 EnvelopingWinds_Timer = 10000+rand()%5000; … … 186 162 return; 187 163 188 if ( WaterBoltVolley_Timer < diff)164 if (WaterBoltVolley_Timer < diff) 189 165 { 190 if( HeroicMode ) DoCast(m_creature,H_SPELL_WATER_BOLT_VOLLEY); 191 else DoCast(m_creature,SPELL_WATER_BOLT_VOLLEY); 192 166 DoCast(m_creature, HeroicMode ? H_SPELL_WATER_BOLT_VOLLEY : SPELL_WATER_BOLT_VOLLEY); 193 167 WaterBoltVolley_Timer = 10000+rand()%5000; 194 168 }else WaterBoltVolley_Timer -= diff; -
trunk/src/bindings/scripts/scripts/zone/coilfang_resevoir/steam_vault/boss_mekgineer_steamrigger.cpp
r90 r166 30 30 #include "def_steam_vault.h" 31 31 32 #define SAY_MECHANICS "I'm bringin' the pain!" 33 #define SOUND_MECHANICS 10367 34 35 #define SAY_AGGRO_1 "You're in for a world of hurt!" 36 #define SOUND_AGGRO_1 10368 37 #define SAY_AGGRO_2 "Eat hot metal, scumbag!" 38 #define SOUND_AGGRO_2 10369 39 #define SAY_AGGRO_3 "I'll come over there!" 40 #define SOUND_AGGRO_3 10370 41 #define SAY_AGGRO_4 "I'm bringin' the pain!" 42 #define SOUND_AGGRO_4 10371 43 44 #define SAY_SLAY_1 "You just got served, punk!" 45 #define SOUND_SLAY_1 10372 46 #define SAY_SLAY_2 "I own you!" 47 #define SOUND_SLAY_2 10373 48 #define SAY_SLAY_3 "Have fun dyin', cupcake!" 49 #define SOUND_SLAY_3 10374 50 51 #define SAY_DEATH "Mommy!" 52 #define SOUND_DEATH 10375 32 #define SAY_MECHANICS -1545007 33 #define SAY_AGGRO_1 -1545008 34 #define SAY_AGGRO_2 -1545009 35 #define SAY_AGGRO_3 -1545010 36 #define SAY_AGGRO_4 -1545011 37 #define SAY_SLAY_1 -1545012 38 #define SAY_SLAY_2 -1545013 39 #define SAY_SLAY_3 -1545014 40 #define SAY_DEATH -1545015 53 41 54 42 #define SPELL_SUPER_SHRINK_RAY 31485 … … 64 52 { 65 53 pInstance = ((ScriptedInstance*)c->GetInstanceData()); 54 HeroicMode = m_creature->GetMap()->IsHeroic(); 66 55 Reset(); 67 56 } 68 57 69 58 ScriptedInstance *pInstance; 59 bool HeroicMode; 70 60 71 61 uint32 Shrink_Timer; … … 86 76 Summon25 = false; 87 77 88 if( pInstance ) pInstance->SetData(TYPE_MEKGINEER_STEAMRIGGER, NOT_STARTED); 78 if (pInstance) 79 pInstance->SetData(TYPE_MEKGINEER_STEAMRIGGER, NOT_STARTED); 89 80 } 90 81 91 82 void JustDied(Unit* Killer) 92 83 { 93 Do Yell(SAY_DEATH, LANG_UNIVERSAL, NULL);94 DoPlaySoundToSet(m_creature,SOUND_DEATH); 95 96 if( pInstance )pInstance->SetData(TYPE_MEKGINEER_STEAMRIGGER, DONE);84 DoScriptText(SAY_DEATH, m_creature); 85 86 if (pInstance) 87 pInstance->SetData(TYPE_MEKGINEER_STEAMRIGGER, DONE); 97 88 } 98 89 … … 101 92 switch(rand()%3) 102 93 { 103 case 0: 104 DoYell(SAY_SLAY_1, LANG_UNIVERSAL, NULL); 105 DoPlaySoundToSet(m_creature,SOUND_SLAY_1); 106 break; 107 case 1: 108 DoYell(SAY_SLAY_2, LANG_UNIVERSAL, NULL); 109 DoPlaySoundToSet(m_creature,SOUND_SLAY_2); 110 break; 111 case 2: 112 DoYell(SAY_SLAY_3, LANG_UNIVERSAL, NULL); 113 DoPlaySoundToSet(m_creature,SOUND_SLAY_3); 114 break; 94 case 0: DoScriptText(SAY_SLAY_1, m_creature); break; 95 case 1: DoScriptText(SAY_SLAY_2, m_creature); break; 96 case 2: DoScriptText(SAY_SLAY_3, m_creature); break; 115 97 } 116 98 } … … 120 102 switch(rand()%3) 121 103 { 122 case 0: 123 DoYell(SAY_AGGRO_1, LANG_UNIVERSAL, NULL); 124 DoPlaySoundToSet(m_creature,SOUND_AGGRO_1); 125 break; 126 case 1: 127 DoYell(SAY_AGGRO_2, LANG_UNIVERSAL, NULL); 128 DoPlaySoundToSet(m_creature,SOUND_AGGRO_2); 129 break; 130 case 2: 131 DoYell(SAY_AGGRO_3, LANG_UNIVERSAL, NULL); 132 DoPlaySoundToSet(m_creature,SOUND_AGGRO_3); 133 break; 134 } 135 136 if( pInstance ) pInstance->SetData(TYPE_MEKGINEER_STEAMRIGGER, IN_PROGRESS); 104 case 0: DoScriptText(SAY_AGGRO_1, m_creature); break; 105 case 1: DoScriptText(SAY_AGGRO_2, m_creature); break; 106 case 2: DoScriptText(SAY_AGGRO_3, m_creature); break; 107 } 108 109 if (pInstance) 110 pInstance->SetData(TYPE_MEKGINEER_STEAMRIGGER, IN_PROGRESS); 137 111 } 138 112 … … 140 114 void SummonMechanichs() 141 115 { 142 DoYell(SAY_MECHANICS, LANG_UNIVERSAL, NULL); 143 DoPlaySoundToSet(m_creature,SOUND_MECHANICS); 116 DoScriptText(SAY_MECHANICS, m_creature); 144 117 145 118 DoSpawnCreature(ENTRY_STREAMRIGGER_MECHANIC,5,5,0,0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 240000); … … 147 120 DoSpawnCreature(ENTRY_STREAMRIGGER_MECHANIC,-5,-5,0,0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 240000); 148 121 149 if ( rand()%2)122 if (rand()%2) 150 123 DoSpawnCreature(ENTRY_STREAMRIGGER_MECHANIC,5,-7,0,0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 240000); 151 if ( rand()%2)124 if (rand()%2) 152 125 DoSpawnCreature(ENTRY_STREAMRIGGER_MECHANIC,7,-5,0,0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 240000); 153 126 } … … 158 131 return; 159 132 160 if ( Shrink_Timer < diff)133 if (Shrink_Timer < diff) 161 134 { 162 135 DoCast(m_creature->getVictim(),SPELL_SUPER_SHRINK_RAY); … … 164 137 }else Shrink_Timer -= diff; 165 138 166 if( Saw_Blade_Timer < diff ) 167 { 168 if( Unit* target = SelectUnit(SELECT_TARGET_RANDOM,1) ) DoCast(target,SPELL_SAW_BLADE); 169 else DoCast(m_creature->getVictim(),SPELL_SAW_BLADE); 139 if (Saw_Blade_Timer < diff) 140 { 141 if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM,1)) 142 DoCast(target,SPELL_SAW_BLADE); 143 else 144 DoCast(m_creature->getVictim(),SPELL_SAW_BLADE); 145 170 146 Saw_Blade_Timer = 15000; 171 147 } else Saw_Blade_Timer -= diff; 172 148 173 if ( Electrified_Net_Timer < diff)149 if (Electrified_Net_Timer < diff) 174 150 { 175 151 DoCast(m_creature->getVictim(),SPELL_ELECTRIFIED_NET); … … 178 154 else Electrified_Net_Timer -= diff; 179 155 180 if( !Summon75 ) 181 if( (m_creature->GetHealth()*100 / m_creature->GetMaxHealth()) < 75 ) 182 { 183 SummonMechanichs(); 184 Summon75 = true; 185 } 186 if( !Summon50 ) 187 if( (m_creature->GetHealth()*100 / m_creature->GetMaxHealth()) < 50 ) 188 { 189 SummonMechanichs(); 190 Summon50 = true; 191 } 192 if( !Summon25 ) 193 if( (m_creature->GetHealth()*100 / m_creature->GetMaxHealth()) < 25 ) 194 { 195 SummonMechanichs(); 196 Summon25 = true; 156 if (!Summon75) 157 { 158 if ((m_creature->GetHealth()*100 / m_creature->GetMaxHealth()) < 75) 159 { 160 SummonMechanichs(); 161 Summon75 = true; 162 } 163 } 164 165 if (!Summon50) 166 { 167 if ((m_creature->GetHealth()*100 / m_creature->GetMaxHealth()) < 50) 168 { 169 SummonMechanichs(); 170 Summon50 = true; 171 } 172 } 173 174 if (!Summon25) 175 { 176 if ((m_creature->GetHealth()*100 / m_creature->GetMaxHealth()) < 25) 177 { 178 SummonMechanichs(); 179 Summon25 = true; 180 } 197 181 } 198 182 … … 218 202 { 219 203 pInstance = ((ScriptedInstance*)c->GetInstanceData()); 204 HeroicMode = m_creature->GetMap()->IsHeroic(); 220 205 Reset(); 221 206 } 222 207 223 208 ScriptedInstance* pInstance; 209 bool HeroicMode; 224 210 225 211 uint32 Repair_Timer; 226 bool HeroicMode;227 212 228 213 void Reset() 229 214 { 230 HeroicMode = m_creature->GetMap()->IsHeroic();231 215 Repair_Timer = 2000; 232 216 } … … 242 226 void UpdateAI(const uint32 diff) 243 227 { 244 if ( Repair_Timer < diff)245 { 246 if (pInstance && pInstance->GetData64(DATA_MEKGINEERSTEAMRIGGER) && pInstance->GetData(TYPE_MEKGINEER_STEAMRIGGER) == IN_PROGRESS)247 { 248 if ( Unit* pMekgineer = Unit::GetUnit((*m_creature), pInstance->GetData64(DATA_MEKGINEERSTEAMRIGGER)))228 if (Repair_Timer < diff) 229 { 230 if (pInstance && pInstance->GetData64(DATA_MEKGINEERSTEAMRIGGER) && pInstance->GetData(TYPE_MEKGINEER_STEAMRIGGER) == IN_PROGRESS) 231 { 232 if (Unit* pMekgineer = Unit::GetUnit((*m_creature), pInstance->GetData64(DATA_MEKGINEERSTEAMRIGGER))) 249 233 { 250 if ( m_creature->IsWithinDistInMap(pMekgineer, MAX_REPAIR_RANGE))234 if (m_creature->IsWithinDistInMap(pMekgineer, MAX_REPAIR_RANGE)) 251 235 { 252 236 //are we already channeling? Doesn't work very well, find better check? 253 if ( !m_creature->GetUInt32Value(UNIT_CHANNEL_SPELL))237 if (!m_creature->GetUInt32Value(UNIT_CHANNEL_SPELL)) 254 238 { 255 239 //m_creature->GetMotionMaster()->MovementExpired(); 256 240 //m_creature->GetMotionMaster()->MoveIdle(); 257 241 258 if( HeroicMode ) DoCast(m_creature,H_SPELL_REPAIR,true); 259 else DoCast(m_creature,SPELL_REPAIR,true); 242 DoCast(m_creature,HeroicMode ? H_SPELL_REPAIR : SPELL_REPAIR, true); 260 243 } 261 244 Repair_Timer = 5000; … … 270 253 }else Repair_Timer -= diff; 271 254 272 if ( !m_creature->SelectHostilTarget() || !m_creature->getVictim())255 if (!m_creature->SelectHostilTarget() || !m_creature->getVictim()) 273 256 return; 274 257 -
trunk/src/bindings/scripts/scripts/zone/coilfang_resevoir/steam_vault/boss_warlord_kalithresh.cpp
r90 r166 25 25 #include "def_steam_vault.h" 26 26 27 #define SAY_INTRO "You deem yourselves worthy simply because you bested my guards? Our work here will not be compromised!" 28 #define SOUND_INTRO 10390 29 30 #define SAY_REGEN "This is not nearly over..." 31 #define SOUND_REGEN 10391 32 33 #define SAY_AGGRO1 "Your head will roll!" 34 #define SOUND_AGGRO1 10392 35 #define SAY_AGGRO2 "I despise all of your kind!" 36 #define SOUND_AGGRO2 10393 37 #define SAY_AGGRO3 "Ba'ahntha sol'dorei!" 38 #define SOUND_AGGRO3 10394 39 40 #define SAY_SLAY1 "Scram, surface filth!" 41 #define SOUND_SLAY1 10395 42 #define SAY_SLAY2 "Ah ha ha ha ha ha ha!" 43 #define SOUND_SLAY2 10396 44 45 #define SAY_DEATH "For her Excellency... for... Vashj!" 46 #define SOUND_DEATH 10397 27 #define SAY_INTRO -1545016 28 #define SAY_REGEN -1545017 29 #define SAY_AGGRO1 -1545018 30 #define SAY_AGGRO2 -1545019 31 #define SAY_AGGRO3 -1545020 32 #define SAY_SLAY1 -1545021 33 #define SAY_SLAY2 -1545022 34 #define SAY_DEATH -1545023 47 35 48 36 #define SPELL_SPELL_REFLECTION 31534 … … 69 57 70 58 //hack, due to really weird spell behaviour :( 71 if( pInstance ) 72 if( pInstance->GetData(TYPE_DISTILLER) == IN_PROGRESS ) 73 { 74 m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); 75 m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); 59 if (pInstance) 60 { 61 if (pInstance->GetData(TYPE_DISTILLER) == IN_PROGRESS) 62 { 63 m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); 64 m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); 65 } 76 66 } 77 67 } … … 83 73 m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); 84 74 m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); 75 85 76 DoCast(m_creature,SPELL_WARLORDS_RAGE_NAGA,true); 86 if( pInstance ) pInstance->SetData(TYPE_DISTILLER,IN_PROGRESS); 77 78 if (pInstance) 79 pInstance->SetData(TYPE_DISTILLER,IN_PROGRESS); 87 80 } 88 81 89 82 void DamageTaken(Unit *done_by, uint32 &damage) 90 83 { 91 if( m_creature->GetHealth() <= damage ) 92 if( pInstance ) pInstance->SetData(TYPE_DISTILLER,DONE); 84 if (m_creature->GetHealth() <= damage) 85 if (pInstance) 86 pInstance->SetData(TYPE_DISTILLER,DONE); 93 87 } 94 88 }; … … 116 110 CanRage = false; 117 111 118 if( pInstance ) pInstance->SetData(TYPE_WARLORD_KALITHRESH, NOT_STARTED); 112 if (pInstance) 113 pInstance->SetData(TYPE_WARLORD_KALITHRESH, NOT_STARTED); 119 114 } 120 115 … … 123 118 switch(rand()%3) 124 119 { 125 case 0: 126 DoYell(SAY_AGGRO1, LANG_UNIVERSAL, NULL); 127 DoPlaySoundToSet(m_creature,SOUND_AGGRO1); 128 break; 129 case 1: 130 DoYell(SAY_AGGRO2, LANG_UNIVERSAL, NULL); 131 DoPlaySoundToSet(m_creature,SOUND_AGGRO2); 132 break; 133 case 2: 134 DoYell(SAY_AGGRO3, LANG_UNIVERSAL, NULL); 135 DoPlaySoundToSet(m_creature,SOUND_AGGRO3); 136 break; 120 case 0: DoScriptText(SAY_AGGRO1, m_creature); break; 121 case 1: DoScriptText(SAY_AGGRO2, m_creature); break; 122 case 2: DoScriptText(SAY_AGGRO3, m_creature); break; 137 123 } 138 124 139 if( pInstance ) pInstance->SetData(TYPE_WARLORD_KALITHRESH, IN_PROGRESS); 125 if (pInstance) 126 pInstance->SetData(TYPE_WARLORD_KALITHRESH, IN_PROGRESS); 140 127 } 141 128 … … 144 131 switch(rand()%2) 145 132 { 146 case 0: 147 DoYell(SAY_SLAY1, LANG_UNIVERSAL, NULL); 148 DoPlaySoundToSet(victim, SOUND_SLAY1); 149 break; 150 case 1: 151 DoYell(SAY_SLAY2, LANG_UNIVERSAL, NULL); 152 DoPlaySoundToSet(victim, SOUND_SLAY2); 153 break; 133 case 0: DoScriptText(SAY_SLAY1, m_creature); break; 134 case 1: DoScriptText(SAY_SLAY2, m_creature); break; 154 135 } 155 136 } … … 178 159 { 179 160 //hack :( 180 if ( spell->Id == SPELL_WARLORDS_RAGE_PROC)181 if ( pInstance)182 if ( pInstance->GetData(TYPE_DISTILLER) == DONE)161 if (spell->Id == SPELL_WARLORDS_RAGE_PROC) 162 if (pInstance) 163 if (pInstance->GetData(TYPE_DISTILLER) == DONE) 183 164 m_creature->RemoveAurasDueToSpell(SPELL_WARLORDS_RAGE_PROC); 184 165 } … … 186 167 void JustDied(Unit* Killer) 187 168 { 188 Do Yell(SAY_DEATH, LANG_UNIVERSAL, NULL);189 DoPlaySoundToSet(m_creature, SOUND_DEATH); 190 191 if( pInstance )pInstance->SetData(TYPE_WARLORD_KALITHRESH, DONE);169 DoScriptText(SAY_DEATH, m_creature); 170 171 if (pInstance) 172 pInstance->SetData(TYPE_WARLORD_KALITHRESH, DONE); 192 173 } 193 174 … … 197 178 return; 198 179 199 if ( Rage_Timer < diff)180 if (Rage_Timer < diff) 200 181 { 201 182 Creature* distiller = SelectCreatureInGrid(17954, 100); 202 if ( distiller)183 if (distiller) 203 184 { 204 DoYell(SAY_REGEN, LANG_UNIVERSAL, NULL); 205 DoPlaySoundToSet(m_creature,SOUND_REGEN); 185 DoScriptText(SAY_REGEN, m_creature); 206 186 DoCast(m_creature,SPELL_WARLORDS_RAGE); 207 187 ((mob_naga_distillerAI*)distiller->AI())->StartRageGen(m_creature); … … 211 191 212 192 //Reflection_Timer 213 if ( Reflection_Timer < diff)193 if (Reflection_Timer < diff) 214 194 { 215 195 DoCast(m_creature, SPELL_SPELL_REFLECTION); … … 218 198 219 199 //Impale_Timer 220 if ( Impale_Timer < diff)221 { 222 if ( Unit* target = SelectUnit(SELECT_TARGET_RANDOM,0))200 if (Impale_Timer < diff) 201 { 202 if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM,0)) 223 203 DoCast(target,SPELL_IMPALE); 224 204 -
trunk/src/bindings/scripts/scripts/zone/hellfire_citadel/blood_furnace/boss_broggok.cpp
r90 r166 24 24 #include "precompiled.h" 25 25 26 #define SAY_AGGRO -1542008 27 26 28 #define SPELL_SLIME_SPRAY 30913 27 29 #define SPELL_POISON_CLOUD 30916 … … 29 31 30 32 #define SPELL_POISON 30914 31 32 #define SAY_AGGRO "Come intruders...."33 33 34 34 struct TRINITY_DLL_DECL boss_broggokAI : public ScriptedAI … … 49 49 void Aggro(Unit *who) 50 50 { 51 Do Yell(SAY_AGGRO, LANG_UNIVERSAL, NULL);51 DoScriptText(SAY_AGGRO, m_creature); 52 52 } 53 53 -
trunk/src/bindings/scripts/scripts/zone/hellfire_citadel/blood_furnace/boss_kelidan_the_breaker.cpp
r90 r166 29 29 #include "precompiled.h" 30 30 31 #define SAY_WAKE "Who dares interrupt... What is this? What have you done? You ruin everything!" 32 #define SOUND_WAKE 10164 33 34 #define SAY_ADD_AGGRO_1 "You mustn't let him loose!" 35 #define SOUND_ADD_AGGRO_1 10166 36 #define SAY_ADD_AGGRO_2 "Ignorant whelps!" 37 #define SOUND_ADD_AGGRO_2 10167 38 #define SAY_ADD_AGGRO_3 "You fools! He'll kill us all!" 39 #define SOUND_ADD_AGGRO_3 10168 40 41 #define SAY_KILL_1 "Just as you deserve!" 42 #define SOUND_KILL_1 10169 43 #define SAY_KILL_2 "Your friends will soon be joining you." 44 #define SOUND_KILL_2 10170 45 46 #define SAY_NOVA "Closer... Come closer.. and burn!" 47 #define SOUND_NOVA 10165 48 49 #define SAY_DIE "Good luck... you'll need it.." 50 #define SOUND_DIE 10171 31 #define SAY_WAKE -1542000 32 33 #define SAY_ADD_AGGRO_1 -1542001 34 #define SAY_ADD_AGGRO_2 -1542002 35 #define SAY_ADD_AGGRO_3 -1542003 36 37 #define SAY_KILL_1 -1542004 38 #define SAY_KILL_2 -1542005 39 #define SAY_NOVA -1542006 40 #define SAY_DIE -1542007 51 41 52 42 #define SPELL_CORRUPTION 30938 … … 89 79 void Aggro(Unit *who) 90 80 { 91 DoYell(SAY_WAKE, LANG_UNIVERSAL, NULL); 92 DoPlaySoundToSet(m_creature,SOUND_WAKE); 81 DoScriptText(SAY_WAKE, m_creature); 93 82 } 94 83 … … 100 89 switch(rand()%2) 101 90 { 102 case 0: 103 DoYell(SAY_KILL_1, LANG_UNIVERSAL, NULL); 104 DoPlaySoundToSet(m_creature,SOUND_KILL_1); 105 break; 106 case 1: 107 DoYell(SAY_KILL_2, LANG_UNIVERSAL, NULL); 108 DoPlaySoundToSet(m_creature,SOUND_KILL_2); 109 break; 91 case 0: DoScriptText(SAY_KILL_1, m_creature); break; 92 case 1: DoScriptText(SAY_KILL_2, m_creature); break; 110 93 } 111 94 } … … 113 96 void JustDied(Unit* Killer) 114 97 { 115 DoYell(SAY_DIE,LANG_UNIVERSAL,NULL); 116 DoPlaySoundToSet(m_creature,SOUND_DIE); 98 DoScriptText(SAY_DIE, m_creature); 117 99 } 118 100 119 101 void UpdateAI(const uint32 diff) 120 102 { 121 if ( !m_creature->SelectHostilTarget() || !m_creature->getVictim())122 return; 123 124 if ( Firenova)125 { 126 if ( Firenova_Timer < diff)103 if (!m_creature->SelectHostilTarget() || !m_creature->getVictim()) 104 return; 105 106 if (Firenova) 107 { 108 if (Firenova_Timer < diff) 127 109 { 128 110 DoCast(m_creature,HeroicMode ? H_SPELL_FIRE_NOVA : SPELL_FIRE_NOVA); … … 134 116 } 135 117 136 if ( ShadowVolley_Timer < diff)118 if (ShadowVolley_Timer < diff) 137 119 { 138 120 DoCast(m_creature,HeroicMode ? H_SPELL_SHADOW_BOLT_VOLLEY : SPELL_SHADOW_BOLT_VOLLEY); … … 140 122 }else ShadowVolley_Timer -=diff; 141 123 142 if ( Corruption_Timer < diff)124 if (Corruption_Timer < diff) 143 125 { 144 126 DoCast(m_creature,SPELL_CORRUPTION); … … 146 128 }else Corruption_Timer -=diff; 147 129 148 if ( BurningNova_Timer < diff)149 { 150 if ( m_creature->IsNonMeleeSpellCasted(false))130 if (BurningNova_Timer < diff) 131 { 132 if (m_creature->IsNonMeleeSpellCasted(false)) 151 133 m_creature->InterruptNonMeleeSpells(true); 152 134 153 DoYell(SAY_NOVA, LANG_UNIVERSAL, NULL); 154 DoPlaySoundToSet(m_creature,SOUND_NOVA); 155 156 if( HeroicMode ) 135 DoScriptText(SAY_NOVA, m_creature); 136 137 if (HeroicMode) 157 138 DoCast(m_creature,SPELL_VORTEX); 158 139 … … 213 194 void UpdateAI(const uint32 diff) 214 195 { 215 if ( !m_creature->SelectHostilTarget() || !m_creature->getVictim())216 return; 217 218 if ( MarkOfShadow_Timer < diff)219 { 220 if ( Unit *target = SelectUnit(SELECT_TARGET_RANDOM, 0))196 if (!m_creature->SelectHostilTarget() || !m_creature->getVictim()) 197 return; 198 199 if (MarkOfShadow_Timer < diff) 200 { 201 if (Unit *target = SelectUnit(SELECT_TARGET_RANDOM, 0)) 221 202 DoCast(target,SPELL_MARK_OF_SHADOW); 222 203 MarkOfShadow_Timer = 15000+rand()%5000; 223 204 }else MarkOfShadow_Timer -=diff; 224 205 225 if ( ShadowBolt_Timer < diff)206 if (ShadowBolt_Timer < diff) 226 207 { 227 208 DoCast(m_creature->getVictim(),HeroicMode ? H_SPELL_SHADOW_BOLT : SPELL_SHADOW_BOLT); -
trunk/src/bindings/scripts/scripts/zone/hellfire_citadel/blood_furnace/boss_the_maker.cpp
r90 r166 24 24 #include "precompiled.h" 25 25 26 #define SAY_AGGRO_1 -1542009 27 #define SAY_AGGRO_2 -1542010 28 #define SAY_AGGRO_3 -1542011 29 #define SAY_KILL_1 -1542012 30 #define SAY_KILL_2 -1542013 31 #define SAY_DIE -1542014 32 26 33 #define SPELL_ACID_SPRAY 38153 // heroic 38973 ??? 38153 27 34 #define SPELL_EXPLODING_BREAKER 30925 28 35 #define SPELL_KNOCKDOWN 20276 29 36 #define SPELL_DOMINATION 25772 // ??? 30 31 #define SAY_KILL_1 "Let's see what I can make of you."32 #define SOUND_KILL_1 1028933 #define SAY_KILL_2 "It is pointless to resist."34 #define SOUND_KILL_2 1029035 36 #define SAY_AGGRO_1 "My work must not be interrupted."37 #define SOUND_AGGRO_1 1028638 #define SAY_AGGRO_2 "Perhaps I can find a use for you."39 #define SOUND_AGGRO_2 1028740 #define SAY_AGGRO_3 "Anger... Hate... These are tools I can use."41 #define SOUND_AGGRO_3 1028842 43 #define SAY_DIE "Stay away from... me."44 #define SOUND_DIE 1029145 37 46 38 struct TRINITY_DLL_DECL boss_the_makerAI : public ScriptedAI … … 65 57 switch(rand()%3) 66 58 { 67 case 0: 68 DoYell(SAY_AGGRO_1, LANG_UNIVERSAL, NULL); 69 DoPlaySoundToSet(m_creature,SOUND_AGGRO_1); 70 break; 71 case 1: 72 DoYell(SAY_AGGRO_2, LANG_UNIVERSAL, NULL); 73 DoPlaySoundToSet(m_creature,SOUND_AGGRO_2); 74 break; 75 case 2: 76 DoYell(SAY_AGGRO_3, LANG_UNIVERSAL, NULL); 77 DoPlaySoundToSet(m_creature,SOUND_AGGRO_3); 78 break; 59 case 0: DoScriptText(SAY_AGGRO_1, m_creature); break; 60 case 1: DoScriptText(SAY_AGGRO_2, m_creature); break; 61 case 2: DoScriptText(SAY_AGGRO_3, m_creature); break; 79 62 } 80 63 } … … 82 65 void KilledUnit(Unit* victim) 83 66 { 84 if (rand()%5)85 return;86 87 67 switch(rand()%2) 88 68 { 89 case 0: 90 DoYell(SAY_KILL_1, LANG_UNIVERSAL, NULL); 91 DoPlaySoundToSet(m_creature,SOUND_KILL_1); 92 break; 93 case 1: 94 DoYell(SAY_KILL_2, LANG_UNIVERSAL, NULL); 95 DoPlaySoundToSet(m_creature,SOUND_KILL_2); 96 break; 69 case 0: DoScriptText(SAY_KILL_1, m_creature); break; 70 case 1: DoScriptText(SAY_KILL_2, m_creature); break; 97 71 } 98 72 } … … 100 74 void JustDied(Unit* Killer) 101 75 { 102 DoYell(SAY_DIE,LANG_UNIVERSAL,NULL); 103 DoPlaySoundToSet(m_creature,SOUND_DIE); 76 DoScriptText(SAY_DIE, m_creature); 104 77 } 105 78 … … 109 82 return; 110 83 111 if (AcidSpray_Timer < diff)84 if (AcidSpray_Timer < diff) 112 85 { 113 86 DoCast(m_creature->getVictim(),SPELL_ACID_SPRAY); … … 115 88 }else AcidSpray_Timer -=diff; 116 89 117 if (ExplodingBreaker_Timer < diff)90 if (ExplodingBreaker_Timer < diff) 118 91 { 119 Unit* target; 120 target = SelectUnit(SELECT_TARGET_RANDOM,0); 121 122 DoCast(target,SPELL_EXPLODING_BREAKER); 92 if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM,0)) 93 DoCast(target,SPELL_EXPLODING_BREAKER); 123 94 ExplodingBreaker_Timer = 4000+rand()%8000; 124 95 }else ExplodingBreaker_Timer -=diff; … … 136 107 */ 137 108 138 if (Knockdown_Timer < diff)109 if (Knockdown_Timer < diff) 139 110 { 140 111 DoCast(m_creature->getVictim(),SPELL_KNOCKDOWN); -
trunk/src/bindings/scripts/scripts/zone/hellfire_citadel/hellfire_ramparts/boss_omor_the_unscarred.cpp
r158 r166 18 18 SDName: Boss_Omar_The_Unscarred 19 19 SD%Complete: 90 20 SDComment: Normal/Heroic support: both, to be tested.Temporary solution for orbital/shadow whip-ability. Needs more core support before making it more proper.20 SDComment: Temporary solution for orbital/shadow whip-ability. Needs more core support before making it more proper. 21 21 SDCategory: Hellfire Citadel, Hellfire Ramparts 22 22 EndScriptData */ 23 23 24 24 #include "precompiled.h" 25 26 #define SAY_AGGRO_1 -1543009 27 #define SAY_AGGRO_2 -1543010 28 #define SAY_AGGRO_3 -1543011 29 #define SAY_SUMMON -1543012 30 #define SAY_CURSE -1543013 31 #define SAY_KILL_1 -1543014 32 #define SAY_DIE -1543015 33 #define SAY_WIPE -1543016 25 34 26 35 #define SPELL_ORBITAL_STRIKE 30637 … … 33 42 #define SPELL_SUMMON_FIENDISH_HOUND 30707 34 43 35 #define SAY_AGGRO_1 "You dare stand against me?!"36 #define SOUND_AGGRO_1 1028037 #define SAY_AGGRO_2 "I will not be defeated!"38 #define SOUND_AGGRO_2 1027939 #define SAY_AGGRO_3 "Your insolence will be your death."40 #define SOUND_AGGRO_3 1028141 42 #define SAY_SUMMON "Achor-she-ki! Feast my pet! Eat your fill!"43 #define SOUND_SUMMON 1027744 45 #define SAY_CURSE "A-Kreesh!"46 #define SOUND_CURSE 1027847 48 #define SAY_KILL_1 "Die, weakling!"49 #define SOUND_KILL_1 1028250 51 #define SAY_DIE "It is... not over."52 #define SOUND_DIE 1028453 54 #define SAY_WIPE "I am victorious!"55 #define SOUND_WIPE 1028356 57 44 struct TRINITY_DLL_DECL boss_omor_the_unscarredAI : public Scripted_NoMovementAI 58 45 { 59 boss_omor_the_unscarredAI(Creature *c) : Scripted_NoMovementAI(c) {Reset();} 46 boss_omor_the_unscarredAI(Creature *c) : Scripted_NoMovementAI(c) 47 { 48 HeroicMode = m_creature->GetMap()->IsHeroic(); 49 Reset(); 50 } 51 52 bool HeroicMode; 60 53 61 54 uint32 OrbitalStrike_Timer; … … 68 61 uint64 playerGUID; 69 62 bool CanPullBack; 70 bool HeroicMode;71 63 72 64 void Reset() 73 65 { 74 HeroicMode = m_creature->GetMap()->IsHeroic(); 75 76 DoYell(SAY_WIPE,LANG_UNIVERSAL,NULL); 77 DoPlaySoundToSet(m_creature,SOUND_WIPE); 66 DoScriptText(SAY_WIPE, m_creature); 78 67 79 68 OrbitalStrike_Timer = 25000; … … 92 81 switch(rand()%3) 93 82 { 94 case 0: 95 DoYell(SAY_AGGRO_1, LANG_UNIVERSAL, NULL); 96 DoPlaySoundToSet(m_creature,SOUND_AGGRO_1); 97 break; 98 case 1: 99 DoYell(SAY_AGGRO_2, LANG_UNIVERSAL, NULL); 100 DoPlaySoundToSet(m_creature,SOUND_AGGRO_2); 101 break; 102 case 2: 103 DoYell(SAY_AGGRO_3, LANG_UNIVERSAL, NULL); 104 DoPlaySoundToSet(m_creature,SOUND_AGGRO_3); 105 break; 83 case 0: DoScriptText(SAY_AGGRO_1, m_creature); break; 84 case 1: DoScriptText(SAY_AGGRO_2, m_creature); break; 85 case 2: DoScriptText(SAY_AGGRO_3, m_creature); break; 106 86 } 107 87 } … … 112 92 return; 113 93 114 DoYell(SAY_KILL_1,LANG_UNIVERSAL,NULL); 115 DoPlaySoundToSet(m_creature,SOUND_KILL_1); 94 DoScriptText(SAY_KILL_1, m_creature); 116 95 } 117 96 118 97 void JustSummoned(Creature* summoned) 119 98 { 120 DoYell(SAY_SUMMON,LANG_UNIVERSAL,NULL); 121 DoPlaySoundToSet(m_creature,SOUND_SUMMON); 122 123 if( Unit* random = SelectUnit(SELECT_TARGET_RANDOM,0) ) 99 DoScriptText(SAY_SUMMON, m_creature); 100 101 if (Unit* random = SelectUnit(SELECT_TARGET_RANDOM,0)) 124 102 summoned->AI()->AttackStart(random); 125 103 … … 129 107 void JustDied(Unit* Killer) 130 108 { 131 DoYell(SAY_DIE,LANG_UNIVERSAL,NULL); 132 DoPlaySoundToSet(m_creature,SOUND_DIE); 109 DoScriptText(SAY_DIE, m_creature); 133 110 } 134 111 … … 139 116 140 117 //only two may be wrong, perhaps increase timer and spawn periodically instead. 141 if ( SummonedCount < 2)142 { 143 if ( Summon_Timer < diff)118 if (SummonedCount < 2) 119 { 120 if (Summon_Timer < diff) 144 121 { 145 122 m_creature->InterruptNonMeleeSpells(false); … … 149 126 } 150 127 151 if ( CanPullBack)152 { 153 if ( ShadowWhip_Timer < diff)154 { 155 if ( Unit* temp = Unit::GetUnit(*m_creature,playerGUID))128 if (CanPullBack) 129 { 130 if (ShadowWhip_Timer < diff) 131 { 132 if (Unit* temp = Unit::GetUnit(*m_creature,playerGUID)) 156 133 { 157 134 //if unit dosen't have this flag, then no pulling back (script will attempt cast, even if orbital strike was resisted) 158 if ( temp->HasUnitMovementFlag(MOVEMENTFLAG_FALLING))135 if (temp->HasUnitMovementFlag(MOVEMENTFLAG_FALLING)) 159 136 { 160 137 m_creature->InterruptNonMeleeSpells(false); … … 167 144 }else ShadowWhip_Timer -= diff; 168 145 } 169 else if ( OrbitalStrike_Timer < diff)146 else if (OrbitalStrike_Timer < diff) 170 147 { 171 148 Unit* temp = NULL; 172 if ( m_creature->IsWithinCombatDist(m_creature->getVictim(), ATTACK_DISTANCE))149 if (m_creature->IsWithinDistInMap(m_creature->getVictim(), ATTACK_DISTANCE)) 173 150 temp = m_creature->getVictim(); 174 151 else temp = SelectUnit(SELECT_TARGET_RANDOM,0); 175 152 176 if ( temp && temp->GetTypeId() == TYPEID_PLAYER)153 if (temp && temp->GetTypeId() == TYPEID_PLAYER) 177 154 { 178 155 DoCast(temp,SPELL_ORBITAL_STRIKE); 179 156 OrbitalStrike_Timer = 14000+rand()%2000; 180 157 playerGUID = temp->GetGUID(); 181 if( playerGUID ) 158 159 if (playerGUID) 182 160 CanPullBack = true; 183 161 } 184 162 }else OrbitalStrike_Timer -= diff; 185 163 186 if ( (m_creature->GetHealth()*100) / m_creature->GetMaxHealth() < 20)187 { 188 if ( DemonicShield_Timer < diff)164 if ((m_creature->GetHealth()*100) / m_creature->GetMaxHealth() < 20) 165 { 166 if (DemonicShield_Timer < diff) 189 167 { 190 168 DoCast(m_creature,SPELL_DEMONIC_SHIELD); … … 193 171 } 194 172 195 if( Aura_Timer < diff ) 196 { 197 DoYell(SAY_CURSE,LANG_UNIVERSAL,NULL); 198 DoPlaySoundToSet(m_creature,SOUND_CURSE); 199 200 if( Unit* target = SelectUnit(SELECT_TARGET_RANDOM,0) ) 201 { 202 if( HeroicMode ) DoCast(target,H_SPELL_BANE_OF_TREACHERY); 203 else DoCast(target,SPELL_TREACHEROUS_AURA); 204 173 if (Aura_Timer < diff) 174 { 175 DoScriptText(SAY_CURSE, m_creature); 176 177 if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM,0)) 178 { 179 DoCast(target,HeroicMode ? H_SPELL_BANE_OF_TREACHERY : SPELL_TREACHEROUS_AURA); 205 180 Aura_Timer = 8000+rand()%8000; 206 181 } 207 182 }else Aura_Timer -= diff; 208 183 209 if ( Shadowbolt_Timer < diff)210 { 211 if ( Unit* target = SelectUnit(SELECT_TARGET_RANDOM,0))212 { 213 if ( target)184 if (Shadowbolt_Timer < diff) 185 { 186 if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM,0)) 187 { 188 if (target) 214 189 target = m_creature->getVictim(); 215 190 216 if( HeroicMode ) DoCast(target,H_SPELL_SHADOW_BOLT); 217 else DoCast(target,SPELL_SHADOW_BOLT); 218 191 DoCast(target,HeroicMode ? H_SPELL_SHADOW_BOLT : SPELL_SHADOW_BOLT); 219 192 Shadowbolt_Timer = 4000+rand()%2500; 220 193 } -
trunk/src/bindings/scripts/scripts/zone/hellfire_citadel/hellfire_ramparts/boss_watchkeeper_gargolmar.cpp
r109 r166 18 18 SDName: Boss_Watchkeeper_Gargolmar 19 19 SD%Complete: 80 20 SDComment: Normal/Heroic support: both, to be tested.Missing adds to heal him. Surge should be used on target furthest away, not random.20 SDComment: Missing adds to heal him. Surge should be used on target furthest away, not random. 21 21 SDCategory: Hellfire Citadel, Hellfire Ramparts 22 22 EndScriptData */ … … 24 24 #include "precompiled.h" 25 25 26 #define SAY_HEAL "Heal me! QUICKLY!" 27 #define SOUND_HEAL 10329 28 29 #define SAY_SURGE "Back off, pup!" 30 #define SOUND_SURGE 10330 31 32 #define SAY_TAUNT "Do you smell that? Fresh meat has somehow breached our citadel. Be wary of any intruders." 33 34 #define SAY_AGGRO_1 "What have we here...?" 35 #define SOUND_AGGRO_1 10331 36 #define SAY_AGGRO_2 "Heh... this may hurt a little." 37 #define SOUND_AGGRO_2 10332 38 #define SAY_AGGRO_3 "I'm gonna enjoy this." 39 #define SOUND_AGGRO_3 10333 40 41 #define SAY_KILL_1 "Say farewell!" 42 #define SOUND_KILL_1 10334 43 #define SAY_KILL_2 "Much too easy..." 44 #define SOUND_KILL_2 10335 45 46 #define SOUND_DIE 10336 26 #define SAY_TAUNT -1543000 27 #define SAY_HEAL -1543001 28 #define SAY_SURGE -1543002 29 #define SAY_AGGRO_1 -1543003 30 #define SAY_AGGRO_2 -1543004 31 #define SAY_AGGRO_3 -1543005 32 #define SAY_KILL_1 -1543006 33 #define SAY_KILL_2 -1543007 34 #define SAY_DIE -1543008 47 35 48 36 #define SPELL_MORTAL_WOUND 30641 … … 53 41 struct TRINITY_DLL_DECL boss_watchkeeper_gargolmarAI : public ScriptedAI 54 42 { 55 boss_watchkeeper_gargolmarAI(Creature *c) : ScriptedAI(c) {Reset();} 43 boss_watchkeeper_gargolmarAI(Creature *c) : ScriptedAI(c) 44 { 45 HeroicMode = m_creature->GetMap()->IsHeroic(); 46 Reset(); 47 } 48 49 bool HeroicMode; 56 50 57 51 uint32 Surge_Timer; … … 61 55 bool HasTaunted; 62 56 bool YelledForHeal; 63 bool HeroicMode;64 57 65 58 void Reset() 66 59 { 67 HeroicMode = m_creature->GetMap()->IsHeroic();68 69 60 Surge_Timer = 5000; 70 61 MortalWound_Timer = 4000; … … 79 70 switch(rand()%3) 80 71 { 81 case 0: 82 DoYell(SAY_AGGRO_1, LANG_UNIVERSAL, NULL); 83 DoPlaySoundToSet(m_creature,SOUND_AGGRO_1); 84 break; 85 case 1: 86 DoYell(SAY_AGGRO_2, LANG_UNIVERSAL, NULL); 87 DoPlaySoundToSet(m_creature,SOUND_AGGRO_2); 88 break; 89 case 2: 90 DoYell(SAY_AGGRO_3, LANG_UNIVERSAL, NULL); 91 DoPlaySoundToSet(m_creature,SOUND_AGGRO_3); 92 break; 72 case 0: DoScriptText(SAY_AGGRO_1, m_creature); break; 73 case 1: DoScriptText(SAY_AGGRO_2, m_creature); break; 74 case 2: DoScriptText(SAY_AGGRO_3, m_creature); break; 93 75 } 94 76 } … … 96 78 void MoveInLineOfSight(Unit* who) 97 79 { 98 if (!m_creature->getVictim() && who->isTargetableForAttack() && ( m_creature->IsHostileTo( who )) && who->isInAccessablePlaceFor(m_creature) )80 if (!m_creature->getVictim() && who->isTargetableForAttack() && ( m_creature->IsHostileTo( who )) && who->isInAccessablePlaceFor(m_creature) ) 99 81 { 100 82 if (!m_creature->canFly() && m_creature->GetDistanceZ(who) > CREATURE_Z_ATTACK_RANGE) … … 102 84 103 85 float attackRadius = m_creature->GetAttackDistance(who); 104 if (m_creature->IsWithinDistInMap(who, attackRadius) && m_creature->IsWithinLOSInMap(who))86 if (m_creature->IsWithinDistInMap(who, attackRadius) && m_creature->IsWithinLOSInMap(who)) 105 87 { 106 88 who->RemoveSpellsCausingAura(SPELL_AURA_MOD_STEALTH); … … 109 91 else if (!HasTaunted && m_creature->IsWithinDistInMap(who, 60.0f)) 110 92 { 111 Do Yell(SAY_TAUNT, LANG_UNIVERSAL, NULL);93 DoScriptText(SAY_TAUNT, m_creature); 112 94 HasTaunted = true; 113 95 } … … 119 101 switch(rand()%2) 120 102 { 121 case 0: 122 DoYell(SAY_KILL_1, LANG_UNIVERSAL, NULL); 123 DoPlaySoundToSet(m_creature,SOUND_KILL_1); 124 break; 125 case 1: 126 DoYell(SAY_KILL_2, LANG_UNIVERSAL, NULL); 127 DoPlaySoundToSet(m_creature,SOUND_KILL_2); 128 break; 103 case 0: DoScriptText(SAY_KILL_1, m_creature); break; 104 case 1: DoScriptText(SAY_KILL_2, m_creature); break; 129 105 } 130 106 } … … 132 108 void JustDied(Unit* Killer) 133 109 { 134 Do PlaySoundToSet(m_creature,SOUND_DIE);110 DoScriptText(SAY_DIE, m_creature); 135 111 } 136 112 … … 140 116 return; 141 117 142 if ( MortalWound_Timer < diff)118 if (MortalWound_Timer < diff) 143 119 { 144 if( HeroicMode ) DoCast(m_creature->getVictim(),H_SPELL_MORTAL_WOUND); 145 else DoCast(m_creature->getVictim(),SPELL_MORTAL_WOUND); 146 120 DoCast(m_creature->getVictim(),HeroicMode ? H_SPELL_MORTAL_WOUND : SPELL_MORTAL_WOUND); 147 121 MortalWound_Timer = 5000+rand()%8000; 148 122 }else MortalWound_Timer -= diff; 149 123 150 if ( Surge_Timer < diff)124 if (Surge_Timer < diff) 151 125 { 152 DoYell(SAY_SURGE, LANG_UNIVERSAL, NULL); 153 DoPlaySoundToSet(m_creature,SOUND_SURGE); 126 DoScriptText(SAY_SURGE, m_creature); 154 127 155 if ( Unit* target = SelectUnit(SELECT_TARGET_RANDOM,0))128 if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM,0)) 156 129 DoCast(target,SPELL_SURGE); 157 130 … … 159 132 }else Surge_Timer -= diff; 160 133 161 if ((m_creature->GetHealth()*100) / m_creature->GetMaxHealth() < 20)134 if ((m_creature->GetHealth()*100) / m_creature->GetMaxHealth() < 20) 162 135 { 163 if ( Retaliation_Timer < diff)136 if (Retaliation_Timer < diff) 164 137 { 165 138 DoCast(m_creature,SPELL_RETALIATION); … … 168 141 } 169 142 170 if( !YelledForHeal ) 171 if((m_creature->GetHealth()*100) / m_creature->GetMaxHealth() < 40) 143 if (!YelledForHeal) 172 144 { 173 DoYell(SAY_HEAL, LANG_UNIVERSAL, NULL); 174 DoPlaySoundToSet(m_creature,SOUND_HEAL); 175 YelledForHeal = true; 145 if ((m_creature->GetHealth()*100) / m_creature->GetMaxHealth() < 40) 146 { 147 DoScriptText(SAY_HEAL, m_creature); 148 YelledForHeal = true; 149 } 176 150 } 177 151 -
trunk/src/bindings/scripts/scripts/zone/hellfire_citadel/magtheridons_lair/boss_magtheridon.cpp
r141 r166 25 25 #include "def_magtheridons_lair.h" 26 26 27 struct Yell 28 { 29 int32 id; 30 }; 31 32 static Yell RandomTaunt[]= 33 { 34 {-1544000}, 35 {-1544001}, 36 {-1544002}, 37 {-1544003}, 38 {-1544004}, 39 {-1544005}, 40 }; 41 42 #define SAY_FREED -1544006 43 #define SAY_AGGRO -1544007 44 #define SAY_BANISH -1544008 45 #define SAY_CHAMBER_DESTROY -1544009 46 #define SAY_PLAYER_KILLED -1544010 47 #define SAY_DEATH -1544011 48 49 #define EMOTE_BERSERK -1544012 50 #define EMOTE_BLASTNOVA -1544013 51 #define EMOTE_BEGIN -1544014 52 27 53 #define MOB_MAGTHERIDON 17257 28 54 #define MOB_ROOM 17516 … … 58 84 #define SPELL_FIRE_BLAST 37110 59 85 60 //Dialog61 #define SAY_AGGRO "Thank you for releasing me. Now...die!"62 #define SOUND_AGGRO 1025463 #define SAY_BANISH "Not again...NOT AGAIN!"64 #define SOUND_BANISH 1025665 #define SAY_FREED "I...am...UNLEASHED!!!"66 #define SOUND_FREED 1025367 #define SAY_CHAMBER_DESTROY "I will not be taken so easily. Let the walls of this prison tremble...and FALL!!!"68 #define SOUND_CHAMBER_DESTROY 1025769 #define SAY_PLAYER_KILLED "Did you think me weak? Soft? Who is the weak one now?!"70 #define SOUND_PLAYER_KILLED 1025571 #define SAY_DEATH "The Legion...will consume you...all...."72 #define SOUND_DEATH 1025873 #define EMOTE_BERSERK "becomes enraged!"74 #define EMOTE_BLASTNOVA "begins to cast Blast Nova!"75 #define EMOTE_BEGIN "%s's bonds begin to weaken!"76 77 86 // count of clickers needed to interrupt blast nova 78 87 #define CLICKERS_COUNT 5 79 80 // Unkown sounds81 uint32 RandomSound[] = {10247, 10248, 10249, 10250, 10251, 10252};82 88 83 89 typedef std::map<uint64, uint64> CubeMap; … … 197 203 uint32 Blaze_Timer; 198 204 uint32 Debris_Timer; 205 uint32 RandChat_Timer; 199 206 200 207 bool Phase3; … … 215 222 BlastNova_Timer = 60000; 216 223 Cleave_Timer = 15000; 224 RandChat_Timer = 90000; 217 225 218 226 Phase3 = false; … … 262 270 if(ClickerNum >= CLICKERS_COUNT && !m_creature->HasAura(SPELL_SHADOW_CAGE, 0)) 263 271 { 264 DoYell(SAY_BANISH, LANG_UNIVERSAL, NULL); 265 DoPlaySoundToSet(m_creature, SOUND_BANISH); 272 DoScriptText(SAY_BANISH, m_creature); 266 273 m_creature->CastSpell(m_creature, SPELL_SHADOW_CAGE, true); 267 274 } … … 274 281 void KilledUnit(Unit* victim) 275 282 { 276 DoYell(SAY_PLAYER_KILLED, LANG_UNIVERSAL, NULL); 277 DoPlaySoundToSet(m_creature, SOUND_PLAYER_KILLED); 283 DoScriptText(SAY_PLAYER_KILLED, m_creature); 278 284 } 279 285 … … 283 289 pInstance->SetData(DATA_MAGTHERIDON_EVENT, DONE); 284 290 285 DoYell(SAY_DEATH,LANG_UNIVERSAL, NULL); 286 DoPlaySoundToSet(m_creature, SOUND_DEATH); 291 DoScriptText(SAY_DEATH, m_creature); 287 292 } 288 293 … … 304 309 m_creature->RemoveAurasDueToSpell(SPELL_SHADOW_CAGE_C); 305 310 306 DoYell(SAY_FREED, LANG_UNIVERSAL, NULL); 307 DoPlaySoundToSet(m_creature, SOUND_FREED); 311 DoScriptText(SAY_FREED, m_creature); 308 312 } 309 313 310 314 void UpdateAI(const uint32 diff) 311 315 { 316 if (!InCombat) 317 { 318 if (RandChat_Timer < diff) 319 { 320 DoScriptText(RandomTaunt[rand()%6].id, m_creature); 321 RandChat_Timer = 90000; 322 }else RandChat_Timer -= diff; 323 } 324 312 325 if(!m_creature->SelectHostilTarget() && !m_creature->getVictim()) 313 326 return; … … 318 331 { 319 332 m_creature->CastSpell(m_creature, SPELL_BERSERK, true); 320 Do TextEmote(EMOTE_BERSERK, NULL);333 DoScriptText(EMOTE_BERSERK, m_creature); 321 334 Berserk_Timer = 60000; 322 335 }else Berserk_Timer -= diff; … … 333 346 if(!m_creature->hasUnitState(UNIT_STAT_STUNNED)) 334 347 { 335 Do TextEmote(EMOTE_BLASTNOVA, NULL);348 DoScriptText(EMOTE_BLASTNOVA, m_creature); 336 349 DoCast(m_creature, SPELL_BLASTNOVA); 337 350 BlastNova_Timer = 60000; … … 371 384 { 372 385 Phase3 = true; 373 DoYell(SAY_CHAMBER_DESTROY, LANG_UNIVERSAL, NULL); 374 DoPlaySoundToSet(m_creature, SOUND_CHAMBER_DESTROY); 386 DoScriptText(SAY_CHAMBER_DESTROY, m_creature); 375 387 m_creature->CastSpell(m_creature, SPELL_CAMERA_SHAKE, true); 376 388 m_creature->CastSpell(m_creature, SPELL_DEBRIS_KNOCKDOWN, true); -
trunk/src/bindings/scripts/scripts/zone/hellfire_citadel/shattered_halls/boss_nethekurse.cpp
r109 r166 18 18 SDName: Boss_Grand_Warlock_Nethekurse 19 19 SD%Complete: 75 20 SDComment: encounter not fully complete . missing part where boss kill minions.20 SDComment: encounter not fully completed. missing part where boss kill minions. 21 21 SDCategory: Hellfire Citadel, Shattered Halls 22 22 EndScriptData */ … … 33 33 struct Say 34 34 { 35 const char* text; 36 uint32 sound; 37 }; 38 39 #define SAY_INTRO "You wish to fight us all at once? This should be amusing!" 40 #define SOUND_INTRO 10262 35 int32 id; 36 }; 41 37 42 38 static Say PeonAttacked[]= 43 39 { 44 { "You can have that one. I no longer need him.", 10263},45 { "Yes, beat him mercilessly. His skull is a thick as an ogres.", 10264},46 { "Don't waste your time on that one. He's weak!", 10265},47 { "You want him? Very well, take him!", 10266},40 {-1540001}, 41 {-1540002}, 42 {-1540003}, 43 {-1540004}, 48 44 }; 49 45 static Say PeonDies[]= 50 46 { 51 {"One pitiful wretch down. Go on, take another one.", 10267}, 52 {"Ahh, what a waste... Next!", 10268}, 53 {"I was going to kill him anyway!", 10269}, 54 {"Thank you for saving me the trouble! Now it's my turn to have some fun...", 10270}, 55 }; 56 57 #define SAY_TAUNT_1 "Beg for your pittyfull life!" 58 #define SOUND_TAUNT_1 10259 59 #define SAY_TAUNT_2 "Run covad, ruun!" 60 #define SOUND_TAUNT_2 10260 61 #define SAY_TAUNT_3 "Your pain amuses me." 62 #define SOUND_TAUNT_3 10261 63 64 #define SAY_AGGRO_1 "I'm already bored." 65 #define SOUND_AGGRO_1 10271 66 #define SAY_AGGRO_2 "Come on! ... Show me a real fight." 67 #define SOUND_AGGRO_2 10272 68 #define SAY_AGGRO_3 "I had more fun torturing the peons." 69 #define SOUND_AGGRO_3 10273 70 71 #define SAY_SLAY_1 "You Loose." 72 #define SOUND_SLAY_1 10274 73 #define SAY_SLAY_2 "Ohh! Just die." 74 #define SOUND_SLAY_2 10275 75 76 #define SAY_DIE "What a ... a shame." 77 #define SOUND_DIE 10276 47 {-1540005}, 48 {-1540006}, 49 {-1540007}, 50 {-1540008}, 51 }; 52 53 #define SAY_INTRO -1540000 54 #define SAY_TAUNT_1 -1540009 55 #define SAY_TAUNT_2 -1540010 56 #define SAY_TAUNT_3 -1540011 57 #define SAY_AGGRO_1 -1540012 58 #define SAY_AGGRO_2 -1540013 59 #define SAY_AGGRO_3 -1540014 60 #define SAY_SLAY_1 -1540015 61 #define SAY_SLAY_2 -1540016 62 #define SAY_DIE -1540017 78 63 79 64 #define SPELL_DEATH_COIL 30500 … … 94 79 { 95 80 pInstance = ((ScriptedInstance*)c->GetInstanceData()); 81 HeroicMode = m_creature->GetMap()->IsHeroic(); 96 82 Reset(); 97 83 } 98 84 99 85 ScriptedInstance* pInstance; 100 101 86 bool HeroicMode; 87 102 88 bool IntroOnce; 103 89 bool IsIntroEvent; … … 119 105 m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); 120 106 121 HeroicMode = m_creature->GetMap()->IsHeroic();122 107 IsIntroEvent = false; 123 108 IntroOnce = false; … … 138 123 void DoYellForPeonAggro() 139 124 { 140 if( PeonEngagedCount >= 4 ) 141 return; 142 143 DoYell(PeonAttacked[PeonEngagedCount].text, LANG_UNIVERSAL, NULL); 144 DoPlaySoundToSet(m_creature, PeonAttacked[PeonEngagedCount].sound); 125 if (PeonEngagedCount >= 4) 126 return; 127 128 DoScriptText(PeonAttacked[PeonEngagedCount].id, m_creature); 145 129 ++PeonEngagedCount; 146 130 } … … 148 132 void DoYellForPeonDeath() 149 133 { 150 if( PeonKilledCount >= 4 ) 151 return; 152 153 DoYell(PeonDies[PeonKilledCount].text, LANG_UNIVERSAL, NULL); 154 DoPlaySoundToSet(m_creature, PeonDies[PeonKilledCount].sound); 134 if (PeonKilledCount >= 4) 135 return; 136 137 DoScriptText(PeonDies[PeonKilledCount].id, m_creature); 155 138 ++PeonKilledCount; 156 139 157 if ( PeonKilledCount == 4)140 if (PeonKilledCount == 4) 158 141 { 159 142 IsIntroEvent = false; … … 167 150 switch(rand()%3) 168 151 { 169 case 0: 170 DoPlaySoundToSet(m_creature,SOUND_TAUNT_1); 171 DoYell(SAY_TAUNT_1,LANG_UNIVERSAL,NULL); 172 break; 173 case 1: 174 DoPlaySoundToSet(m_creature,SOUND_TAUNT_2); 175 DoYell(SAY_TAUNT_2,LANG_UNIVERSAL,NULL); 176 break; 177 case 2: 178 DoPlaySoundToSet(m_creature,SOUND_TAUNT_3); 179 DoYell(SAY_TAUNT_3,LANG_UNIVERSAL,NULL); 180 break; 152 case 0: DoScriptText(SAY_TAUNT_1, m_creature); break; 153 case 1: DoScriptText(SAY_TAUNT_2, m_creature); break; 154 case 2: DoScriptText(SAY_TAUNT_3, m_creature); break; 181 155 } 182 156 … … 191 165 void AttackStart(Unit* who) 192 166 { 193 if ( IsIntroEvent || !IsMainEvent)167 if (IsIntroEvent || !IsMainEvent) 194 168 return; 195 169 … … 213 187 void MoveInLineOfSight(Unit *who) 214 188 { 215 if( !m_creature->getVictim() && who->isTargetableForAttack() && ( m_creature->IsHostileTo( who )) && who->isInAccessablePlaceFor(m_creature) ) 216 { 217 if( !IntroOnce && m_creature->IsWithinDistInMap(who, 75) ) 218 { 219 DoYell(SAY_INTRO, LANG_UNIVERSAL, NULL); 220 DoPlaySoundToSet(m_creature, SOUND_INTRO); 189 if (!m_creature->getVictim() && who->isTargetableForAttack() && ( m_creature->IsHostileTo( who )) && who->isInAccessablePlaceFor(m_creature) ) 190 { 191 if (!IntroOnce && m_creature->IsWithinDistInMap(who, 75)) 192 { 193 DoScriptText(SAY_INTRO, m_creature); 221 194 IntroOnce = true; 222 195 IsIntroEvent = true; 223 196 224 if ( pInstance)197 if (pInstance) 225 198 pInstance->SetData(TYPE_NETHEKURSE,IN_PROGRESS); 226 199 } 227 200 228 if (!m_creature->canFly() && m_creature->GetDistanceZ(who) > CREATURE_Z_ATTACK_RANGE )201 if (!m_creature->canFly() && m_creature->GetDistanceZ(who) > CREATURE_Z_ATTACK_RANGE ) 229 202 return; 230 203 231 if ( IsIntroEvent || !IsMainEvent)204 if (IsIntroEvent || !IsMainEvent) 232 205 return; 233 206 234 207 float attackRadius = m_creature->GetAttackDistance(who); 235 if (m_creature->IsWithinDistInMap(who, attackRadius) && m_creature->IsWithinLOSInMap(who) )208 if (m_creature->IsWithinDistInMap(who, attackRadius) && m_creature->IsWithinLOSInMap(who) ) 236 209 { 237 210 who->RemoveSpellsCausingAura(SPELL_AURA_MOD_STEALTH); … … 245 218 switch(rand()%3) 246 219 { 247 case 0: 248 DoPlaySoundToSet(m_creature,SOUND_AGGRO_1); 249 DoYell(SAY_AGGRO_1,LANG_UNIVERSAL,NULL); 250 break; 251 case 1: 252 DoPlaySoundToSet(m_creature,SOUND_AGGRO_2); 253 DoYell(SAY_AGGRO_2,LANG_UNIVERSAL,NULL); 254 break; 255 case 2: 256 DoPlaySoundToSet(m_creature,SOUND_AGGRO_3); 257 DoYell(SAY_AGGRO_3,LANG_UNIVERSAL,NULL); 258 break; 220 case 0: DoScriptText(SAY_AGGRO_1, m_creature); break; 221 case 1: DoScriptText(SAY_AGGRO_2, m_creature); break; 222 case 2: DoScriptText(SAY_AGGRO_3, m_creature); break; 259 223 } 260 224 } … … 271 235 switch(rand()%2) 272 236 { 273 case 0: 274 DoPlaySoundToSet(m_creature,SOUND_SLAY_1); 275 DoYell(SAY_SLAY_1,LANG_UNIVERSAL,NULL); 276 break; 277 case 1: 278 DoPlaySoundToSet(m_creature,SOUND_SLAY_2); 279 DoYell(SAY_SLAY_2,LANG_UNIVERSAL,NULL); 280 break; 237 case 0: DoScriptText(SAY_SLAY_1, m_creature); break; 238 case 1: DoScriptText(SAY_SLAY_2, m_creature); break; 281 239 } 282 240 } … … 284 242 void JustDied(Unit* Killer) 285 243 { 286 DoPlaySoundToSet(m_creature,SOUND_DIE); 287 DoYell(SAY_DIE,LANG_UNIVERSAL,NULL); 288 289 if( !pInstance ) 244 DoScriptText(SAY_DIE, m_creature); 245 246 if (!pInstance) 290 247 return; 291 248 292 249 pInstance->SetData(TYPE_NETHEKURSE,DONE); 293 250 294 if ( pInstance->GetData64(DATA_NETHEKURSE_DOOR))295 { 296 if ( GameObject *Door = GameObject::GetGameObject(*m_creature,pInstance->GetData64(DATA_NETHEKURSE_DOOR)))251 if (pInstance->GetData64(DATA_NETHEKURSE_DOOR)) 252 { 253 if (GameObject *Door = GameObject::GetGameObject(*m_creature,pInstance->GetData64(DATA_NETHEKURSE_DOOR))) 297 254 Door->SetGoState(0); 298 255 } … … 301 258 void UpdateAI(const uint32 diff) 302 259 { 303 if ( IsIntroEvent)304 { 305 if ( !pInstance)260 if (IsIntroEvent) 261 { 262 if (!pInstance) 306 263 return; 307 264 308 if ( pInstance->GetData(TYPE_NETHEKURSE) == IN_PROGRESS)309 { 310 if ( IntroEvent_Timer < diff)265 if (pInstance->GetData(TYPE_NETHEKURSE) == IN_PROGRESS) 266 { 267 if (IntroEvent_Timer < diff) 311 268 { 312 269 DoTauntPeons(); … … 315 272 } 316 273 317 if (!m_creature->SelectHostilTarget() || !m_creature->getVictim() )318 return; 319 320 if ( !IsMainEvent)321 return; 322 323 if ( Phase)324 { 325 if ( !SpinOnce)274 if (!m_creature->SelectHostilTarget() || !m_creature->getVictim() ) 275 return; 276 277 if (!IsMainEvent) 278 return; 279 280 if (Phase) 281 { 282 if (!SpinOnce) 326 283 { 327 284 DoCast(m_creature->getVictim(),SPELL_DARK_SPIN); … … 329 286 } 330 287 331 if ( Cleave_Timer < diff)288 if (Cleave_Timer < diff) 332 289 { 333 290 DoCast(m_creature->getVictim(),(HeroicMode ? H_SPELL_SHADOW_SLAM : SPELL_SHADOW_CLEAVE)); … … 337 294 else 338 295 { 339 if ( ShadowFissure_Timer < diff)340 { 341 if ( Unit *target = SelectUnit(SELECT_TARGET_RANDOM,0))296 if (ShadowFissure_Timer < diff) 297 { 298 if (Unit *target = SelectUnit(SELECT_TARGET_RANDOM,0)) 342 299 DoCast(target,SPELL_SHADOW_FISSURE); 343 300 ShadowFissure_Timer = 7500+rand()%7500; 344 301 }else ShadowFissure_Timer -= diff; 345 302 346 if ( DeathCoil_Timer < diff)347 { 348 if ( Unit *target = SelectUnit(SELECT_TARGET_RANDOM,0))303 if (DeathCoil_Timer < diff) 304 { 305 if (Unit *target = SelectUnit(SELECT_TARGET_RANDOM,0)) 349 306 DoCast(target,SPELL_DEATH_COIL); 350 307 DeathCoil_Timer = 15000+rand()%5000; 351 308 }else DeathCoil_Timer -= diff; 352 309 353 if ( (m_creature->GetHealth()*100) / m_creature->GetMaxHealth() <= 20)310 if ((m_creature->GetHealth()*100) / m_creature->GetMaxHealth() <= 20) 354 311 Phase = true; 355 312 … … 383 340 void Aggro(Unit* who) 384 341 { 385 if ( pInstance)386 { 387 if ( pInstance->GetData64(DATA_NETHEKURSE))342 if (pInstance) 343 { 344 if (pInstance->GetData64(DATA_NETHEKURSE)) 388 345 { 389 346 Creature *pKurse = (Creature*)Unit::GetUnit(*m_creature,pInstance->GetData64(DATA_NETHEKURSE)); 390 if ( pKurse)347 if (pKurse) 391 348 ((boss_grand_warlock_nethekurseAI*)pKurse->AI())->DoYellForPeonAggro(); 392 349 } 393 350 394 if (pInstance->GetData(TYPE_NETHEKURSE) == IN_PROGRESS )351 if (pInstance->GetData(TYPE_NETHEKURSE) == IN_PROGRESS ) 395 352 return; 396 353 else pInstance->SetData(TYPE_NETHEKURSE,IN_PROGRESS); … … 400 357 void JustDied(Unit* Killer) 401 358 { 402 if ( pInstance)403 { 404 if ( pInstance->GetData64(DATA_NETHEKURSE))359 if (pInstance) 360 { 361 if (pInstance->GetData64(DATA_NETHEKURSE)) 405 362 { 406 363 Creature *pKurse = (Creature*)Unit::GetUnit(*m_creature,pInstance->GetData64(DATA_NETHEKURSE)); 407 if ( pKurse)364 if (pKurse) 408 365 ((boss_grand_warlock_nethekurseAI*)pKurse->AI())->DoYellForPeonDeath(); 409 366 } … … 413 370 void UpdateAI(const uint32 diff) 414 371 { 415 if ( !m_creature->SelectHostilTarget() || !m_creature->getVictim())416 return; 417 418 if ( Hemorrhage_Timer < diff)372 if (!m_creature->SelectHostilTarget() || !m_creature->getVictim()) 373 return; 374 375 if (Hemorrhage_Timer < diff) 419 376 { 420 377 DoCast(m_creature->getVictim(),SPELL_HEMORRHAGE); … … 448 405 void UpdateAI(const uint32 diff) 449 406 { 450 if ( !Start)407 if (!Start) 451 408 { 452 409 //triggered spell of consumption does not properly show it's SpellVisual, hack it a bit … … 456 413 } 457 414 458 if (Stop_Timer < diff)415 if (Stop_Timer < diff) 459 416 { 460 417 m_creature->setDeathState(JUST_DIED); -
trunk/src/bindings/scripts/scripts/zone/hellfire_citadel/shattered_halls/boss_warbringer_omrogg.cpp
r90 r166 35 35 struct Yell 36 36 { 37 const char* text; 38 uint32 sound; 37 int32 id; 39 38 uint32 creature; 40 39 }; … … 42 41 static Yell GoCombat[]= 43 42 { 44 { "Smash!", 10306, ENTRY_LEFT_HEAD},45 { "If you nice me let you live.", 10308, ENTRY_LEFT_HEAD},46 { "Me hungry!", 10309, ENTRY_LEFT_HEAD},43 {-1540018, ENTRY_LEFT_HEAD}, 44 {-1540019, ENTRY_LEFT_HEAD}, 45 {-1540020, ENTRY_LEFT_HEAD}, 47 46 }; 48 47 static Yell GoCombatDelay[]= 49 48 { 50 { "Why don't you let me do the talking?", 10317, ENTRY_RIGHT_HEAD},51 { "No, we will NOT let you live!", 10318, ENTRY_RIGHT_HEAD},52 { "You always hungry. That why we so fat!", 10319, ENTRY_RIGHT_HEAD},49 {-1540021, ENTRY_RIGHT_HEAD}, 50 {-1540022, ENTRY_RIGHT_HEAD}, 51 {-1540023, ENTRY_RIGHT_HEAD}, 53 52 }; 54 53 55 54 static Yell Threat[]= 56 55 { 57 { "You stay here. Me go kill someone else!", 10303, ENTRY_LEFT_HEAD},58 { "What are you doing!", 10315, ENTRY_RIGHT_HEAD},59 { "Me kill someone else...", 10302, ENTRY_LEFT_HEAD},60 { "Me not like this one...",10300, ENTRY_LEFT_HEAD},56 {-1540024, ENTRY_LEFT_HEAD}, 57 {-1540025, ENTRY_RIGHT_HEAD}, 58 {-1540026, ENTRY_LEFT_HEAD}, 59 {-1540027, ENTRY_LEFT_HEAD}, 61 60 }; 62 61 static Yell ThreatDelay1[]= 63 62 { 64 { "That's not funny!", 10314, ENTRY_RIGHT_HEAD},65 { "Me get bored...", 10305, ENTRY_LEFT_HEAD},66 { "I'm not done yet, idiot!", 10313, ENTRY_RIGHT_HEAD},67 { "Hey you numbskull!", 10312, ENTRY_RIGHT_HEAD},63 {-1540028, ENTRY_RIGHT_HEAD}, 64 {-1540029, ENTRY_LEFT_HEAD}, 65 {-1540030, ENTRY_RIGHT_HEAD}, 66 {-1540031, ENTRY_RIGHT_HEAD}, 68 67 }; 69 68 static Yell ThreatDelay2[]= 70 69 { 71 { "Ha ha ha.", 10304, ENTRY_LEFT_HEAD},72 { "Whhy! He almost dead!", 10316, ENTRY_RIGHT_HEAD},73 { "H'ey...", 10307, ENTRY_LEFT_HEAD},74 { "We kill his friend!", 10301, ENTRY_LEFT_HEAD},70 {-1540032, ENTRY_LEFT_HEAD}, 71 {-1540033, ENTRY_RIGHT_HEAD}, 72 {-1540034, ENTRY_LEFT_HEAD}, 73 {-1540035, ENTRY_LEFT_HEAD}, 75 74 }; 76 75 77 76 static Yell Killing[]= 78 77 { 79 { "This one die easy!", 10310, ENTRY_LEFT_HEAD},80 { "I'm tired. You kill next one!", 10320, ENTRY_RIGHT_HEAD},78 {-1540036, ENTRY_LEFT_HEAD}, 79 {-1540037, ENTRY_RIGHT_HEAD}, 81 80 }; 82 81 static Yell KillingDelay[]= 83 82 { 84 {"That's because I do all the hard work!", 10321, ENTRY_RIGHT_HEAD}, 85 {"SD2 script error, should not see this.", 0, ENTRY_LEFT_HEAD}, 86 }; 87 88 #define EMOTE_ENRAGE "enrages" 89 90 #define YELL_DIE_L "This all...your fault!" 91 #define SOUND_DIE_L 10311 92 #define YELL_DIE_R "I...hate...you..." 93 #define SOUND_DIE_R 10322 83 {-1540038, ENTRY_RIGHT_HEAD}, 84 {-1000000, ENTRY_LEFT_HEAD}, 85 }; 86 87 #define YELL_DIE_L -1540039 88 #define YELL_DIE_R -1540040 89 #define EMOTE_ENRAGE -1540041 94 90 95 91 #define SPELL_BLAST_WAVE 30600 … … 118 114 void UpdateAI(const uint32 diff) 119 115 { 120 if ( !DeathYell)116 if (!DeathYell) 121 117 return; 122 118 123 if( Death_Timer < diff ) 124 { 125 DoYell(YELL_DIE_R,LANG_UNIVERSAL,NULL); 126 DoPlaySoundToSet(m_creature, SOUND_DIE_R); 119 if (Death_Timer < diff) 120 { 121 DoScriptText(YELL_DIE_R, m_creature); 127 122 DeathYell = false; 128 123 }else Death_Timer -= diff; … … 140 135 141 136 ScriptedInstance* pInstance; 137 bool HeroicMode; 142 138 143 139 uint64 LeftHead; … … 147 143 int ikilling; 148 144 149 bool HeroicMode;150 145 bool AggroYell; 151 146 bool ThreatYell; … … 182 177 ResetThreat_Timer = 30000; 183 178 184 if ( pInstance)179 if (pInstance) 185 180 pInstance->SetData(TYPE_OMROGG, NOT_STARTED); //End boss can use this later. O'mrogg must be defeated(DONE) or he will come to aid. 186 181 } … … 188 183 void DoYellForThreat() 189 184 { 190 if ( LeftHead && RightHead)185 if (LeftHead && RightHead) 191 186 { 192 187 Unit *Left = Unit::GetUnit(*m_creature,LeftHead); 193 188 Unit *Right = Unit::GetUnit(*m_creature,RightHead); 194 189 195 if ( !Left && !Right)190 if (!Left && !Right) 196 191 return; 197 192 … … 200 195 Unit *source = (Left->GetEntry() == Threat[ithreat].creature ? Left : Right); 201 196 202 source->MonsterYell(Threat[ithreat].text, LANG_UNIVERSAL, 0); 203 DoPlaySoundToSet(source, Threat[ithreat].sound); 197 DoScriptText(Threat[ithreat].id, source); 204 198 205 199 Delay_Timer = 3500; … … 213 207 DoSpawnCreature(ENTRY_RIGHT_HEAD,0,0,0,0,TEMPSUMMON_TIMED_DESPAWN,1800000); 214 208 215 if ( Unit *Left = Unit::GetUnit(*m_creature,LeftHead))209 if (Unit *Left = Unit::GetUnit(*m_creature,LeftHead)) 216 210 { 217 211 iaggro = rand()%3; 218 212 219 Left->MonsterYell(GoCombat[iaggro].text, LANG_UNIVERSAL, 0); 220 DoPlaySoundToSet(Left, GoCombat[iaggro].sound); 213 DoScriptText(GoCombat[iaggro].id, Left); 221 214 222 215 Delay_Timer = 3500; 223 216 AggroYell = true; 224 217 } 225 if( pInstance ) 218 219 if (pInstance) 226 220 pInstance->SetData(TYPE_OMROGG, IN_PROGRESS); 227 221 } … … 229 223 void JustSummoned(Creature *summoned) 230 224 { 231 if ( summoned->GetEntry() == ENTRY_LEFT_HEAD)225 if (summoned->GetEntry() == ENTRY_LEFT_HEAD) 232 226 LeftHead = summoned->GetGUID(); 233 227 234 if ( summoned->GetEntry() == ENTRY_RIGHT_HEAD)228 if (summoned->GetEntry() == ENTRY_RIGHT_HEAD) 235 229 RightHead = summoned->GetGUID(); 236 230 … … 242 236 void KilledUnit(Unit* victim) 243 237 { 244 if ( LeftHead && RightHead)238 if (LeftHead && RightHead) 245 239 { 246 240 Unit *Left = Unit::GetUnit(*m_creature,LeftHead); 247 241 Unit *Right = Unit::GetUnit(*m_creature,RightHead); 248 242 249 if ( !Left && !Right)243 if (!Left && !Right) 250 244 return; 251 245 … … 257 251 { 258 252 case 0: 259 source->MonsterYell(Killing[ikilling].text, LANG_UNIVERSAL, 0); 260 DoPlaySoundToSet(source, Killing[ikilling].sound); 253 DoScriptText(Killing[ikilling].id, source); 261 254 Delay_Timer = 3500; 262 255 KillingYell = true; 263 256 break; 264 257 case 1: 265 source->MonsterYell(Killing[ikilling].text, LANG_UNIVERSAL, 0); 266 DoPlaySoundToSet(source, Killing[ikilling].sound); 258 DoScriptText(Killing[ikilling].id, source); 267 259 KillingYell = false; 268 260 break; … … 273 265 void JustDied(Unit* Killer) 274 266 { 275 if ( LeftHead && RightHead)267 if (LeftHead && RightHead) 276 268 { 277 269 Unit *Left = Unit::GetUnit(*m_creature,LeftHead); 278 270 Unit *Right = Unit::GetUnit(*m_creature,RightHead); 279 271 280 if ( !Left && !Right)272 if (!Left && !Right) 281 273 return; 282 274 283 Left->MonsterYell(YELL_DIE_L, LANG_UNIVERSAL, 0); 284 DoPlaySoundToSet(Left,SOUND_DIE_L); 275 DoScriptText(YELL_DIE_L, Left); 285 276 286 277 ((mob_omrogg_headsAI*)((Creature*)Right)->AI())->DoDeathYell(); 287 278 } 288 if( pInstance ) 279 280 if (pInstance) 289 281 pInstance->SetData(TYPE_OMROGG, DONE); 290 282 } … … 292 284 void UpdateAI(const uint32 diff) 293 285 { 294 if ( Delay_Timer < diff)286 if (Delay_Timer < diff) 295 287 { 296 288 Delay_Timer = 3500; 297 289 298 if ( !LeftHead && !RightHead)290 if (!LeftHead && !RightHead) 299 291 return; 300 292 … … 302 294 Unit *Right = Unit::GetUnit(*m_creature,RightHead); 303 295 304 if ( !Left && !Right)296 if (!Left && !Right) 305 297 return; 306 298 307 if( AggroYell ) 308 { 309 Right->MonsterYell(GoCombatDelay[iaggro].text, LANG_UNIVERSAL, 0); 310 DoPlaySoundToSet(Right, GoCombatDelay[iaggro].sound); 299 if (AggroYell) 300 { 301 DoScriptText(GoCombatDelay[iaggro].id, Right); 311 302 AggroYell = false; 312 303 } 313 304 314 if ( ThreatYell2)305 if (ThreatYell2) 315 306 { 316 307 Unit *source = (Left->GetEntry() == ThreatDelay2[ithreat].creature ? Left : Right); 317 308 318 source->MonsterYell(ThreatDelay2[ithreat].text, LANG_UNIVERSAL, 0); 319 DoPlaySoundToSet(source, ThreatDelay2[ithreat].sound); 309 DoScriptText(ThreatDelay2[ithreat].id, source); 320 310 ThreatYell2 = false; 321 311 } 322 312 323 if ( ThreatYell)313 if (ThreatYell) 324 314 { 325 315 Unit *source = (Left->GetEntry() == ThreatDelay1[ithreat].creature ? Left : Right); 326 316 327 source->MonsterYell(ThreatDelay1[ithreat].text, LANG_UNIVERSAL, 0); 328 DoPlaySoundToSet(source, ThreatDelay1[ithreat].sound); 317 DoScriptText(ThreatDelay1[ithreat].id, source); 329 318 ThreatYell = false; 330 319 ThreatYell2 = true; 331 320 } 332 321 333 if ( KillingYell)322 if (KillingYell) 334 323 { 335 324 Unit *source = (Left->GetEntry() == KillingDelay[ikilling].creature ? Left : Right); 336 325 337 source->MonsterYell(KillingDelay[ikilling].text, LANG_UNIVERSAL, 0); 338 DoPlaySoundToSet(source, KillingDelay[ikilling].sound); 326 DoScriptText(KillingDelay[ikilling].id, source); 339 327 KillingYell = false; 340 328 } 341 329 }else Delay_Timer -= diff; 342 330 343 if ( !m_creature->SelectHostilTarget() || !m_creature->getVictim())331 if (!m_creature->SelectHostilTarget() || !m_creature->getVictim()) 344 332 return; 345 333 346 if ( BlastCount && BlastWave_Timer <= diff)334 if (BlastCount && BlastWave_Timer <= diff) 347 335 { 348 336 DoCast(m_creature,SPELL_BLAST_WAVE); 349 337 BlastWave_Timer = 5000; 350 338 ++BlastCount; 351 if( BlastCount == 3 ) 339 340 if (BlastCount == 3) 352 341 BlastCount = 0; 353 342 }else BlastWave_Timer -= diff; 354 343 355 if ( BurningMaul_Timer < diff)356 { 357 Do TextEmote(EMOTE_ENRAGE,NULL);344 if (BurningMaul_Timer < diff) 345 { 346 DoScriptText(EMOTE_ENRAGE, m_creature); 358 347 DoCast(m_creature,HeroicMode ? H_SPELL_BURNING_MAUL : SPELL_BURNING_MAUL); 359 348 BurningMaul_Timer = 40000; … … 362 351 }else BurningMaul_Timer -= diff; 363 352 364 if ( ResetThreat_Timer < diff)365 { 366 if ( Unit *target = SelectUnit(SELECT_TARGET_RANDOM,0))353 if (ResetThreat_Timer < diff) 354 { 355 if (Unit *target = SelectUnit(SELECT_TARGET_RANDOM,0)) 367 356 { 368 357 DoYellForThreat(); … … 373 362 }else ResetThreat_Timer -= diff; 374 363 375 if ( Fear_Timer < diff)364 if (Fear_Timer < diff) 376 365 { 377 366 DoCast(m_creature,SPELL_FEAR); … … 379 368 }else Fear_Timer -= diff; 380 369 381 if ( ThunderClap_Timer < diff)370 if (ThunderClap_Timer < diff) 382 371 { 383 372 DoCast(m_creature,SPELL_THUNDERCLAP);