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); } } }
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(); };
void OnLoad() { AggroNearestUnit(); ParentClass::OnLoad(); };