mirror of
https://github.com/SapphireServer/Sapphire.git
synced 2025-04-27 06:47:45 +00:00
Using LandIdent in packets
This commit is contained in:
parent
3bbb343d09
commit
90eb03df95
5 changed files with 32 additions and 42 deletions
|
@ -774,12 +774,17 @@ namespace Core::Common
|
||||||
Private = 2,
|
Private = 2,
|
||||||
};
|
};
|
||||||
|
|
||||||
struct LandPermissionSet
|
struct LandIdent
|
||||||
{
|
{
|
||||||
int16_t landId; //00
|
int16_t landId; //00
|
||||||
int16_t wardNum; //02
|
int16_t wardNum; //02
|
||||||
int16_t zoneId; //04
|
int16_t territoryTypeId; //04
|
||||||
int16_t worldId; //06
|
int16_t worldId; //06
|
||||||
|
};
|
||||||
|
|
||||||
|
struct LandPermissionSet
|
||||||
|
{
|
||||||
|
LandIdent landIdent;
|
||||||
uint32_t permissionMask; //08
|
uint32_t permissionMask; //08
|
||||||
uint32_t unkown1; //12
|
uint32_t unkown1; //12
|
||||||
};
|
};
|
||||||
|
|
|
@ -1612,10 +1612,7 @@ struct LandStruct
|
||||||
|
|
||||||
struct FFXIVIpcLandUpdate : FFXIVIpcBasePacket< LandUpdate >
|
struct FFXIVIpcLandUpdate : FFXIVIpcBasePacket< LandUpdate >
|
||||||
{
|
{
|
||||||
uint16_t landId;
|
Common::LandIdent landIdent;
|
||||||
uint16_t unknow0;
|
|
||||||
uint16_t unknow1;
|
|
||||||
uint16_t unknow2;
|
|
||||||
LandStruct land;
|
LandStruct land;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -1627,10 +1624,7 @@ struct FFXIVIpcLandPriceUpdate : FFXIVIpcBasePacket< LandPriceUpdate >
|
||||||
|
|
||||||
struct FFXIVIpcLandInfoSign : FFXIVIpcBasePacket< LandInfoSign >
|
struct FFXIVIpcLandInfoSign : FFXIVIpcBasePacket< LandInfoSign >
|
||||||
{
|
{
|
||||||
uint16_t landId;
|
Common::LandIdent landIdent;
|
||||||
uint16_t wardNum;
|
|
||||||
uint16_t zoneId;
|
|
||||||
uint16_t worldId;
|
|
||||||
uint64_t ownerId; // ither contentId or fcId
|
uint64_t ownerId; // ither contentId or fcId
|
||||||
uint32_t unknow1;
|
uint32_t unknow1;
|
||||||
uint8_t houseIconAdd;
|
uint8_t houseIconAdd;
|
||||||
|
@ -1645,10 +1639,7 @@ struct FFXIVIpcLandInfoSign : FFXIVIpcBasePacket< LandInfoSign >
|
||||||
|
|
||||||
struct FFXIVIpcLandRename : FFXIVIpcBasePacket< LandRename >
|
struct FFXIVIpcLandRename : FFXIVIpcBasePacket< LandRename >
|
||||||
{
|
{
|
||||||
uint16_t landId;
|
Common::LandIdent landIdent;
|
||||||
uint16_t wardNum;
|
|
||||||
uint16_t zoneId;
|
|
||||||
uint16_t worldId;
|
|
||||||
char landName[20];
|
char landName[20];
|
||||||
uint32_t padding;
|
uint32_t padding;
|
||||||
};
|
};
|
||||||
|
@ -1669,10 +1660,7 @@ struct FFXIVIpcLandSetMap : FFXIVIpcBasePacket< LandSetMap >
|
||||||
|
|
||||||
struct FFXIVIpcLandSetInitialize : FFXIVIpcBasePacket< LandSetInitialize >
|
struct FFXIVIpcLandSetInitialize : FFXIVIpcBasePacket< LandSetInitialize >
|
||||||
{
|
{
|
||||||
uint16_t unknown0;
|
Common::LandIdent landIdent;
|
||||||
uint16_t landSetId; // set 1 for "Mist, Ward 2"
|
|
||||||
uint16_t zoneId;
|
|
||||||
uint16_t worldId;
|
|
||||||
uint8_t unknown1;
|
uint8_t unknown1;
|
||||||
uint8_t subInstance; // (default : 1/2)
|
uint8_t subInstance; // (default : 1/2)
|
||||||
uint8_t unknown3;
|
uint8_t unknown3;
|
||||||
|
@ -1722,12 +1710,7 @@ struct FFXIVIpcLandSetYardInitialize : FFXIVIpcBasePacket< LandSetYardInitialize
|
||||||
|
|
||||||
struct FFXIVIpcHousingWardInfo : FFXIVIpcBasePacket< HousingWardInfo >
|
struct FFXIVIpcHousingWardInfo : FFXIVIpcBasePacket< HousingWardInfo >
|
||||||
{
|
{
|
||||||
uint16_t unknown1;
|
Common::LandIdent landIdent;
|
||||||
|
|
||||||
uint16_t wardId;
|
|
||||||
uint16_t territoryTypeId;
|
|
||||||
|
|
||||||
uint16_t unknown2;
|
|
||||||
|
|
||||||
struct HouseInfoEntry
|
struct HouseInfoEntry
|
||||||
{
|
{
|
||||||
|
|
|
@ -1771,11 +1771,11 @@ bool Core::Entity::Player::isOnEnterEventDone() const
|
||||||
void Core::Entity::Player::setLandPermissions( uint8_t permissionSet, uint32_t permissionMask,
|
void Core::Entity::Player::setLandPermissions( uint8_t permissionSet, uint32_t permissionMask,
|
||||||
int16_t landId, int16_t wardNum, int16_t zoneId )
|
int16_t landId, int16_t wardNum, int16_t zoneId )
|
||||||
{
|
{
|
||||||
m_landPermission[ permissionSet ].landId = landId;
|
m_landPermission[ permissionSet ].landIdent.landId = landId;
|
||||||
|
m_landPermission[ permissionSet ].landIdent.wardNum = wardNum;
|
||||||
|
m_landPermission[ permissionSet ].landIdent.territoryTypeId = zoneId;
|
||||||
|
m_landPermission[ permissionSet ].landIdent.worldId = 67;
|
||||||
m_landPermission[ permissionSet ].permissionMask = permissionMask;
|
m_landPermission[ permissionSet ].permissionMask = permissionMask;
|
||||||
m_landPermission[ permissionSet ].wardNum = wardNum;
|
|
||||||
m_landPermission[ permissionSet ].zoneId = zoneId;
|
|
||||||
m_landPermission[ permissionSet ].worldId = 67;
|
|
||||||
m_landPermission[ permissionSet ].unkown1 = 0;
|
m_landPermission[ permissionSet ].unkown1 = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1805,10 +1805,10 @@ void Core::Entity::Player::sendLandPermissionSlot( uint8_t slotId, uint8_t landI
|
||||||
auto landPermissions = makeZonePacket< FFXIVIpcLandPermissionSlot >( getId() );
|
auto landPermissions = makeZonePacket< FFXIVIpcLandPermissionSlot >( getId() );
|
||||||
landPermissions->data().type = slotId;
|
landPermissions->data().type = slotId;
|
||||||
|
|
||||||
landPermissions->data().permissionSet.landId = landId;
|
landPermissions->data().permissionSet.landIdent.landId = landId;
|
||||||
landPermissions->data().permissionSet.wardNum = wardId;
|
landPermissions->data().permissionSet.landIdent.wardNum = wardId;
|
||||||
landPermissions->data().permissionSet.zoneId = zoneId;
|
landPermissions->data().permissionSet.landIdent.territoryTypeId = zoneId;
|
||||||
landPermissions->data().permissionSet.worldId = 67;
|
landPermissions->data().permissionSet.landIdent.worldId = 67;
|
||||||
landPermissions->data().permissionSet.permissionMask = 0;
|
landPermissions->data().permissionSet.permissionMask = 0;
|
||||||
queuePacket( landPermissions );
|
queuePacket( landPermissions );
|
||||||
}
|
}
|
|
@ -93,12 +93,13 @@ void Core::HousingMgr::sendLandSignOwned( Entity::Player& player, uint8_t wardId
|
||||||
//memcpy( &landInfoSignPacket->data().estateName, land->getLandName().c_str(), land->getLandName().size() );
|
//memcpy( &landInfoSignPacket->data().estateName, land->getLandName().c_str(), land->getLandName().size() );
|
||||||
landInfoSignPacket->data().houseSize = land->getSize();
|
landInfoSignPacket->data().houseSize = land->getSize();
|
||||||
landInfoSignPacket->data().houseType = static_cast< uint8_t >( land->getLandType() );
|
landInfoSignPacket->data().houseType = static_cast< uint8_t >( land->getLandType() );
|
||||||
landInfoSignPacket->data().landId = land->getLandId();
|
landInfoSignPacket->data().landIdent.landId = land->getLandId();
|
||||||
|
landInfoSignPacket->data().landIdent.wardNum = land->getWardNum();
|
||||||
|
landInfoSignPacket->data().landIdent.worldId = 67;
|
||||||
|
landInfoSignPacket->data().landIdent.territoryTypeId = land->getTerritoryTypeId();
|
||||||
landInfoSignPacket->data().ownerId = player.getContentId(); // should be real owner contentId, not player.contentId()
|
landInfoSignPacket->data().ownerId = player.getContentId(); // should be real owner contentId, not player.contentId()
|
||||||
memcpy( &landInfoSignPacket->data().ownerName, playerName.c_str(), playerName.size() );
|
memcpy( &landInfoSignPacket->data().ownerName, playerName.c_str(), playerName.size() );
|
||||||
landInfoSignPacket->data().wardNum = land->getWardNum();
|
|
||||||
landInfoSignPacket->data().worldId = 67;
|
|
||||||
landInfoSignPacket->data().zoneId = land->getTerritoryTypeId();
|
|
||||||
player.queuePacket( landInfoSignPacket );
|
player.queuePacket( landInfoSignPacket );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -230,8 +231,8 @@ void Core::HousingMgr::sendWardLandInfo( Entity::Player& player, uint8_t wardId,
|
||||||
return;
|
return;
|
||||||
|
|
||||||
auto wardInfoPacket = makeZonePacket< Server::FFXIVIpcHousingWardInfo >( player.getId() );
|
auto wardInfoPacket = makeZonePacket< Server::FFXIVIpcHousingWardInfo >( player.getId() );
|
||||||
wardInfoPacket->data().wardId = wardId;
|
wardInfoPacket->data().landIdent.wardNum = wardId;
|
||||||
wardInfoPacket->data().territoryTypeId = territoryTypeId;
|
wardInfoPacket->data().landIdent.territoryTypeId = territoryTypeId;
|
||||||
|
|
||||||
for( int i = 0; i < 60; i++ )
|
for( int i = 0; i < 60; i++ )
|
||||||
{
|
{
|
||||||
|
|
|
@ -116,10 +116,11 @@ void Core::HousingZone::sendLandSet( Entity::Player& player )
|
||||||
{
|
{
|
||||||
auto landsetInitializePacket = makeZonePacket< FFXIVIpcLandSetInitialize >( player.getId() );
|
auto landsetInitializePacket = makeZonePacket< FFXIVIpcLandSetInitialize >( player.getId() );
|
||||||
|
|
||||||
landsetInitializePacket->data().landSetId = m_landSetId;
|
landsetInitializePacket->data().landIdent.wardNum = m_wardNum;
|
||||||
landsetInitializePacket->data().zoneId = m_territoryTypeId;
|
//landsetInitializePacket->data().landIdent.landSetId = m_landSetId;
|
||||||
|
landsetInitializePacket->data().landIdent.territoryTypeId = m_territoryTypeId;
|
||||||
//TODO: get current WorldId
|
//TODO: get current WorldId
|
||||||
landsetInitializePacket->data().worldId = 67;
|
landsetInitializePacket->data().landIdent.worldId = 67;
|
||||||
landsetInitializePacket->data().subInstance = isPlayerSubInstance( player ) == false ? 1 : 2;
|
landsetInitializePacket->data().subInstance = isPlayerSubInstance( player ) == false ? 1 : 2;
|
||||||
|
|
||||||
uint8_t startIndex = isPlayerSubInstance( player ) == false ? 0 : 30;
|
uint8_t startIndex = isPlayerSubInstance( player ) == false ? 0 : 30;
|
||||||
|
@ -162,7 +163,7 @@ void Core::HousingZone::sendLandUpdate( uint8_t landId )
|
||||||
auto pPlayer = playerIt.second;
|
auto pPlayer = playerIt.second;
|
||||||
|
|
||||||
auto landUpdatePacket = makeZonePacket< FFXIVIpcLandUpdate >( pPlayer->getId() );
|
auto landUpdatePacket = makeZonePacket< FFXIVIpcLandUpdate >( pPlayer->getId() );
|
||||||
landUpdatePacket->data().landId = landId;
|
landUpdatePacket->data().landIdent.landId = landId;
|
||||||
|
|
||||||
auto& landData = landUpdatePacket->data().land;
|
auto& landData = landUpdatePacket->data().land;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue