1
Fork 0
mirror of https://github.com/SapphireServer/Sapphire.git synced 2025-04-27 14:57:44 +00:00

hide additional quarters door in private housing

This commit is contained in:
NotAdam 2018-12-30 23:25:52 +11:00
parent 144d8e8f27
commit fc9f33dd78
3 changed files with 10 additions and 1 deletions

View file

@ -240,6 +240,7 @@ enum ActorControlType : uint16_t
*/
HousingItemMoveConfirm = 0x3F9,
OpenEstateSettingsUI = 0x3FF,
HideAdditionalChambersDoor = 0x400,
/*!
* param1 = outdoor furnishings

View file

@ -1701,6 +1701,10 @@ struct FFXIVIpcHousingObjectMove : FFXIVIpcBasePacket< HousingObjectMove >
struct FFXIVIpcHousingObjectInitialize : FFXIVIpcBasePacket< HousingObjectInitialize >
{
Common::LandIdent landIdent;
/*!
* when this is 2, actrl 0x400 will hide the additional quarters door
* if it's any other value, it will stay there regardless
*/
int8_t u1; //Outdoor -1 / Indoor 0 - probably indicator
uint8_t packetNum;
uint8_t packetTotal;

View file

@ -76,12 +76,14 @@ void Sapphire::World::Territory::Housing::HousingInteriorTerritory::onPlayerZone
player.queuePacket( indoorInitPacket );
auto yardPacketTotal = static_cast< uint8_t >( 2 + pLand->getSize() );
for( uint8_t yardPacketNum = 0; yardPacketNum < yardPacketTotal; yardPacketNum++ )
{
auto objectInitPacket = makeZonePacket< Server::FFXIVIpcHousingObjectInitialize >( player.getId() );
memcpy( &objectInitPacket->data().landIdent, &m_landIdent, sizeof( Common::LandIdent ) );
objectInitPacket->data().u1 = 0;
// todo: change this when FC houses become a thing
objectInitPacket->data().u1 = 2; // 2 = actrl 0x400 will hide the fc door, otherwise it will stay there
objectInitPacket->data().u2 = 100;
objectInitPacket->data().packetNum = yardPacketNum;
objectInitPacket->data().packetTotal = yardPacketTotal;
@ -92,6 +94,8 @@ void Sapphire::World::Territory::Housing::HousingInteriorTerritory::onPlayerZone
player.queuePacket( objectInitPacket );
}
// todo: if in fc house, don't send this
player.queuePacket( Server::makeActorControl143( player.getId(), Network::ActorControl::HideAdditionalChambersDoor ) );
}
void Sapphire::World::Territory::Housing::HousingInteriorTerritory::onUpdate( uint32_t currTime )