mirror of
https://github.com/SapphireServer/Sapphire.git
synced 2025-04-26 14:37:44 +00:00
correctly send exterior placed items/storeroom inventories
This commit is contained in:
parent
332456ffd0
commit
a5ad3fb883
5 changed files with 54 additions and 13 deletions
|
@ -222,10 +222,34 @@ namespace Sapphire::Common
|
|||
FreeCompanyGil = 22000,
|
||||
FreeCompanyCrystal = 22001,
|
||||
|
||||
HousingExternalAppearance = 25000,
|
||||
HousingOutdoorItemStoreroom = 25001,
|
||||
HousingInternalAppearance = 25002,
|
||||
HousingIndoorItemStoreroom = 25003,
|
||||
// housing interior containers
|
||||
HousingInteriorAppearance = 25002,
|
||||
|
||||
// 50 in each container max
|
||||
HousingInteriorPlacedItems1 = 25003,
|
||||
HousingInteriorPlacedItems2 = 25004,
|
||||
HousingInteriorPlacedItems3 = 25005,
|
||||
HousingInteriorPlacedItems4 = 25006,
|
||||
HousingInteriorPlacedItems5 = 25007,
|
||||
HousingInteriorPlacedItems6 = 25008,
|
||||
|
||||
// 50 max per container?
|
||||
HousingInteriorStoreroom1 = 27001,
|
||||
HousingInteriorStoreroom2 = 27002,
|
||||
HousingInteriorStoreroom3 = 27003,
|
||||
HousingInteriorStoreroom4 = 27004,
|
||||
HousingInteriorStoreroom5 = 27005,
|
||||
HousingInteriorStoreroom6 = 27006,
|
||||
HousingInteriorStoreroom7 = 27007,
|
||||
HousingInteriorStoreroom8 = 27008,
|
||||
|
||||
|
||||
// housing exterior containers
|
||||
HousingOutdoorPlacedItems = 25001,
|
||||
HousingOutdoorAppearance = 25000,
|
||||
HousingOutdoorStoreroom = 27000,
|
||||
|
||||
|
||||
};
|
||||
|
||||
enum ContainerType : uint16_t
|
||||
|
|
|
@ -304,6 +304,7 @@ enum ActorControlType : uint16_t
|
|||
AchievementCritReq = 0x3E8,
|
||||
AchievementList = 0x3E9,
|
||||
|
||||
SetEstateLightingLevel = 0x40B, // param1 = light level 0 - 5 maps to UI val 5-0
|
||||
RequestHousingBuildPreset = 0x44C,
|
||||
RequestEstateHallRemoval = 0x44F,
|
||||
RequestBuildPreset = 0x450, // no idea what this is, it gets sent with BuildPresetHandler and has the plot id in param1
|
||||
|
|
|
@ -423,16 +423,18 @@ void Sapphire::Network::GameConnection::clientTriggerHandler( const Packets::FFX
|
|||
}
|
||||
case ClientTriggerType::RequestLandInventory:
|
||||
{
|
||||
if( param2 != 1 )
|
||||
return;
|
||||
|
||||
uint8_t plot = ( param12 & 0xFF );
|
||||
|
||||
|
||||
auto housingMgr = g_fw.get< HousingMgr >();
|
||||
if( !housingMgr )
|
||||
break;
|
||||
|
||||
housingMgr->sendHousingInventory( player, Common::InventoryType::HousingOutdoorItemStoreroom, plot );
|
||||
uint16_t inventoryType = Common::InventoryType::HousingOutdoorPlacedItems;
|
||||
if( param2 == 1 )
|
||||
inventoryType = Common::InventoryType::HousingOutdoorStoreroom;
|
||||
|
||||
housingMgr->sendHousingInventory( player, inventoryType, plot );
|
||||
|
||||
break;
|
||||
}
|
||||
|
@ -446,7 +448,7 @@ void Sapphire::Network::GameConnection::clientTriggerHandler( const Packets::FFX
|
|||
if( !housingMgr )
|
||||
break;
|
||||
|
||||
housingMgr->sendHousingInventory( player, Common::InventoryType::HousingIndoorItemStoreroom, 255 );
|
||||
// housingMgr->sendHousingInventory( player, Common::InventoryType::HousingInd, 255 );
|
||||
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -122,10 +122,23 @@ void Sapphire::Land::init()
|
|||
m_landInventoryMap[ type ] = make_ItemContainer( type, maxSize, "houseiteminventory", true, true );
|
||||
};
|
||||
|
||||
setupContainer( InventoryType::HousingExternalAppearance, 8 );
|
||||
setupContainer( InventoryType::HousingInternalAppearance, 8 );
|
||||
setupContainer( InventoryType::HousingOutdoorItemStoreroom, m_maxPlacedExternalItems );
|
||||
setupContainer( InventoryType::HousingIndoorItemStoreroom, m_maxPlacedInternalItems );
|
||||
setupContainer( InventoryType::HousingOutdoorAppearance, 8 );
|
||||
setupContainer( InventoryType::HousingOutdoorPlacedItems, m_maxPlacedExternalItems );
|
||||
setupContainer( InventoryType::HousingOutdoorStoreroom, m_maxPlacedExternalItems );
|
||||
|
||||
setupContainer( InventoryType::HousingInteriorAppearance, 9 );
|
||||
|
||||
//uint64_t uId, uint32_t catalogId, uint64_t model1, uint64_t model2, bool isHq
|
||||
auto item = make_Item( 0x1000, 6600, 0, 0, false );
|
||||
item->setStackSize(1);
|
||||
|
||||
m_landInventoryMap[ InventoryType::HousingOutdoorPlacedItems ]->setItem( 0, item );
|
||||
m_landInventoryMap[ InventoryType::HousingOutdoorStoreroom ]->setItem( 0, item );
|
||||
}
|
||||
|
||||
void Sapphire::Land::loadItemContainerContents()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
uint32_t Sapphire::Land::convertItemIdToHousingItemId( uint32_t itemId )
|
||||
|
|
|
@ -62,6 +62,7 @@ namespace Sapphire
|
|||
uint8_t getLandTag( uint8_t slot );
|
||||
|
||||
ItemContainerPtr getItemContainer( uint16_t inventoryType ) const;
|
||||
void loadItemContainerContents();
|
||||
|
||||
private:
|
||||
uint32_t convertItemIdToHousingItemId( uint32_t itemId );
|
||||
|
|
Loading…
Add table
Reference in a new issue