1
Fork 0
mirror of https://github.com/SapphireServer/Sapphire.git synced 2025-04-26 06:27:45 +00:00

Clean up quest_parser

This commit is contained in:
Rushi 2022-01-21 21:58:46 +01:00
parent 7e8209c11b
commit ae3d57a492
2 changed files with 11 additions and 11 deletions

View file

@ -13,3 +13,4 @@ else()
target_link_libraries (quest_parse common xivdat mysql zlib)
endif()
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/unluac_2015_06_13.jar ${EXECUTABLE_OUTPUT_PATH}/unluac_2015_06_13.jar COPYONLY)

View file

@ -24,9 +24,8 @@ Sapphire::Data::ExdData g_exdDataGen;
namespace fs = std::filesystem;
using namespace Sapphire;
const std::string javaPath("\"C:\\Program Files (x86)\\Java\\jre1.8.0_301\\bin\\java.exe\" -jar unluac_2015_06_13.jar ");
const std::string gamePath( "F:\\client3.0\\game\\sqpack" );
std::string javaPath( "C:\\Program Files (x86)\\Java\\jre1.8.0_301\\bin\\java.exe" );
std::string gamePath( "F:\\client3.0\\game\\sqpack" );
const std::string onWithinRangeStr(
" void onWithinRange( World::Quest& quest, Entity::Player& player, uint64_t eRangeId, float x, float y, float z ) override\n"
@ -472,26 +471,26 @@ int main( int argc, char** argv )
Logger::init( "quest_parser" );
bool unluac = false;
std::string datLocation( gamePath );
// std::string datLocation( "/home/mordred/sqpack" );
if( argc > 1 )
datLocation = std::string( argv[ 1 ] );
gamePath = std::string( argv[ 1 ] );
if( argc > 2 )
unluac = ( bool ) atoi( argv[ 2 ] );
if( argc > 3)
javaPath = std::string( argv[ 3 ] );
unluac = true;
Logger::info( "Setting up generated EXD data" );
if( !g_exdDataGen.init( datLocation ) )
if( !g_exdDataGen.init( gamePath ) )
{
std::cout << datLocation << "\n";
std::cout << gamePath << "\n";
Logger::fatal( "Error setting up EXD data " );
std::cout << "Usage: quest_parser \"path/to/ffxiv/game/sqpack\" <1/0 unluac export toggle>\n";
return 0;
}
xiv::dat::GameData data( datLocation );
xiv::dat::GameData data( gamePath );
auto rows = g_exdDataGen.getIdList< Component::Excel::Quest >();
@ -546,7 +545,7 @@ int main( int argc, char** argv )
if( unluac )
{
std::string command =
std::string( javaPath ) + "generated/" + questInfo->getString( questInfo->data().Script ) + ".luab" + ">> " +
javaPath + " -jar unluac_2015_06_13.jar " + "generated/" + questInfo->getString( questInfo->data().Script ) + ".luab" + ">> " +
"generated/" + questInfo->getString( questInfo->data().Script ) + ".lua";
if( system( command.c_str() ) == -1 )
{