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:
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
|
@ -61,7 +61,8 @@ public:
|
||||||
if( !warp )
|
if( !warp )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
player.eventStart( actorId, warp->defaultTalk1, Event::EventHandler::Nest, 0, 0, std::bind( &WarpTaxi::inner2, this, std::placeholders::_1, std::placeholders::_2 ) );
|
player.eventStart( actorId, warp->conditionSuccessEvent, Event::EventHandler::Nest, 0, 0,
|
||||||
player.playScene( warp->defaultTalk1, 0, HIDE_HOTBAR, 0, 0, 7, nullptr );
|
std::bind( &WarpTaxi::inner2, this, std::placeholders::_1, std::placeholders::_2 ) );
|
||||||
|
player.playScene( warp->conditionSuccessEvent, 0, HIDE_HOTBAR, 0, 0, 7, nullptr );
|
||||||
}
|
}
|
||||||
};
|
};
|
|
@ -77,7 +77,7 @@ void Core::Network::GameConnection::cfRegisterDuty( const Packets::FFXIVARR_PACK
|
||||||
if( !cfCondition )
|
if( !cfCondition )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
auto instance = pTeriMgr->createInstanceContent( cfCondition->instanceContent );
|
auto instance = pTeriMgr->createInstanceContent( cfCondition->content );
|
||||||
if( !instance )
|
if( !instance )
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
|
|
@ -58,12 +58,12 @@ void Core::Land::load()
|
||||||
pDb->directExecute( "INSERT INTO land ( landsetid, landid, type, size, status, landprice ) "
|
pDb->directExecute( "INSERT INTO land ( landsetid, landid, type, size, status, landprice ) "
|
||||||
"VALUES ( " + std::to_string( m_landSetId ) + "," + std::to_string( m_landId ) + ","
|
"VALUES ( " + std::to_string( m_landSetId ) + "," + std::to_string( m_landId ) + ","
|
||||||
+ std::to_string( static_cast< uint8_t >( m_type ) ) + ","
|
+ std::to_string( static_cast< uint8_t >( m_type ) ) + ","
|
||||||
+ std::to_string( m_landInfo->sizes[ m_landId ] ) + ","
|
+ std::to_string( m_landInfo->plotSize[ m_landId ] ) + ","
|
||||||
+ " 1, " + std::to_string( m_landInfo->prices[ m_landId ] ) + " );" );
|
+ " 1, " + std::to_string( m_landInfo->initialPrice[ m_landId ] ) + " );" );
|
||||||
|
|
||||||
m_currentPrice = m_landInfo->prices[ m_landId ];
|
m_currentPrice = m_landInfo->initialPrice[ m_landId ];
|
||||||
m_minPrice = m_landInfo->minPrices[ m_landId ];
|
m_minPrice = m_landInfo->minPrice[ m_landId ];
|
||||||
m_size = m_landInfo->sizes[ m_landId ];
|
m_size = m_landInfo->plotSize[ m_landId ];
|
||||||
m_state = HouseState::forSale;
|
m_state = HouseState::forSale;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -73,8 +73,8 @@ void Core::Land::load()
|
||||||
m_state = res->getUInt( "Status" );
|
m_state = res->getUInt( "Status" );
|
||||||
m_currentPrice = res->getUInt( "LandPrice" );
|
m_currentPrice = res->getUInt( "LandPrice" );
|
||||||
m_ownerPlayerId = res->getUInt( "OwnerId" );
|
m_ownerPlayerId = res->getUInt( "OwnerId" );
|
||||||
m_minPrice = m_landInfo->minPrices[ m_landId ];
|
m_minPrice = m_landInfo->minPrice[ m_landId ];
|
||||||
m_maxPrice = m_landInfo->prices[ m_landId ];
|
m_maxPrice = m_landInfo->initialPrice[ m_landId ];
|
||||||
}
|
}
|
||||||
init();
|
init();
|
||||||
}
|
}
|
||||||
|
|
|
@ -249,7 +249,7 @@ Core::ZonePtr Core::TerritoryMgr::createInstanceContent( uint32_t contentFinderC
|
||||||
auto pContentFinderCondition = pExdData->get< Core::Data::ContentFinderCondition >( contentFinderConditionId );
|
auto pContentFinderCondition = pExdData->get< Core::Data::ContentFinderCondition >( contentFinderConditionId );
|
||||||
if( !pContentFinderCondition )
|
if( !pContentFinderCondition )
|
||||||
return nullptr;
|
return nullptr;
|
||||||
auto instanceContentId = pContentFinderCondition->instanceContent;
|
auto instanceContentId = pContentFinderCondition->content;
|
||||||
|
|
||||||
auto pInstanceContent = pExdData->get< Core::Data::InstanceContent >( instanceContentId );
|
auto pInstanceContent = pExdData->get< Core::Data::InstanceContent >( instanceContentId );
|
||||||
if( !pInstanceContent )
|
if( !pInstanceContent )
|
||||||
|
|
|
@ -36,8 +36,8 @@ bool Core::Data::ExdDataGenerated::init( const std::string& path )
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
m_data = boost::make_shared< xiv::dat::GameData >( path );
|
m_data = std::make_shared< xiv::dat::GameData >( path );
|
||||||
m_exd_data = boost::make_shared< xiv::exd::ExdData >( *m_data );
|
m_exd_data = std::make_shared< xiv::exd::ExdData >( *m_data );
|
||||||
|
|
||||||
SETUPDATACCESS
|
SETUPDATACCESS
|
||||||
}
|
}
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
#include <ExdCat.h>
|
#include <ExdCat.h>
|
||||||
#include <Exd.h>
|
#include <Exd.h>
|
||||||
#include <set>
|
#include <set>
|
||||||
#include <boost/make_shared.hpp>
|
#include <variant>
|
||||||
|
|
||||||
namespace Core {
|
namespace Core {
|
||||||
namespace Data {
|
namespace Data {
|
||||||
|
@ -35,13 +35,13 @@ STRUCTS
|
||||||
template< class T >
|
template< class T >
|
||||||
T getField( std::vector< xiv::exd::Field >& fields, uint32_t index )
|
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 );
|
void loadIdList( xiv::exd::Exd& data, std::set< uint32_t >& outIdList );
|
||||||
|
|
||||||
boost::shared_ptr< xiv::dat::GameData > m_data;
|
std::shared_ptr< xiv::dat::GameData > m_data;
|
||||||
boost::shared_ptr< xiv::exd::ExdData > m_exd_data;
|
std::shared_ptr< xiv::exd::ExdData > m_exd_data;
|
||||||
|
|
||||||
DATACCESS
|
DATACCESS
|
||||||
|
|
||||||
|
|
|
@ -45,8 +45,8 @@ std::vector< std::string > cppKeyWords
|
||||||
"class"
|
"class"
|
||||||
};
|
};
|
||||||
|
|
||||||
std::string datLocation( "/home/mordred/sqpack" );
|
//std::string datLocation( "/home/mordred/sqpack" );
|
||||||
//std::string datLocation( "C:\\SquareEnix\\FINAL FANTASY XIV - A Realm Reborn\\game\\sqpack" );
|
std::string datLocation( "C:\\SquareEnix\\FINAL FANTASY XIV - A Realm Reborn\\game\\sqpack" );
|
||||||
std::map< uint8_t, std::string > g_typeMap;
|
std::map< uint8_t, std::string > g_typeMap;
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue