mirror of
https://github.com/SapphireServer/Sapphire.git
synced 2025-04-25 22:17:45 +00:00
More stuff
This commit is contained in:
parent
e832c078d5
commit
e73613f443
6 changed files with 63 additions and 57 deletions
|
@ -759,7 +759,16 @@ namespace Core::Common
|
||||||
uint8_t color[ 8 ]; // 36
|
uint8_t color[ 8 ]; // 36
|
||||||
};
|
};
|
||||||
|
|
||||||
struct HousePermissionSet
|
enum LandPermissionSlot
|
||||||
|
{
|
||||||
|
FreeCompany,
|
||||||
|
Private,
|
||||||
|
Apartment,
|
||||||
|
SharedHouse1,
|
||||||
|
SharedHouse2
|
||||||
|
};
|
||||||
|
|
||||||
|
struct LandPermissionSet
|
||||||
{
|
{
|
||||||
int16_t landSetId; //00
|
int16_t landSetId; //00
|
||||||
int16_t wardNum; //02
|
int16_t wardNum; //02
|
||||||
|
|
|
@ -1578,21 +1578,21 @@ struct FFXIVIpcPerformNote : FFXIVIpcBasePacket< PerformNote >
|
||||||
//IPCs
|
//IPCs
|
||||||
struct FFXIVIpcLandPermission : FFXIVIpcBasePacket<LandPermission >
|
struct FFXIVIpcLandPermission : FFXIVIpcBasePacket<LandPermission >
|
||||||
{
|
{
|
||||||
Common::HousePermissionSet freeCompanyHouse; // 00
|
Common::LandPermissionSet freeCompanyHouse; // 00
|
||||||
uint64_t unkown1;
|
uint64_t unkown1;
|
||||||
Common::HousePermissionSet privateHouse; // 24
|
Common::LandPermissionSet privateHouse; // 24
|
||||||
uint64_t unkown2;
|
uint64_t unkown2;
|
||||||
Common::HousePermissionSet apartment; // 48
|
Common::LandPermissionSet apartment; // 48
|
||||||
uint64_t unkown3;
|
uint64_t unkown3;
|
||||||
Common::HousePermissionSet sharedHouse[2]; //72
|
Common::LandPermissionSet sharedHouse[2]; //72
|
||||||
uint64_t unkown4;
|
uint64_t unkown4;
|
||||||
Common::HousePermissionSet unkownHouse;
|
Common::LandPermissionSet unkownHouse;
|
||||||
uint64_t unkown5;
|
uint64_t unkown5;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct FFXIVIpcLandUpdate : FFXIVIpcBasePacket< LandUpdate >
|
struct FFXIVIpcLandUpdate : FFXIVIpcBasePacket< LandUpdate >
|
||||||
{
|
{
|
||||||
uint16_t landSetId;
|
uint16_t landId;
|
||||||
uint16_t unknow0;
|
uint16_t unknow0;
|
||||||
uint16_t unknow1;
|
uint16_t unknow1;
|
||||||
uint16_t unknow2;
|
uint16_t unknow2;
|
||||||
|
|
|
@ -89,6 +89,12 @@ Core::Entity::Player::Player() :
|
||||||
memset( m_classArray, 0, sizeof( m_classArray ) );
|
memset( m_classArray, 0, sizeof( m_classArray ) );
|
||||||
memset( m_expArray, 0, sizeof( m_expArray ) );
|
memset( m_expArray, 0, sizeof( m_expArray ) );
|
||||||
|
|
||||||
|
for ( uint8_t i = 0; i < 5; i++ )
|
||||||
|
{
|
||||||
|
memset( &m_housePermission[i], 0xFF, 8 );
|
||||||
|
memset( &m_housePermission[i].permissionMask, 0, 8 );
|
||||||
|
}
|
||||||
|
|
||||||
m_objSpawnIndexAllocator.init( MAX_DISPLAYED_EOBJS );
|
m_objSpawnIndexAllocator.init( MAX_DISPLAYED_EOBJS );
|
||||||
m_actorSpawnIndexAllocator.init( MAX_DISPLAYED_ACTORS, true );
|
m_actorSpawnIndexAllocator.init( MAX_DISPLAYED_ACTORS, true );
|
||||||
}
|
}
|
||||||
|
@ -1568,48 +1574,7 @@ void Core::Entity::Player::sendZonePackets()
|
||||||
sendItemLevel();
|
sendItemLevel();
|
||||||
}
|
}
|
||||||
|
|
||||||
struct HousePermissionSet
|
sendLandPermissions();
|
||||||
{
|
|
||||||
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();
|
||||||
|
@ -1786,3 +1751,33 @@ bool Core::Entity::Player::isOnEnterEventDone() const
|
||||||
{
|
{
|
||||||
return m_onEnterEventDone;
|
return m_onEnterEventDone;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Core::Entity::Player::setLandPermissions( uint8_t permissionSet, uint32_t permissionMask, int16_t landSetId, int16_t wardNum, int16_t zoneId )
|
||||||
|
{
|
||||||
|
m_housePermission[permissionSet].landSetId = landSetId;
|
||||||
|
m_housePermission[permissionSet].permissionMask = permissionMask;
|
||||||
|
m_housePermission[permissionSet].wardNum = wardNum;
|
||||||
|
m_housePermission[permissionSet].worldId = 67;
|
||||||
|
m_housePermission[permissionSet].unkown1 = 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
void Core::Entity::Player::sendLandPermissions()
|
||||||
|
{
|
||||||
|
auto landPermissions = makeZonePacket< FFXIVIpcLandPermission >( getId() );
|
||||||
|
|
||||||
|
landPermissions->data().freeCompanyHouse = m_housePermission[Common::LandPermissionSlot::FreeCompany];
|
||||||
|
landPermissions->data().privateHouse = m_housePermission[Common::LandPermissionSlot::Private];
|
||||||
|
landPermissions->data().apartment = m_housePermission[Common::LandPermissionSlot::Apartment];
|
||||||
|
landPermissions->data().sharedHouse[0] = m_housePermission[Common::LandPermissionSlot::SharedHouse1];
|
||||||
|
landPermissions->data().sharedHouse[1] = m_housePermission[Common::LandPermissionSlot::SharedHouse2];
|
||||||
|
memset( &landPermissions->data().unkownHouse, 0xFF, 8 );
|
||||||
|
memset( &landPermissions->data().unkownHouse.permissionMask, 0, 8 );
|
||||||
|
landPermissions->data().unkownHouse.permissionMask = 2;
|
||||||
|
landPermissions->data().unkown1 = 0;
|
||||||
|
landPermissions->data().unkown2 = 0;
|
||||||
|
landPermissions->data().unkown3 = 0;
|
||||||
|
landPermissions->data().unkown4 = 0;
|
||||||
|
landPermissions->data().unkown5 = 0;
|
||||||
|
|
||||||
|
queuePacket( landPermissions );
|
||||||
|
}
|
|
@ -761,6 +761,12 @@ namespace Core::Entity
|
||||||
|
|
||||||
void setDirectorInitialized( bool isInitialized );
|
void setDirectorInitialized( bool isInitialized );
|
||||||
|
|
||||||
|
// Housing Handling
|
||||||
|
//////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
void setLandPermissions( uint8_t permissionSet, uint32_t permissionMask, int16_t landSetId, int16_t wardNum, int16_t zoneId );
|
||||||
|
|
||||||
|
void sendLandPermissions();
|
||||||
|
|
||||||
// Player Battle Handling
|
// Player Battle Handling
|
||||||
//////////////////////////////////////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
void initHateSlotQueue();
|
void initHateSlotQueue();
|
||||||
|
@ -1013,6 +1019,9 @@ namespace Core::Entity
|
||||||
uint8_t m_searchSelectRegion; // regions selected to show up in profile
|
uint8_t m_searchSelectRegion; // regions selected to show up in profile
|
||||||
uint8_t m_searchSelectClass; // class selected to show up in profile
|
uint8_t m_searchSelectClass; // class selected to show up in profile
|
||||||
|
|
||||||
|
// housing info
|
||||||
|
Common::LandPermissionSet m_housePermission[5];
|
||||||
|
|
||||||
// gc info
|
// gc info
|
||||||
uint8_t m_gc;
|
uint8_t m_gc;
|
||||||
uint8_t m_gcRank[3];
|
uint8_t m_gcRank[3];
|
||||||
|
|
|
@ -288,13 +288,7 @@ void Core::Land::Update( uint32_t currTime )
|
||||||
m_currentPrice = ( m_currentPrice / 100 ) * 99.58;
|
m_currentPrice = ( m_currentPrice / 100 ) * 99.58;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
m_devaluationTime = m_nextDrop - currTime;
|
||||||
UpdateDatabase();
|
UpdateDatabase();
|
||||||
}
|
}
|
||||||
m_devaluationTime = m_nextDrop - currTime;
|
|
||||||
onUpdate();
|
|
||||||
}
|
|
||||||
|
|
||||||
void Core::Land::onUpdate()
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
}
|
|
@ -52,7 +52,6 @@ namespace Core
|
||||||
void setPreset( uint32_t itemId );
|
void setPreset( uint32_t itemId );
|
||||||
void UpdateDatabase();
|
void UpdateDatabase();
|
||||||
void Update( uint32_t currTime );
|
void Update( uint32_t currTime );
|
||||||
void onUpdate();
|
|
||||||
|
|
||||||
const Common::LandStruct& getLand();
|
const Common::LandStruct& getLand();
|
||||||
uint32_t getMaxItems();
|
uint32_t getMaxItems();
|
||||||
|
|
Loading…
Add table
Reference in a new issue