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

[svn] Fix a compile error about M_PI_2.
Update Felmyst script to test new setActive function.
Fix the bug that priest's fear is unbreakable (dirty hack before find the correct way).
(some unfinished unused content included, just ignore them, will finish them later)

Original author: megamage
Date: 2008-10-27 10:57:53-05:00

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/src/bindings/scripts/scripts/zone/sunwell_plateau/boss_felmyst.cpp

    r90 r122  
    158158        FlightCount = 0; 
    159159 
    160         m_creature->RemoveUnitMovementFlag(MOVEMENTFLAG_LEVITATING); 
     160        m_creature->RemoveUnitMovementFlag(MOVEMENTFLAG_LEVITATING + MOVEMENTFLAG_ONTRANSPORT); 
    161161        m_creature->SetFloatValue(UNIT_FIELD_BOUNDINGRADIUS, 10); 
    162162        m_creature->SetFloatValue(UNIT_FIELD_COMBATREACH, 10); 
    163163 
    164164        DespawnSummons(MOB_VAPOR_TRAIL); 
     165  m_creature->setActive(false); 
    165166    } 
    166167 
    167168    void Aggro(Unit *who) 
    168169    { 
     170  m_creature->setActive(true); 
    169171        DoZoneInCombat(); 
    170172        m_creature->CastSpell(m_creature, AURA_SUNWELL_RADIANCE, true); 
     
    283285            m_creature->GetMotionMaster()->Clear(false); 
    284286            m_creature->HandleEmoteCommand(EMOTE_ONESHOT_LIFTOFF); 
    285             m_creature->SetUnitMovementFlags(MOVEMENTFLAG_LEVITATING); 
     287            m_creature->SetUnitMovementFlags(MOVEMENTFLAG_LEVITATING + MOVEMENTFLAG_ONTRANSPORT); 
    286288            m_creature->StopMoving(); 
    287289            DoYell(YELL_TAKEOFF, LANG_UNIVERSAL, NULL); 
     
    290292            break; 
    291293        case 1: 
    292             m_creature->AddUnitMovementFlag(MOVEMENTFLAG_ONTRANSPORT); 
    293294            m_creature->GetMotionMaster()->MovePoint(0, m_creature->GetPositionX()+1, m_creature->GetPositionY(), m_creature->GetPositionZ()+10); 
    294             m_creature->RemoveUnitMovementFlag(MOVEMENTFLAG_ONTRANSPORT); 
    295295            Timer[EVENT_FLIGHT_SEQUENCE] = 0; 
    296296            break; 
    297297        case 2: 
    298             if(Player* target = SelectRandomPlayer(50)) 
     298            if(Player* target = SelectRandomPlayer(150)) 
    299299            { 
    300300                Creature* Vapor = m_creature->SummonCreature(MOB_VAPOR, target->GetPositionX()-5+rand()%10, target->GetPositionY()-5+rand()%10, target->GetPositionZ(), 0, TEMPSUMMON_TIMED_DESPAWN, 9000); 
     
    312312            DespawnSummons(MOB_VAPOR_TRAIL); 
    313313            //m_creature->CastSpell(m_creature, SPELL_VAPOR_SELECT); need core support 
    314             if(Player* target = SelectRandomPlayer(50)) 
     314            if(Player* target = SelectRandomPlayer(150)) 
    315315            { 
    316316                //target->CastSpell(target, SPELL_VAPOR_SUMMON, true); need core support 
     
    331331            break; 
    332332        case 5: 
    333             if(Player* target = SelectRandomPlayer(80)) 
     333            if(Player* target = SelectRandomPlayer(150)) 
    334334            { 
    335335                BreathX = target->GetPositionX(); 
    336336                BreathY = target->GetPositionY(); 
    337337                float x, y, z; 
    338                 target->GetContactPoint(m_creature, x, y, z, 40); 
    339                 m_creature->AddUnitMovementFlag(MOVEMENTFLAG_ONTRANSPORT); 
     338                target->GetContactPoint(m_creature, x, y, z, 70); 
    340339                m_creature->GetMotionMaster()->MovePoint(0, x, y, z+10); 
    341                 m_creature->RemoveUnitMovementFlag(MOVEMENTFLAG_ONTRANSPORT); 
    342340            }else EnterEvadeMode(); 
    343341            Timer[EVENT_FLIGHT_SEQUENCE] = 0; 
     
    356354                x = 2 * BreathX - x; 
    357355                y = 2 * BreathY - y; 
    358                 m_creature->AddUnitMovementFlag(MOVEMENTFLAG_ONTRANSPORT); 
    359356                m_creature->GetMotionMaster()->MovePoint(0, x, y, z); 
    360                 m_creature->RemoveUnitMovementFlag(MOVEMENTFLAG_ONTRANSPORT); 
    361357            } 
    362358            Timer[EVENT_SUMMON_FOG] = 1; 
     
    375371                float x, y, z; 
    376372                target->GetContactPoint(m_creature, x, y, z); 
    377                 m_creature->AddUnitMovementFlag(MOVEMENTFLAG_ONTRANSPORT); 
    378373                m_creature->GetMotionMaster()->MovePoint(0, x, y, z); 
    379                 m_creature->RemoveUnitMovementFlag(MOVEMENTFLAG_ONTRANSPORT); 
    380374            }else EnterEvadeMode(); 
    381375            Timer[EVENT_FLIGHT_SEQUENCE] = 0; 
    382376            break; 
    383377        case 10: 
    384             m_creature->RemoveUnitMovementFlag(MOVEMENTFLAG_LEVITATING); 
     378            m_creature->RemoveUnitMovementFlag(MOVEMENTFLAG_LEVITATING + MOVEMENTFLAG_ONTRANSPORT); 
    385379            m_creature->StopMoving(); 
    386380            m_creature->HandleEmoteCommand(EMOTE_ONESHOT_LAND); 
     
    440434                break; 
    441435            case EVENT_ENCAPSULATE: 
    442                 if(Unit* target = SelectRandomPlayer(50)) 
     436                if(Unit* target = SelectRandomPlayer(150)) 
    443437                { 
    444438                    m_creature->CastSpell(target, SPELL_ENCAPSULATE_CHANNEL, false);