• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ IsTimerFinished函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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


示例16: AIUpdate

	void AIUpdate()
	{
		if(IsTimerFinished(mRessTimer))
		{
			SetPhase(2);
			
			_unit->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NOT_SELECTABLE);
			_unit->SetUInt32Value(UNIT_FIELD_DISPLAYID, 26351);
			_unit->SetUInt32Value(UNIT_FIELD_HEALTH,_unit->GetUInt32Value(UNIT_FIELD_MAXHEALTH));
			_unit->setDeathState(ALIVE);
			_unit->WipeTargetList();
			_unit->WipeHateList();
		
			Emote("I return! A second chance to carve out your skull!", Text_Yell, 13209);
			RemoveTimer(mRessTimer);
		}
	} 	
开发者ID:AtVirus,项目名称:Descent-Scripts,代码行数:17,代码来源:Instance_UtgardeKeep.cpp


示例17: AIUpdate

		void AIUpdate()
		{
			if(!IsCasting())
			{
				if(mBurningNovaTimer == INVALIDATE_TIMER || IsTimerFinished(mBurningNovaTimer))
				{
					if(IsHeroic())
						CastSpell(mVortex);
					CastSpell(mBurningNova);

					ResetTimer(mBurningNovaTimer, 30000);

					ParentClass::AIUpdate();
				};
			};

			ParentClass::AIUpdate();
		}
开发者ID:Antares84,项目名称:arcemu,代码行数:18,代码来源:Instance_BloodFurnace.cpp


示例18: AIUpdate

		void AIUpdate()
		{
			// Every 25% Halazzi calls on the lynx
			if(!mLynx && GetHealthPercent() <= (100 - SplitCount * 25))
				Split();

			// Lynx OR Halazzi is at 20% HP Merge them together again
			if(mLynx && (mLynx->GetHealthPct() <= 20 || GetHealthPercent() <= 20))
				Merge();

			// At <25% Phase 3 begins
			if(GetHealthPercent() < 25 && GetPhase() == 1)
			{
				ResetTimer(mTotemTimer, 30000);
				SetPhase(3);
			}

			if(GetPhase() == 2 || GetPhase() == 3)
			{
				if(IsTimerFinished(mTotemTimer))
				{
					MoonScriptCreatureAI* Totem = NULL;
					Totem = SpawnCreature(CN_TOTEM, (_unit->GetPositionX() + RandomFloat(3) - 3), (_unit->GetPositionY() + RandomFloat(3) - 3), _unit->GetPositionZ(), 0, true);
					if(Totem)
					{
						Totem->Despawn(60000); // Despawn in 60 seconds
						Totem->AggroNearestPlayer();
						Totem = NULL;
					}
					switch(GetPhase())
					{
						case 2:
							ResetTimer(mTotemTimer, 60000);
							break;
						case 3:
							ResetTimer(mTotemTimer, 30000);
							break; // Spawn them faster then phase 2
					}
				}
			}
		}
开发者ID:Refuge89,项目名称:Edge-of-Chaos,代码行数:41,代码来源:Raid_ZulAman.cpp


示例19: AIUpdate

		void AIUpdate()
		{
			if((GetHealthPercent() <= 50 && mSummon == 0))
				mSummon += 1;

			if(mSummon == 1)
				ChargeRift();

			if(IsTimerFinished(mSummonTimer) && mRift == false)
			{
				SummonRift(false);
				ResetTimer(mSummonTimer, IsHeroic() ? 14000 : 18000);
			};

			if(mRift == true && (GetLinkedCreature() == NULL || ! GetLinkedCreature()->IsAlive()))
			{
				RemoveAura(47748);
				mRift = false;
			};

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


示例20: AIUpdate

	void AIUpdate()
	{
		if(!GetUnit()->IsInWorld())
			return;

		//kazdou minutu posleme novy cas
		if(IsTimerFinished(m_MinuteTimer) && !m_EventEnd)
		{
			ResetTimer(m_MinuteTimer, 60000);
			GetUnit()->GetMapMgr()->GetWorldStateManager()->SetWorldState(WORLDSTATE_ZULAMAN_TIMEDEVENT_TIME, static_cast<uint32>(GetTimer(m_EventTimer) / 60000));
		}

		m_Akilzon		= ForceCreatureFind(CN_AKILZON, AKILZON_SPAWN, false);
		m_Nalorakk		= ForceCreatureFind(CN_NALORAKK, NALORAKK_SPAWN, false);
		m_Janalai		= ForceCreatureFind(CN_JANALAI, JANALAI_SPAWN, false);
		m_Halazzi		= ForceCreatureFind(CN_HALAZZI, HALAZZI_SPAWN, false);
		
		if(m_Akilzon && !m_Akilzon->isAlive() && !m_spawnedAkilzonChest)
		{
			m_d++;
		}
		
		if(m_Halazzi && !m_Halazzi->isAlive() && !m_spawnedHalazziChest)
		{
			m_d++;
		}
		
		if(m_Nalorakk && !m_Nalorakk->isAlive() && !m_spawneddNalorakkChest)
		{
			m_d++;
		}
		
		if(m_Janalai && !m_Janalai->isAlive() && !m_spawnedJanalaiChest)
		{
			m_d++;
		}

		switch(m_d)
		{
		case 0:
			break;
		case 1:
			m_Chest = 187021;
			break;
		case 2:
			m_Chest = 186648;
			break;
		case 3:
			m_Chest = 186667;
			break;
		case 4:
			m_Chest = 186672;
			break;
		}
		
		if(m_Akilzon && !m_Akilzon->isAlive() && !IsTimerFinished(m_EventTimer) && !m_spawnedAkilzonChest)
		{
			ResetTimer(m_EventTimer, GetTimer(m_EventTimer) + 600000);
			m_Akilzon->GetMapMgr()->GetInterface()->SpawnGameObject(m_Chest, 300, 1460, 81.5f, 0, true, 0, 0);
			m_spawnedAkilzonChest = true;
			GetUnit()->GetMapMgr()->GetWorldStateManager()->SetWorldState(WORLDSTATE_ZULAMAN_TIMEDEVENT_TIME, static_cast<uint32>(GetTimer(m_EventTimer) / 60000));
		}
		
		if(m_Nalorakk && !m_Nalorakk->isAlive() && !IsTimerFinished(m_EventTimer) && !m_spawneddNalorakkChest)
		{
			ResetTimer(m_EventTimer, GetTimer(m_EventTimer) + 900000);
			m_Nalorakk->GetMapMgr()->GetInterface()->SpawnGameObject(m_Chest, -90, 1410, 27.5f, 0, true, 0, 0);
			m_spawneddNalorakkChest = true;
			GetUnit()->GetMapMgr()->GetWorldStateManager()->SetWorldState(WORLDSTATE_ZULAMAN_TIMEDEVENT_TIME, static_cast<uint32>(GetTimer(m_EventTimer) / 60000));
		}

		if(m_Janalai && !m_Janalai->isAlive() && !IsTimerFinished(m_EventTimer) && !m_spawnedJanalaiChest)
		{
			m_Janalai->GetMapMgr()->GetInterface()->SpawnGameObject(m_Chest, -78, 1140, 5.3f, 0, true, 0, 0);
			m_spawnedJanalaiChest = true;
		}

		if(m_Halazzi && !m_Halazzi->isAlive() && !IsTimerFinished(m_EventTimer) && !m_spawnedHalazziChest)
		{
			m_Halazzi->GetMapMgr()->GetInterface()->SpawnGameObject(m_Chest, 390, 1150, 6.2f, 0, true, 0, 0);
			m_spawnedHalazziChest = true;
		}

		if(m_d == 4 && !m_EventEnd)
		{
			m_EventEnd = true;
			GetUnit()->GetMapMgr()->GetWorldStateManager()->SetWorldState(WORLDSTATE_ZULAMAN_TIMEDEVENT_DISPLAY, 0);
			RemoveAIUpdateEvent();
		}

		if(IsTimerFinished(m_EventTimer) && !m_EventEnd)
		{
			m_EventEnd = true;
			GetUnit()->GetMapMgr()->GetWorldStateManager()->SetWorldState(WORLDSTATE_ZULAMAN_TIMEDEVENT_DISPLAY, 0);
			RemoveAIUpdateEvent();
		}

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



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ IsTower函数代码示例发布时间:2022-05-30
下一篇:
C++ IsTimedOut函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap