ThrallAI(Creature* pCreature) : MoonScriptCreatureAI(pCreature)
    {
        SetWaypointMoveType(Movement::WP_MOVEMENT_SCRIPT_DONTMOVEWP);
        for (uint8 i = 1; i < MAX_THRALLWP1; ++i)
            AddWaypoint(CreateWaypoint(i, 0, Movement::WP_MOVE_TYPE_WALK, ThrallWP1[i]));

        m_currentWp = 0;
    }
    void StartEscort(Player* pPlayer)
    {
        GameObject* pGO = GetNearestGameObject();
        if (pGO)
            pGO->SetState(pGO->GetState() == 1 ? 0 : 1);

        _unit->SetUInt32Value(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_NONE);
        SetWaypointMoveType(Movement::WP_MOVEMENT_SCRIPT_FORWARDTHENSTOP);
    }
예제 #3
0
    explicit LakkaAI(Creature* pCreature) : CreatureAIScript(pCreature)
    {
        SetWaypointMoveType(Movement::WP_MOVEMENT_SCRIPT_NONE);

        //WPs
        for (uint8 i = 1; i < 4; ++i)
        {
            AddWaypoint(CreateWaypoint(i, 0, LakkaWaypoint[i].wp_flag, LakkaWaypoint[i].wp_location));
        }
    }
예제 #4
0
 void OnReachWP(uint32 iWaypointId, bool /*bForwards*/) override
 {
     switch (iWaypointId)
     {
         case 1:
         {
             SetWaypointMoveType(Movement::WP_MOVEMENT_SCRIPT_WANTEDWP);
             SetWaypointToMove(2);
             for (const auto& itr : getCreature()->getInRangeObjectsSet())
             {
                 if (itr && itr->isPlayer())
                 {
                     Player* pPlayer = static_cast<Player*>(itr);
                     if (pPlayer != nullptr)
                     {
                         QuestLogEntry* pQuest = pPlayer->GetQuestLogForEntry(10097);
                         if (pQuest != nullptr && pQuest->GetMobCount(1) < 1)
                         {
                             pQuest->SetMobCount(1, 1);
                             pQuest->SendUpdateAddKill(1);
                             pQuest->UpdatePlayerFields();
                         }
                     }
                 }
             }
         }
         break;
         case 3:
         {
             despawn(100, 0);
         }
         break;
         default:
         {
             SetWaypointMoveType(Movement::WP_MOVEMENT_SCRIPT_WANTEDWP);
             SetWaypointToMove(1);
         }
     }
 }
예제 #5
0
    explicit DofNaralexAI(Creature* pCreature) : CreatureAIScript(pCreature)
    {
        Mutanus = nullptr;

        for (uint8 i = 1; i < 39; ++i)
        {
            AddWaypoint(CreateWaypoint(i, 0, Movement::WP_MOVE_TYPE_RUN, ToNaralex[i]));
        }

        SetWaypointMoveType(Movement::WP_MOVEMENT_SCRIPT_NONE);

        // Awakening Spell
        Awakening = addAISpell(6271, 0.0f, TARGET_SELF);
        Awakening->addEmote("Step back and be ready!, I'll try to Awake Naralex", CHAT_MSG_MONSTER_SAY, 0);

        SpawnTimer = 0;
    }