Ejemplo n.º 1
0
 void AIUpdate()
 {
     ParentClass::AIUpdate();
     if (IsTimerFinished(mElizaCombatTimer))
     {
         SetCanEnterCombat(true);
         AggroNearestUnit();
         RemoveTimer(mElizaCombatTimer);
     }
     if ( GetHealthPercent()>=10 && GetHealthPercent()<=98 && !IsCasting())
     {
         // Correct me if I'm wrong but I saw only 1 guard spawning
         mElizaGuard = _unit->GetMapMgr()->GetInterface()->GetCreatureNearestCoords(_unit->GetPositionX(), _unit->GetPositionY(), _unit->GetPositionZ(), 1871);
         if ( mElizaGuard == NULL )
         {
             CastSpellNowNoScheduling(mSummonGuard);
         }
     }
 }
Ejemplo n.º 2
0
	void AIUpdate()
	{
		if( mStarted == false ) 
		{
			ApplyAura( 44200 );
			ApplyAura( 26586 );
			mStarted = true;
			RegisterAIUpdateEvent( 11500 );
			return;
		}

		if( mStarted == true && GetCanEnterCombat() == false ) //start part 
		{
			SetCanEnterCombat( true );
			SetAllowMelee( true );
			SetAllowSpell( true );
			SetAllowTargeting( true );
			SetCanMove( false );
			AggroNearestUnit( 1 );
		};

		ParentClass::AIUpdate();
	};
Ejemplo n.º 3
0
		void OnLoad()
		{
			AggroNearestUnit();
			ParentClass::OnLoad();
		};