本文整理汇总了C++中PlayerPointer::SetMovement方法的典型用法代码示例。如果您正苦于以下问题:C++ PlayerPointer::SetMovement方法的具体用法?C++ PlayerPointer::SetMovement怎么用?C++ PlayerPointer::SetMovement使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PlayerPointer
的用法示例。
在下文中一共展示了PlayerPointer::SetMovement方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: AIUpdate
void AIUpdate()
{
PlayerPointer CurrentPlayer = objmgr.GetPlayer( mPlayerGuid );
if ( CurrentPlayer == NULLPLR )
{
RemoveAIUpdateEvent();
mPlayerGuid = 0;
return;
};
if ( CurrentPlayer->GetMapId() == 530 ) // Shattrath
{
CurrentPlayer->SafeTeleport( 530, 0, -1742.640869f, 5454.712402f, -7.928009f, 4.606363f );
}
else if ( CurrentPlayer->GetMapId() == 0 ) // Elwynn Forest
{
CurrentPlayer->SafeTeleport( 0, 0, -9569.150391f, -14.753426f, 68.051422f, 4.874008f );
}
else if ( CurrentPlayer->GetMapId() == 1 ) // Mulgore
{
CurrentPlayer->SafeTeleport( 1, 0, -1326.711914f, 86.301125f, 133.093918f, 3.510725f );
};
CurrentPlayer->SetMovement( MOVE_UNROOT, 1 );
CurrentPlayer->CastSpell( CurrentPlayer, 42867, true ); // 24742
_gameobject->SetUInt32Value(GAMEOBJECT_FLAGS,0);
mPlayerGuid = 0;
RemoveAIUpdateEvent();
};
示例2: OnActivate
void OnActivate( PlayerPointer pPlayer )
{
if ( pPlayer == NULLPLR || mPlayerGuid != 0 )
return;
// Do you think we should look for ai owner ?
/*GameObjectPointer BlastCannon = pPlayer->GetMapMgr()->GetInterface()->GetGameObjectNearestCoords( pPlayer->GetPositionX(), pPlayer->GetPositionY(), pPlayer->GetPositionZ(), 180515 );
if ( BlastCannon != NULLGOB )
BlastCannon->SetUInt32Value( GAMEOBJECT_FLAGS, 33 );*/
pPlayer->CastSpell( pPlayer, 24832, true );
pPlayer->SetMovement( MOVE_ROOT, 1 );
_gameobject->PlaySoundToSet( 8476 );
mPlayerGuid = pPlayer->GetGUID();
RegisterAIUpdateEvent( 2200 );
};