当前位置: 首页>>代码示例>>C++>>正文


C++ IsTimerFinished函数代码示例

本文整理汇总了C++中IsTimerFinished函数的典型用法代码示例。如果您正苦于以下问题:C++ IsTimerFinished函数的具体用法?C++ IsTimerFinished怎么用?C++ IsTimerFinished使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了IsTimerFinished函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: AIUpdate

	void AIUpdate()
	{
        ParentClass::AIUpdate();

		// Bear Form
		if(IsTimerFinished(MorphTimer) && GetPhase() == 1)
		{
			SetPhase(2, Morph);
			// Morph into a bear since the spell doesnt work
			SetDisplayId(21635);
			// 20 Seconds until switch to Troll Form
			ResetTimer(MorphTimer, 20000);
		}
		
		// Troll Form
		else if(IsTimerFinished(MorphTimer) && GetPhase() == 2)
		{
			// Remove Bear Form
			RemoveAura(42377);
			// Transform back into a Troll
			SetDisplayId(21631);
			SetPhase(1);
			// 45 Seconds until switch to Bear Form
			ResetTimer(MorphTimer, 45000);

			Emote("Make way for Nalorakk!", Text_Yell, 12073);
		}
	}
开发者ID:Desch,项目名称:Edge-of-Chaos,代码行数:28,代码来源:Raid_ZulAman.cpp

示例2: AIUpdate

	void AIUpdate()
	{
		if (!IsCasting())
		{
			if (mBlastWaveTimer == -1 || IsTimerFinished(mBlastWaveTimer))
			{
				Unit* unit = GetBestUnitTarget(TargetFilter_Closest);
				if (unit && GetRangeToUnit(unit) < 15.0f)
				{
					CastSpellNowNoScheduling(mBlastWave);
					if (mBlastWaveTimer == -1)
						mBlastWaveTimer = AddTimer(6000);
					else
						ResetTimer(mBlastWaveTimer, 6000);
					ParentClass::AIUpdate();
					return;
				}
			}

			if (IsTimerFinished(mEventTimer))
			{
				ResetTimer(mEventTimer, 30000);
				CastSpellNowNoScheduling(mSpellShield);
			}
		}

		ParentClass::AIUpdate();
	}
开发者ID:Bootz,项目名称:arcticdev,代码行数:28,代码来源:Raid_GruulsLair.cpp

示例3: AIUpdate

        void AIUpdate()
        {
            if (IsTimerFinished(SpeechTimer))
                Speech();

            if (IsTimerFinished(VoidTimer))
                VoidZoneArc();

            ParentClass::AIUpdate();
        }
开发者ID:lev1976g,项目名称:AscEmu,代码行数:10,代码来源:Instance_Arcatraz.cpp

示例4: AIUpdate

		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();
		};
开发者ID:Refuge89,项目名称:Edge-of-Chaos,代码行数:51,代码来源:Instance_HallsOfLightning.cpp

示例5: AIUpdate

        void AIUpdate()
        {
            if (GetHealthPercent() <= 66 && GetPhase() == 1)
            {
                Emote("You landlubbers are tougher than I thought. I'll have to improvise!", Text_Yell, 5778);
                SetPhase(2, mStomp);
            }
            else if (GetHealthPercent() <= 33 && GetPhase() == 3)
            {
                Emote("D'ah! Now you're making me angry!", Text_Yell, 5779);
                SetPhase(4, mStomp);
            }

            if (GetPhase() == 2 || GetPhase() == 4)
            {
                if (NearChest())
                    SwitchWeapons();
                else if (_unit->GetAIInterface()->getAIState() != STATE_SCRIPTMOVE)
                {
                    MoveToChest();
                }
            }

            if (IsTimerFinished(mWaitAtChest))
                MoveToPlayer();

            ParentClass::AIUpdate();
        }
开发者ID:Nupper,项目名称:AscEmu,代码行数:28,代码来源:Instance_Deadmines.cpp

示例6: AIUpdate

	void AIUpdate()
	{
		if(IsTimerFinished(mSkeletonTimer))
			addSummon();

		ParentClass::AIUpdate();
	};
开发者ID:arcticdev,项目名称:arctic-test,代码行数:7,代码来源:Instance_UtgardeKeep.cpp

示例7: AIUpdate

	void AIUpdate()
	{
		if( IsTimerFinished( mStanceTimer ) )
		{
			switch ( GetPhase() )
			{
			case STANCE_BATTLE:
				switchStance( RandomUInt( 1 ) + 2 );
				break;
			case STANCE_BERSERKER:
				if( RandomUInt( 1 ) == 1 )
					switchStance( STANCE_BATTLE );
				else
					switchStance( STANCE_DEFENSIVE );
				break;
			case STANCE_DEFENSIVE:
				switchStance( RandomUInt( 1 ) + 1 );
				break;
			};

			
			ResetTimer( mStanceTimer, TIMER_STANCE_CHANGE + ( RandomUInt( 7 ) * 1000 ) );
		};

		ParentClass::AIUpdate();
	};
开发者ID:Desch,项目名称:Edge-of-Chaos,代码行数:26,代码来源:Instance_HallsOfLightning.cpp

示例8: AIUpdate

	void AIUpdate()
	{
		if(IsTimerFinished(mStompTimer))
		{
			CastSpellNowNoScheduling( mStomp );
			SetCanMove( false );
			ResetTimer( mStompTimer, ( STOMP_TIMER + SHATTER_TIMER ));
			mShatterTimer = AddTimer( SHATTER_TIMER );

		}
		if(IsTimerFinished(mShatterTimer))
		{
			CastSpellNowNoScheduling( mShatter );
			SetCanMove( true );
			RemoveTimer( mShatterTimer );
		}
	}
开发者ID:vata,项目名称:wowice,代码行数:17,代码来源:Instance_HallsOfStone.cpp

示例9: AIUpdate

void MoonScriptBossAI::AIUpdate(MapManagerScript* MMSCript, uint32 p_time)
{
	if( mEnrageSpell && mEnrageTimerDuration > 0 && IsTimerFinished(mEnrageTimer) )
	{
		CastSpell(mEnrageSpell);
		RemoveTimer(mEnrageTimer);
	}
	MoonScriptCreatureAI::AIUpdate(MMSCript, p_time);
}
开发者ID:Refuge89,项目名称:Hearthstone,代码行数:9,代码来源:Base.cpp

示例10: AIUpdate

void ArcScriptBossAI::AIUpdate()
{
	if( mEnrageSpell && mEnrageTimerDuration > 0 && IsTimerFinished(mEnrageTimer) )
	{
		CastSpell(mEnrageSpell);
		RemoveTimer(mEnrageTimer);
	}
	ArcScriptCreatureAI::AIUpdate();
}
开发者ID:AegisEmu,项目名称:AegisEmu,代码行数:9,代码来源:Base.cpp

示例11: AIUpdate

        void AIUpdate()
        {
            if (IsTimerFinished(mReplyTimer) && pDalronn != NULL)
            {
                pDalronn->Emote("By all means, don't assess the situation, you halfwit! Just jump into the fray!", Text_Yell, 13199);
                RemoveTimer(mReplyTimer);
            };

            ParentClass::AIUpdate();
        };
开发者ID:Declipe,项目名称:AscEmu,代码行数:10,代码来源:Instance_UtgardeKeep.cpp

示例12: AIUpdate

	void AIUpdate()
	{
		if( IsTimerFinished(mClearHateList) )
		{
			_unit->GetAIInterface()->ClearHateList();
			//_unit->AggroRandomPlayer();
			ResetTimer(mClearHateList, 1000);
		}
		ParentClass::AIUpdate();
	} 
开发者ID:AtVirus,项目名称:Descent-Scripts,代码行数:10,代码来源:Instance_MagistersTerrace.cpp

示例13: AIUpdate

		void AIUpdate()
		{
			if(IsTimerFinished(mClearHateList))
			{
				ClearHateList();
				AggroRandomUnit();
				ResetTimer(mClearHateList, 15000);
			};

			ParentClass::AIUpdate();
		};
开发者ID:Tulba,项目名称:wowtbc,代码行数:11,代码来源:Instance_MagistersTerrace.cpp

示例14: AIUpdate

	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();
	}
开发者ID:wow4all,项目名称:wowtbc,代码行数:41,代码来源:Raid_MoltenCore.cpp

示例15: AIUpdate

 void AIUpdate()
 {
     if(IsTimerFinished(mRazuunTimer))
     {
         switch(mRazuunPhase)
         {
             case 0:
                 {
                     _unit->Emote(EMOTE_ONESHOT_TALK);
                     _unit->SendChatMessage(CHAT_MSG_MONSTER_SAY, LANG_UNIVERSAL, "Doom Lord Kazzak will be pleased. You are to increase the pace of your attacks. Destroy the orcish and dwarven strongholds with all haste.");
                     mRazuunPhase = 1;
                     ResetTimer(mRazuunTimer, 9000);
                 }
                 break;
             case 1:
                 {
                     _unit->Emote(EMOTE_ONESHOT_TALK);
                     _unit->SendChatMessage(CHAT_MSG_MONSTER_SAY, LANG_UNIVERSAL, "Don't worry about that. I've increased production at the Deathforge. You'll have all the infernals you need to carry out your orders. Don't fail, Jovaan.");
                     mRazuunPhase = 2;
                     ResetTimer(mRazuunTimer, 15000);
                 }
                 break;
             case 2:
                 {
                     _unit->Emote(EMOTE_ONESHOT_QUESTION);
                     _unit->SendChatMessage(CHAT_MSG_MONSTER_SAY, LANG_UNIVERSAL, "Yes?");
                     mRazuunPhase = 3;
                     ResetTimer(mRazuunTimer, 8000);
                 }
                 break;
             case 3:
                 {
                     _unit->Emote(EMOTE_ONESHOT_QUESTION);
                     _unit->SendChatMessage(CHAT_MSG_MONSTER_SAY, LANG_UNIVERSAL, "Crate? I didn't send you a crate, Jovaan. Don't you have more important things to worry about? Go see to them!");
                     mRazuunPhase = 4;
                     ResetTimer(mRazuunTimer, 5000);
                 }
                 break;
             case 4:
                 {
                     mRazuunPhase = -1;
                     RemoveTimer(mRazuunTimer);
                     Despawn(0, 0);
                     return;
                 }
                 break;
         }
     }
     ParentClass::AIUpdate();
 }
开发者ID:lev1976g,项目名称:easywow,代码行数:50,代码来源:Quest_ShadowMoon.cpp


注:本文中的IsTimerFinished函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。