本文整理汇总了C++中GetPathAtMapEnd函数的典型用法代码示例。如果您正苦于以下问题:C++ GetPathAtMapEnd函数的具体用法?C++ GetPathAtMapEnd怎么用?C++ GetPathAtMapEnd使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了GetPathAtMapEnd函数的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: AddPct
void FlightPathMovementGenerator::DoReset(Player* owner)
{
if (!owner)
return;
if (!owner->isAlive())
return;
float playerFlightSpeed = 32.0f;
// Add percentage from SPELL_AURA_MOD_TAXI_FLIGHT_SPEED.
Unit::AuraEffectList const& mIncreaseTaxiFlightSpeed = owner->GetAuraEffectsByType(SPELL_AURA_MOD_TAXI_FLIGHT_SPEED);
for (Unit::AuraEffectList::const_iterator i = mIncreaseTaxiFlightSpeed.begin(); i != mIncreaseTaxiFlightSpeed.end(); ++i)
AddPct(playerFlightSpeed, (*i)->GetAmount());
owner->getHostileRefManager().setOnlineOfflineState(false);
owner->AddUnitState(UNIT_STATE_IN_FLIGHT);
owner->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_DISABLE_MOVE | UNIT_FLAG_TAXI_FLIGHT);
Movement::MoveSplineInit init(*owner);
uint32 end = GetPathAtMapEnd();
for (uint32 i = GetCurrentNode(); i != end; ++i)
{
G3D::Vector3 vertice((*i_path)[i].x, (*i_path)[i].y, (*i_path)[i].z);
init.Path().push_back(vertice);
}
init.SetFirstPointId(GetCurrentNode());
init.SetFly();
init.SetSmooth();
init.SetWalk(true);
init.SetVelocity(playerFlightSpeed);
init.Launch();
}
示例2: traveller
void FlightPathMovementGenerator::Reset(Player & player)
{
player.getHostileRefManager().setOnlineOfflineState(false);
player.addUnitState(UNIT_STAT_TAXI_FLIGHT);
player.SetFlag(UNIT_FIELD_FLAGS,UNIT_FLAG_DISABLE_MOVE | UNIT_FLAG_TAXI_FLIGHT);
Traveller<Player> traveller(player);
// do not send movement, it was sent already
i_destinationHolder.SetDestination(traveller, (*i_path)[i_currentNode].x, (*i_path)[i_currentNode].y, (*i_path)[i_currentNode].z, false);
player.SendMonsterMoveByPath(GetPath(),GetCurrentNode(),GetPathAtMapEnd(), SplineFlags(SPLINEFLAG_WALKMODE|SPLINEFLAG_FLYING));
}
示例3: traveller
void FlightPathMovementGenerator::Initialize(Player &player)
{
player.getHostileRefManager().setOnlineOfflineState(false);
player.AddUnitState(UNIT_STAT_IN_FLIGHT);
player.SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_DISABLE_MOVE | UNIT_FLAG_TAXI_FLIGHT);
Traveller<Player> traveller(player);
// do not send movement, it was sent already
i_destinationHolder.SetDestination(traveller, (*i_path)[i_currentNode].x, (*i_path)[i_currentNode].y, (*i_path)[i_currentNode].z, false);
// For preloading end grid
InitEndGridInfo();
player.SendMonsterMoveByPath(GetPath(), GetCurrentNode(), GetPathAtMapEnd());
}
示例4: LoadPath
void FlightPathMovementGenerator::Initialize(Player &player)
{
player.getHostilRefManager().setOnlineOfflineState(false);
player.addUnitState(UNIT_STAT_IN_FLIGHT);
player.SetFlag(UNIT_FIELD_FLAGS,UNIT_FLAG_DISABLE_MOVE | UNIT_FLAG_TAXI_FLIGHT);
LoadPath(player);
Traveller<Player> traveller(player);
// do not send movement, it was sent already
i_destinationHolder.SetDestination(traveller, i_path[i_currentNode].x, i_path[i_currentNode].y, i_path[i_currentNode].z, false);
player.SendMonsterMoveByPath(GetPath(),GetCurrentNode(),GetPathAtMapEnd(),MOVEMENTFLAG_WALK_MODE|MOVEMENTFLAG_ONTRANSPORT);
}
示例5: GetPath
void FlightPathMovementGenerator::ResendPathToOtherPlayers(Player& player)
{
TaxiPathNodeList path = GetPath();
uint32 pathEndPoint = GetPathAtMapEnd();
uint32 traveltime = uint32(PLAYER_FLIGHT_SPEED * (path.GetTotalLength(GetCurrentNode(),pathEndPoint)
- player.GetDistance(path[GetCurrentNode()].x, path[GetCurrentNode()].y, path[GetCurrentNode()].z)));
player.SendMonsterMoveByPath(path,
GetCurrentNode(),
pathEndPoint,
SplineFlags(SPLINEFLAG_WALKMODE|SPLINEFLAG_FLYING),
traveltime,
true );
}
示例6: traveller
void FlightPathMovementGenerator::Reset(Player & player)
{
player.getHostileRefManager().setOnlineOfflineState(false);
player.addUnitState(UNIT_STAT_TAXI_FLIGHT);
player.SetFlag(UNIT_FIELD_FLAGS,UNIT_FLAG_DISABLE_MOVE | UNIT_FLAG_TAXI_FLIGHT);
Traveller<Player> traveller(player);
// do not send movement, it was sent already
i_destinationHolder.SetDestination(traveller, (*i_path)[i_currentNode].x, (*i_path)[i_currentNode].y, (*i_path)[i_currentNode].z, false);
TaxiPathNodeList path = GetPath();
uint32 pathEndPoint = GetPathAtMapEnd();
uint32 traveltime = uint32(PLAYER_FLIGHT_SPEED * path.GetTotalLength(GetCurrentNode(),pathEndPoint));
player.SendMonsterMoveByPath(path,GetCurrentNode(),pathEndPoint, SplineFlags(SPLINEFLAG_WALKMODE|SPLINEFLAG_FLYING), traveltime );
}
示例7: init
void FlightPathMovementGenerator::_Reset(Player & player)
{
Movement::MoveSplineInit init(player);
uint32 end = GetPathAtMapEnd();
for (uint32 i = GetCurrentNode(); i != end; ++i)
{
G3D::Vector3 vertice((*i_path)[i].x,(*i_path)[i].y,(*i_path)[i].z);
init.Path().push_back(vertice);
}
init.SetFirstPointId(GetCurrentNode());
init.SetFly();
init.SetVelocity(PLAYER_FLIGHT_SPEED);
init.Launch();
}
示例8: LoadPath
void FlightPathMovementGenerator::Initialize(Player &player)
{
// Random handlers used for quests etc. - best would be to add FlightPathMovementGenerator::Initialize to sub-script class (Feanor)
if( player.m_taxi.GetTaxiDestination() == 158 || player.m_taxi.GetTaxiDestination() == 243 )
player.SetDisplayId(16587);
player.getHostileRefManager().setOnlineOfflineState(false);
player.addUnitState(UNIT_STAT_IN_FLIGHT);
player.SetFlag(UNIT_FIELD_FLAGS,UNIT_FLAG_DISABLE_MOVE | UNIT_FLAG_TAXI_FLIGHT);
LoadPath(player);
Traveller<Player> traveller(player);
// do not send movement, it was sent already
i_destinationHolder.SetDestination(traveller, i_path[i_currentNode].x, i_path[i_currentNode].y, i_path[i_currentNode].z, false);
player.SendMonsterMoveByPath(GetPath(),GetCurrentNode(),GetPathAtMapEnd(), SplineFlags(SPLINEFLAG_WALKMODE|SPLINEFLAG_FLYING));
}
示例9: init
void FlightPathMovementGenerator::DoReset(Player* player)
{
player->getHostileRefManager().setOnlineOfflineState(false);
player->AddUnitState(UNIT_STATE_IN_FLIGHT);
player->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_DISABLE_MOVE | UNIT_FLAG_TAXI_FLIGHT);
Movement::MoveSplineInit init(player);
uint32 end = GetPathAtMapEnd();
for (uint32 i = GetCurrentNode(); i < end; ++i)
{
G3D::Vector3 vertice(i_path[i]->x, i_path[i]->y, i_path[i]->z);
init.Path().push_back(vertice);
}
init.SetFirstPointId(GetCurrentNode());
init.SetFly();
init.SetVelocity(PLAYER_FLIGHT_SPEED);
init.Launch();
}
示例10: init
void FlightPathMovementGenerator::Reset(Player & player)
{
player.getHostileRefManager().setOnlineOfflineState(false);
player.AddUnitState(UNIT_STAT_IN_FLIGHT);
player.SetFlag(UNIT_FIELD_FLAGS,UNIT_FLAG_DISABLE_MOVE | UNIT_FLAG_TAXI_FLIGHT);
Movement::MoveSplineInit init(player);
uint32 end = GetPathAtMapEnd();
for (uint32 i = GetCurrentNode(); i != end; ++i)
{
G3D::Vector3 vertice((*i_path)[i].x,(*i_path)[i].y,(*i_path)[i].z);
init.Path().push_back(vertice);
}
init.SetFirstPointId(GetCurrentNode());
init.SetFly();
init.SetVelocity(32.0f);
init.Launch();
}
示例11: init
void FlightPathMovementGenerator::DoReset(Player* player)
{
player->AddUnitState(UNIT_STATE_IN_FLIGHT);
player->CombatStopWithPets();
player->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_REMOVE_CLIENT_CONTROL | UNIT_FLAG_TAXI_FLIGHT);
Movement::MoveSplineInit init(player);
uint32 end = GetPathAtMapEnd();
for (uint32 i = GetCurrentNode(); i != end; ++i)
{
G3D::Vector3 vertice(_path[i]->LocX, _path[i]->LocY, _path[i]->LocZ);
init.Path().push_back(vertice);
}
init.SetFirstPointId(GetCurrentNode());
init.SetFly();
init.SetVelocity(PLAYER_FLIGHT_SPEED);
init.Launch();
}
示例12: init
void FlightPathMovementGenerator::DoReset(Player* player)
{
player->getHostileRefManager().setOnlineOfflineState(false);
player->AddUnitState(UNIT_STATE_IN_FLIGHT);
player->SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_REMOVE_CLIENT_CONTROL | UNIT_FLAG_TAXI_FLIGHT);
Movement::MoveSplineInit init(player);
uint32 end = GetPathAtMapEnd();
for (uint32 i = i_currentNode; i != end; ++i)
{
G3D::Vector3 vertice(i_path[i]->Loc.X, i_path[i]->Loc.Y, i_path[i]->Loc.Z);
init.Path().push_back(vertice);
}
init.SetFirstPointId(i_currentNode);
init.SetFly();
init.SetSmooth();
init.SetUncompressed();
init.SetWalk(true);
init.SetVelocity(PLAYER_FLIGHT_SPEED);
init.Launch();
}
示例13: LoadPath
void FlightPathMovementGenerator::Initialize(Player &player)
{
player.getHostileRefManager().setOnlineOfflineState(false);
player.addUnitState(UNIT_STAT_IN_FLIGHT);
player.SetFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_DISABLE_MOVE | UNIT_FLAG_TAXI_FLIGHT);
LoadPath(player);
Traveller<Player> traveller(player);
// do not send movement, it was sent already
i_destinationHolder.SetDestination(traveller, i_path[i_currentNode].x, i_path[i_currentNode].y, i_path[i_currentNode].z, false);
player.SendMonsterMoveByPath(GetPath(), GetCurrentNode(), GetPathAtMapEnd());
// Storage to preload flightmaster grid at end of flight. For multi-stop flights, this will
// be reinitialized for each flightmaster at the end of each spline (or stop) in the flight.
uint32 nodeCount = i_mapIds.size(); // Get the number of nodes in the path. i_path and i_mapIds are the
// same size when loaded in ObjectMgr::GetTaxiPathNodes, called from LoadPath()
m_endMapId = i_mapIds[nodeCount -1]; // Get the map ID from the last node
m_preloadTargetNode = nodeCount - 3; // 2 nodes before the final node, we pre-load the grid
m_endGridX = i_path[nodeCount -1].x; // Get the X position from the last node
m_endGridY = i_path[nodeCount -1].y; // Get tye Y position from the last node
}