本文整理汇总了C++中FlightPathMovementGenerator::GetPathAtMapEnd方法的典型用法代码示例。如果您正苦于以下问题:C++ FlightPathMovementGenerator::GetPathAtMapEnd方法的具体用法?C++ FlightPathMovementGenerator::GetPathAtMapEnd怎么用?C++ FlightPathMovementGenerator::GetPathAtMapEnd使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类FlightPathMovementGenerator
的用法示例。
在下文中一共展示了FlightPathMovementGenerator::GetPathAtMapEnd方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: HandleMoveWorldportAckOpcode
void WorldSession::HandleMoveWorldportAckOpcode( WorldPacket & /*recv_data*/ )
{
sLog.outDebug( "WORLD: got MSG_MOVE_WORLDPORT_ACK." );
MapEntry const* mEntry = sMapStore.LookupEntry(GetPlayer()->GetMapId());
if(!mEntry || !MaNGOS::IsValidMapCoord(GetPlayer()->GetPositionX(),GetPlayer()->GetPositionY()))
{
LogoutPlayer(false);
return;
}
// reset instance validity
GetPlayer()->m_InstanceValid = true;
GetPlayer()->SetSemaphoreTeleport(false);
GetPlayer()->SendInitialPacketsBeforeAddToMap();
MapManager::Instance().GetMap(GetPlayer()->GetMapId(), GetPlayer())->Add(GetPlayer());
GetPlayer()->SendInitialPacketsAfterAddToMap();
// flight fast teleport case
if(GetPlayer()->GetMotionMaster()->top()->GetMovementGeneratorType()==FLIGHT_MOTION_TYPE)
{
if(!_player->InBattleGround())
{
// short preparations to continue flight
FlightPathMovementGenerator* flight = (FlightPathMovementGenerator*)(GetPlayer()->GetMotionMaster()->top());
flight->Initialize(*GetPlayer());
SendPath(flight->GetPath(),flight->GetCurrentNode(),flight->GetPathAtMapEnd());
GetPlayer()->SetDontMove(false);
return;
}
// battleground state prepre, stop flight
GetPlayer()->GetMotionMaster()->MovementExpired();
GetPlayer()->FlightComplete();
GetPlayer()->ClearTaxiDestinations();
GetPlayer()->StopMoving();
}
// resurrect character at enter into instance where his corpse exist after add to map
Corpse *corpse = GetPlayer()->GetCorpse();
if (corpse && corpse->GetType() == CORPSE_RESURRECTABLE && corpse->GetMapId() == GetPlayer()->GetMapId())
{
if( mEntry && (mEntry->map_type == MAP_INSTANCE || mEntry->map_type == MAP_RAID) )
{
GetPlayer()->ResurrectPlayer(0.5f,false);
GetPlayer()->SpawnCorpseBones();
GetPlayer()->SaveToDB();
}
}
// mount allow check
if(!_player->GetBaseMap()->IsMountAllowed())
_player->RemoveSpellsCausingAura(SPELL_AURA_MOUNTED);
// battleground state preper
if(_player->InBattleGround())
{
BattleGround *bg = _player->GetBattleGround();
if(bg)
{
if(bg->GetMapId() == _player->GetMapId()) // we teleported to bg
{
if(!bg->GetBgRaid(_player->GetTeam())) // first player joined
{
Group *group = new Group;
bg->SetBgRaid(_player->GetTeam(), group);
group->ConvertToRaid();
group->AddMember(_player->GetGUID(), _player->GetName());
group->ChangeLeader(_player->GetGUID());
}
else // raid already exist
{
bg->GetBgRaid(_player->GetTeam())->AddMember(_player->GetGUID(), _player->GetName());
}
}
}
}
// honorless target
if(GetPlayer()->pvpInfo.inHostileArea)
GetPlayer()->CastSpell(GetPlayer(), 2479, true);
// resummon pet
if(GetPlayer()->m_oldpetnumber)
{
Pet* NewPet = new Pet(GetPlayer());
if(!NewPet->LoadPetFromDB(GetPlayer(), 0, GetPlayer()->m_oldpetnumber, true))
delete NewPet;
GetPlayer()->m_oldpetnumber = 0;
}
GetPlayer()->SetDontMove(false);
}