1
Fork 0
mirror of https://github.com/SapphireServer/Sapphire.git synced 2025-04-28 15:17:46 +00:00

Fixed exd to work with generated data, also fixed generator ( boost leftovers )

This commit is contained in:
Mordred 2018-11-23 21:16:02 +01:00
parent 5b15b7a42b
commit e2220b0685
9 changed files with 1620 additions and 590 deletions

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -61,7 +61,8 @@ public:
if( !warp )
return;
player.eventStart( actorId, warp->defaultTalk1, Event::EventHandler::Nest, 0, 0, std::bind( &WarpTaxi::inner2, this, std::placeholders::_1, std::placeholders::_2 ) );
player.playScene( warp->defaultTalk1, 0, HIDE_HOTBAR, 0, 0, 7, nullptr );
player.eventStart( actorId, warp->conditionSuccessEvent, Event::EventHandler::Nest, 0, 0,
std::bind( &WarpTaxi::inner2, this, std::placeholders::_1, std::placeholders::_2 ) );
player.playScene( warp->conditionSuccessEvent, 0, HIDE_HOTBAR, 0, 0, 7, nullptr );
}
};

View file

@ -77,7 +77,7 @@ void Core::Network::GameConnection::cfRegisterDuty( const Packets::FFXIVARR_PACK
if( !cfCondition )
return;
auto instance = pTeriMgr->createInstanceContent( cfCondition->instanceContent );
auto instance = pTeriMgr->createInstanceContent( cfCondition->content );
if( !instance )
return;

View file

@ -58,12 +58,12 @@ void Core::Land::load()
pDb->directExecute( "INSERT INTO land ( landsetid, landid, type, size, status, landprice ) "
"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->sizes[ m_landId ] ) + ","
+ " 1, " + std::to_string( m_landInfo->prices[ m_landId ] ) + " );" );
+ std::to_string( m_landInfo->plotSize[ m_landId ] ) + ","
+ " 1, " + std::to_string( m_landInfo->initialPrice[ m_landId ] ) + " );" );
m_currentPrice = m_landInfo->prices[ m_landId ];
m_minPrice = m_landInfo->minPrices[ m_landId ];
m_size = m_landInfo->sizes[ m_landId ];
m_currentPrice = m_landInfo->initialPrice[ m_landId ];
m_minPrice = m_landInfo->minPrice[ m_landId ];
m_size = m_landInfo->plotSize[ m_landId ];
m_state = HouseState::forSale;
}
else
@ -73,8 +73,8 @@ void Core::Land::load()
m_state = res->getUInt( "Status" );
m_currentPrice = res->getUInt( "LandPrice" );
m_ownerPlayerId = res->getUInt( "OwnerId" );
m_minPrice = m_landInfo->minPrices[ m_landId ];
m_maxPrice = m_landInfo->prices[ m_landId ];
m_minPrice = m_landInfo->minPrice[ m_landId ];
m_maxPrice = m_landInfo->initialPrice[ m_landId ];
}
init();
}

View file

@ -249,7 +249,7 @@ Core::ZonePtr Core::TerritoryMgr::createInstanceContent( uint32_t contentFinderC
auto pContentFinderCondition = pExdData->get< Core::Data::ContentFinderCondition >( contentFinderConditionId );
if( !pContentFinderCondition )
return nullptr;
auto instanceContentId = pContentFinderCondition->instanceContent;
auto instanceContentId = pContentFinderCondition->content;
auto pInstanceContent = pExdData->get< Core::Data::InstanceContent >( instanceContentId );
if( !pInstanceContent )

View file

@ -36,8 +36,8 @@ bool Core::Data::ExdDataGenerated::init( const std::string& path )
{
try
{
m_data = boost::make_shared< xiv::dat::GameData >( path );
m_exd_data = boost::make_shared< xiv::exd::ExdData >( *m_data );
m_data = std::make_shared< xiv::dat::GameData >( path );
m_exd_data = std::make_shared< xiv::exd::ExdData >( *m_data );
SETUPDATACCESS
}

View file

@ -11,7 +11,7 @@
#include <ExdCat.h>
#include <Exd.h>
#include <set>
#include <boost/make_shared.hpp>
#include <variant>
namespace Core {
namespace Data {
@ -35,13 +35,13 @@ STRUCTS
template< class T >
T getField( std::vector< xiv::exd::Field >& fields, uint32_t index )
{
return *boost::get< T >( &fields.at( index ) );
return boost::get< T >( fields.at( index ) );
}
void loadIdList( xiv::exd::Exd& data, std::set< uint32_t >& outIdList );
boost::shared_ptr< xiv::dat::GameData > m_data;
boost::shared_ptr< xiv::exd::ExdData > m_exd_data;
std::shared_ptr< xiv::dat::GameData > m_data;
std::shared_ptr< xiv::exd::ExdData > m_exd_data;
DATACCESS

View file

@ -45,8 +45,8 @@ std::vector< std::string > cppKeyWords
"class"
};
std::string datLocation( "/home/mordred/sqpack" );
//std::string datLocation( "C:\\SquareEnix\\FINAL FANTASY XIV - A Realm Reborn\\game\\sqpack" );
//std::string datLocation( "/home/mordred/sqpack" );
std::string datLocation( "C:\\SquareEnix\\FINAL FANTASY XIV - A Realm Reborn\\game\\sqpack" );
std::map< uint8_t, std::string > g_typeMap;