mirror of
https://github.com/SapphireServer/Sapphire.git
synced 2025-04-27 14:57:44 +00:00
Fixed various small offset issues / packet sizes
This commit is contained in:
parent
bd0cf1718a
commit
1f1b524d6f
5 changed files with 72 additions and 14 deletions
|
@ -393,6 +393,7 @@ namespace Core::Common
|
||||||
c.UI8E = 0;
|
c.UI8E = 0;
|
||||||
c.UI8F = 0;
|
c.UI8F = 0;
|
||||||
c.padding = 0;
|
c.padding = 0;
|
||||||
|
c.padding1 = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -760,10 +761,10 @@ namespace Core::Common
|
||||||
|
|
||||||
struct HousePermissionSet
|
struct HousePermissionSet
|
||||||
{
|
{
|
||||||
uint16_t landSetId; //00
|
int16_t landSetId; //00
|
||||||
uint16_t wardNum; //02
|
int16_t wardNum; //02
|
||||||
uint16_t zoneId; //04
|
int16_t zoneId; //04
|
||||||
uint16_t worldId; //06
|
int16_t worldId; //06
|
||||||
uint32_t permissionMask; //08
|
uint32_t permissionMask; //08
|
||||||
uint32_t unkown1; //12
|
uint32_t unkown1; //12
|
||||||
};
|
};
|
||||||
|
|
|
@ -193,7 +193,7 @@ namespace Core::Network::Packets
|
||||||
LandPermission = 0x0229, // updated 4.4
|
LandPermission = 0x0229, // updated 4.4
|
||||||
LandSetYardInitialize = 0x022C, // updated 4.4
|
LandSetYardInitialize = 0x022C, // updated 4.4
|
||||||
YardObjectMove = 0x0230, // updated 4.4
|
YardObjectMove = 0x0230, // updated 4.4
|
||||||
LandSetExtending = 0x0251, // updated 4.4
|
LandSetMap = 0x0251, // updated 4.4
|
||||||
|
|
||||||
SharedEstateSettingsResponse = 0x023C, // updated 4.4
|
SharedEstateSettingsResponse = 0x023C, // updated 4.4
|
||||||
|
|
||||||
|
|
|
@ -750,7 +750,8 @@ struct FFXIVIpcInitZone : FFXIVIpcBasePacket< InitZone >
|
||||||
uint32_t unknown3;
|
uint32_t unknown3;
|
||||||
uint32_t unknown4;
|
uint32_t unknown4;
|
||||||
uint8_t weatherId;
|
uint8_t weatherId;
|
||||||
uint16_t bitmask;
|
uint8_t bitmask;
|
||||||
|
uint8_t bitmask1;
|
||||||
uint8_t unknown5;
|
uint8_t unknown5;
|
||||||
uint16_t festivalId;
|
uint16_t festivalId;
|
||||||
uint16_t additionalFestivalId;
|
uint16_t additionalFestivalId;
|
||||||
|
@ -1339,7 +1340,7 @@ struct FFXIVIpcQuestUpdate :
|
||||||
struct FFXIVIpcQuestCompleteList :
|
struct FFXIVIpcQuestCompleteList :
|
||||||
FFXIVIpcBasePacket< QuestCompleteList >
|
FFXIVIpcBasePacket< QuestCompleteList >
|
||||||
{
|
{
|
||||||
uint8_t questCompleteMask[396];
|
uint8_t questCompleteMask[480];
|
||||||
uint8_t unknownCompleteMask[32];
|
uint8_t unknownCompleteMask[32];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -1604,15 +1605,18 @@ struct FFXIVIpcLandPriceUpdate : FFXIVIpcBasePacket< LandPriceUpdate >
|
||||||
uint32_t timeLeft;
|
uint32_t timeLeft;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct FFXIVIpcLandSetExtend : FFXIVIpcBasePacket< LandSetExtending >
|
struct FFXIVIpcLandSetMap : FFXIVIpcBasePacket< LandSetMap >
|
||||||
{
|
{
|
||||||
|
uint8_t u1;
|
||||||
|
uint8_t subdivision;
|
||||||
|
uint8_t u3;
|
||||||
struct
|
struct
|
||||||
{
|
{
|
||||||
uint8_t houseSize;
|
uint8_t status;
|
||||||
uint8_t houseState;
|
uint8_t size;
|
||||||
uint8_t iconColor;
|
uint8_t isPrivate;
|
||||||
uint8_t iconIconAdd;
|
} landInfo[ 30 ];
|
||||||
} landset[30];
|
uint8_t padding[ 3 ];
|
||||||
};
|
};
|
||||||
|
|
||||||
struct FFXIVIpcLandSetInitialize : FFXIVIpcBasePacket< LandSetInitialize >
|
struct FFXIVIpcLandSetInitialize : FFXIVIpcBasePacket< LandSetInitialize >
|
||||||
|
|
|
@ -1568,10 +1568,53 @@ void Core::Entity::Player::sendZonePackets()
|
||||||
sendItemLevel();
|
sendItemLevel();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
struct HousePermissionSet
|
||||||
|
{
|
||||||
|
int16_t landSetId; //00
|
||||||
|
int16_t wardNum; //02
|
||||||
|
int16_t zoneId; //04
|
||||||
|
int16_t worldId; //06
|
||||||
|
uint32_t permissionMask; //08
|
||||||
|
uint32_t unkown1; //12
|
||||||
|
};
|
||||||
|
|
||||||
|
auto landPermissions = makeZonePacket< FFXIVIpcLandPermission >( getId() );
|
||||||
|
landPermissions->data().freeCompanyHouse.landSetId = -1;
|
||||||
|
landPermissions->data().freeCompanyHouse.wardNum = -1;
|
||||||
|
landPermissions->data().freeCompanyHouse.zoneId = -1;
|
||||||
|
landPermissions->data().freeCompanyHouse.worldId = -1;
|
||||||
|
landPermissions->data().unkown1 = 0;
|
||||||
|
landPermissions->data().privateHouse.landSetId = -1;
|
||||||
|
landPermissions->data().privateHouse.wardNum = -1;
|
||||||
|
landPermissions->data().privateHouse.zoneId = -1;
|
||||||
|
landPermissions->data().privateHouse.worldId = -1;
|
||||||
|
landPermissions->data().unkown2 = 0;
|
||||||
|
landPermissions->data().apartment.landSetId = -1;
|
||||||
|
landPermissions->data().apartment.wardNum = -1;
|
||||||
|
landPermissions->data().apartment.zoneId = -1;
|
||||||
|
landPermissions->data().apartment.worldId = -1;
|
||||||
|
landPermissions->data().unkown3 = 0;
|
||||||
|
landPermissions->data().sharedHouse[0].landSetId = -1;
|
||||||
|
landPermissions->data().sharedHouse[0].wardNum = -1;
|
||||||
|
landPermissions->data().sharedHouse[0].zoneId = -1;
|
||||||
|
landPermissions->data().sharedHouse[0].worldId = -1;
|
||||||
|
landPermissions->data().sharedHouse[1].landSetId = -1;
|
||||||
|
landPermissions->data().sharedHouse[1].wardNum = -1;
|
||||||
|
landPermissions->data().sharedHouse[1].zoneId = -1;
|
||||||
|
landPermissions->data().sharedHouse[1].worldId = -1;
|
||||||
|
landPermissions->data().unkown4 = 0;
|
||||||
|
landPermissions->data().unkownHouse.landSetId = -1;
|
||||||
|
landPermissions->data().unkownHouse.wardNum = -1;
|
||||||
|
landPermissions->data().unkownHouse.zoneId = -1;
|
||||||
|
landPermissions->data().unkownHouse.worldId = -1;
|
||||||
|
landPermissions->data().unkown5 = 2;
|
||||||
|
queuePacket( landPermissions );
|
||||||
|
|
||||||
|
|
||||||
auto initZonePacket = makeZonePacket< FFXIVIpcInitZone >( getId() );
|
auto initZonePacket = makeZonePacket< FFXIVIpcInitZone >( getId() );
|
||||||
initZonePacket->data().zoneId = getCurrentZone()->getTerritoryTypeId();
|
initZonePacket->data().zoneId = getCurrentZone()->getTerritoryTypeId();
|
||||||
initZonePacket->data().weatherId = static_cast< uint8_t >( getCurrentZone()->getCurrentWeather() );
|
initZonePacket->data().weatherId = static_cast< uint8_t >( getCurrentZone()->getCurrentWeather() );
|
||||||
initZonePacket->data().bitmask = 0x1; //Setting this to 16 (deciaml) makes it so you can fly in the area (more research needed!)
|
initZonePacket->data().bitmask = 0x1; //Setting this to 16 (decimal) makes it so you can fly in the area (more research needed!)
|
||||||
initZonePacket->data().unknown5 = 0x2A;
|
initZonePacket->data().unknown5 = 0x2A;
|
||||||
initZonePacket->data().festivalId = getCurrentZone()->getCurrentFestival().first;
|
initZonePacket->data().festivalId = getCurrentZone()->getCurrentFestival().first;
|
||||||
initZonePacket->data().additionalFestivalId = getCurrentZone()->getCurrentFestival().second;
|
initZonePacket->data().additionalFestivalId = getCurrentZone()->getCurrentFestival().second;
|
||||||
|
|
|
@ -99,6 +99,16 @@ void Core::HousingZone::onPlayerZoneIn( Entity::Player& player )
|
||||||
player.queuePacket( landsetYardInitializePacket );
|
player.queuePacket( landsetYardInitializePacket );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
auto landSetMap = makeZonePacket< FFXIVIpcLandSetMap >( player.getId() );
|
||||||
|
landSetMap->data().subdivision = isPlayerSubInstance( player ) == false ? 1 : 2;
|
||||||
|
uint8_t startIndex = isPlayerSubInstance( player ) == false ? 0 : 30;
|
||||||
|
for( uint8_t i = startIndex, count = 0; i < ( startIndex + 30 ); i++, count++ )
|
||||||
|
{
|
||||||
|
landSetMap->data().landInfo[ count ].status = 1;
|
||||||
|
//memcpy( , &getLand( i )->getLand(), sizeof( Common::LandStruct ) );
|
||||||
|
}
|
||||||
|
player.queuePacket( landSetMap );
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void Core::HousingZone::sendLandSet( Entity::Player& player )
|
void Core::HousingZone::sendLandSet( Entity::Player& player )
|
||||||
|
|
Loading…
Add table
Reference in a new issue