예제 #1
0
    void AIUpdate()
	{	
        ParentClass::AIUpdate();

		if( IsTimerFinished( mSummonTime ) )
		{
			MoonScriptCreatureAI *Eagle = NULL;
			// Spawn 3 Soaring Eagles
			for(int x=0; x<3; x++)
			{
				Eagle = SpawnCreature(CN_SOARING_EAGLE, ( _unit->GetPositionX() + RandomFloat( 12 ) - 10 ), ( _unit->GetPositionY()+ RandomFloat( 12 ) - 15 ),
				_unit->GetPositionZ(), _unit->GetOrientation(), true);
				if(Eagle)
				{
					Eagle->AggroNearestUnit();
					Eagle->SetDespawnWhenInactive(true);
				}
			}
			Eagle = NULL;
			Emote("Feed, me bruddahs!", Text_Yell, 12019);
			// Restart the timer
			ResetTimer( mSummonTime, 120000);
		}
	}