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


C++ SetCanMove函数代码示例

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


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

示例1: AIUpdate

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

示例2: EnslavedNetherwingDrakeAI

 EnslavedNetherwingDrakeAI(Creature* pCreature) : MoonScriptCreatureAI(pCreature)
 {
     Movement::LocationWithFlag WayPoint = { _unit->GetPositionX(), _unit->GetPositionY() + 30, _unit->GetPositionZ() + 100, _unit->GetOrientation(), Movement::WP_MOVE_TYPE_FLY };
     SetCanMove(false);
     _unit->SetUInt64Value(UNIT_FIELD_FLAGS, UNIT_FLAG_FEIGN_DEATH | UNIT_FLAG_NOT_ATTACKABLE_2);
     AddWaypoint(CreateWaypoint(1, 0, WayPoint));
 }
开发者ID:master312,项目名称:AscEmu,代码行数:7,代码来源:Quest_ShadowMoon.cpp

示例3: OnCombatStart

	void OnCombatStart(Unit* mTarget)
	{
		SetAllowMelee(false);
		SetCanMove(false);
		//doors
		ParentClass::OnCombatStart(mTarget);
	}
开发者ID:AscEmu,项目名称:AscEmu_TBC,代码行数:7,代码来源:Raid_SunwellPlateau.cpp

示例4: AIUpdate

	void AIUpdate()
	{
		SetAllowMelee(false);
		SetCanMove(false);
		timmer++;
		if (summoningst == true && (timmer == 20 || timmer == 60 || timmer == 100))
		{
			SpawnCreature(CN_SHADOWSWORD_BERSERKER, 1871, 650, 71, 0, false);
			SpawnCreature(CN_SHADOWSWORD_FURY_MAGE, 1871, 650, 71, 0, false);
			SpawnCreature(CN_SHADOWSWORD_FURY_MAGE, 1748, 700, 71, 0, false);
			SpawnCreature(CN_SHADOWSWORD_BERSERKER, 1748, 700, 71, 0, false);
		}

		if (timmer == 120)
		{
			timmer = 0;
			summoningst = true;
			switch (spawnplace)
			{
			case 1:
				{
				SpawnCreature(CN_VOID_SENTINEL, 1800, 652, 71, 0, false);
				++spawnplace;
				}break;
			case 2:
				{
				SpawnCreature(CN_VOID_SENTINEL, 1798, 605, 71, 0, false);
				++spawnplace;
				}break;
			case 3:
				{
				SpawnCreature(CN_VOID_SENTINEL, 1826, 650, 71, 0, false);
				++spawnplace;
				}break;
			case 4:
				{
				SpawnCreature(CN_VOID_SENTINEL, 1783, 625, 71, 0, false);
				++spawnplace;
				}break;
			case 5:
				{
				SpawnCreature(CN_VOID_SENTINEL, 1816, 595, 71, 0, false);
				++spawnplace;
				}break;
			case 6:
				{
				SpawnCreature(CN_VOID_SENTINEL, 1844, 641, 71, 0, false);
				spawnplace = 1;
				}break;
			}
		}

		if (GetHealthPercent() <= 35)
		{
			SpawnCreature(CN_ENTROPIUS, true);
			Despawn(100,0);
		}

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

示例5: SeaforiumDepthCharge

    SeaforiumDepthCharge(Creature* pCreature) : MoonScriptCreatureAI(pCreature)
	{
		SetCanMove( false );
		SetCanEnterCombat( false );
		_unit->SetFaction(21);
		RegisterAIUpdateEvent(3000);
	}
开发者ID:vata,项目名称:wowice,代码行数:7,代码来源:Quest_BoreanTundra.cpp

示例6: OnLoad

	void OnLoad()
	{
		_unit->SetUInt32Value(UNIT_FIELD_FACTIONTEMPLATE, 1771);
		SetFlyMode(true);
		SetCanMove(false);
		ParentClass::OnLoad();
	}
开发者ID:AscEmu,项目名称:AscEmu_TBC,代码行数:7,代码来源:Raid_SunwellPlateau.cpp

示例7: OnCombatStart

	void OnCombatStart(Unit* mTarget)
	{
		SetAllowMelee(false);
		SetCanMove(false);
		dtimmer = 1;
		ParentClass::OnCombatStart(mTarget);
	}
开发者ID:Bootz,项目名称:arcticdev,代码行数:7,代码来源:Raid_SunwellPlateau.cpp

示例8: EnslavedNetherwingDrakeAI

 EnslavedNetherwingDrakeAI(Creature* pCreature) : MoonScriptCreatureAI(pCreature)
 {
     LocationExtra WayPoint = { _unit->GetPositionX(), _unit->GetPositionY() + 30, _unit->GetPositionZ() + 100, _unit->GetOrientation(), Flag_Fly };
     SetCanMove(false);
     _unit->SetUInt64Value(UNIT_FIELD_FLAGS, UNIT_FLAG_FEIGN_DEATH | UNIT_FLAG_NOT_ATTACKABLE_2);
     AddWaypoint(CreateWaypoint(1, 0, Flag_Fly, WayPoint));
 }
开发者ID:lev1976g,项目名称:easywow,代码行数:7,代码来源:Quest_ShadowMoon.cpp

示例9: VoidZoneARC

 VoidZoneARC(Creature* pCreature) : MoonScriptCreatureAI(pCreature)
 {
     StopMovement();
     SetCanMove(false);
     SetCanEnterCombat(false);
     RegisterAIUpdateEvent(1000);
 }
开发者ID:lev1976g,项目名称:AscEmu,代码行数:7,代码来源:Instance_Arcatraz.cpp

示例10: SeaforiumDepthCharge

 SeaforiumDepthCharge(Creature* pCreature) : MoonScriptCreatureAI(pCreature)
 {
     SetCanMove( false );
     SetCanEnterCombat( false );
     _unit->SetFaction(21);
     p_timer = 3000;
 }
开发者ID:Sandshroud,项目名称:Sandshroud-Prodigy,代码行数:7,代码来源:Borean_Tundra.cpp

示例11: OnCombatStart

	void OnCombatStart(Unit* pTarget)
	{
		SetDisplayWeapon(true, true);
		ParentClass::OnCombatStart(pTarget);

		mAliveAdds = 0;
		mLastYell = -1;
		for (int i = 0; i < 4; ++i)
		{
			Unit* pAdd = ForceCreatureFind(Adds[i]);
			if (pAdd != NULL && pAdd->isAlive())
			{
				Unit* pTarget = GetBestPlayerTarget();
				if (pTarget != NULL)
				{
					pAdd->GetAIInterface()->AttackReaction(pTarget, 200);
				}

				++mAliveAdds;
			}
		}
		if (mAliveAdds > 1)
		{
			SetCanEnterCombat(false);
			SetBehavior(Behavior_Spell);
			SetCanMove(false);
		}
	}
开发者ID:Bootz,项目名称:arcticdev,代码行数:28,代码来源:Raid_GruulsLair.cpp

示例12: OnAddDied

	void OnAddDied()
	{
		if (mAliveAdds > 0)
		{
			--mAliveAdds;
			if (mAliveAdds > 1)
			{
				uint32 RandomText = RandomUInt(1);
				while (RandomText == mLastYell)
				{
					RandomText = RandomUInt(1);
				}

				switch (RandomText)
				{
				case 0:
					Emote("You not kill next one so easy!", Text_Yell, 11369);
					break;
				case 1:
					Emote("Does not prove anything!", Text_Yell, 11370);
					break;
				}

				mLastYell = RandomText;
			}
			else if (mAliveAdds == 1)
			{
				Emote("Good, now you fight me!", Text_Yell, 0);
				SetCanEnterCombat(true);
				SetBehavior(Behavior_Default);
				SetCanMove(true);
			}
		}
	}
开发者ID:Bootz,项目名称:arcticdev,代码行数:34,代码来源:Raid_GruulsLair.cpp

示例13: 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

示例14: GiveTurn

void GameManager::GiveTurn(int playerID)
{
    //player sprite에 화살표 주기 주기
    auto nowTurnPlayer = m_PlayerList.find(playerID);
    nowTurnPlayer->second->SetMyTurn(true);
    auto tank = nowTurnPlayer->second->GetTank();
        tank->SetCanMove(true);

}
开发者ID:skdn159,项目名称:Heartress,代码行数:9,代码来源:GameManager.cpp

示例15: AIUpdate

	void AIUpdate()
	{
		if(GetHealthPercent() <= 50 && GetPhase() == 1)
		{
			const char * Text = "";
			uint32 pSoundID = 0;
			uint32 Random = rand()%2;
			switch (Random)	
			{
				case 0:
					Text =  "I'll give you more than you can handle.";
					pSoundID = 13321;
					break;
				case 1:
					Text = "There's plenty of me to go around.";
					pSoundID = 13322;
					break;
			}
			
			Emote(Text, Text_Yell, pSoundID);

			SetPhase(2);
			SetCanMove(false);
			ApplyAura(60191);

			pFire = _unit->GetMapMgr()->GetInterface()->SpawnCreature( CN_TELESTRA_FIRE, 494.726990f, 89.128799f, -15.941300f, 6.021390f, true, true, NULL, NULL );
			pFrost = _unit->GetMapMgr()->GetInterface()->SpawnCreature( CN_TELESTRA_FROST, 495.006012f, 89.328102f, -16.124609f, 0.027486f, true, true, NULL, NULL );
			pArcane = _unit->GetMapMgr()->GetInterface()->SpawnCreature( CN_TELESTRA_ARCANE, 504.798431f, 102.248375f, -16.124609f, 4.629921f, true, true, NULL, NULL );
		};

		if( GetPhase() == 2 )
		{
			if( ( pFrost != NULL && pFrost->isAlive() ) || ( pFire != NULL && pFire->isAlive() ) || ( pArcane != NULL && pArcane->isAlive() ) )
				return;

			Emote("Now to finish the job!", Text_Yell, 13323);
			RemoveAura(60191);
			SetCanMove(true);
			SetPhase(3);
		};

		ParentClass::AIUpdate();
	};
开发者ID:Vanj-crew,项目名称:HearthStone-Emu,代码行数:43,代码来源:Instance_Nexus.cpp


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