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

[svn] Continue the work of rewriting spell target selection functions (warning: this may cause some spells broken).
Add some spell_script_target.
Delete some workaround in scripts (since core provides spell support now).

Original author: megamage
Date: 2008-10-25 10:37:28-05:00

Location:
trunk/src/bindings/scripts/scripts/zone/black_temple
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • trunk/src/bindings/scripts/scripts/zone/black_temple/boss_illidan.cpp

    r106 r108  
    9797//Phase Normal spells 
    9898#define SPELL_FLAME_CRASH_EFFECT        40836 // Firey blue ring of circle that the other flame crash summons 
     99#define SPELL_SUMMON_SHADOWDEMON        41117 // Summon four shadowfiends 
    99100#define SPELL_SHADOWFIEND_PASSIVE       41913 // Passive aura for shadowfiends 
    100101#define SPELL_SHADOW_DEMON_PASSIVE      41079 // Adds the "shadowform" aura to Shadow Demons. 
     
    386387    void Reset(); 
    387388 
    388     void JustSummoned(Creature* summon)//, TempSummonType type) 
    389     { 
    390         if(summon->GetCreatureInfo()->Entry == FLAME_CRASH) 
    391         { 
    392         //    type = TEMPSUMMON_TIMED_DESPAWN; 
    393         } 
    394         //error_log("justsummoned %d %d", summon->GetCreatureInfo()->Entry, summon->GetGUID()); 
     389    void JustSummoned(Creature* summon) 
     390    { 
     391        if(summon->GetCreatureInfo()->Entry == SHADOW_DEMON) 
     392        { 
     393            Unit *target = SelectUnit(SELECT_TARGET_RANDOM, 0); 
     394            if(target && target->GetTypeId() == TYPEID_PLAYER) // only on players. 
     395            { 
     396                summon->AddThreat(target, 5000000.0f); 
     397                summon->AI()->AttackStart(target); 
     398            } 
     399            DoZoneInCombat(summon); 
     400        } 
    395401    } 
    396402 
     
    559565    void SummonFlamesOfAzzinoth(); 
    560566    void SummonMaiev(); 
    561     void SummonShadowDemon() 
    562     { 
    563         Creature* ShadowDemon = NULL; 
    564         Unit* target = NULL; 
    565         for(uint8 i = 0; i < 4; i++) 
    566         { 
    567             ShadowDemon = DoSpawnCreature(SHADOW_DEMON, 0,0,0,0,TEMPSUMMON_TIMED_OR_CORPSE_DESPAWN,25000); 
    568             if(ShadowDemon) 
    569             { 
    570                 target = SelectUnit(SELECT_TARGET_RANDOM, 0); 
    571                 if(target && target->GetTypeId() == TYPEID_PLAYER) // only on players. 
    572                 { 
    573                     ShadowDemon->AddThreat(target, 5000000.0f); 
    574                     ShadowDemon->AI()->AttackStart(target); 
    575                 } 
    576                 DoZoneInCombat(ShadowDemon); 
    577             } 
    578         } 
    579     } 
    580567    void HandleTalkSequence(); 
    581568    void HandleFlightSequence() 
     
    944931                        break; 
    945932                    case EVENT_SHADOWDEMON: 
    946                         SummonShadowDemon(); 
     933                        DoCast(m_creature, SPELL_SUMMON_SHADOWDEMON); 
    947934                        Timer[EVENT_SHADOWDEMON] = 0; 
    948935                        Timer[EVENT_FLAME_BURST] += 10000; 
  • trunk/src/bindings/scripts/scripts/zone/black_temple/illidari_council.cpp

    r90 r108  
    696696        if(CircleOfHealingTimer < diff) 
    697697        { 
    698             //Currently bugged and puts Malande on the threatlist of the other council members. It also heals players. 
    699             //DoCast(m_creature, SPELL_CIRCLE_OF_HEALING); 
     698            DoCast(m_creature, SPELL_CIRCLE_OF_HEALING); 
    700699            CircleOfHealingTimer = 60000; 
    701700        }else CircleOfHealingTimer -= diff;