From c13a0b14ed998d31696c5bb72601fb4821f7accc Mon Sep 17 00:00:00 2001 From: NotAdam Date: Sun, 2 Dec 2018 16:42:46 +1100 Subject: [PATCH] cleanup and document storeroom status actrl --- src/common/Network/CommonActorControl.h | 23 +++++++++++++++---- .../Housing/HousingInteriorTerritory.cpp | 22 +++++++++--------- 2 files changed, 30 insertions(+), 15 deletions(-) diff --git a/src/common/Network/CommonActorControl.h b/src/common/Network/CommonActorControl.h index 208aeb97..e15c95c3 100644 --- a/src/common/Network/CommonActorControl.h +++ b/src/common/Network/CommonActorControl.h @@ -207,23 +207,38 @@ enum ActorControlType : uint16_t Dismount = 0x3A0, // Duty Recorder - BeginReplayAck = 0x3A1, + BeginReplayAck = 0x3A1, EndReplayAck = 0x3A2, // Housing - ShowHousingItemUI = 0x3F7, + ShowHousingItemUI = 0x3F7, ShowBuildPresetUI = 0x3E9, BuildPresetResponse = 0x3ED, + /*! + * param1 = outdoor furnishings + * u8 0 - relocation available, 1 = available + * u8 1 - outoor furnishings placed + * u8 2 - outdoor furnishings in storeroom + * u8 3 - outdoor funishings limit + * param2 = indoor furnishings + * u16 0 - relocation available, 1 = available + * u16 1 - furnishings placed + * param3 = indoor furnishings + * u16 0 - in storeroom + * u16 1 - indoor furnishings limit + */ + HousingStoreroomStatus = 0x419, + // PvP Duel - SetPvPState = 0x5E0, // param3 must be 6 to engage a duel (hardcoded in the client) + SetPvPState = 0x5E0, // param3 must be 6 to engage a duel (hardcoded in the client) EndDuelSession = 0x5E1, // because someone went oob? StartDuelCountdown = 0x5E2, // begins a countdown; also does some duel bgm thing. StartDuel = 0x5E3, // actually all it does is set the challenger actor id; DuelResultScreen = 0x5E4, // win/lose thing, also reset a target id just like what EndDuelSession does. // Duty Action - SetDutyActionId = 0x5E8, // ContentExAction + SetDutyActionId = 0x5E8, // ContentExAction SetDutyActionHud = 0x5E9, // disable/enable SetDutyActionActive = 0x5EA, SetDutyActionRemaining = 0x5EB, diff --git a/src/servers/sapphire_zone/Territory/Housing/HousingInteriorTerritory.cpp b/src/servers/sapphire_zone/Territory/Housing/HousingInteriorTerritory.cpp index 758274ff..009c8d35 100644 --- a/src/servers/sapphire_zone/Territory/Housing/HousingInteriorTerritory.cpp +++ b/src/servers/sapphire_zone/Territory/Housing/HousingInteriorTerritory.cpp @@ -56,26 +56,26 @@ void Housing::HousingInteriorTerritory::onPlayerZoneIn( Entity::Player& player ) "HousingInteriorTerritory::onPlayerZoneIn: Zone#" + std::to_string( getGuId() ) + "|" + std::to_string( getTerritoryTypeId() ) + ", Entity#" + std::to_string( player.getId() ) ); - auto housingIndoorInitializPacket = makeZonePacket< FFXIVIpcHousingIndoorInitialize >( player.getId() ); - housingIndoorInitializPacket->data().u1 = 2578; - housingIndoorInitializPacket->data().u2 = 10; - housingIndoorInitializPacket->data().u3 = 530; - housingIndoorInitializPacket->data().u4 = 266; + auto indoorInitPacket = makeZonePacket< FFXIVIpcHousingIndoorInitialize >( player.getId() ); + indoorInitPacket->data().u1 = 0; + indoorInitPacket->data().u2 = 0; + indoorInitPacket->data().u3 = 0; + indoorInitPacket->data().u4 = 0; auto landSetId = pHousingMgr->toLandSetId( m_landIdent.territoryTypeId, m_landIdent.wardNum ); auto pLand = pHousingMgr->getHousingZoneByLandSetId( landSetId )->getLand( m_landIdent.landId ); auto pHouse = pLand->getHouse(); + for( auto i = 0; i < 10; i++ ) + { + indoorInitPacket->data().indoorItems[ i ] = pHouse->getHouseInteriorPart( (Common::HousingInteriorSlot)i ); + } + uint32_t yardPacketNum; uint32_t yardPacketTotal = 2 + pLand->getSize(); - for( auto i = 0; i < 10; i++ ) - { - housingIndoorInitializPacket->data().indoorItems[ i ] = pHouse->getHouseInteriorPart( (Common::HousingInteriorSlot)i ); - } - - player.queuePacket( housingIndoorInitializPacket ); + player.queuePacket( indoorInitPacket ); for( yardPacketNum = 0; yardPacketNum < yardPacketTotal; yardPacketNum++ ) {