mirror of
https://github.com/SapphireServer/Sapphire.git
synced 2025-04-26 14:37:44 +00:00
Clean up quest_parser
This commit is contained in:
parent
7e8209c11b
commit
ae3d57a492
2 changed files with 11 additions and 11 deletions
|
@ -13,3 +13,4 @@ else()
|
||||||
target_link_libraries (quest_parse common xivdat mysql zlib)
|
target_link_libraries (quest_parse common xivdat mysql zlib)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/unluac_2015_06_13.jar ${EXECUTABLE_OUTPUT_PATH}/unluac_2015_06_13.jar COPYONLY)
|
|
@ -24,9 +24,8 @@ Sapphire::Data::ExdData g_exdDataGen;
|
||||||
namespace fs = std::filesystem;
|
namespace fs = std::filesystem;
|
||||||
using namespace Sapphire;
|
using namespace Sapphire;
|
||||||
|
|
||||||
|
std::string javaPath( "C:\\Program Files (x86)\\Java\\jre1.8.0_301\\bin\\java.exe" );
|
||||||
const std::string javaPath("\"C:\\Program Files (x86)\\Java\\jre1.8.0_301\\bin\\java.exe\" -jar unluac_2015_06_13.jar ");
|
std::string gamePath( "F:\\client3.0\\game\\sqpack" );
|
||||||
const std::string gamePath( "F:\\client3.0\\game\\sqpack" );
|
|
||||||
|
|
||||||
const std::string onWithinRangeStr(
|
const std::string onWithinRangeStr(
|
||||||
" void onWithinRange( World::Quest& quest, Entity::Player& player, uint64_t eRangeId, float x, float y, float z ) override\n"
|
" 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" );
|
Logger::init( "quest_parser" );
|
||||||
|
|
||||||
bool unluac = false;
|
bool unluac = false;
|
||||||
std::string datLocation( gamePath );
|
|
||||||
|
|
||||||
// std::string datLocation( "/home/mordred/sqpack" );
|
|
||||||
if( argc > 1 )
|
if( argc > 1 )
|
||||||
datLocation = std::string( argv[ 1 ] );
|
gamePath = std::string( argv[ 1 ] );
|
||||||
if( argc > 2 )
|
if( argc > 2 )
|
||||||
unluac = ( bool ) atoi( argv[ 2 ] );
|
unluac = ( bool ) atoi( argv[ 2 ] );
|
||||||
|
if( argc > 3)
|
||||||
|
javaPath = std::string( argv[ 3 ] );
|
||||||
|
|
||||||
unluac = true;
|
unluac = true;
|
||||||
|
|
||||||
Logger::info( "Setting up generated EXD data" );
|
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 " );
|
Logger::fatal( "Error setting up EXD data " );
|
||||||
std::cout << "Usage: quest_parser \"path/to/ffxiv/game/sqpack\" <1/0 unluac export toggle>\n";
|
std::cout << "Usage: quest_parser \"path/to/ffxiv/game/sqpack\" <1/0 unluac export toggle>\n";
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
xiv::dat::GameData data( datLocation );
|
xiv::dat::GameData data( gamePath );
|
||||||
|
|
||||||
auto rows = g_exdDataGen.getIdList< Component::Excel::Quest >();
|
auto rows = g_exdDataGen.getIdList< Component::Excel::Quest >();
|
||||||
|
|
||||||
|
@ -546,7 +545,7 @@ int main( int argc, char** argv )
|
||||||
if( unluac )
|
if( unluac )
|
||||||
{
|
{
|
||||||
std::string command =
|
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";
|
"generated/" + questInfo->getString( questInfo->data().Script ) + ".lua";
|
||||||
if( system( command.c_str() ) == -1 )
|
if( system( command.c_str() ) == -1 )
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Reference in a new issue