mirror of
https://github.com/SapphireServer/Sapphire.git
synced 2025-04-30 08:07:46 +00:00
Merge branch 'housing' of https://github.com/SapphireMordred/Sapphire into housing
This commit is contained in:
commit
c317fb13e7
6 changed files with 23 additions and 17 deletions
|
@ -19,12 +19,6 @@ MODIFY COLUMN UPDATE_DATE DATETIME NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURR
|
||||||
ALTER TABLE charainfosearch
|
ALTER TABLE charainfosearch
|
||||||
MODIFY COLUMN UPDATE_DATE DATETIME NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP;
|
MODIFY COLUMN UPDATE_DATE DATETIME NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP;
|
||||||
|
|
||||||
ALTER TABLE charaitemcrystal
|
|
||||||
MODIFY COLUMN UPDATE_DATE DATETIME NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP;
|
|
||||||
|
|
||||||
ALTER TABLE charaitemcurrency
|
|
||||||
MODIFY COLUMN UPDATE_DATE DATETIME NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP;
|
|
||||||
|
|
||||||
ALTER TABLE charaitemgearset
|
ALTER TABLE charaitemgearset
|
||||||
MODIFY COLUMN UPDATE_DATE DATETIME NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP;
|
MODIFY COLUMN UPDATE_DATE DATETIME NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP;
|
||||||
|
|
||||||
|
|
|
@ -74,14 +74,19 @@ std::string Core::Event::getEventName( uint32_t eventId )
|
||||||
return "WarpTaxi";
|
return "WarpTaxi";
|
||||||
return unknown + "ChocoboWarp"; //who know
|
return unknown + "ChocoboWarp"; //who know
|
||||||
}
|
}
|
||||||
|
|
||||||
case Event::EventHandler::EventHandlerType::Shop:
|
case Event::EventHandler::EventHandlerType::Shop:
|
||||||
{
|
{
|
||||||
auto shopInfo = pExdData->get< Core::Data::GilShop >( eventId );
|
auto shopInfo = pExdData->get< Core::Data::GilShop >( eventId );
|
||||||
|
|
||||||
if( shopInfo )
|
return "GilShop" + std::to_string( eventId );
|
||||||
|
/*if( shopInfo )
|
||||||
|
{
|
||||||
|
if( shopInfo->name.empty() || shopInfo->name == " " )
|
||||||
|
return "GilShop" + std::to_string( eventId );
|
||||||
return shopInfo->name;
|
return shopInfo->name;
|
||||||
|
}*/
|
||||||
return unknown + "GilShop";
|
//return unknown + "GilShop";
|
||||||
}
|
}
|
||||||
default:
|
default:
|
||||||
{
|
{
|
||||||
|
|
|
@ -152,8 +152,7 @@ namespace Core::Network
|
||||||
DECLARE_HANDLER( cfRegisterRoulette );
|
DECLARE_HANDLER( cfRegisterRoulette );
|
||||||
|
|
||||||
DECLARE_HANDLER( cfDutyAccepted );
|
DECLARE_HANDLER( cfDutyAccepted );
|
||||||
|
|
||||||
|
|
||||||
DECLARE_HANDLER( actionHandler );
|
DECLARE_HANDLER( actionHandler );
|
||||||
|
|
||||||
DECLARE_HANDLER( gm1Handler );
|
DECLARE_HANDLER( gm1Handler );
|
||||||
|
|
|
@ -265,16 +265,15 @@ void Core::Network::GameConnection::eventHandlerShop( const Packets::FFXIVARR_PA
|
||||||
|
|
||||||
auto eventType = static_cast< uint16_t >( eventId >> 16 );
|
auto eventType = static_cast< uint16_t >( eventId >> 16 );
|
||||||
|
|
||||||
std::string eventName = "onShop";
|
std::string eventName = "onOpen";
|
||||||
std::string objName = Event::getEventName( eventId );
|
std::string objName = Event::getEventName( eventId );
|
||||||
|
|
||||||
player.sendDebug( "EventId: " +
|
player.sendDebug( "EventId: " +
|
||||||
std::to_string( eventId ) +
|
std::to_string( eventId ) +
|
||||||
" (0x" + Util::intToHexString( static_cast< uint64_t >( eventId & 0xFFFFFFF ), 8 ) + ")" );
|
" (0x" + Util::intToHexString( static_cast< uint64_t >( eventId & 0xFFFFFFF ), 8 ) + ")" );
|
||||||
|
|
||||||
|
|
||||||
player.sendDebug( "Calling: " + objName + "." + eventName );
|
player.sendDebug( "Calling: " + objName + "." + eventName );
|
||||||
player.eventStart( 0, eventId, Event::EventHandler::UI, 0, 0 );
|
player.eventStart( 0, eventId, Event::EventHandler::UI, 0, packet.data().param );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -240,8 +240,13 @@ void Core::HousingMgr::sendWardLandInfo( Entity::Player& player, uint8_t wardId,
|
||||||
|
|
||||||
auto& entry = wardInfoPacket->data().houseInfoEntry[ i ];
|
auto& entry = wardInfoPacket->data().houseInfoEntry[ i ];
|
||||||
|
|
||||||
|
// retail always sends the house price in this packet, even after the house has been sold
|
||||||
|
// so I guess we do the same
|
||||||
entry.housePrice = land->getCurrentPrice();
|
entry.housePrice = land->getCurrentPrice();
|
||||||
|
|
||||||
|
if( land->getState() == Common::HouseState::forSale )
|
||||||
|
continue;
|
||||||
|
|
||||||
switch( land->getLandType() )
|
switch( land->getLandType() )
|
||||||
{
|
{
|
||||||
case LandType::FreeCompany:
|
case LandType::FreeCompany:
|
||||||
|
|
|
@ -410,14 +410,18 @@ bool Core::TerritoryMgr::movePlayer( ZonePtr pZone, Core::Entity::PlayerPtr pPla
|
||||||
if( isHousingTerritory( pZone->getTerritoryTypeId() ) )
|
if( isHousingTerritory( pZone->getTerritoryTypeId() ) )
|
||||||
{
|
{
|
||||||
auto pHousing = std::dynamic_pointer_cast< HousingZone >( pZone );
|
auto pHousing = std::dynamic_pointer_cast< HousingZone >( pZone );
|
||||||
if( pHousing )
|
if( pHousing )
|
||||||
pPlayer->setTerritoryId( pHousing->getLandSetId() );
|
pPlayer->setTerritoryId( pHousing->getLandSetId() );
|
||||||
}
|
}
|
||||||
|
else if( isInstanceContentTerritory( pZone->getTerritoryTypeId() ) )
|
||||||
|
{
|
||||||
|
pPlayer->setTerritoryId( pZone->getGuId() );
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
pPlayer->setTerritoryId( 0 );
|
pPlayer->setTerritoryId( 0 );
|
||||||
}
|
}
|
||||||
|
|
||||||
// mark character as zoning in progress
|
// mark character as zoning in progress
|
||||||
pPlayer->setLoadingComplete( false );
|
pPlayer->setLoadingComplete( false );
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue