您当前的位置:首页 > IT编程 > C++
| C语言 | Java | VB | VC | python | Android | TensorFlow | C++ | oracle | 学术与代码 | cnn卷积神经网络 | gnn | 图像修复 | Keras | 数据集 | Neo4j | 自然语言处理 | 深度学习 | 医学CAD | 医学影像 | 超参数 | pointnet | pytorch | 异常检测 | Transformers | 情感分类 | 知识图谱 |

自学教程:C++ GetPathAtMapEnd函数代码示例

51自学网 2021-06-01 21:12:26
  C++
这篇教程C++ GetPathAtMapEnd函数代码示例写得很实用,希望能帮到您。

本文整理汇总了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();}
开发者ID:concept45,项目名称:Core,代码行数:33,


示例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));}
开发者ID:Adalinator,项目名称:mangos,代码行数:11,


示例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());}
开发者ID:CamelPown,项目名称:TrueBl0OD,代码行数:12,


示例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);}
开发者ID:spiritos,项目名称:mangos,代码行数:12,


示例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 );} 
开发者ID:Phatcat,项目名称:mangos,代码行数:13,


示例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 );}
开发者ID:Phatcat,项目名称:mangos,代码行数:14,


示例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();}
开发者ID:Splash,项目名称:mangos,代码行数:14,


示例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));}
开发者ID:Lirok,项目名称:mangos,代码行数:16,


示例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();}
开发者ID:Helias,项目名称:azerothcore-wotlk,代码行数:18,


示例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();}
开发者ID:Shutok,项目名称:HeavensGate,代码行数:18,


示例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();}
开发者ID:m-uu,项目名称:ElunaTrinityWotlk,代码行数:18,


示例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();}
开发者ID:090809,项目名称:TrinityCore,代码行数:21,


示例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}
开发者ID:ShadowCore,项目名称:ShadowCore,代码行数:23,



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


C++ GetPathComponent函数代码示例
C++ GetPath函数代码示例
万事OK自学网:51自学网_软件自学网_CAD自学网自学excel、自学PS、自学CAD、自学C语言、自学css3实例,是一个通过网络自主学习工作技能的自学平台,网友喜欢的软件自学网站。