本文整理汇总了C++中LocationVector::ChangeCoords方法的典型用法代码示例。如果您正苦于以下问题:C++ LocationVector::ChangeCoords方法的具体用法?C++ LocationVector::ChangeCoords怎么用?C++ LocationVector::ChangeCoords使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类LocationVector
的用法示例。
在下文中一共展示了LocationVector::ChangeCoords方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: HookHandleRepop
bool EyeOfTheStorm::HookHandleRepop(Player* plr)
{
uint32 i;
uint32 t = plr->GetTeam();
float dist = 999999.0f;
float distcur;
LocationVector dest;
dest.ChangeCoords( EOTSStartLocations[t][0], EOTSStartLocations[t][1], EOTSStartLocations[t][2], 0 );
for(i = 0; i < EOTS_TOWER_COUNT; i++)
{
if( m_CPBanner[i] && m_CPBanner[i]->GetEntry() == EOTS_BANNER_ALLIANCE && t == 0 ||
m_CPBanner[i]->GetEntry() == EOTS_BANNER_HORDE && t == 1 ||
m_CPBanner2[i] && m_CPBanner2[i]->GetEntry() == EOTS_BANNER_ALLIANCE && t == 0 ||
m_CPBanner2[i]->GetEntry() == EOTS_BANNER_HORDE && t == 1 ||
m_CPBanner3[i] && m_CPBanner3[i]->GetEntry() == EOTS_BANNER_ALLIANCE && t == 0 ||
m_CPBanner3[i]->GetEntry() == EOTS_BANNER_HORDE && t == 1 )
{
distcur = plr->GetPositionNC().Distance2DSq( EOTSGraveyardLocations[i][0], EOTSGraveyardLocations[i][1] );
if( distcur < dist )
{
dist = distcur;
dest.ChangeCoords( EOTSGraveyardLocations[i][0], EOTSGraveyardLocations[i][1], EOTSGraveyardLocations[i][2], 0 );
}
}
}
plr->SafeTeleport(plr->GetMapId(), plr->GetInstanceID(), dest);
return true;
}
示例2: HookHandleRepop
bool EyeOfTheStorm::HookHandleRepop(Player * plr)
{
uint32 i;
int32 sval;
uint32 t = plr->GetTeam();
float dist = 999999.0f;
float distcur;
LocationVector dest;
if(plr->GetTeam() == 0)
sval = 100;
else
sval = 0;
dest.ChangeCoords( EOTSStartLocations[t][0], EOTSStartLocations[t][1], EOTSStartLocations[t][2], 0 );
for(i = 0; i < EOTS_TOWER_COUNT; ++i)
{
if( m_CPStatus[i] == sval )
{
distcur = plr->GetPositionNC().Distance2DSq( EOTSGraveyardLocations[i][0], EOTSGraveyardLocations[i][1] );
if( distcur < dist )
{
dist = distcur;
dest.ChangeCoords( EOTSGraveyardLocations[i][0], EOTSGraveyardLocations[i][1], EOTSGraveyardLocations[i][2], 0 );
}
}
}
plr->SafeTeleport(plr->GetMapId(), plr->GetInstanceID(), dest);
return true;
}
示例3: HookHandleRepop
bool WarsongGulch::HookHandleRepop(Player * plr)
{
LocationVector dest;
if(plr->GetTeam())
dest.ChangeCoords(1032.644775f, 1388.316040f, 340.559937f, 0.043200f);
else
dest.ChangeCoords(1423.218872f, 1554.663574f, 342.833801f, 3.124139f);
plr->SafeTeleport(plr->GetMapId(), plr->GetInstanceID(), dest);
return true;
}
示例4: HookHandleRepop
bool CircleOfBlood::HookHandleRepop(Player* plr)
{
LocationVector dest;
dest.ChangeCoords(6241.171875f, 261.067322f, 0.891833f);
plr->SafeTeleport(m_mapMgr->GetMapId(), m_mapMgr->GetInstanceID(), dest);
return true;
}
示例5: HookHandleRepop
bool RingOfTrials::HookHandleRepop(Player* plr)
{
LocationVector dest;
dest.ChangeCoords(4057.042725f, 2918.686523f, 13.051933f);
plr->SafeTeleport(m_mapMgr->GetMapId(), m_mapMgr->GetInstanceID(), dest);
return true;
}
示例6: SOTATeleporter
// 54640
bool SOTATeleporter( uint32 i, Spell *s ){
Player *plr = s->GetPlayerTarget();
if( plr == NULL )
return true;
LocationVector dest;
uint32 closest_platform = 0;
for(uint32 i = 0; i < 5; i++){
float distance = plr->GetDistanceSq( sotaTransporterDestination[i][0], sotaTransporterDestination[i][1], sotaTransporterDestination[i][2]);
if(distance < 75){
closest_platform = i;
break;
}
}
dest.ChangeCoords(sotaTransporterDestination[closest_platform][0],
sotaTransporterDestination[closest_platform][1],
sotaTransporterDestination[closest_platform][2],
sotaTransporterDestination[closest_platform][3]);
plr->SafeTeleport(plr->GetMapId(), plr->GetInstanceID(), dest);
return true;
}
示例7: HookHandleRepop
bool DalaranSewers::HookHandleRepop(Player* plr)
{
LocationVector dest;
dest.ChangeCoords(1292.51f, 792.05f, 9.34f);
plr->SafeTeleport(m_mapMgr->GetMapId(), m_mapMgr->GetInstanceID(), dest);
return true;
}
示例8: OnPlatformTeleport
void IsleOfConquest::OnPlatformTeleport(Player* plr)
{
LocationVector dest;
uint32 closest_platform = 0;
if(plr->GetTeam() == TEAM_ALLIANCE)
{
for (uint32 i = 0; i < 6; i++)
{
float distance = CalcDistance(plr->GetPositionX(),
plr->GetPositionY(), plr->GetPositionZ(),
iocTransporterDestination[i][0],
iocTransporterDestination[i][1],
iocTransporterDestination[i][2]);
if (distance < 75 && distance > 10)
{
closest_platform = i;
break;
}
}
dest.ChangeCoords(iocTransporterDestination[closest_platform][0],
iocTransporterDestination[closest_platform][1],
iocTransporterDestination[closest_platform][2],
iocTransporterDestination[closest_platform][3]);
}
else // HORDE
{
for (uint32 i = 6; i < 12; i++)
{
float distance = CalcDistance(plr->GetPositionX(),
plr->GetPositionY(), plr->GetPositionZ(),
iocTransporterDestination[i][0],
iocTransporterDestination[i][1],
iocTransporterDestination[i][2]);
if (distance < 75 && distance > 10)
{
closest_platform = i;
break;
}
}
dest.ChangeCoords(iocTransporterDestination[closest_platform][0],
iocTransporterDestination[closest_platform][1],
iocTransporterDestination[closest_platform][2],
iocTransporterDestination[closest_platform][3]);
}
plr->SafeTeleport(plr->GetMapId(), plr->GetInstanceID(), dest);
}
示例9: HandleTeleportCheatOpcode
void WorldSession::HandleTeleportCheatOpcode(WorldPacket & recv_data)
{
float x,y,z,o;
LocationVector vec;
if(!HasGMPermissions())
{
SendNotification("You do not have permission to use this function.");
return;
}
recv_data >> x >> y >> z >> o;
vec.ChangeCoords(x,y,z,o);
_player->SafeTeleport(_player->GetMapId(),_player->GetInstanceID(),vec);
}
示例10: HookHandleRepop
bool RingOfValor::HookHandleRepop( Player *plr ){
LocationVector dest;
dest.ChangeCoords(762.91f, -284.28f, 28.28f);
plr->SafeTeleport(m_mapMgr->GetMapId(), m_mapMgr->GetInstanceID(), dest);
return true;
}