本文整理汇总了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();
};
示例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));
}
示例3: OnCombatStart
void OnCombatStart(Unit* mTarget)
{
SetAllowMelee(false);
SetCanMove(false);
//doors
ParentClass::OnCombatStart(mTarget);
}
示例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();
}
示例5: SeaforiumDepthCharge
SeaforiumDepthCharge(Creature* pCreature) : MoonScriptCreatureAI(pCreature)
{
SetCanMove( false );
SetCanEnterCombat( false );
_unit->SetFaction(21);
RegisterAIUpdateEvent(3000);
}
示例6: OnLoad
void OnLoad()
{
_unit->SetUInt32Value(UNIT_FIELD_FACTIONTEMPLATE, 1771);
SetFlyMode(true);
SetCanMove(false);
ParentClass::OnLoad();
}
示例7: OnCombatStart
void OnCombatStart(Unit* mTarget)
{
SetAllowMelee(false);
SetCanMove(false);
dtimmer = 1;
ParentClass::OnCombatStart(mTarget);
}
示例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));
}
示例9: VoidZoneARC
VoidZoneARC(Creature* pCreature) : MoonScriptCreatureAI(pCreature)
{
StopMovement();
SetCanMove(false);
SetCanEnterCombat(false);
RegisterAIUpdateEvent(1000);
}
示例10: SeaforiumDepthCharge
SeaforiumDepthCharge(Creature* pCreature) : MoonScriptCreatureAI(pCreature)
{
SetCanMove( false );
SetCanEnterCombat( false );
_unit->SetFaction(21);
p_timer = 3000;
}
示例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);
}
}
示例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);
}
}
}
示例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 );
}
}
示例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);
}
示例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();
};