mirror of
https://github.com/SapphireServer/Sapphire.git
synced 2025-04-26 14:37:44 +00:00
Merge pull request #464 from NotAdam/housing
hide fc doors in private houses, fix log issue on windows
This commit is contained in:
commit
803fcfe4de
7 changed files with 16 additions and 9 deletions
|
@ -734,7 +734,7 @@ void defaultGet( shared_ptr< HttpServer::Response > response, shared_ptr< HttpSe
|
|||
|
||||
int main( int argc, char* argv[] )
|
||||
{
|
||||
Logger::init( "log/SapphireAPI" );
|
||||
Logger::init( "log/api" );
|
||||
|
||||
Logger::info( "===========================================================" );
|
||||
Logger::info( "Sapphire API Server " );
|
||||
|
|
|
@ -25,7 +25,7 @@ namespace Sapphire
|
|||
|
||||
void Logger::init( const std::string& logPath )
|
||||
{
|
||||
auto pos = logPath.find_last_of( '/' );
|
||||
auto pos = logPath.find_last_of( fs::path::preferred_separator );
|
||||
|
||||
if( pos != std::string::npos )
|
||||
{
|
||||
|
|
|
@ -240,6 +240,7 @@ enum ActorControlType : uint16_t
|
|||
*/
|
||||
HousingItemMoveConfirm = 0x3F9,
|
||||
OpenEstateSettingsUI = 0x3FF,
|
||||
HideAdditionalChambersDoor = 0x400,
|
||||
|
||||
/*!
|
||||
* param1 = outdoor furnishings
|
||||
|
|
|
@ -1701,6 +1701,10 @@ struct FFXIVIpcHousingObjectMove : FFXIVIpcBasePacket< HousingObjectMove >
|
|||
struct FFXIVIpcHousingObjectInitialize : FFXIVIpcBasePacket< HousingObjectInitialize >
|
||||
{
|
||||
Common::LandIdent landIdent;
|
||||
/*!
|
||||
* when this is 2, actrl 0x400 will hide the additional quarters door
|
||||
* if it's any other value, it will stay there regardless
|
||||
*/
|
||||
int8_t u1; //Outdoor -1 / Indoor 0 - probably indicator
|
||||
uint8_t packetNum;
|
||||
uint8_t packetTotal;
|
||||
|
|
|
@ -104,7 +104,7 @@ int main( int32_t argc, char* argv[] )
|
|||
std::string database;
|
||||
std::string pass;
|
||||
|
||||
Logger::init( "log/SapphireDbm" );
|
||||
Logger::init( "log/dbm" );
|
||||
|
||||
std::string sFile;
|
||||
std::string iFile;
|
||||
|
|
|
@ -31,12 +31,10 @@ namespace Sapphire
|
|||
m_configPath( configPath ),
|
||||
m_numConnections( 0 )
|
||||
{
|
||||
m_pConfig = std::shared_ptr< ConfigMgr >( new ConfigMgr );
|
||||
m_pConfig = std::make_shared< ConfigMgr >();
|
||||
}
|
||||
|
||||
ServerLobby::~ServerLobby( void )
|
||||
{
|
||||
}
|
||||
ServerLobby::~ServerLobby( void ) = default;
|
||||
|
||||
LobbySessionPtr ServerLobby::getSession( char* sessionId )
|
||||
{
|
||||
|
@ -50,7 +48,7 @@ namespace Sapphire
|
|||
|
||||
void ServerLobby::run( int32_t argc, char* argv[] )
|
||||
{
|
||||
Logger::init( "log/SapphireLobby" );
|
||||
Logger::init( "log/lobby" );
|
||||
|
||||
Logger::info( "===========================================================" );
|
||||
Logger::info( "Sapphire Server Project " );
|
||||
|
|
|
@ -76,12 +76,14 @@ void Sapphire::World::Territory::Housing::HousingInteriorTerritory::onPlayerZone
|
|||
|
||||
player.queuePacket( indoorInitPacket );
|
||||
|
||||
|
||||
auto yardPacketTotal = static_cast< uint8_t >( 2 + pLand->getSize() );
|
||||
for( uint8_t yardPacketNum = 0; yardPacketNum < yardPacketTotal; yardPacketNum++ )
|
||||
{
|
||||
auto objectInitPacket = makeZonePacket< Server::FFXIVIpcHousingObjectInitialize >( player.getId() );
|
||||
memcpy( &objectInitPacket->data().landIdent, &m_landIdent, sizeof( Common::LandIdent ) );
|
||||
objectInitPacket->data().u1 = 0;
|
||||
// todo: change this when FC houses become a thing
|
||||
objectInitPacket->data().u1 = 2; // 2 = actrl 0x400 will hide the fc door, otherwise it will stay there
|
||||
objectInitPacket->data().u2 = 100;
|
||||
objectInitPacket->data().packetNum = yardPacketNum;
|
||||
objectInitPacket->data().packetTotal = yardPacketTotal;
|
||||
|
@ -92,6 +94,8 @@ void Sapphire::World::Territory::Housing::HousingInteriorTerritory::onPlayerZone
|
|||
player.queuePacket( objectInitPacket );
|
||||
}
|
||||
|
||||
// todo: if in fc house, don't send this
|
||||
player.queuePacket( Server::makeActorControl143( player.getId(), Network::ActorControl::HideAdditionalChambersDoor ) );
|
||||
}
|
||||
|
||||
void Sapphire::World::Territory::Housing::HousingInteriorTerritory::onUpdate( uint32_t currTime )
|
||||
|
|
Loading…
Add table
Reference in a new issue