Exemplo n.º 1
0
void MoonScriptBossAI::SetPhase(int32 pPhase, SpellDesc* pPhaseChangeSpell)
{
	if( mPhaseIndex != pPhase )
	{
		//Cancel all spells
		CancelAllSpells();

		//Enable spells related to that phase
		for( PhaseSpellArray::iterator SpellIter = mPhaseSpells.begin(); SpellIter != mPhaseSpells.end(); ++SpellIter )
		{
			if( SpellIter->first == pPhase ) SpellIter->second->mEnabled = true;
			else SpellIter->second->mEnabled = false;
		}

		//Remember phase index
		mPhaseIndex = pPhase;

		//Cast phase change spell now if available
		if( pPhaseChangeSpell ) CastSpellNowNoScheduling(pPhaseChangeSpell);
	}
}
	void AIUpdate()
	{
		if( IsTimerFinished( mNovaTimer ) )
		{
			switch( RandomUInt(2) )
			{
			case 0: Emote( "You cannot hide from fate!",			Text_Yell,	14163	); break;
			case 1: Emote( "Come closer. I will make it quick.",	Text_Yell,	14164	); break;
			case 2: Emote( "Your flesh cannot hold out for long.",	Text_Yell,	14165	); break;
			};

			Announce( "Loken begins to cast Lightning Nova!" );
			CastSpellNowNoScheduling( mNova );
			ResetTimer( mNovaTimer, TIMER_NOVA + ( RandomUInt( 8 ) * 1000 ) );
		};

		if( mSpeech == 4 )
			return;

		if( GetHealthPercent() <= ( 100 - ( 25 * mSpeech ) ) )
		{
            switch( mSpeech )
            {
			case 1: Emote( "You stare blindly into the abyss!",	                                    Text_Yell, 14169 ); break;
			case 2: Emote( "Your ignorance is profound. Can you not see where this path leads?",    Text_Yell, 14170 ); break;
			case 3: Emote( "You cross the precipice of oblivion!",                                  Text_Yell, 14171 ); break;
			++mSpeech;
            };
        };

		if( IsTimerFinished( mRespondTimer ) )
		{
			Emote( "My master has shown me the future, and you have no place in it. Azeroth will be reborn in darkness. Yogg-Saron shall be released! The Pantheon shall fall!", Text_Yell, 14161 );
			RemoveTimer( mRespondTimer );
			RemoveAIUpdateEvent();
		};
		
		ParentClass::AIUpdate();
	};
	void OnCombatStart(Unit* pTarget)
	{
		CastSpellNowNoScheduling(mDiseaseCloud);

		ParentClass::OnCombatStart(pTarget);
	}
Exemplo n.º 4
0
	void OnDied(Unit* pKiller)
	{
		CastSpellNowNoScheduling(mEruption);
		ParentClass::OnDied(pKiller);
	}
Exemplo n.º 5
0
	void OnDied(Unit* pKiller)
	{
		CastSpellNowNoScheduling(mFlames);
		ParentClass::OnDied(pKiller);
	}
Exemplo n.º 6
0
	void OnCombatStart(Unit* pTarget)
	{
		CastSpellNowNoScheduling(mSpellShield);

		ParentClass::OnCombatStart(pTarget);
	}