mirror of
https://github.com/SapphireServer/Sapphire.git
synced 2025-04-29 07:37:45 +00:00
fix this stupid inconsistency where its sometimes 2 u8s, sometimes u16s
This commit is contained in:
parent
ebda186553
commit
ab3c3a91cd
3 changed files with 14 additions and 5 deletions
|
@ -450,13 +450,22 @@ void Sapphire::World::Manager::HousingMgr::requestEstateEditGuestAccess( Entity:
|
|||
player.queuePacket( packet );
|
||||
}
|
||||
|
||||
Sapphire::Common::LandIdent Sapphire::World::Manager::HousingMgr::clientTriggerParamsToLandIdent( uint32_t param11, uint32_t param12 ) const
|
||||
Sapphire::Common::LandIdent Sapphire::World::Manager::HousingMgr::clientTriggerParamsToLandIdent( uint32_t param11, uint32_t param12, bool use16bits ) const
|
||||
{
|
||||
Common::LandIdent ident;
|
||||
ident.worldId = param11 >> 16;
|
||||
ident.territoryTypeId = param11 & 0xFFFF;
|
||||
ident.wardNum = (param12 >> 8) & 0xFF;
|
||||
ident.landId = param12 & 0xFF;
|
||||
|
||||
if( use16bits )
|
||||
{
|
||||
ident.wardNum = param12 >> 16;
|
||||
ident.landId = param12 & 0xFFFF;
|
||||
}
|
||||
else
|
||||
{
|
||||
ident.wardNum = (param12 >> 8) & 0xFF;
|
||||
ident.landId = param12 & 0xFF;
|
||||
}
|
||||
|
||||
return ident;
|
||||
}
|
||||
|
|
|
@ -33,7 +33,7 @@ namespace Sapphire::World::Manager
|
|||
/*!
|
||||
* @brief Converts param1 of a client trigger into a Common::LandIndent
|
||||
*/
|
||||
Common::LandIdent clientTriggerParamsToLandIdent( uint32_t param11, uint32_t param12 ) const;
|
||||
Common::LandIdent clientTriggerParamsToLandIdent( uint32_t param11, uint32_t param12, bool use16bits = true ) const;
|
||||
|
||||
void sendWardLandInfo( Entity::Player& player, uint8_t wardId, uint16_t territoryTypeId );
|
||||
|
||||
|
|
|
@ -336,7 +336,7 @@ void Sapphire::Network::GameConnection::clientTriggerHandler( const Packets::FFX
|
|||
{
|
||||
auto pHousingMgr = g_fw.get< HousingMgr >();
|
||||
|
||||
auto ident = pHousingMgr->clientTriggerParamsToLandIdent( param11, param12 );
|
||||
auto ident = pHousingMgr->clientTriggerParamsToLandIdent( param11, param12, false );
|
||||
pHousingMgr->sendLandSignOwned( player, ident );
|
||||
|
||||
break;
|
||||
|
|
Loading…
Add table
Reference in a new issue