void PreventActions(bool Allow)
	{
		FelExplosion->mEnabled = Allow;
		SetAllowMelee(Allow);
		SetAllowRanged(Allow);
		SetAllowSpell(Allow);
		SetAllowTargeting(Allow);
	}
Пример #2
0
		void AIUpdate()
		{
			if(GetPhase() == 1 && GetHealthPercent() <= (mPhaseRepeat * 25))
			{
				switch(rand() % 2)
				{
					case 0:
						Emote("I'll give you more than you can handle.", Text_Yell, 13321);
						break;
					case 1:
						Emote("There's plenty of me to go around.", Text_Yell, 13322);
						break;
				}
				SetPhase(2);
				SetCanMove(false);
				SetAllowRanged(false);
				SetAllowSpell(false);
				SetAllowTargeting(false);
				ApplyAura(60191);

				for(int i = 0; i < 3; ++i)
				{
					mAddArray[i] = _unit->GetMapMgr()->GetInterface()->SpawnCreature(CN_TELESTRA_FIRE + i, FormSpawns[i].x, FormSpawns[i].y, FormSpawns[i].z, FormSpawns[i].o, true, true, 0, 0);
					if(mAddArray[i] != NULL)
						++mAddCount;
				}

			};

			if(GetPhase() == 2)
			{
				for(int i = 0; i < 3; ++i)
				{
					if(mAddArray[i] != NULL)
					{
						mAddArray[i]->Despawn(1000, 0);
						mAddArray[i] = NULL;
						--mAddCount;
					}
				}

				if(mAddCount != 0)
					return;

				Emote("Now to finish the job!", Text_Yell, 13323);
				RemoveAura(60191);
				SetCanMove(true);
				mPhaseRepeat = 1;
				SetPhase(mHeroic  ? 1 : 3);   //3 disables p2
			};

			ParentClass::AIUpdate();
		};
Пример #3
0
	void AIUpdate()
	{
		if(!Elite1->isAlive() && !Elite2->isAlive() && !Elite3->isAlive() && !Elite4->isAlive() &&
		!Healer1->isAlive() && !Healer2->isAlive() && !Healer3->isAlive() && !Healer4->isAlive() && GetPhase() == 1)
		{
			SetCanEnterCombat(false);
			SetAllowMelee(false);
			SetAllowRanged(false);
			SetAllowSpell(false);
			SetAllowTargeting(false);
			SetCanMove(false);
			RemoveAllAuras();
			_unit->SetUInt64Value(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_ATTACKABLE_9);		
			Emote("Impossible! Stay your attack, mortal... I submit! I submit!", Text_Yell, 8045);
			SetPhase(2);
			DomoSayTimer1 = AddTimer(7000);
			DomoSayTimer2 = AddTimer(16000);
			DomoTeleportTimer3 = AddTimer(34000);
		}
		
		if(GetPhase() == 2 && IsTimerFinished(DomoSayTimer1))
		{
			Emote("Brashly, you have come to rest the secrets of the Living Flame! You will soon regret the recklessness of your quest", Text_Yell, NULL);
			RemoveTimer(DomoSayTimer1);
		}
		
		if(GetPhase() == 2 && IsTimerFinished(DomoSayTimer2))
		{
			Emote("I go now to summon the lord whose house this is. Should you seek an audience with him, your paltry lives will surely be forfeit! Nevertheless, seek out his lair, if you dare!", Text_Yell, NULL);
			RemoveTimer(DomoSayTimer2);
		}
		
		if(GetPhase() == 2 && IsTimerFinished(DomoTeleportTimer3))
		{
			_unit->SetPosition(838.719971f, -830.810974f, -232.095001f, 2.870590f);
			RemoveTimer(DomoTeleportTimer3);
		}
		
			
		ParentClass::AIUpdate();
	}
Пример #4
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();
	};
Пример #5
0
	KilJaedenAI(Creature* pCreature) : MoonScriptBossAI(pCreature)
	{	
		SetCanEnterCombat( false );

		DelayNextAttack( 11600 );
		SetAllowMelee( false );
		SetAllowSpell( false );
		SetAllowTargeting( false );
		SetCanMove( false );
		TriggerCooldownOnAllSpells(); 

		SetCanMove( false );
		Emote( "The expendible have perished... So be it! Now I shall succeed where Sargeras could not! I will bleed this wretched world and secure my place as the true master of the Burning Legion. The end has come! Let the unraveling of this world commence!", Text_Yell, 12500 );
		mStarted = false;
		RegisterAIUpdateEvent( 100 );

		pKJDummy = static_cast<KJDummyAI*>( GetNearestCreature( CN_KIL_JADEN_DUMMY ) );
		if( pKJDummy )
			pKJDummy->AddEncounterCreature( _unit );

		AddPhaseSpell( 1, AddSpell( SOUL_FLAY, Target_Current, 50, 0, 6 ) );
		AddPhaseSpell( 1, AddSpell( LEGION_LIGHTNING, Target_RandomPlayer, 25, 2.0f, 8 ) );
		AddPhaseSpell( 1, AddSpell( FIRE_BLOOM, Target_RandomPlayer, 20, 0, 10 ) );
	};