mirror of
https://github.com/SapphireServer/Sapphire.git
synced 2025-04-26 22:37:45 +00:00
Merge pull request #439 from NotAdam/housing
GilShop improvements, init land values in db to 0, fix for login crash
This commit is contained in:
commit
ec87bbc179
5 changed files with 12 additions and 7 deletions
|
@ -37,11 +37,10 @@ private:
|
|||
}
|
||||
|
||||
// sell
|
||||
else if( result.param2 == 2 )
|
||||
// can't sell if the vendor is yourself (eg, housing permit shop)
|
||||
else if( result.param2 == 2 && result.actorId != player.getId() )
|
||||
{
|
||||
// so apparently shops will always show a sell window
|
||||
// BUT won't always let you sell stuff (eg, housing permit menu)
|
||||
// there doesn't seem to be anything in gilshop exd for that, so maybe it's some shitty server hack?
|
||||
|
||||
}
|
||||
|
||||
player.playGilShop( result.eventId, SCENE_FLAGS, std::bind( &GilShop::shopInteractionCallback, this, std::placeholders::_1, std::placeholders::_2 ) );
|
||||
|
|
|
@ -8,6 +8,7 @@ namespace Core::Event
|
|||
|
||||
struct SceneResult
|
||||
{
|
||||
uint64_t actorId;
|
||||
uint32_t eventId;
|
||||
uint16_t param1;
|
||||
uint16_t param2;
|
||||
|
|
|
@ -321,6 +321,10 @@ void Core::Network::GameConnection::processOutQueue()
|
|||
|
||||
pRP.addPacket( pPacket );
|
||||
totalSize += pPacket->getSize();
|
||||
|
||||
// todo: figure out a good max set size and make it configurable
|
||||
if( totalSize > 15000 )
|
||||
break;
|
||||
}
|
||||
|
||||
if( totalSize > 0 )
|
||||
|
|
|
@ -221,6 +221,7 @@ void Core::Network::GameConnection::eventHandlerReturn( const Packets::FFXIVARR_
|
|||
if( eventCallback )
|
||||
{
|
||||
Event::SceneResult result;
|
||||
result.actorId = pEvent->getActorId();
|
||||
result.eventId = eventId;
|
||||
result.param1 = param1;
|
||||
result.param2 = param2;
|
||||
|
|
|
@ -37,7 +37,7 @@ Core::Land::Land( uint16_t territoryTypeId, uint8_t wardNum, uint8_t landId, uin
|
|||
m_ownerPlayerId( 0 ),
|
||||
m_landSetId( landSetId ),
|
||||
m_landInfo( info ),
|
||||
m_type( Common::LandType::Private ),
|
||||
m_type( Common::LandType::none ),
|
||||
m_fcIcon( 0 ),
|
||||
m_fcIconColor( 0 ),
|
||||
m_fcId( 0 ),
|
||||
|
@ -60,11 +60,11 @@ void Core::Land::load()
|
|||
"AND LandId = " + std::to_string( m_landId ) );
|
||||
if( !res->next() )
|
||||
{
|
||||
pDb->directExecute( "INSERT INTO land ( landsetid, landid, type, size, status, landprice ) "
|
||||
pDb->directExecute( "INSERT INTO land ( landsetid, landid, type, size, status, landprice, UpdateTime, OwnerId, HouseId ) "
|
||||
"VALUES ( " + std::to_string( m_landSetId ) + "," + std::to_string( m_landId ) + ","
|
||||
+ std::to_string( static_cast< uint8_t >( m_type ) ) + ","
|
||||
+ std::to_string( m_landInfo->plotSize[ m_landId ] ) + ","
|
||||
+ " 1, " + std::to_string( m_landInfo->initialPrice[ m_landId ] ) + " );" );
|
||||
+ " 1, " + std::to_string( m_landInfo->initialPrice[ m_landId ] ) + ", 0, 0, 0 );" );
|
||||
|
||||
m_currentPrice = m_landInfo->initialPrice[ m_landId ];
|
||||
m_minPrice = m_landInfo->minPrice[ m_landId ];
|
||||
|
|
Loading…
Add table
Reference in a new issue