Changeset 63

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

[svn] Recalculate attack time in Unit::ApplyAttackTimePercentMod? function.
Add Felmyst script.
Add Eredar twins script. Script provided by BroodWyrm?.
Update Brutallus script. Patch provided by riddick. (Burn temporarily disabled)
Update void reaver script. Patch provided by Bagsac.
Fix a bug that Najentus causes server crash.

Original author: megamage
Date: 2008-10-19 12:01:49-05:00

Location:
trunk/src
Files:
3 added
8 modified

Legend:

Unmodified
Added
Removed
  • trunk/src/bindings/scripts/Makefile.am

    r53 r63  
    324324scripts/zone/stratholme/instance_stratholme.cpp \ 
    325325scripts/zone/stratholme/stratholme.cpp \ 
     326scripts/zone/sunwell_plateau/boss_eredar_twins.cpp \ 
     327scripts/zone/sunwell_plateau/boss_felmyst.cpp \ 
    326328scripts/zone/sunwell_plateau/boss_brutallus.cpp \ 
    327329scripts/zone/sunwell_plateau/boss_kalecgos.cpp \ 
  • trunk/src/bindings/scripts/VC71/71ScriptDev2.vcproj

    r53 r63  
    19241924                                        <File 
    19251925                                                RelativePath="..\scripts\zone\sunwell_plateau\boss_brutallus.cpp" 
     1926                                                > 
     1927                                        </File> 
     1928                                        <File 
     1929                                                RelativePath="..\scripts\zone\sunwell_plateau\boss_eredar_twins.cpp" 
     1930                                                > 
     1931                                        </File> 
     1932                                        <File 
     1933                                                RelativePath="..\scripts\zone\sunwell_plateau\boss_felmyst.cpp" 
    19261934                                                > 
    19271935                                        </File> 
  • trunk/src/bindings/scripts/VC80/80ScriptDev2.vcproj

    r53 r63  
    21572157                                        <File 
    21582158                                                RelativePath="..\scripts\zone\sunwell_plateau\boss_brutallus.cpp" 
     2159                                                > 
     2160                                        </File> 
     2161                                        <File 
     2162                                                RelativePath="..\scripts\zone\sunwell_plateau\boss_eredar_twins.cpp" 
     2163                                                > 
     2164                                        </File> 
     2165                                        <File 
     2166                                                RelativePath="..\scripts\zone\sunwell_plateau\boss_felmyst.cpp" 
    21592167                                                > 
    21602168                                        </File> 
  • trunk/src/bindings/scripts/VC90/90ScriptDev2.vcproj

    r53 r63  
    21552155                                        <File 
    21562156                                                RelativePath="..\scripts\zone\sunwell_plateau\boss_brutallus.cpp" 
     2157                                                > 
     2158                                        </File> 
     2159                                        <File 
     2160                                                RelativePath="..\scripts\zone\sunwell_plateau\boss_eredar_twins.cpp" 
     2161                                                > 
     2162                                        </File> 
     2163                                        <File 
     2164                                                RelativePath="..\scripts\zone\sunwell_plateau\boss_felmyst.cpp" 
    21572165                                                > 
    21582166                                        </File> 
  • trunk/src/bindings/scripts/scripts/zone/black_temple/boss_warlord_najentus.cpp

    r58 r63  
    169169        if(TidalShieldTimer < diff) 
    170170        { 
    171             m_creature->InterruptNonMeleeSpells(false); 
    172             DoCast(m_creature, SPELL_TIDAL_SHIELD, true); 
     171            m_creature->CastSpell(m_creature, SPELL_TIDAL_SHIELD, true); 
    173172            ResetTimer(45000); 
    174173        }else TidalShieldTimer -= diff; 
     
    187186            for(uint8 i = 0; i < 3; ++i) 
    188187            { 
    189                 Unit* target = SelectUnit(SELECT_TARGET_RANDOM, 1); 
    190                 if(!target) target = m_creature->getVictim(); 
    191                 m_creature->CastSpell(target, SPELL_NEEDLE_SPINE, true); 
    192             } 
    193             m_creature->SetInFront(m_creature->getVictim()); 
     188                if(Unit* target = SelectUnit(SELECT_TARGET_RANDOM, 0))  
     189                    m_creature->CastSpell(target, SPELL_NEEDLE_SPINE, true); 
     190            } 
    194191            NeedleSpineTimer = 30000; 
    195192        }else NeedleSpineTimer -= diff; 
     
    214211            Unit* target = SelectUnit(SELECT_TARGET_RANDOM, 1); 
    215212            if(!target) target = m_creature->getVictim(); 
    216             m_creature->CastSpell(target, SPELL_IMPALING_SPINE, true); 
    217             m_creature->SetInFront(m_creature->getVictim()); 
    218             SpineTargetGUID = target->GetGUID(); 
    219             //must let target summon, otherwise you cannot click the spine 
    220             target->SummonGameObject(GOBJECT_SPINE, target->GetPositionX(), target->GetPositionY(), target->GetPositionZ(), m_creature->GetOrientation(), 0, 0, 0, 0, 30); 
    221  
    222             switch(rand()%2) 
    223             { 
    224             case 0: 
    225                 DoYell(SAY_NEEDLE1, LANG_UNIVERSAL, NULL); 
    226                 DoPlaySoundToSet(m_creature, SOUND_NEEDLE1); 
    227                 break; 
    228             case 1: 
    229                 DoYell(SAY_NEEDLE2, LANG_UNIVERSAL, NULL); 
    230                 DoPlaySoundToSet(m_creature, SOUND_NEEDLE2); 
    231                 break; 
    232             } 
    233             ImpalingSpineTimer = 21000; 
     213            if(target) 
     214            { 
     215                m_creature->CastSpell(target, SPELL_IMPALING_SPINE, true); 
     216                SpineTargetGUID = target->GetGUID(); 
     217                //must let target summon, otherwise you cannot click the spine 
     218                target->SummonGameObject(GOBJECT_SPINE, target->GetPositionX(), target->GetPositionY(), target->GetPositionZ(), m_creature->GetOrientation(), 0, 0, 0, 0, 30); 
     219 
     220                switch(rand()%2) 
     221                { 
     222                case 0: 
     223                    DoYell(SAY_NEEDLE1, LANG_UNIVERSAL, NULL); 
     224                    DoPlaySoundToSet(m_creature, SOUND_NEEDLE1); 
     225                    break; 
     226                case 1: 
     227                    DoYell(SAY_NEEDLE2, LANG_UNIVERSAL, NULL); 
     228                    DoPlaySoundToSet(m_creature, SOUND_NEEDLE2); 
     229                    break; 
     230                } 
     231                ImpalingSpineTimer = 21000; 
     232            } 
    234233        }else ImpalingSpineTimer -= diff; 
    235234 
  • trunk/src/bindings/scripts/scripts/zone/sunwell_plateau/boss_brutallus.cpp

    r48 r63  
    1 /* Copyright © 2006,2007 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> 
     1/* Copyright ?2006,2007 ScriptDev2 <https://scriptdev2.svn.sourceforge.net/> 
    22 * This program is free software; you can redistribute it and/or modify 
    33 * it under the terms of the GNU General Public License as published by 
     
    1717/* ScriptData 
    1818SDName: Boss_Brutallus 
    19 SD%Complete: 80 
    20 SDComment: Needs intro. Talk to the dragon. 
     19SD%Complete: 90 
     20SDComment: Burn gets casted on himself and intro is missing. 
    2121EndScriptData */ 
    2222 
     
    2525 
    2626// Yells and Sounds used by boss. 
    27 #define YELL_AGGRO "Ahh! More lambs to the slaughter!" 
    28 #define SOUND_AGGRO 12463 
     27#define YELL_AGGRO                      "Ahh! More lambs to the slaughter!" 
     28#define SOUND_AGGRO             12463 
    2929 
    30 #define YELL_BERSERK "So much for a real challenge... Die!" 
    31 #define SOUND_BERSERK 12470 
     30#define YELL_BERSERK            "So much for a real challenge... Die!" 
     31#define SOUND_BERSERK           12470 
    3232 
    33 #define YELL_KILL1 "Perish, insect!" 
    34 #define SOUND_KILL1 12464 
     33#define YELL_KILL1                      "Perish, insect!" 
     34#define SOUND_KILL1             12464 
    3535 
    36 #define YELL_KILL2 "You are meat!" 
    37 #define SOUND_KILL2 12465 
     36#define YELL_KILL2                      "You are meat!" 
     37#define SOUND_KILL2             12465 
     38         
     39#define YELL_KILL3                      "Too easy!" 
     40#define SOUND_KILL3             12466 
    3841 
    39 #define YELL_KILL3 "Too easy!" 
    40 #define SOUND_KILL3 12466 
     42#define YELL_CHARGE             "I will crush you!" 
     43#define SOUND_CHARGE            12460 
    4144 
    42 #define YELL_CHARGE "I will crush you!"                     //I think it use this for stomp. No? 
    43 #define SOUND_CHARGE 12460 
     45#define YELL_DEATH                      "Gah! Well done... Now... this gets... interesting..." 
     46#define SOUND_DEATH             12471 
    4447 
    45 #define YELL_DEATH "Gah! Well done... Now... this gets... interesting..." 
    46 #define SOUND_DEATH 12471 
     48#define YELL_LOVE1                      "Bring the fight to me!" 
     49#define SOUND_LOVE1             12467 
    4750 
    48 #define YELL_LOVE1 "Bring the fight to me!" 
    49 #define SOUND_LOVE1 12467 
     51#define YELL_LOVE2                      "Another day, another glorious battle!" 
     52#define SOUND_LOVE2             12468 
    5053 
    51 #define YELL_LOVE2 "Another day, another glorious battle!" 
    52 #define SOUND_LOVE2 12468 
    53  
    54 #define YELL_LOVE3 "I live for this!" 
    55 #define SOUND_LOVE3 12469 
     54#define YELL_LOVE3                      "I live for this!" 
     55#define SOUND_LOVE3             12469 
    5656 
    5757// Boss spells. 
    58 #define METEOR_SLASH 45150 
    59 #define BURN 46394 
    60 #define STOMP 45185 
    61 #define BERSERK 26662 
     58#define SPELL_METEOR_SLASH              45150 
     59#define SPELL_BURN                              46394 
     60#define SPELL_STOMP                     45185 
     61#define SPELL_BERSERK                   26662 
    6262 
    6363struct TRINITY_DLL_DECL boss_brutallusAI : public ScriptedAI 
     
    6969    uint32 StompTimer; 
    7070    uint32 BerserkTimer; 
    71     uint32 LoveTimer; 
    7271 
    7372    void Reset() 
     
    7776        BurnTimer = 60000; 
    7877        BerserkTimer = 360000; 
    79         LoveTimer = 10000 + rand()%7000; 
    8078    } 
    8179 
     
    116114            return; 
    117115 
    118         if(LoveTimer < diff) 
    119         { 
    120             switch(rand()%3) 
    121             { 
    122                 case 0: 
    123                     DoYell(YELL_LOVE1,LANG_UNIVERSAL, NULL); 
    124                     DoPlaySoundToSet(m_creature, SOUND_LOVE1); 
    125                     break; 
    126                 case 1: 
    127                     DoYell(YELL_LOVE2,LANG_UNIVERSAL, NULL); 
    128                     DoPlaySoundToSet(m_creature, SOUND_LOVE2); 
    129                     break; 
    130                 case 2: 
    131                     DoYell(YELL_LOVE3,LANG_UNIVERSAL, NULL); 
    132                     DoPlaySoundToSet(m_creature, SOUND_LOVE3); 
    133                     break; 
    134             } 
    135             LoveTimer = 15000 + rand()%8000; 
    136         }else LoveTimer -= diff; 
    137  
    138116        if(SlashTimer < diff) 
    139117        { 
    140             DoCast(m_creature->getVictim(),METEOR_SLASH); 
     118            DoCast(m_creature->getVictim(),SPELL_METEOR_SLASH); 
    141119            SlashTimer = 11000; 
    142120        }else SlashTimer -= diff; 
     
    144122        if(StompTimer < diff) 
    145123        { 
    146             DoYell(YELL_CHARGE,LANG_UNIVERSAL, NULL); 
    147             DoPlaySoundToSet(m_creature, SOUND_CHARGE); 
    148             Unit *Target = m_creature->getVictim(); 
    149             DoCast(Target,STOMP); 
     124                        switch(rand()%3) 
     125                        { 
     126                                case 0: 
     127                                        DoYell(YELL_LOVE1,LANG_UNIVERSAL, NULL); 
     128                                        DoPlaySoundToSet(m_creature, SOUND_LOVE1); 
     129                                        break; 
     130                                case 1: 
     131                                        DoYell(YELL_LOVE2,LANG_UNIVERSAL, NULL); 
     132                                        DoPlaySoundToSet(m_creature, SOUND_LOVE2); 
     133                                        break; 
     134                                case 2: 
     135                                        DoYell(YELL_LOVE3,LANG_UNIVERSAL, NULL); 
     136                                        DoPlaySoundToSet(m_creature, SOUND_LOVE3); 
     137                                        break; 
     138                        } 
     139             
     140                        Unit *Target = m_creature->getVictim(); 
     141            DoCast(Target,SPELL_STOMP); 
    150142            if(Target->HasAura(45151,0)) Target->RemoveAura(45151,0); 
    151143            StompTimer = 30000; 
     
    155147        { 
    156148            Unit *target = SelectUnit(SELECT_TARGET_RANDOM, 0); 
    157             DoCast(target,BURN); 
    158             BurnTimer = 60000; 
     149            //DoCast(target,SPELL_BURN); 
     150                        BurnTimer = 60000; 
    159151        } 
    160152        else BurnTimer -= diff; 
     
    166158            DoYell(YELL_BERSERK,LANG_UNIVERSAL, NULL); 
    167159            DoPlaySoundToSet(m_creature, SOUND_BERSERK); 
    168             DoCast(m_creature,BERSERK); 
     160            DoCast(m_creature,SPELL_BERSERK); 
    169161            BerserkTimer = 20000; 
    170162        } 
  • trunk/src/bindings/scripts/scripts/zone/tempest_keep/the_eye/boss_void_reaver.cpp

    r57 r63  
    2727#define SPELL_POUNDING              34162 
    2828#define SPELL_ARCANE_ORB            34172 
    29 #define SPELL_KNOCK_AWAY            11130 
     29#define SPELL_KNOCK_AWAY            25778 
    3030#define SPELL_BERSERK               27680 
    3131 
  • trunk/src/game/Unit.cpp

    r61 r63  
    1064810648void Unit::ApplyAttackTimePercentMod( WeaponAttackType att,float val, bool apply ) 
    1064910649{ 
     10650    float remainingTimePct = (float)m_attackTimer[att] / (GetAttackTime(att) * m_modAttackSpeedPct[att]); 
    1065010651    if(val > 0) 
    1065110652    { 
     
    1065810659        ApplyPercentModFloatValue(UNIT_FIELD_BASEATTACKTIME+att,-val,apply); 
    1065910660    } 
     10661    m_attackTimer[att] = uint32(GetAttackTime(att) * m_modAttackSpeedPct[att] * remainingTimePct); 
    1066010662} 
    1066110663