示例#1
0
    void StartRun()
    {
        std::list<Creature*> alist= FindAllCreaturesWithEntry(17963, 100);
        std::list<Creature*> blist= FindAllCreaturesWithEntry(17964, 100);
        for(std::list<Creature*>::iterator itr = blist.begin(); itr != blist.end(); itr++)
            alist.push_front(*itr);
        for(std::list<Creature*>::iterator itr = alist.begin(); itr != alist.end(); itr++)
        {
            if ((*itr)->GetFormation() == me->GetFormation())
            {
                if ((*itr)->isAlive())
                {
                    (*itr)->RemoveAllAuras();
                    (*itr)->DeleteThreatList();
                    (*itr)->CombatStop();

                    if (me->GetPositionY() > -150.0f)
                        (*itr)->GetMotionMaster()->MovePoint(1, 115.0f, -98.0f, -1.5f);
                    else
                        (*itr)->GetMotionMaster()->MovePoint(2, -102.0f, -121.0f, -2.1f);

                    (*itr)->ForcedDespawn(7000);
                } 
            }
        }
    }
示例#2
0
    void WaypointReached(uint32 uiPointId)
    {
        if (!m_pInstance)
            return;

        switch(uiPointId)
        {
            case 2:
                //modify respawn if event fails (out of LOS)
                me->SetRespawnDelay(10); // then sec for a nice respawn effect
                
                DoScriptText(SAY_AT_GONG, me);

                if (GameObject* pEntranceDoor = m_pInstance->instance->GetGameObject(m_pInstance->GetData64(DATA_GO_GONG)))
                    pEntranceDoor->RemoveFlag(GAMEOBJECT_FLAGS, GO_FLAG_NOTSELECTABLE);

                //Start bang gong for 10min
                me->CastSpell(me, SPELL_BANGING_THE_GONG, false);
                SetEscortPaused(true);
                break;
            case 3:
                DoScriptText(SAY_OPENING_ENTRANCE, me);
                break;
            case 4:
                DoScriptText(SAY_OPEN_GATE, me);
                break;
            case 5:
                m_pInstance->SetData(TYPE_EVENT_RUN,SPECIAL);
                me->SetRespawnDelay(RespawnDelay);
                break;
            case 6:
                std::list<Creature*> trolls = FindAllCreaturesWithEntry(23889, 100);
                for(std::list<Creature *>::iterator i = trolls.begin(); i != trolls.end(); i++)
                {
                    (*i)->AI()->DoZoneInCombat();
                    (*i)->AddThreat(me, 1000);
                }
                trolls = FindAllCreaturesWithEntry(23597, 100);
                for(std::list<Creature *>::iterator i = trolls.begin(); i != trolls.end(); i++)
                {
                    (*i)->AI()->DoZoneInCombat();
                    (*i)->AddThreat(me, 1000);
                }
//                ((Creature*)Guardian)->GetMotionMaster()->MoveChase(me);
                SetEscortPaused(true);
                DoGlobalScriptText(SAY_INST_BEGIN, HEXLORD, me->GetMap());
                break;
                //TODO: Spawn group of Amani'shi Savage and make them run to entrance
        }
    }
示例#3
0
    void MoroesFormation()
    {
        std::list<Creature*> moroes_formation = FindAllCreaturesWithEntry(CREATURE_PHANTOM_GUEST, 65);
        for (std::list<Creature*>::iterator it = moroes_formation.begin(); it != moroes_formation.end(); it++)
            if ((*it)->isAlive() && (*it)->GetPositionZ() <= 83)
                (*it)->ToCreature()->AI()->AttackStart(m_creature->getVictim());

        moroes_formation = FindAllCreaturesWithEntry(CREATURE_GHOSTLY_STEWARD, 65);
        for (std::list<Creature*>::iterator it = moroes_formation.begin(); it != moroes_formation.end(); it++)
            if ((*it)->isAlive() && (*it)->GetPositionZ() <= 83)
                (*it)->ToCreature()->AI()->AttackStart(m_creature->getVictim());

        moroes_formation = FindAllCreaturesWithEntry(CREATURE_SKELETAL_WAITER, 65);
        for (std::list<Creature*>::iterator it = moroes_formation.begin(); it != moroes_formation.end(); it++)
            if ((*it)->isAlive() && (*it)->GetPositionZ() <= 83)
                (*it)->ToCreature()->AI()->AttackStart(m_creature->getVictim());
    }
示例#4
0
    void MovementInform(uint32 Type, uint32 Id)
    {
        if (Type != POINT_MOTION_TYPE)
            return;

        if(Id >= 6)
            return;

        Fire = true;
        targets.clear();
        std::list<Creature*> t = FindAllCreaturesWithEntry(23746, 20);
        for(std::list<Creature*>::iterator i = t.begin(); i != t.end(); ++i)
            targets.push_back((*i)->GetGUID());

    }
示例#5
0
 void StartRun()
 {
     std::list<Creature*> alist= FindAllCreaturesWithEntry(17799, 100);
     for(std::list<Creature*>::iterator itr = alist.begin(); itr != alist.end(); itr++)
     {
         if ((*itr)->GetFormation() == me->GetFormation())
         {
             if ((*itr)->isAlive())
             {
                 (*itr)->RemoveAllAuras();
                 (*itr)->DeleteThreatList();
                 (*itr)->CombatStop();
                 (*itr)->GetMotionMaster()->MovePoint(1, -149.0f, -295.0f, -7.6f);
                 (*itr)->ForcedDespawn(7000);
             } 
         }
     }
 }
    void Reset()
    {
        ClearCastQueue();

        Reflection_Timer = 10000;
        Impale_Timer = 7000+rand()%7000;
        Rage_Timer = 45000;
        CurrentDistiller = 0;
        checkTimer = 3000;

        std::list<Creature*> naga_distillers = FindAllCreaturesWithEntry(17954, 100);
        for(std::list<Creature*>::iterator it = naga_distillers.begin(); it != naga_distillers.end(); it++)
        {
            (*it)->Respawn();
            (*it)->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
            (*it)->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE);
        }

        if (pInstance)
            pInstance->SetData(TYPE_WARLORD_KALITHRESH, NOT_STARTED);
    }
    void TrashAggro()
    {
        std::list<Creature*> TrashEntryList;
        std::list<Creature*> TrashList;

        TrashList.clear();

        for(uint8 i = 0; i < 7; ++i)
        {
            TrashEntryList.clear();
            TrashEntryList = FindAllCreaturesWithEntry(trashEntry[i], 100.0f);

            for(std::list<Creature*>::iterator iter = TrashEntryList.begin(); iter != TrashEntryList.end(); ++iter)
                TrashList.push_back(*iter);
        }

        if(!TrashList.empty())
             for(std::list<Creature*>::iterator i = TrashList.begin(); i != TrashList.end(); ++i)
             {
                 (*i)->setActive(true);
                 (*i)->AI()->AttackStart(me->getVictim());
             }
    }