Changeset 166

Show
Ignore:
Timestamp:
11/19/08 13:42:20 (17 years ago)
Author:
yumileroy
Message:

[svn] * Updated more .cpp scripts to use script_texts

  • Hellfire Ramparts
  • Blood Furnace
  • Shattered Halls
  • Magtheridon's Lair
  • Steam Vault

* Added random OOC yells to Magtheridon

Original author: slg
Date: 2008-11-04 16:26:01-06:00

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  
    1818SDName: Boss_Hydromancer_Thespia 
    1919SD%Complete: 80 
    20 SDComment: Normal/heroic mode: to be tested. Needs additional adjustments (when instance script is adjusted) 
     20SDComment: Needs additional adjustments (when instance script is adjusted) 
    2121SDCategory: Coilfang Resevoir, The Steamvault 
    2222EndScriptData */ 
     
    3030#include "def_steam_vault.h" 
    3131 
    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 
    4939 
    5040#define SPELL_LIGHTNING_CLOUD       25033 
     
    5747    { 
    5848        pInstance = ((ScriptedInstance*)c->GetInstanceData()); 
     49        HeroicMode = m_creature->GetMap()->IsHeroic(); 
    5950        Reset(); 
    6051    } 
     
    6960    void Reset() 
    7061    { 
    71         HeroicMode = m_creature->GetMap()->IsHeroic(); 
    72  
    7362        LightningCloud_Timer = 28000; 
    7463        LungBurst_Timer = 7000; 
    7564        EnvelopingWinds_Timer = 9000; 
    7665 
    77         if( pInstance ) pInstance->SetData(TYPE_HYDROMANCER_THESPIA, NOT_STARTED); 
     66        if (pInstance) 
     67            pInstance->SetData(TYPE_HYDROMANCER_THESPIA, NOT_STARTED); 
    7868    } 
    7969 
    8070    void JustDied(Unit* Killer) 
    8171    { 
    82         DoYell(SAY_DEAD, LANG_UNIVERSAL, NULL); 
    83         DoPlaySoundToSet(m_creature,SOUND_DEAD); 
     72        DoScriptText(SAY_DEAD, m_creature); 
    8473 
    85         if( pInstance ) pInstance->SetData(TYPE_HYDROMANCER_THESPIA, DONE); 
     74        if (pInstance) 
     75            pInstance->SetData(TYPE_HYDROMANCER_THESPIA, DONE); 
    8676    } 
    8777 
     
    9080        switch(rand()%2) 
    9181        { 
    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; 
    10084        } 
    10185    } 
     
    10589        switch(rand()%3) 
    10690        { 
    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; 
    11994        } 
    12095 
    121         if( pInstance ) pInstance->SetData(TYPE_HYDROMANCER_THESPIA, IN_PROGRESS); 
     96        if (pInstance) 
     97            pInstance->SetData(TYPE_HYDROMANCER_THESPIA, IN_PROGRESS); 
    12298    } 
    12399 
     
    128104 
    129105        //LightningCloud_Timer 
    130         if( LightningCloud_Timer < diff ) 
     106        if (LightningCloud_Timer < diff) 
    131107        { 
    132108            //cast twice in Heroic mode 
    133             if( Unit* target = SelectUnit(SELECT_TARGET_RANDOM,0) ) 
     109            if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM,0)) 
    134110                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)) 
    137113                    DoCast(target, SPELL_LIGHTNING_CLOUD); 
    138114            LightningCloud_Timer = 28000; 
     
    140116 
    141117        //LungBurst_Timer 
    142         if( LungBurst_Timer < diff ) 
     118        if (LungBurst_Timer < diff) 
    143119        { 
    144             if( Unit* target = SelectUnit(SELECT_TARGET_RANDOM,0) ) 
     120            if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM,0)) 
    145121                DoCast(target, SPELL_LUNG_BURST); 
    146122            LungBurst_Timer = 10000+rand()%5000; 
     
    148124 
    149125        //EnvelopingWinds_Timer 
    150         if( EnvelopingWinds_Timer < diff ) 
     126        if (EnvelopingWinds_Timer < diff) 
    151127        { 
    152128            //cast twice in Heroic mode 
    153             if( Unit* target = SelectUnit(SELECT_TARGET_RANDOM,0) ) 
     129            if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM,0)) 
    154130                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)) 
    157133                    DoCast(target, SPELL_ENVELOPING_WINDS); 
    158134            EnvelopingWinds_Timer = 10000+rand()%5000; 
     
    186162            return; 
    187163 
    188         if( WaterBoltVolley_Timer < diff ) 
     164        if (WaterBoltVolley_Timer < diff) 
    189165        { 
    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); 
    193167            WaterBoltVolley_Timer = 10000+rand()%5000; 
    194168        }else WaterBoltVolley_Timer -= diff; 
  • trunk/src/bindings/scripts/scripts/zone/coilfang_resevoir/steam_vault/boss_mekgineer_steamrigger.cpp

    r90 r166  
    3030#include "def_steam_vault.h" 
    3131 
    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 
    5341 
    5442#define SPELL_SUPER_SHRINK_RAY      31485 
     
    6452    { 
    6553        pInstance = ((ScriptedInstance*)c->GetInstanceData()); 
     54        HeroicMode = m_creature->GetMap()->IsHeroic(); 
    6655        Reset(); 
    6756    } 
    6857 
    6958    ScriptedInstance *pInstance; 
     59    bool HeroicMode; 
    7060 
    7161    uint32 Shrink_Timer; 
     
    8676        Summon25 = false; 
    8777 
    88         if( pInstance ) pInstance->SetData(TYPE_MEKGINEER_STEAMRIGGER, NOT_STARTED); 
     78        if (pInstance) 
     79            pInstance->SetData(TYPE_MEKGINEER_STEAMRIGGER, NOT_STARTED); 
    8980    } 
    9081 
    9182    void JustDied(Unit* Killer) 
    9283    { 
    93         DoYell(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); 
    9788    } 
    9889 
     
    10192        switch(rand()%3) 
    10293        { 
    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; 
    11597        } 
    11698    } 
     
    120102        switch(rand()%3) 
    121103        { 
    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); 
    137111    } 
    138112 
     
    140114    void SummonMechanichs() 
    141115    { 
    142         DoYell(SAY_MECHANICS, LANG_UNIVERSAL, NULL); 
    143         DoPlaySoundToSet(m_creature,SOUND_MECHANICS); 
     116        DoScriptText(SAY_MECHANICS, m_creature); 
    144117 
    145118        DoSpawnCreature(ENTRY_STREAMRIGGER_MECHANIC,5,5,0,0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 240000); 
     
    147120        DoSpawnCreature(ENTRY_STREAMRIGGER_MECHANIC,-5,-5,0,0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 240000); 
    148121 
    149         if( rand()%2 ) 
     122        if (rand()%2) 
    150123            DoSpawnCreature(ENTRY_STREAMRIGGER_MECHANIC,5,-7,0,0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 240000); 
    151         if( rand()%2 ) 
     124        if (rand()%2) 
    152125            DoSpawnCreature(ENTRY_STREAMRIGGER_MECHANIC,7,-5,0,0, TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN, 240000); 
    153126    } 
     
    158131            return; 
    159132 
    160         if( Shrink_Timer < diff ) 
     133        if (Shrink_Timer < diff) 
    161134        { 
    162135            DoCast(m_creature->getVictim(),SPELL_SUPER_SHRINK_RAY); 
     
    164137        }else Shrink_Timer -= diff; 
    165138 
    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 
    170146            Saw_Blade_Timer = 15000; 
    171147        } else Saw_Blade_Timer -= diff; 
    172148 
    173         if( Electrified_Net_Timer < diff ) 
     149        if (Electrified_Net_Timer < diff) 
    174150        { 
    175151            DoCast(m_creature->getVictim(),SPELL_ELECTRIFIED_NET); 
     
    178154        else Electrified_Net_Timer -= diff; 
    179155 
    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            } 
    197181        } 
    198182 
     
    218202    { 
    219203        pInstance = ((ScriptedInstance*)c->GetInstanceData()); 
     204        HeroicMode = m_creature->GetMap()->IsHeroic(); 
    220205        Reset(); 
    221206    } 
    222207 
    223208    ScriptedInstance* pInstance; 
     209    bool HeroicMode; 
    224210 
    225211    uint32 Repair_Timer; 
    226     bool HeroicMode; 
    227212 
    228213    void Reset() 
    229214    { 
    230         HeroicMode = m_creature->GetMap()->IsHeroic(); 
    231215        Repair_Timer = 2000; 
    232216    } 
     
    242226    void UpdateAI(const uint32 diff) 
    243227    { 
    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))) 
    249233                { 
    250                     if( m_creature->IsWithinDistInMap(pMekgineer, MAX_REPAIR_RANGE) ) 
     234                    if (m_creature->IsWithinDistInMap(pMekgineer, MAX_REPAIR_RANGE)) 
    251235                    { 
    252236                        //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)) 
    254238                        { 
    255239                            //m_creature->GetMotionMaster()->MovementExpired(); 
    256240                            //m_creature->GetMotionMaster()->MoveIdle(); 
    257241 
    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); 
    260243                        } 
    261244                        Repair_Timer = 5000; 
     
    270253        }else Repair_Timer -= diff; 
    271254 
    272         if( !m_creature->SelectHostilTarget() || !m_creature->getVictim() ) 
     255        if (!m_creature->SelectHostilTarget() || !m_creature->getVictim()) 
    273256            return; 
    274257 
  • trunk/src/bindings/scripts/scripts/zone/coilfang_resevoir/steam_vault/boss_warlord_kalithresh.cpp

    r90 r166  
    2525#include "def_steam_vault.h" 
    2626 
    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 
    4735 
    4836#define SPELL_SPELL_REFLECTION      31534 
     
    6957 
    7058        //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            } 
    7666        } 
    7767    } 
     
    8373        m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE); 
    8474        m_creature->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); 
     75 
    8576        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); 
    8780    } 
    8881 
    8982    void DamageTaken(Unit *done_by, uint32 &damage) 
    9083    { 
    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); 
    9387    } 
    9488}; 
     
    116110        CanRage = false; 
    117111 
    118         if( pInstance ) pInstance->SetData(TYPE_WARLORD_KALITHRESH, NOT_STARTED); 
     112        if (pInstance) 
     113            pInstance->SetData(TYPE_WARLORD_KALITHRESH, NOT_STARTED); 
    119114    } 
    120115 
     
    123118        switch(rand()%3) 
    124119        { 
    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; 
    137123        } 
    138124 
    139         if( pInstance ) pInstance->SetData(TYPE_WARLORD_KALITHRESH, IN_PROGRESS); 
     125        if (pInstance) 
     126            pInstance->SetData(TYPE_WARLORD_KALITHRESH, IN_PROGRESS); 
    140127    } 
    141128 
     
    144131        switch(rand()%2) 
    145132        { 
    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; 
    154135        } 
    155136    } 
     
    178159    { 
    179160        //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) 
    183164                    m_creature->RemoveAurasDueToSpell(SPELL_WARLORDS_RAGE_PROC); 
    184165    } 
     
    186167    void JustDied(Unit* Killer) 
    187168    { 
    188         DoYell(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); 
    192173    } 
    193174 
     
    197178            return; 
    198179 
    199         if( Rage_Timer < diff ) 
     180        if (Rage_Timer < diff) 
    200181        { 
    201182            Creature* distiller = SelectCreatureInGrid(17954, 100); 
    202             if( distiller ) 
     183            if (distiller) 
    203184            { 
    204                 DoYell(SAY_REGEN, LANG_UNIVERSAL, NULL); 
    205                 DoPlaySoundToSet(m_creature,SOUND_REGEN); 
     185                DoScriptText(SAY_REGEN, m_creature); 
    206186                DoCast(m_creature,SPELL_WARLORDS_RAGE); 
    207187                ((mob_naga_distillerAI*)distiller->AI())->StartRageGen(m_creature); 
     
    211191 
    212192        //Reflection_Timer 
    213         if( Reflection_Timer < diff ) 
     193        if (Reflection_Timer < diff) 
    214194        { 
    215195            DoCast(m_creature, SPELL_SPELL_REFLECTION); 
     
    218198 
    219199        //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)) 
    223203                DoCast(target,SPELL_IMPALE); 
    224204 
  • trunk/src/bindings/scripts/scripts/zone/hellfire_citadel/blood_furnace/boss_broggok.cpp

    r90 r166  
    2424#include "precompiled.h" 
    2525 
     26#define SAY_AGGRO               -1542008 
     27 
    2628#define SPELL_SLIME_SPRAY       30913 
    2729#define SPELL_POISON_CLOUD      30916 
     
    2931 
    3032#define SPELL_POISON            30914 
    31  
    32 #define SAY_AGGRO "Come intruders...." 
    3333 
    3434struct TRINITY_DLL_DECL boss_broggokAI : public ScriptedAI 
     
    4949    void Aggro(Unit *who) 
    5050    { 
    51         DoYell(SAY_AGGRO, LANG_UNIVERSAL, NULL); 
     51        DoScriptText(SAY_AGGRO, m_creature); 
    5252    } 
    5353 
  • trunk/src/bindings/scripts/scripts/zone/hellfire_citadel/blood_furnace/boss_kelidan_the_breaker.cpp

    r90 r166  
    2929#include "precompiled.h" 
    3030 
    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 
    5141 
    5242#define SPELL_CORRUPTION            30938 
     
    8979    void Aggro(Unit *who) 
    9080    { 
    91         DoYell(SAY_WAKE, LANG_UNIVERSAL, NULL); 
    92         DoPlaySoundToSet(m_creature,SOUND_WAKE); 
     81        DoScriptText(SAY_WAKE, m_creature); 
    9382    } 
    9483 
     
    10089        switch(rand()%2) 
    10190        { 
    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; 
    11093        } 
    11194    } 
     
    11396    void JustDied(Unit* Killer) 
    11497    { 
    115         DoYell(SAY_DIE,LANG_UNIVERSAL,NULL); 
    116         DoPlaySoundToSet(m_creature,SOUND_DIE); 
     98        DoScriptText(SAY_DIE, m_creature); 
    11799    } 
    118100 
    119101    void UpdateAI(const uint32 diff) 
    120102    { 
    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) 
    127109            { 
    128110                DoCast(m_creature,HeroicMode ? H_SPELL_FIRE_NOVA : SPELL_FIRE_NOVA); 
     
    134116        } 
    135117 
    136         if( ShadowVolley_Timer < diff ) 
     118        if (ShadowVolley_Timer < diff) 
    137119        { 
    138120            DoCast(m_creature,HeroicMode ? H_SPELL_SHADOW_BOLT_VOLLEY : SPELL_SHADOW_BOLT_VOLLEY); 
     
    140122        }else ShadowVolley_Timer -=diff; 
    141123 
    142         if( Corruption_Timer < diff ) 
     124        if (Corruption_Timer < diff) 
    143125        { 
    144126            DoCast(m_creature,SPELL_CORRUPTION); 
     
    146128        }else Corruption_Timer -=diff; 
    147129 
    148         if( BurningNova_Timer < diff ) 
    149         { 
    150             if( m_creature->IsNonMeleeSpellCasted(false) ) 
     130        if (BurningNova_Timer < diff) 
     131        { 
     132            if (m_creature->IsNonMeleeSpellCasted(false)) 
    151133                m_creature->InterruptNonMeleeSpells(true); 
    152134 
    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) 
    157138                DoCast(m_creature,SPELL_VORTEX); 
    158139 
     
    213194    void UpdateAI(const uint32 diff) 
    214195    { 
    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)) 
    221202                DoCast(target,SPELL_MARK_OF_SHADOW); 
    222203            MarkOfShadow_Timer = 15000+rand()%5000; 
    223204        }else MarkOfShadow_Timer -=diff; 
    224205 
    225         if( ShadowBolt_Timer < diff ) 
     206        if (ShadowBolt_Timer < diff) 
    226207        { 
    227208            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  
    2424#include "precompiled.h" 
    2525 
     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 
    2633#define SPELL_ACID_SPRAY            38153                   // heroic 38973 ??? 38153 
    2734#define SPELL_EXPLODING_BREAKER     30925 
    2835#define SPELL_KNOCKDOWN             20276 
    2936#define SPELL_DOMINATION            25772                   // ??? 
    30  
    31 #define SAY_KILL_1          "Let's see what I can make of you." 
    32 #define SOUND_KILL_1        10289 
    33 #define SAY_KILL_2          "It is pointless to resist." 
    34 #define SOUND_KILL_2        10290 
    35  
    36 #define SAY_AGGRO_1         "My work must not be interrupted." 
    37 #define SOUND_AGGRO_1       10286 
    38 #define SAY_AGGRO_2         "Perhaps I can find a use for you." 
    39 #define SOUND_AGGRO_2       10287 
    40 #define SAY_AGGRO_3         "Anger... Hate... These are tools I can use." 
    41 #define SOUND_AGGRO_3       10288 
    42  
    43 #define SAY_DIE             "Stay away from... me." 
    44 #define SOUND_DIE           10291 
    4537 
    4638struct TRINITY_DLL_DECL boss_the_makerAI : public ScriptedAI 
     
    6557        switch(rand()%3) 
    6658        { 
    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; 
    7962        } 
    8063    } 
     
    8265    void KilledUnit(Unit* victim) 
    8366    { 
    84         if (rand()%5) 
    85             return; 
    86  
    8767        switch(rand()%2) 
    8868        { 
    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; 
    9771        } 
    9872    } 
     
    10074    void JustDied(Unit* Killer) 
    10175    { 
    102         DoYell(SAY_DIE,LANG_UNIVERSAL,NULL); 
    103         DoPlaySoundToSet(m_creature,SOUND_DIE); 
     76        DoScriptText(SAY_DIE, m_creature); 
    10477    } 
    10578 
     
    10982            return; 
    11083 
    111         if(AcidSpray_Timer < diff) 
     84        if (AcidSpray_Timer < diff) 
    11285        { 
    11386            DoCast(m_creature->getVictim(),SPELL_ACID_SPRAY); 
     
    11588        }else AcidSpray_Timer -=diff; 
    11689 
    117         if(ExplodingBreaker_Timer < diff) 
     90        if (ExplodingBreaker_Timer < diff) 
    11891        { 
    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); 
    12394            ExplodingBreaker_Timer = 4000+rand()%8000; 
    12495        }else ExplodingBreaker_Timer -=diff; 
     
    136107        */ 
    137108 
    138         if(Knockdown_Timer < diff) 
     109        if (Knockdown_Timer < diff) 
    139110        { 
    140111            DoCast(m_creature->getVictim(),SPELL_KNOCKDOWN); 
  • trunk/src/bindings/scripts/scripts/zone/hellfire_citadel/hellfire_ramparts/boss_omor_the_unscarred.cpp

    r158 r166  
    1818SDName: Boss_Omar_The_Unscarred 
    1919SD%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. 
     20SDComment: Temporary solution for orbital/shadow whip-ability. Needs more core support before making it more proper. 
    2121SDCategory: Hellfire Citadel, Hellfire Ramparts 
    2222EndScriptData */ 
    2323 
    2424#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 
    2534 
    2635#define SPELL_ORBITAL_STRIKE        30637 
     
    3342#define SPELL_SUMMON_FIENDISH_HOUND 30707 
    3443 
    35 #define SAY_AGGRO_1                 "You dare stand against me?!" 
    36 #define SOUND_AGGRO_1               10280 
    37 #define SAY_AGGRO_2                 "I will not be defeated!" 
    38 #define SOUND_AGGRO_2               10279 
    39 #define SAY_AGGRO_3                 "Your insolence will be your death." 
    40 #define SOUND_AGGRO_3               10281 
    41  
    42 #define SAY_SUMMON                  "Achor-she-ki! Feast my pet! Eat your fill!" 
    43 #define SOUND_SUMMON                10277 
    44  
    45 #define SAY_CURSE                   "A-Kreesh!" 
    46 #define SOUND_CURSE                 10278 
    47  
    48 #define SAY_KILL_1                  "Die, weakling!" 
    49 #define SOUND_KILL_1                10282 
    50  
    51 #define SAY_DIE                     "It is... not over." 
    52 #define SOUND_DIE                   10284 
    53  
    54 #define SAY_WIPE                    "I am victorious!" 
    55 #define SOUND_WIPE                  10283 
    56  
    5744struct TRINITY_DLL_DECL boss_omor_the_unscarredAI : public Scripted_NoMovementAI 
    5845{ 
    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; 
    6053 
    6154    uint32 OrbitalStrike_Timer; 
     
    6861    uint64 playerGUID; 
    6962    bool CanPullBack; 
    70     bool HeroicMode; 
    7163 
    7264    void Reset() 
    7365    { 
    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); 
    7867 
    7968        OrbitalStrike_Timer = 25000; 
     
    9281        switch(rand()%3) 
    9382        { 
    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; 
    10686        } 
    10787    } 
     
    11292            return; 
    11393 
    114         DoYell(SAY_KILL_1,LANG_UNIVERSAL,NULL); 
    115         DoPlaySoundToSet(m_creature,SOUND_KILL_1); 
     94        DoScriptText(SAY_KILL_1, m_creature); 
    11695    } 
    11796 
    11897    void JustSummoned(Creature* summoned) 
    11998    { 
    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)) 
    124102            summoned->AI()->AttackStart(random); 
    125103 
     
    129107    void JustDied(Unit* Killer) 
    130108    { 
    131         DoYell(SAY_DIE,LANG_UNIVERSAL,NULL); 
    132         DoPlaySoundToSet(m_creature,SOUND_DIE); 
     109        DoScriptText(SAY_DIE, m_creature); 
    133110    } 
    134111 
     
    139116 
    140117        //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) 
    144121            { 
    145122                m_creature->InterruptNonMeleeSpells(false); 
     
    149126        } 
    150127 
    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)) 
    156133                { 
    157134                    //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)) 
    159136                    { 
    160137                        m_creature->InterruptNonMeleeSpells(false); 
     
    167144            }else ShadowWhip_Timer -= diff; 
    168145        } 
    169         else if( OrbitalStrike_Timer < diff ) 
     146        else if (OrbitalStrike_Timer < diff) 
    170147        { 
    171148            Unit* temp = NULL; 
    172             if( m_creature->IsWithinCombatDist(m_creature->getVictim(), ATTACK_DISTANCE) ) 
     149            if (m_creature->IsWithinDistInMap(m_creature->getVictim(), ATTACK_DISTANCE)) 
    173150                temp = m_creature->getVictim(); 
    174151            else temp = SelectUnit(SELECT_TARGET_RANDOM,0); 
    175152 
    176             if( temp && temp->GetTypeId() == TYPEID_PLAYER ) 
     153            if (temp && temp->GetTypeId() == TYPEID_PLAYER) 
    177154            { 
    178155                DoCast(temp,SPELL_ORBITAL_STRIKE); 
    179156                OrbitalStrike_Timer = 14000+rand()%2000; 
    180157                playerGUID = temp->GetGUID(); 
    181                 if( playerGUID ) 
     158 
     159                if (playerGUID) 
    182160                    CanPullBack = true; 
    183161            } 
    184162        }else OrbitalStrike_Timer -= diff; 
    185163 
    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) 
    189167            { 
    190168                DoCast(m_creature,SPELL_DEMONIC_SHIELD); 
     
    193171        } 
    194172 
    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); 
    205180                Aura_Timer = 8000+rand()%8000; 
    206181            } 
    207182        }else Aura_Timer -= diff; 
    208183 
    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) 
    214189                    target = m_creature->getVictim(); 
    215190 
    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); 
    219192                Shadowbolt_Timer = 4000+rand()%2500; 
    220193            } 
  • trunk/src/bindings/scripts/scripts/zone/hellfire_citadel/hellfire_ramparts/boss_watchkeeper_gargolmar.cpp

    r109 r166  
    1818SDName: Boss_Watchkeeper_Gargolmar 
    1919SD%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. 
     20SDComment: Missing adds to heal him. Surge should be used on target furthest away, not random. 
    2121SDCategory: Hellfire Citadel, Hellfire Ramparts 
    2222EndScriptData */ 
     
    2424#include "precompiled.h" 
    2525 
    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 
    4735 
    4836#define SPELL_MORTAL_WOUND      30641 
     
    5341struct TRINITY_DLL_DECL boss_watchkeeper_gargolmarAI : public ScriptedAI 
    5442{ 
    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; 
    5650 
    5751    uint32 Surge_Timer; 
     
    6155    bool HasTaunted; 
    6256    bool YelledForHeal; 
    63     bool HeroicMode; 
    6457 
    6558    void Reset() 
    6659    { 
    67         HeroicMode = m_creature->GetMap()->IsHeroic(); 
    68  
    6960        Surge_Timer = 5000; 
    7061        MortalWound_Timer = 4000; 
     
    7970        switch(rand()%3) 
    8071        { 
    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; 
    9375        } 
    9476    } 
     
    9678    void MoveInLineOfSight(Unit* who) 
    9779    { 
    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) ) 
    9981        { 
    10082            if (!m_creature->canFly() && m_creature->GetDistanceZ(who) > CREATURE_Z_ATTACK_RANGE) 
     
    10284 
    10385            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)) 
    10587            { 
    10688                who->RemoveSpellsCausingAura(SPELL_AURA_MOD_STEALTH); 
     
    10991            else if (!HasTaunted && m_creature->IsWithinDistInMap(who, 60.0f)) 
    11092            { 
    111                 DoYell(SAY_TAUNT, LANG_UNIVERSAL, NULL); 
     93                DoScriptText(SAY_TAUNT, m_creature); 
    11294                HasTaunted = true; 
    11395            } 
     
    119101        switch(rand()%2) 
    120102        { 
    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; 
    129105        } 
    130106    } 
     
    132108    void JustDied(Unit* Killer) 
    133109    { 
    134         DoPlaySoundToSet(m_creature,SOUND_DIE); 
     110        DoScriptText(SAY_DIE, m_creature); 
    135111    } 
    136112 
     
    140116            return; 
    141117 
    142         if( MortalWound_Timer < diff ) 
     118        if (MortalWound_Timer < diff) 
    143119        { 
    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); 
    147121            MortalWound_Timer = 5000+rand()%8000; 
    148122        }else MortalWound_Timer -= diff; 
    149123 
    150         if( Surge_Timer < diff ) 
     124        if (Surge_Timer < diff) 
    151125        { 
    152             DoYell(SAY_SURGE, LANG_UNIVERSAL, NULL); 
    153             DoPlaySoundToSet(m_creature,SOUND_SURGE); 
     126            DoScriptText(SAY_SURGE, m_creature); 
    154127 
    155             if( Unit* target = SelectUnit(SELECT_TARGET_RANDOM,0) ) 
     128            if (Unit* target = SelectUnit(SELECT_TARGET_RANDOM,0)) 
    156129                DoCast(target,SPELL_SURGE); 
    157130 
     
    159132        }else Surge_Timer -= diff; 
    160133 
    161         if((m_creature->GetHealth()*100) / m_creature->GetMaxHealth() < 20) 
     134        if ((m_creature->GetHealth()*100) / m_creature->GetMaxHealth() < 20) 
    162135        { 
    163             if( Retaliation_Timer < diff ) 
     136            if (Retaliation_Timer < diff) 
    164137            { 
    165138                DoCast(m_creature,SPELL_RETALIATION); 
     
    168141        } 
    169142 
    170         if( !YelledForHeal ) 
    171             if((m_creature->GetHealth()*100) / m_creature->GetMaxHealth() < 40) 
     143        if (!YelledForHeal) 
    172144        { 
    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            } 
    176150        } 
    177151 
  • trunk/src/bindings/scripts/scripts/zone/hellfire_citadel/magtheridons_lair/boss_magtheridon.cpp

    r141 r166  
    2525#include "def_magtheridons_lair.h" 
    2626 
     27struct Yell 
     28{ 
     29    int32 id; 
     30}; 
     31 
     32static 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 
    2753#define MOB_MAGTHERIDON     17257 
    2854#define MOB_ROOM            17516 
     
    5884#define SPELL_FIRE_BLAST                        37110 
    5985 
    60 //Dialog 
    61 #define SAY_AGGRO                   "Thank you for releasing me. Now...die!" 
    62 #define SOUND_AGGRO                 10254 
    63 #define SAY_BANISH                  "Not again...NOT AGAIN!" 
    64 #define SOUND_BANISH                10256 
    65 #define SAY_FREED                   "I...am...UNLEASHED!!!" 
    66 #define SOUND_FREED                 10253 
    67 #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       10257 
    69 #define SAY_PLAYER_KILLED           "Did you think me weak? Soft? Who is the weak one now?!" 
    70 #define SOUND_PLAYER_KILLED         10255 
    71 #define SAY_DEATH                   "The Legion...will consume you...all...." 
    72 #define SOUND_DEATH                 10258  
    73 #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  
    7786// count of clickers needed to interrupt blast nova 
    7887#define CLICKERS_COUNT                          5 
    79  
    80 // Unkown sounds 
    81 uint32 RandomSound[] = {10247, 10248, 10249, 10250, 10251, 10252}; 
    8288 
    8389typedef std::map<uint64, uint64> CubeMap; 
     
    197203    uint32 Blaze_Timer; 
    198204    uint32 Debris_Timer; 
     205        uint32 RandChat_Timer; 
    199206 
    200207    bool Phase3; 
     
    215222        BlastNova_Timer = 60000; 
    216223        Cleave_Timer = 15000; 
     224        RandChat_Timer = 90000; 
    217225 
    218226        Phase3 = false; 
     
    262270        if(ClickerNum >= CLICKERS_COUNT && !m_creature->HasAura(SPELL_SHADOW_CAGE, 0)) 
    263271        { 
    264             DoYell(SAY_BANISH, LANG_UNIVERSAL, NULL); 
    265             DoPlaySoundToSet(m_creature, SOUND_BANISH);   
     272            DoScriptText(SAY_BANISH, m_creature); 
    266273            m_creature->CastSpell(m_creature, SPELL_SHADOW_CAGE, true); 
    267274        } 
     
    274281    void KilledUnit(Unit* victim) 
    275282    { 
    276         DoYell(SAY_PLAYER_KILLED, LANG_UNIVERSAL, NULL); 
    277         DoPlaySoundToSet(m_creature, SOUND_PLAYER_KILLED); 
     283        DoScriptText(SAY_PLAYER_KILLED, m_creature); 
    278284    } 
    279285 
     
    283289            pInstance->SetData(DATA_MAGTHERIDON_EVENT, DONE); 
    284290 
    285         DoYell(SAY_DEATH,LANG_UNIVERSAL, NULL); 
    286         DoPlaySoundToSet(m_creature, SOUND_DEATH); 
     291        DoScriptText(SAY_DEATH, m_creature); 
    287292    } 
    288293 
     
    304309        m_creature->RemoveAurasDueToSpell(SPELL_SHADOW_CAGE_C); 
    305310 
    306         DoYell(SAY_FREED, LANG_UNIVERSAL, NULL); 
    307         DoPlaySoundToSet(m_creature, SOUND_FREED);           
     311        DoScriptText(SAY_FREED, m_creature); 
    308312   } 
    309313 
    310314    void UpdateAI(const uint32 diff) 
    311315    { 
     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 
    312325        if(!m_creature->SelectHostilTarget() && !m_creature->getVictim()) 
    313326            return; 
     
    318331        { 
    319332            m_creature->CastSpell(m_creature, SPELL_BERSERK, true); 
    320             DoTextEmote(EMOTE_BERSERK, NULL); 
     333            DoScriptText(EMOTE_BERSERK, m_creature); 
    321334            Berserk_Timer = 60000; 
    322335        }else Berserk_Timer -= diff; 
     
    333346            if(!m_creature->hasUnitState(UNIT_STAT_STUNNED)) 
    334347            { 
    335                 DoTextEmote(EMOTE_BLASTNOVA, NULL); 
     348                DoScriptText(EMOTE_BLASTNOVA, m_creature); 
    336349                DoCast(m_creature, SPELL_BLASTNOVA); 
    337350                BlastNova_Timer = 60000; 
     
    371384        {                         
    372385            Phase3 = true; 
    373             DoYell(SAY_CHAMBER_DESTROY, LANG_UNIVERSAL, NULL); 
    374             DoPlaySoundToSet(m_creature, SOUND_CHAMBER_DESTROY); 
     386            DoScriptText(SAY_CHAMBER_DESTROY, m_creature); 
    375387            m_creature->CastSpell(m_creature, SPELL_CAMERA_SHAKE, true); 
    376388            m_creature->CastSpell(m_creature, SPELL_DEBRIS_KNOCKDOWN, true); 
  • trunk/src/bindings/scripts/scripts/zone/hellfire_citadel/shattered_halls/boss_nethekurse.cpp

    r109 r166  
    1818SDName: Boss_Grand_Warlock_Nethekurse 
    1919SD%Complete: 75 
    20 SDComment: encounter not fully complete. missing part where boss kill minions. 
     20SDComment: encounter not fully completed. missing part where boss kill minions. 
    2121SDCategory: Hellfire Citadel, Shattered Halls 
    2222EndScriptData */ 
     
    3333struct Say 
    3434{ 
    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}; 
    4137 
    4238static Say PeonAttacked[]= 
    4339{ 
    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}, 
    4844}; 
    4945static Say PeonDies[]= 
    5046{ 
    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 
    7863 
    7964#define SPELL_DEATH_COIL            30500 
     
    9479    { 
    9580        pInstance = ((ScriptedInstance*)c->GetInstanceData()); 
     81        HeroicMode = m_creature->GetMap()->IsHeroic(); 
    9682        Reset(); 
    9783    } 
    9884 
    9985    ScriptedInstance* pInstance; 
    100  
    10186    bool HeroicMode; 
     87 
    10288    bool IntroOnce; 
    10389    bool IsIntroEvent; 
     
    119105        m_creature->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE); 
    120106 
    121         HeroicMode = m_creature->GetMap()->IsHeroic(); 
    122107        IsIntroEvent = false; 
    123108        IntroOnce = false; 
     
    138123    void DoYellForPeonAggro() 
    139124    { 
    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); 
    145129        ++PeonEngagedCount; 
    146130    } 
     
    148132    void DoYellForPeonDeath() 
    149133    { 
    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); 
    155138        ++PeonKilledCount; 
    156139 
    157         if( PeonKilledCount == 4 ) 
     140        if (PeonKilledCount == 4) 
    158141        { 
    159142            IsIntroEvent = false; 
     
    167150        switch(rand()%3) 
    168151        { 
    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; 
    181155        } 
    182156 
     
    191165    void AttackStart(Unit* who) 
    192166    { 
    193         if ( IsIntroEvent || !IsMainEvent ) 
     167        if (IsIntroEvent || !IsMainEvent) 
    194168            return; 
    195169 
     
    213187    void MoveInLineOfSight(Unit *who) 
    214188    { 
    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); 
    221194                IntroOnce = true; 
    222195                IsIntroEvent = true; 
    223196 
    224                 if( pInstance ) 
     197                if (pInstance) 
    225198                    pInstance->SetData(TYPE_NETHEKURSE,IN_PROGRESS); 
    226199            } 
    227200 
    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 ) 
    229202                return; 
    230203 
    231             if( IsIntroEvent || !IsMainEvent ) 
     204            if (IsIntroEvent || !IsMainEvent) 
    232205                return; 
    233206 
    234207            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) ) 
    236209            { 
    237210                who->RemoveSpellsCausingAura(SPELL_AURA_MOD_STEALTH); 
     
    245218        switch(rand()%3) 
    246219        { 
    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; 
    259223        } 
    260224    } 
     
    271235        switch(rand()%2) 
    272236        { 
    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; 
    281239        } 
    282240    } 
     
    284242    void JustDied(Unit* Killer) 
    285243    { 
    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) 
    290247            return; 
    291248 
    292249        pInstance->SetData(TYPE_NETHEKURSE,DONE); 
    293250 
    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))) 
    297254                Door->SetGoState(0); 
    298255        } 
     
    301258    void UpdateAI(const uint32 diff) 
    302259    { 
    303         if( IsIntroEvent ) 
    304         { 
    305             if( !pInstance ) 
     260        if (IsIntroEvent) 
     261        { 
     262            if (!pInstance) 
    306263                return; 
    307264 
    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) 
    311268                { 
    312269                    DoTauntPeons(); 
     
    315272        } 
    316273 
    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) 
    326283            { 
    327284                DoCast(m_creature->getVictim(),SPELL_DARK_SPIN); 
     
    329286            } 
    330287 
    331             if( Cleave_Timer < diff ) 
     288            if (Cleave_Timer < diff) 
    332289            { 
    333290                DoCast(m_creature->getVictim(),(HeroicMode ? H_SPELL_SHADOW_SLAM : SPELL_SHADOW_CLEAVE)); 
     
    337294        else 
    338295        { 
    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)) 
    342299                    DoCast(target,SPELL_SHADOW_FISSURE); 
    343300                ShadowFissure_Timer = 7500+rand()%7500; 
    344301            }else ShadowFissure_Timer -= diff; 
    345302 
    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)) 
    349306                    DoCast(target,SPELL_DEATH_COIL); 
    350307                DeathCoil_Timer = 15000+rand()%5000; 
    351308            }else DeathCoil_Timer -= diff; 
    352309 
    353             if( (m_creature->GetHealth()*100) / m_creature->GetMaxHealth() <= 20 ) 
     310            if ((m_creature->GetHealth()*100) / m_creature->GetMaxHealth() <= 20) 
    354311                Phase = true; 
    355312 
     
    383340    void Aggro(Unit* who) 
    384341    { 
    385         if( pInstance ) 
    386         { 
    387             if( pInstance->GetData64(DATA_NETHEKURSE) ) 
     342        if (pInstance) 
     343        { 
     344            if (pInstance->GetData64(DATA_NETHEKURSE)) 
    388345            { 
    389346                Creature *pKurse = (Creature*)Unit::GetUnit(*m_creature,pInstance->GetData64(DATA_NETHEKURSE)); 
    390                 if( pKurse ) 
     347                if (pKurse) 
    391348                    ((boss_grand_warlock_nethekurseAI*)pKurse->AI())->DoYellForPeonAggro(); 
    392349            } 
    393350 
    394             if( pInstance->GetData(TYPE_NETHEKURSE) == IN_PROGRESS ) 
     351            if (pInstance->GetData(TYPE_NETHEKURSE) == IN_PROGRESS ) 
    395352                return; 
    396353            else pInstance->SetData(TYPE_NETHEKURSE,IN_PROGRESS); 
     
    400357    void JustDied(Unit* Killer) 
    401358    { 
    402         if( pInstance ) 
    403         { 
    404             if( pInstance->GetData64(DATA_NETHEKURSE) ) 
     359        if (pInstance) 
     360        { 
     361            if (pInstance->GetData64(DATA_NETHEKURSE)) 
    405362            { 
    406363                Creature *pKurse = (Creature*)Unit::GetUnit(*m_creature,pInstance->GetData64(DATA_NETHEKURSE)); 
    407                 if( pKurse ) 
     364                if (pKurse) 
    408365                    ((boss_grand_warlock_nethekurseAI*)pKurse->AI())->DoYellForPeonDeath(); 
    409366            } 
     
    413370    void UpdateAI(const uint32 diff) 
    414371    { 
    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) 
    419376        { 
    420377            DoCast(m_creature->getVictim(),SPELL_HEMORRHAGE); 
     
    448405    void UpdateAI(const uint32 diff) 
    449406    { 
    450         if( !Start ) 
     407        if (!Start) 
    451408        { 
    452409            //triggered spell of consumption does not properly show it's SpellVisual, hack it a bit 
     
    456413        } 
    457414 
    458         if( Stop_Timer < diff) 
     415        if (Stop_Timer < diff) 
    459416        { 
    460417            m_creature->setDeathState(JUST_DIED); 
  • trunk/src/bindings/scripts/scripts/zone/hellfire_citadel/shattered_halls/boss_warbringer_omrogg.cpp

    r90 r166  
    3535struct Yell 
    3636{ 
    37     const char* text; 
    38     uint32 sound; 
     37    int32 id; 
    3938    uint32 creature; 
    4039}; 
     
    4241static Yell GoCombat[]= 
    4342{ 
    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}, 
    4746}; 
    4847static Yell GoCombatDelay[]= 
    4948{ 
    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}, 
    5352}; 
    5453 
    5554static Yell Threat[]= 
    5655{ 
    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}, 
    6160}; 
    6261static Yell ThreatDelay1[]= 
    6362{ 
    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}, 
    6867}; 
    6968static Yell ThreatDelay2[]= 
    7069{ 
    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}, 
    7574}; 
    7675 
    7776static Yell Killing[]= 
    7877{ 
    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}, 
    8180}; 
    8281static Yell KillingDelay[]= 
    8382{ 
    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 
    9490 
    9591#define SPELL_BLAST_WAVE            30600 
     
    118114    void UpdateAI(const uint32 diff) 
    119115    { 
    120         if( !DeathYell ) 
     116        if (!DeathYell) 
    121117            return; 
    122118 
    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); 
    127122            DeathYell = false; 
    128123        }else Death_Timer -= diff; 
     
    140135 
    141136    ScriptedInstance* pInstance; 
     137    bool HeroicMode; 
    142138 
    143139    uint64 LeftHead; 
     
    147143    int ikilling; 
    148144 
    149     bool HeroicMode; 
    150145    bool AggroYell; 
    151146    bool ThreatYell; 
     
    182177        ResetThreat_Timer = 30000; 
    183178 
    184         if( pInstance ) 
     179        if (pInstance) 
    185180            pInstance->SetData(TYPE_OMROGG, NOT_STARTED);   //End boss can use this later. O'mrogg must be defeated(DONE) or he will come to aid. 
    186181    } 
     
    188183    void DoYellForThreat() 
    189184    { 
    190         if( LeftHead && RightHead ) 
     185        if (LeftHead && RightHead) 
    191186        { 
    192187            Unit *Left  = Unit::GetUnit(*m_creature,LeftHead); 
    193188            Unit *Right = Unit::GetUnit(*m_creature,RightHead); 
    194189 
    195             if( !Left && !Right ) 
     190            if (!Left && !Right) 
    196191                return; 
    197192 
     
    200195            Unit *source = (Left->GetEntry() == Threat[ithreat].creature ? Left : Right); 
    201196 
    202             source->MonsterYell(Threat[ithreat].text, LANG_UNIVERSAL, 0); 
    203             DoPlaySoundToSet(source, Threat[ithreat].sound); 
     197            DoScriptText(Threat[ithreat].id, source); 
    204198 
    205199            Delay_Timer = 3500; 
     
    213207        DoSpawnCreature(ENTRY_RIGHT_HEAD,0,0,0,0,TEMPSUMMON_TIMED_DESPAWN,1800000); 
    214208 
    215         if( Unit *Left = Unit::GetUnit(*m_creature,LeftHead) ) 
     209        if (Unit *Left = Unit::GetUnit(*m_creature,LeftHead)) 
    216210        { 
    217211            iaggro = rand()%3; 
    218212 
    219             Left->MonsterYell(GoCombat[iaggro].text, LANG_UNIVERSAL, 0); 
    220             DoPlaySoundToSet(Left, GoCombat[iaggro].sound); 
     213            DoScriptText(GoCombat[iaggro].id, Left); 
    221214 
    222215            Delay_Timer = 3500; 
    223216            AggroYell = true; 
    224217        } 
    225         if( pInstance ) 
     218 
     219        if (pInstance) 
    226220            pInstance->SetData(TYPE_OMROGG, IN_PROGRESS); 
    227221    } 
     
    229223    void JustSummoned(Creature *summoned) 
    230224    { 
    231         if( summoned->GetEntry() == ENTRY_LEFT_HEAD ) 
     225        if (summoned->GetEntry() == ENTRY_LEFT_HEAD) 
    232226            LeftHead = summoned->GetGUID(); 
    233227 
    234         if( summoned->GetEntry() == ENTRY_RIGHT_HEAD ) 
     228        if (summoned->GetEntry() == ENTRY_RIGHT_HEAD) 
    235229            RightHead = summoned->GetGUID(); 
    236230 
     
    242236    void KilledUnit(Unit* victim) 
    243237    { 
    244         if( LeftHead && RightHead ) 
     238        if (LeftHead && RightHead) 
    245239        { 
    246240            Unit *Left  = Unit::GetUnit(*m_creature,LeftHead); 
    247241            Unit *Right = Unit::GetUnit(*m_creature,RightHead); 
    248242 
    249             if( !Left && !Right ) 
     243            if (!Left && !Right) 
    250244                return; 
    251245 
     
    257251            { 
    258252                case 0: 
    259                     source->MonsterYell(Killing[ikilling].text, LANG_UNIVERSAL, 0); 
    260                     DoPlaySoundToSet(source, Killing[ikilling].sound); 
     253                    DoScriptText(Killing[ikilling].id, source); 
    261254                    Delay_Timer = 3500; 
    262255                    KillingYell = true; 
    263256                    break; 
    264257                case 1: 
    265                     source->MonsterYell(Killing[ikilling].text, LANG_UNIVERSAL, 0); 
    266                     DoPlaySoundToSet(source, Killing[ikilling].sound); 
     258                    DoScriptText(Killing[ikilling].id, source); 
    267259                    KillingYell = false; 
    268260                    break; 
     
    273265    void JustDied(Unit* Killer) 
    274266    { 
    275         if( LeftHead && RightHead ) 
     267        if (LeftHead && RightHead) 
    276268        { 
    277269            Unit *Left  = Unit::GetUnit(*m_creature,LeftHead); 
    278270            Unit *Right = Unit::GetUnit(*m_creature,RightHead); 
    279271 
    280             if( !Left && !Right ) 
     272            if (!Left && !Right) 
    281273                return; 
    282274 
    283             Left->MonsterYell(YELL_DIE_L, LANG_UNIVERSAL, 0); 
    284             DoPlaySoundToSet(Left,SOUND_DIE_L); 
     275            DoScriptText(YELL_DIE_L, Left); 
    285276 
    286277            ((mob_omrogg_headsAI*)((Creature*)Right)->AI())->DoDeathYell(); 
    287278        } 
    288         if( pInstance ) 
     279 
     280        if (pInstance) 
    289281            pInstance->SetData(TYPE_OMROGG, DONE); 
    290282    } 
     
    292284    void UpdateAI(const uint32 diff) 
    293285    { 
    294         if( Delay_Timer < diff ) 
     286        if (Delay_Timer < diff) 
    295287        { 
    296288            Delay_Timer = 3500; 
    297289 
    298             if( !LeftHead && !RightHead ) 
     290            if (!LeftHead && !RightHead) 
    299291                return; 
    300292 
     
    302294            Unit *Right = Unit::GetUnit(*m_creature,RightHead); 
    303295 
    304             if( !Left && !Right ) 
     296            if (!Left && !Right) 
    305297                return; 
    306298 
    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); 
    311302                AggroYell = false; 
    312303            } 
    313304 
    314             if( ThreatYell2 ) 
     305            if (ThreatYell2) 
    315306            { 
    316307                Unit *source = (Left->GetEntry() == ThreatDelay2[ithreat].creature ? Left : Right); 
    317308 
    318                 source->MonsterYell(ThreatDelay2[ithreat].text, LANG_UNIVERSAL, 0); 
    319                 DoPlaySoundToSet(source, ThreatDelay2[ithreat].sound); 
     309                DoScriptText(ThreatDelay2[ithreat].id, source); 
    320310                ThreatYell2 = false; 
    321311            } 
    322312 
    323             if( ThreatYell ) 
     313            if (ThreatYell) 
    324314            { 
    325315                Unit *source = (Left->GetEntry() == ThreatDelay1[ithreat].creature ? Left : Right); 
    326316 
    327                 source->MonsterYell(ThreatDelay1[ithreat].text, LANG_UNIVERSAL, 0); 
    328                 DoPlaySoundToSet(source, ThreatDelay1[ithreat].sound); 
     317                DoScriptText(ThreatDelay1[ithreat].id, source); 
    329318                ThreatYell = false; 
    330319                ThreatYell2 = true; 
    331320            } 
    332321 
    333             if( KillingYell ) 
     322            if (KillingYell) 
    334323            { 
    335324                Unit *source = (Left->GetEntry() == KillingDelay[ikilling].creature ? Left : Right); 
    336325 
    337                 source->MonsterYell(KillingDelay[ikilling].text, LANG_UNIVERSAL, 0); 
    338                 DoPlaySoundToSet(source, KillingDelay[ikilling].sound); 
     326                DoScriptText(KillingDelay[ikilling].id, source); 
    339327                KillingYell = false; 
    340328            } 
    341329        }else Delay_Timer -= diff; 
    342330 
    343         if( !m_creature->SelectHostilTarget() || !m_creature->getVictim() ) 
     331        if (!m_creature->SelectHostilTarget() || !m_creature->getVictim()) 
    344332            return; 
    345333 
    346         if( BlastCount && BlastWave_Timer <= diff ) 
     334        if (BlastCount && BlastWave_Timer <= diff) 
    347335        { 
    348336            DoCast(m_creature,SPELL_BLAST_WAVE); 
    349337            BlastWave_Timer = 5000; 
    350338            ++BlastCount; 
    351             if( BlastCount == 3 ) 
     339 
     340            if (BlastCount == 3) 
    352341                BlastCount = 0; 
    353342        }else BlastWave_Timer -= diff; 
    354343 
    355         if( BurningMaul_Timer < diff ) 
    356         { 
    357             DoTextEmote(EMOTE_ENRAGE,NULL); 
     344        if (BurningMaul_Timer < diff) 
     345        { 
     346            DoScriptText(EMOTE_ENRAGE, m_creature); 
    358347            DoCast(m_creature,HeroicMode ? H_SPELL_BURNING_MAUL : SPELL_BURNING_MAUL); 
    359348            BurningMaul_Timer = 40000; 
     
    362351        }else BurningMaul_Timer -= diff; 
    363352 
    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)) 
    367356            { 
    368357                DoYellForThreat(); 
     
    373362        }else ResetThreat_Timer -= diff; 
    374363 
    375         if( Fear_Timer < diff ) 
     364        if (Fear_Timer < diff) 
    376365        { 
    377366            DoCast(m_creature,SPELL_FEAR); 
     
    379368        }else Fear_Timer -= diff; 
    380369 
    381         if( ThunderClap_Timer < diff ) 
     370        if (ThunderClap_Timer < diff) 
    382371        { 
    383372            DoCast(m_creature,SPELL_THUNDERCLAP);