mirror of
https://github.com/SapphireServer/Sapphire.git
synced 2025-04-28 15:17:46 +00:00
Move housingmgr to u8s for inv slots instead of u16s
This commit is contained in:
parent
fca98c3cd2
commit
f81746654c
2 changed files with 14 additions and 15 deletions
|
@ -956,7 +956,7 @@ bool Sapphire::World::Manager::HousingMgr::isPlacedItemsInventory( Sapphire::Com
|
||||||
}
|
}
|
||||||
|
|
||||||
void Sapphire::World::Manager::HousingMgr::reqPlaceHousingItem( Sapphire::Entity::Player& player, uint16_t landId,
|
void Sapphire::World::Manager::HousingMgr::reqPlaceHousingItem( Sapphire::Entity::Player& player, uint16_t landId,
|
||||||
uint16_t containerId, uint16_t slotId,
|
uint16_t containerId, uint8_t slotId,
|
||||||
Sapphire::Common::FFXIVARR_POSITION3 pos,
|
Sapphire::Common::FFXIVARR_POSITION3 pos,
|
||||||
float rotation )
|
float rotation )
|
||||||
{
|
{
|
||||||
|
@ -1038,7 +1038,7 @@ void Sapphire::World::Manager::HousingMgr::reqPlaceHousingItem( Sapphire::Entity
|
||||||
}
|
}
|
||||||
|
|
||||||
void Sapphire::World::Manager::HousingMgr::reqPlaceItemInStore( Sapphire::Entity::Player& player, uint16_t landId,
|
void Sapphire::World::Manager::HousingMgr::reqPlaceItemInStore( Sapphire::Entity::Player& player, uint16_t landId,
|
||||||
uint16_t containerId, uint16_t slotId )
|
uint16_t containerId, uint8_t slotId )
|
||||||
{
|
{
|
||||||
LandPtr land;
|
LandPtr land;
|
||||||
bool isOutside = false;
|
bool isOutside = false;
|
||||||
|
@ -1229,7 +1229,7 @@ void Sapphire::World::Manager::HousingMgr::sendInternalEstateInventoryBatch( Sap
|
||||||
}
|
}
|
||||||
|
|
||||||
void Sapphire::World::Manager::HousingMgr::reqMoveHousingItem( Entity::Player& player,
|
void Sapphire::World::Manager::HousingMgr::reqMoveHousingItem( Entity::Player& player,
|
||||||
Common::LandIdent ident, uint16_t slot,
|
Common::LandIdent ident, uint8_t slot,
|
||||||
Common::FFXIVARR_POSITION3 pos, float rot )
|
Common::FFXIVARR_POSITION3 pos, float rot )
|
||||||
{
|
{
|
||||||
auto landSet = toLandSetId( ident.territoryTypeId, ident.wardNum );
|
auto landSet = toLandSetId( ident.territoryTypeId, ident.wardNum );
|
||||||
|
@ -1254,7 +1254,7 @@ void Sapphire::World::Manager::HousingMgr::reqMoveHousingItem( Entity::Player& p
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Sapphire::World::Manager::HousingMgr::moveInternalItem( Entity::Player& player, Common::LandIdent ident,
|
bool Sapphire::World::Manager::HousingMgr::moveInternalItem( Entity::Player& player, Common::LandIdent ident,
|
||||||
Territory::Housing::HousingInteriorTerritory& terri, uint16_t slot,
|
Territory::Housing::HousingInteriorTerritory& terri, uint8_t slot,
|
||||||
Common::FFXIVARR_POSITION3 pos, float rot )
|
Common::FFXIVARR_POSITION3 pos, float rot )
|
||||||
{
|
{
|
||||||
auto containerIdx = static_cast< uint16_t >( slot / 50 );
|
auto containerIdx = static_cast< uint16_t >( slot / 50 );
|
||||||
|
@ -1300,7 +1300,7 @@ bool Sapphire::World::Manager::HousingMgr::moveInternalItem( Entity::Player& pla
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Sapphire::World::Manager::HousingMgr::moveExternalItem( Entity::Player& player,
|
bool Sapphire::World::Manager::HousingMgr::moveExternalItem( Entity::Player& player,
|
||||||
Common::LandIdent ident, uint16_t slot,
|
Common::LandIdent ident, uint8_t slot,
|
||||||
Sapphire::HousingZone& terri, Common::FFXIVARR_POSITION3 pos,
|
Sapphire::HousingZone& terri, Common::FFXIVARR_POSITION3 pos,
|
||||||
float rot )
|
float rot )
|
||||||
{
|
{
|
||||||
|
@ -1336,7 +1336,7 @@ bool Sapphire::World::Manager::HousingMgr::moveExternalItem( Entity::Player& pla
|
||||||
}
|
}
|
||||||
|
|
||||||
void Sapphire::World::Manager::HousingMgr::reqRemoveHousingItem( Sapphire::Entity::Player& player, uint16_t plot,
|
void Sapphire::World::Manager::HousingMgr::reqRemoveHousingItem( Sapphire::Entity::Player& player, uint16_t plot,
|
||||||
uint16_t containerId, uint16_t slot,
|
uint16_t containerId, uint8_t slot,
|
||||||
bool sendToStoreroom )
|
bool sendToStoreroom )
|
||||||
{
|
{
|
||||||
if( auto terri = std::dynamic_pointer_cast< Territory::Housing::HousingInteriorTerritory >( player.getCurrentZone() ) )
|
if( auto terri = std::dynamic_pointer_cast< Territory::Housing::HousingInteriorTerritory >( player.getCurrentZone() ) )
|
||||||
|
@ -1456,7 +1456,7 @@ bool Sapphire::World::Manager::HousingMgr::removeInternalItem( Entity::Player& p
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Sapphire::World::Manager::HousingMgr::removeExternalItem( Entity::Player& player, HousingZone& terri, Land& land,
|
bool Sapphire::World::Manager::HousingMgr::removeExternalItem( Entity::Player& player, HousingZone& terri, Land& land,
|
||||||
Common::InventoryType containerType, uint16_t slotId,
|
Common::InventoryType containerType, uint8_t slotId,
|
||||||
bool sendToStoreroom )
|
bool sendToStoreroom )
|
||||||
{
|
{
|
||||||
auto& containers = getEstateInventory( land.getLandIdent() );
|
auto& containers = getEstateInventory( land.getLandIdent() );
|
||||||
|
|
|
@ -156,10 +156,10 @@ namespace Sapphire::World::Manager
|
||||||
*/
|
*/
|
||||||
bool initHouseModels( Entity::Player& player, LandPtr land, uint32_t presetCatalogId );
|
bool initHouseModels( Entity::Player& player, LandPtr land, uint32_t presetCatalogId );
|
||||||
|
|
||||||
void reqPlaceHousingItem( Entity::Player& player, uint16_t landId, uint16_t containerId, uint16_t slotId,
|
void reqPlaceHousingItem( Entity::Player& player, uint16_t landId, uint16_t containerId, uint8_t slotId,
|
||||||
Common::FFXIVARR_POSITION3 pos, float rotation );
|
Common::FFXIVARR_POSITION3 pos, float rotation );
|
||||||
|
|
||||||
void reqPlaceItemInStore( Entity::Player& player, uint16_t landId, uint16_t containerId, uint16_t slotId );
|
void reqPlaceItemInStore( Entity::Player& player, uint16_t landId, uint16_t containerId, uint8_t slotId );
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* @brief Returns the equivalent YardObject for a HousingItem
|
* @brief Returns the equivalent YardObject for a HousingItem
|
||||||
|
@ -169,13 +169,12 @@ namespace Sapphire::World::Manager
|
||||||
Common::HousingObject getYardObjectForItem( Inventory::HousingItemPtr item ) const;
|
Common::HousingObject getYardObjectForItem( Inventory::HousingItemPtr item ) const;
|
||||||
|
|
||||||
|
|
||||||
void reqMoveHousingItem( Entity::Player& player, Common::LandIdent ident, uint16_t slot,
|
void reqMoveHousingItem( Entity::Player& player, Common::LandIdent ident, uint8_t slot,
|
||||||
Common::FFXIVARR_POSITION3 pos, float rot );
|
Common::FFXIVARR_POSITION3 pos, float rot );
|
||||||
|
|
||||||
|
|
||||||
void reqRemoveHousingItem( Sapphire::Entity::Player& player, uint16_t plot,
|
void reqRemoveHousingItem( Sapphire::Entity::Player& player, uint16_t plot,
|
||||||
uint16_t containerId, uint16_t slot,
|
uint16_t containerId, uint8_t slot, bool sendToStoreroom );
|
||||||
bool sendToStoreroom );
|
|
||||||
|
|
||||||
void reqEstateExteriorRemodel( Entity::Player& player, uint16_t plot );
|
void reqEstateExteriorRemodel( Entity::Player& player, uint16_t plot );
|
||||||
|
|
||||||
|
@ -212,7 +211,7 @@ namespace Sapphire::World::Manager
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
bool removeExternalItem( Entity::Player& player, HousingZone& terri, Land& land,
|
bool removeExternalItem( Entity::Player& player, HousingZone& terri, Land& land,
|
||||||
Common::InventoryType containerType, uint16_t slotId,
|
Common::InventoryType containerType, uint8_t slotId,
|
||||||
bool sendToStoreroom );
|
bool sendToStoreroom );
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
|
@ -228,7 +227,7 @@ namespace Sapphire::World::Manager
|
||||||
* @param rot The new rotation
|
* @param rot The new rotation
|
||||||
* @return true if moved successfully
|
* @return true if moved successfully
|
||||||
*/
|
*/
|
||||||
bool moveExternalItem( Entity::Player& player, Common::LandIdent ident, uint16_t slot,
|
bool moveExternalItem( Entity::Player& player, Common::LandIdent ident, uint8_t slot,
|
||||||
Sapphire::HousingZone& terri, Common::FFXIVARR_POSITION3 pos, float rot );
|
Sapphire::HousingZone& terri, Common::FFXIVARR_POSITION3 pos, float rot );
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
|
@ -245,7 +244,7 @@ namespace Sapphire::World::Manager
|
||||||
* @return true if moved successfully
|
* @return true if moved successfully
|
||||||
*/
|
*/
|
||||||
bool moveInternalItem( Entity::Player& player, Common::LandIdent ident,
|
bool moveInternalItem( Entity::Player& player, Common::LandIdent ident,
|
||||||
Territory::Housing::HousingInteriorTerritory& terri, uint16_t slot,
|
Territory::Housing::HousingInteriorTerritory& terri, uint8_t slot,
|
||||||
Common::FFXIVARR_POSITION3 pos, float rot );
|
Common::FFXIVARR_POSITION3 pos, float rot );
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
|
|
Loading…
Add table
Reference in a new issue