mirror of
https://github.com/SapphireServer/Sapphire.git
synced 2025-04-29 07:37:45 +00:00
added Land Update function
This commit is contained in:
parent
0f86374264
commit
e832c078d5
2 changed files with 15 additions and 0 deletions
|
@ -131,6 +131,20 @@ void Core::HousingZone::sendLandSet( Entity::Player& player )
|
||||||
player.queuePacket( landsetInitializePacket );
|
player.queuePacket( landsetInitializePacket );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Core::HousingZone::sendLandUpdate( uint8_t landId )
|
||||||
|
{
|
||||||
|
for( const auto& playerIt : m_playerMap )
|
||||||
|
{
|
||||||
|
auto pPlayer = playerIt.second;
|
||||||
|
|
||||||
|
auto landUpdatePacket = makeZonePacket< FFXIVIpcLandUpdate >( pPlayer->getId() );
|
||||||
|
landUpdatePacket->data().landId = landId;
|
||||||
|
landUpdatePacket->data().land = getLand( landId )->getLand();
|
||||||
|
|
||||||
|
pPlayer->queuePacket( landUpdatePacket );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
bool Core::HousingZone::isPlayerSubInstance( Entity::Player& player )
|
bool Core::HousingZone::isPlayerSubInstance( Entity::Player& player )
|
||||||
{
|
{
|
||||||
return player.getPos().x < -15000.0f; //ToDo: get correct pos
|
return player.getPos().x < -15000.0f; //ToDo: get correct pos
|
||||||
|
|
|
@ -23,6 +23,7 @@ namespace Core
|
||||||
void onUpdate( uint32_t currTime ) override;
|
void onUpdate( uint32_t currTime ) override;
|
||||||
|
|
||||||
void sendLandSet( Entity::Player& player );
|
void sendLandSet( Entity::Player& player );
|
||||||
|
void sendLandUpdate( uint8_t landId );
|
||||||
bool isPlayerSubInstance( Entity::Player& player );
|
bool isPlayerSubInstance( Entity::Player& player );
|
||||||
|
|
||||||
/* returns current ward number for this zone */
|
/* returns current ward number for this zone */
|
||||||
|
|
Loading…
Add table
Reference in a new issue