Esempio n. 1
0
	void AIUpdate()
	{
		if(SpawnTimer && IsTimerFinished(SpawnTimer))
		{
			switch(GetPhase())
			{
				case 2: Moccasin(); ResetTimer(SpawnTimer,100000); SetPhase(3); break;
				case 3: Ectoplasm(); ResetTimer(SpawnTimer,100000); SetPhase(4); break;
				case 4: BMutanus(); ResetTimer(SpawnTimer,100000); SetPhase(5); break;
			}
		}
		if(GetPhase() == 5 && (!Mutanus || !Mutanus->GetUnit()->isAlive()))
		{
			MoonScriptCreatureAI* Naralex = GetNearestCreature(3679);
			if(Naralex && Naralex->IsAlive())
			{
				SetDisplayId(17089);
				Naralex->SetDisplayId(17089);
				Naralex->Emote("I am awake... at last", Text_Say, 5789);
				Naralex->GetUnit()->SetStandState(STANDSTATE_STAND);
				SetFlyMode(true);
				Naralex->SetFlyMode(true);
				MoveTo(-6.704030f, 200.308838f, -26.938824f);
				Naralex->MoveTo(-6.704030f, 200.308838f, -26.938824f);
			}
			SetPhase(6);
		}
		ParentClass::AIUpdate();
	}
Esempio n. 2
0
 void AIUpdate() override
 {
     if (SpawnTimer && _isTimerFinished(SpawnTimer))
     {
         switch (getScriptPhase())
         {
             case 2:
                 Moccasin();
                 _resetTimer(SpawnTimer, 100000);
                 setScriptPhase(3);
                 break;
             case 3:
                 Ectoplasm();
                 _resetTimer(SpawnTimer, 100000);
                 setScriptPhase(4);
                 break;
             case 4:
                 BMutanus();
                 _resetTimer(SpawnTimer, 100000);
                 setScriptPhase(5);
                 break;
             default:
                 break;
         }
     }
     if (isScriptPhase(5) && (!Mutanus || !Mutanus->isAlive()))
     {
         CreatureAIScript* Naralex = getNearestCreatureAI(3679);
         if (Naralex && Naralex->isAlive())
         {
             _setDisplayId(17089);
             Naralex->_setDisplayId(17089);
             Naralex->sendChatMessage(CHAT_MSG_MONSTER_SAY, 5789, "I am awake... at last");
             Naralex->getCreature()->setStandState(STANDSTATE_STAND);
             setFlyMode(true);
             Naralex->setFlyMode(true);
             moveTo(-6.704030f, 200.308838f, -26.938824f);
             Naralex->moveTo(-6.704030f, 200.308838f, -26.938824f);
         }
         setScriptPhase(6);
     }
 }