|
@@ -577,7 +577,7 @@ bool Csv2YamlTool::initialize( int argc, char* argv[] ){
|
|
|
|
|
|
// Copied and adjusted from guild.cpp
|
|
// Copied and adjusted from guild.cpp
|
|
// <skill id>,<max lv>,<req id1>,<req lv1>,<req id2>,<req lv2>,<req id3>,<req lv3>,<req id4>,<req lv4>,<req id5>,<req lv5>
|
|
// <skill id>,<max lv>,<req id1>,<req lv1>,<req id2>,<req lv2>,<req id3>,<req lv3>,<req id4>,<req lv4>,<req id5>,<req lv5>
|
|
-static bool guild_read_guildskill_tree_db( char* split[], int columns, int current ){
|
|
|
|
|
|
+static bool guild_read_guildskill_tree_db( char* split[], size_t columns, size_t current ){
|
|
uint16 skill_id = (uint16)atoi(split[0]);
|
|
uint16 skill_id = (uint16)atoi(split[0]);
|
|
std::string* name = util::umap_find( aegis_skillnames, skill_id );
|
|
std::string* name = util::umap_find( aegis_skillnames, skill_id );
|
|
|
|
|
|
@@ -802,8 +802,7 @@ static bool pet_read_db( const char* file ){
|
|
}
|
|
}
|
|
|
|
|
|
// Copied and adjusted from skill.cpp
|
|
// Copied and adjusted from skill.cpp
|
|
-static bool skill_parse_row_magicmushroomdb(char *split[], int column, int current)
|
|
|
|
-{
|
|
|
|
|
|
+static bool skill_parse_row_magicmushroomdb( char *split[], size_t column, size_t current ){
|
|
uint16 skill_id = atoi(split[0]);
|
|
uint16 skill_id = atoi(split[0]);
|
|
std::string *skill_name = util::umap_find(aegis_skillnames, skill_id);
|
|
std::string *skill_name = util::umap_find(aegis_skillnames, skill_id);
|
|
|
|
|
|
@@ -820,8 +819,7 @@ static bool skill_parse_row_magicmushroomdb(char *split[], int column, int curre
|
|
}
|
|
}
|
|
|
|
|
|
// Copied and adjusted from skill.cpp
|
|
// Copied and adjusted from skill.cpp
|
|
-static bool skill_parse_row_abradb(char* split[], int columns, int current)
|
|
|
|
-{
|
|
|
|
|
|
+static bool skill_parse_row_abradb( char* split[], size_t columns, size_t current ){
|
|
uint16 skill_id = atoi(split[0]);
|
|
uint16 skill_id = atoi(split[0]);
|
|
std::string *skill_name = util::umap_find(aegis_skillnames, skill_id);
|
|
std::string *skill_name = util::umap_find(aegis_skillnames, skill_id);
|
|
|
|
|
|
@@ -861,8 +859,7 @@ static bool skill_parse_row_abradb(char* split[], int columns, int current)
|
|
}
|
|
}
|
|
|
|
|
|
// Copied and adjusted from skill.cpp
|
|
// Copied and adjusted from skill.cpp
|
|
-static bool skill_parse_row_spellbookdb(char* split[], int columns, int current)
|
|
|
|
-{
|
|
|
|
|
|
+static bool skill_parse_row_spellbookdb( char* split[], size_t columns, size_t current ){
|
|
uint16 skill_id = atoi(split[0]);
|
|
uint16 skill_id = atoi(split[0]);
|
|
std::string *skill_name = util::umap_find(aegis_skillnames, skill_id);
|
|
std::string *skill_name = util::umap_find(aegis_skillnames, skill_id);
|
|
|
|
|
|
@@ -889,7 +886,7 @@ static bool skill_parse_row_spellbookdb(char* split[], int columns, int current)
|
|
}
|
|
}
|
|
|
|
|
|
// Copied and adjusted from mob.cpp
|
|
// Copied and adjusted from mob.cpp
|
|
-static bool mob_readdb_mobavail(char* str[], int columns, int current) {
|
|
|
|
|
|
+static bool mob_readdb_mobavail( char* str[], size_t columns, size_t current ){
|
|
uint16 mob_id = atoi(str[0]);
|
|
uint16 mob_id = atoi(str[0]);
|
|
std::string *mob_name = util::umap_find(aegis_mobnames, mob_id);
|
|
std::string *mob_name = util::umap_find(aegis_mobnames, mob_id);
|
|
|
|
|
|
@@ -1121,8 +1118,7 @@ static bool mob_readdb_mobavail(char* str[], int columns, int current) {
|
|
|
|
|
|
// skill_db.yml function
|
|
// skill_db.yml function
|
|
//----------------------
|
|
//----------------------
|
|
-static bool skill_parse_row_requiredb(char* split[], int columns, int current)
|
|
|
|
-{
|
|
|
|
|
|
+static bool skill_parse_row_requiredb( char* split[], size_t columns, size_t current ){
|
|
s_skill_require entry = {};
|
|
s_skill_require entry = {};
|
|
|
|
|
|
skill_split_atoi(split[1], entry.hp);
|
|
skill_split_atoi(split[1], entry.hp);
|
|
@@ -1236,8 +1232,7 @@ static bool skill_parse_row_requiredb(char* split[], int columns, int current)
|
|
|
|
|
|
// skill_db.yml function
|
|
// skill_db.yml function
|
|
//----------------------
|
|
//----------------------
|
|
-static bool skill_parse_row_castdb(char* split[], int columns, int current)
|
|
|
|
-{
|
|
|
|
|
|
+static bool skill_parse_row_castdb( char* split[], size_t columns, size_t current ){
|
|
s_skill_db entry = {};
|
|
s_skill_db entry = {};
|
|
|
|
|
|
skill_split_atoi(split[1], entry.cast);
|
|
skill_split_atoi(split[1], entry.cast);
|
|
@@ -1257,8 +1252,7 @@ static bool skill_parse_row_castdb(char* split[], int columns, int current)
|
|
|
|
|
|
// skill_db.yml function
|
|
// skill_db.yml function
|
|
//----------------------
|
|
//----------------------
|
|
-static bool skill_parse_row_castnodexdb(char* split[], int columns, int current)
|
|
|
|
-{
|
|
|
|
|
|
+static bool skill_parse_row_castnodexdb( char* split[], size_t columns, size_t current ){
|
|
s_skill_db entry = {};
|
|
s_skill_db entry = {};
|
|
|
|
|
|
entry.castnodex = atoi(split[1]);
|
|
entry.castnodex = atoi(split[1]);
|
|
@@ -1272,8 +1266,7 @@ static bool skill_parse_row_castnodexdb(char* split[], int columns, int current)
|
|
|
|
|
|
// skill_db.yml function
|
|
// skill_db.yml function
|
|
//----------------------
|
|
//----------------------
|
|
-static bool skill_parse_row_unitdb(char* split[], int columns, int current)
|
|
|
|
-{
|
|
|
|
|
|
+static bool skill_parse_row_unitdb( char* split[], size_t columns, size_t current ){
|
|
s_skill_unit_csv entry = {};
|
|
s_skill_unit_csv entry = {};
|
|
|
|
|
|
entry.unit_id = (uint16)strtol(split[1], NULL, 16);
|
|
entry.unit_id = (uint16)strtol(split[1], NULL, 16);
|
|
@@ -1291,8 +1284,7 @@ static bool skill_parse_row_unitdb(char* split[], int columns, int current)
|
|
|
|
|
|
// skill_db.yml function
|
|
// skill_db.yml function
|
|
//----------------------
|
|
//----------------------
|
|
-static bool skill_parse_row_copyabledb(char* split[], int column, int current)
|
|
|
|
-{
|
|
|
|
|
|
+static bool skill_parse_row_copyabledb( char* split[], size_t column, size_t current ){
|
|
s_skill_copyable entry = {};
|
|
s_skill_copyable entry = {};
|
|
int skill_id = -1;
|
|
int skill_id = -1;
|
|
|
|
|
|
@@ -1321,8 +1313,7 @@ static bool skill_parse_row_copyabledb(char* split[], int column, int current)
|
|
|
|
|
|
// skill_db.yml function
|
|
// skill_db.yml function
|
|
//----------------------
|
|
//----------------------
|
|
-static bool skill_parse_row_nonearnpcrangedb(char* split[], int column, int current)
|
|
|
|
-{
|
|
|
|
|
|
+static bool skill_parse_row_nonearnpcrangedb( char* split[], size_t column, size_t current ){
|
|
s_skill_db entry = {};
|
|
s_skill_db entry = {};
|
|
int skill_id = -1;
|
|
int skill_id = -1;
|
|
|
|
|
|
@@ -1350,7 +1341,7 @@ static bool skill_parse_row_nonearnpcrangedb(char* split[], int column, int curr
|
|
}
|
|
}
|
|
|
|
|
|
// Copied and adjusted from skill.cpp
|
|
// Copied and adjusted from skill.cpp
|
|
-static bool skill_parse_row_skilldb(char* split[], int columns, int current) {
|
|
|
|
|
|
+static bool skill_parse_row_skilldb( char* split[], size_t columns, size_t current ){
|
|
int arr[MAX_SKILL_LEVEL], arr_size, skill_id = atoi(split[0]);
|
|
int arr[MAX_SKILL_LEVEL], arr_size, skill_id = atoi(split[0]);
|
|
|
|
|
|
body << YAML::BeginMap;
|
|
body << YAML::BeginMap;
|
|
@@ -2323,7 +2314,7 @@ static bool skill_parse_row_skilldb(char* split[], int columns, int current) {
|
|
}
|
|
}
|
|
|
|
|
|
// Copied and adjusted from quest.cpp
|
|
// Copied and adjusted from quest.cpp
|
|
-static bool quest_read_db(char *split[], int columns, int current) {
|
|
|
|
|
|
+static bool quest_read_db( char *split[], size_t columns, size_t current ){
|
|
int quest_id = atoi(split[0]);
|
|
int quest_id = atoi(split[0]);
|
|
|
|
|
|
if (quest_id < 0 || quest_id >= INT_MAX) {
|
|
if (quest_id < 0 || quest_id >= INT_MAX) {
|
|
@@ -2459,7 +2450,7 @@ static bool quest_read_db(char *split[], int columns, int current) {
|
|
}
|
|
}
|
|
|
|
|
|
// Copied and adjusted from instance.cpp
|
|
// Copied and adjusted from instance.cpp
|
|
-static bool instance_readdb_sub(char* str[], int columns, int current) {
|
|
|
|
|
|
+static bool instance_readdb_sub( char* str[], size_t columns, size_t current ){
|
|
body << YAML::BeginMap;
|
|
body << YAML::BeginMap;
|
|
body << YAML::Key << "Id" << YAML::Value << atoi(str[0]);
|
|
body << YAML::Key << "Id" << YAML::Value << atoi(str[0]);
|
|
body << YAML::Key << "Name" << YAML::Value << str[1];
|
|
body << YAML::Key << "Name" << YAML::Value << str[1];
|
|
@@ -2498,21 +2489,21 @@ static bool instance_readdb_sub(char* str[], int columns, int current) {
|
|
|
|
|
|
// item_db.yml function
|
|
// item_db.yml function
|
|
//---------------------
|
|
//---------------------
|
|
-static bool itemdb_read_itemavail(char *str[], int columns, int current) {
|
|
|
|
|
|
+static bool itemdb_read_itemavail( char *str[], size_t columns, size_t current ){
|
|
item_avail.insert({ strtoul(str[0], nullptr, 10), strtoul(str[1], nullptr, 10) });
|
|
item_avail.insert({ strtoul(str[0], nullptr, 10), strtoul(str[1], nullptr, 10) });
|
|
return true;
|
|
return true;
|
|
}
|
|
}
|
|
|
|
|
|
// item_db.yml function
|
|
// item_db.yml function
|
|
//---------------------
|
|
//---------------------
|
|
-static bool itemdb_read_buyingstore(char* fields[], int columns, int current) {
|
|
|
|
|
|
+static bool itemdb_read_buyingstore( char* fields[], size_t columns, size_t current ){
|
|
item_buyingstore.insert({ strtoul(fields[0], nullptr, 10), true });
|
|
item_buyingstore.insert({ strtoul(fields[0], nullptr, 10), true });
|
|
return true;
|
|
return true;
|
|
}
|
|
}
|
|
|
|
|
|
// item_db.yml function
|
|
// item_db.yml function
|
|
//---------------------
|
|
//---------------------
|
|
-static bool itemdb_read_flag(char* fields[], int columns, int current) {
|
|
|
|
|
|
+static bool itemdb_read_flag( char* fields[], size_t columns, size_t current ){
|
|
s_item_flag_csv2yaml item = { 0 };
|
|
s_item_flag_csv2yaml item = { 0 };
|
|
uint16 flag = abs(atoi(fields[1]));
|
|
uint16 flag = abs(atoi(fields[1]));
|
|
|
|
|
|
@@ -2547,7 +2538,7 @@ static bool itemdb_read_flag(char* fields[], int columns, int current) {
|
|
|
|
|
|
// item_db.yml function
|
|
// item_db.yml function
|
|
//---------------------
|
|
//---------------------
|
|
-static bool itemdb_read_itemdelay(char* str[], int columns, int current) {
|
|
|
|
|
|
+static bool itemdb_read_itemdelay( char* str[], size_t columns, size_t current ){
|
|
s_item_delay_csv2yaml item = { 0 };
|
|
s_item_delay_csv2yaml item = { 0 };
|
|
|
|
|
|
item.delay = atoi(str[1]);
|
|
item.delay = atoi(str[1]);
|
|
@@ -2561,7 +2552,7 @@ static bool itemdb_read_itemdelay(char* str[], int columns, int current) {
|
|
|
|
|
|
// item_db.yml function
|
|
// item_db.yml function
|
|
//---------------------
|
|
//---------------------
|
|
-static bool itemdb_read_stack(char* fields[], int columns, int current) {
|
|
|
|
|
|
+static bool itemdb_read_stack( char* fields[], size_t columns, size_t current ){
|
|
s_item_stack_csv2yaml item = { 0 };
|
|
s_item_stack_csv2yaml item = { 0 };
|
|
|
|
|
|
item.amount = atoi(fields[1]);
|
|
item.amount = atoi(fields[1]);
|
|
@@ -2583,7 +2574,7 @@ static bool itemdb_read_stack(char* fields[], int columns, int current) {
|
|
|
|
|
|
// item_db.yml function
|
|
// item_db.yml function
|
|
//---------------------
|
|
//---------------------
|
|
-static bool itemdb_read_nouse(char* fields[], int columns, int current) {
|
|
|
|
|
|
+static bool itemdb_read_nouse( char* fields[], size_t columns, size_t current ){
|
|
s_item_nouse_csv2yaml item = { 0 };
|
|
s_item_nouse_csv2yaml item = { 0 };
|
|
|
|
|
|
item.sitting = "true";
|
|
item.sitting = "true";
|
|
@@ -2595,7 +2586,7 @@ static bool itemdb_read_nouse(char* fields[], int columns, int current) {
|
|
|
|
|
|
// item_db.yml function
|
|
// item_db.yml function
|
|
//---------------------
|
|
//---------------------
|
|
-static bool itemdb_read_itemtrade(char* str[], int columns, int current) {
|
|
|
|
|
|
+static bool itemdb_read_itemtrade( char* str[], size_t columns, size_t current ){
|
|
s_item_trade_csv2yaml item = { 0 };
|
|
s_item_trade_csv2yaml item = { 0 };
|
|
int flag = atoi(str[1]);
|
|
int flag = atoi(str[1]);
|
|
|
|
|
|
@@ -3103,7 +3094,7 @@ static bool itemdb_read_randomopt(const char* file) {
|
|
}
|
|
}
|
|
|
|
|
|
// Copied and adjusted from itemdb.cpp
|
|
// Copied and adjusted from itemdb.cpp
|
|
-static bool itemdb_read_randomopt_group(char* str[], int columns, int current) {
|
|
|
|
|
|
+static bool itemdb_read_randomopt_group( char* str[], size_t columns, size_t current ){
|
|
if ((columns - 2) % 3 != 0) {
|
|
if ((columns - 2) % 3 != 0) {
|
|
ShowError("itemdb_read_randomopt_group: Invalid column entries '%d'.\n", columns);
|
|
ShowError("itemdb_read_randomopt_group: Invalid column entries '%d'.\n", columns);
|
|
return false;
|
|
return false;
|
|
@@ -3205,7 +3196,7 @@ static bool itemdb_randomopt_group_yaml(void) {
|
|
return true;
|
|
return true;
|
|
}
|
|
}
|
|
|
|
|
|
-static bool pc_readdb_levelpenalty( char* fields[], int columns, int current ){
|
|
|
|
|
|
+static bool pc_readdb_levelpenalty( char* fields[], size_t columns, size_t current ){
|
|
// 1=experience, 2=item drop
|
|
// 1=experience, 2=item drop
|
|
int type = atoi( fields[0] );
|
|
int type = atoi( fields[0] );
|
|
|
|
|
|
@@ -3269,7 +3260,7 @@ bool pc_levelpenalty_yaml(){
|
|
|
|
|
|
// mob_db.yml function
|
|
// mob_db.yml function
|
|
//--------------------
|
|
//--------------------
|
|
-static bool mob_readdb_race2(char *fields[], int columns, int current) {
|
|
|
|
|
|
+static bool mob_readdb_race2( char *fields[], size_t columns, size_t current ){
|
|
int64 race;
|
|
int64 race;
|
|
|
|
|
|
if (ISDIGIT(fields[0][0]))
|
|
if (ISDIGIT(fields[0][0]))
|
|
@@ -3300,7 +3291,7 @@ static bool mob_readdb_race2(char *fields[], int columns, int current) {
|
|
|
|
|
|
// mob_db.yml function
|
|
// mob_db.yml function
|
|
//--------------------
|
|
//--------------------
|
|
-static bool mob_readdb_drop(char *str[], int columns, int current) {
|
|
|
|
|
|
+static bool mob_readdb_drop( char *str[], size_t columns, size_t current ){
|
|
uint32 mob_id = strtoul(str[0], nullptr, 10);
|
|
uint32 mob_id = strtoul(str[0], nullptr, 10);
|
|
std::string *mob_name = util::umap_find(aegis_mobnames, static_cast<uint16>(mob_id));
|
|
std::string *mob_name = util::umap_find(aegis_mobnames, static_cast<uint16>(mob_id));
|
|
|
|
|
|
@@ -3347,7 +3338,7 @@ static bool mob_readdb_drop(char *str[], int columns, int current) {
|
|
}
|
|
}
|
|
|
|
|
|
// Copied and adjusted from mob.cpp
|
|
// Copied and adjusted from mob.cpp
|
|
-static bool mob_readdb_sub(char *fields[], int columns, int current) {
|
|
|
|
|
|
+static bool mob_readdb_sub( char *fields[], size_t columns, size_t current ){
|
|
uint32 mob_id = strtoul(fields[0], nullptr, 10);
|
|
uint32 mob_id = strtoul(fields[0], nullptr, 10);
|
|
|
|
|
|
body << YAML::BeginMap;
|
|
body << YAML::BeginMap;
|
|
@@ -3711,7 +3702,7 @@ static bool mob_readdb_sub(char *fields[], int columns, int current) {
|
|
}
|
|
}
|
|
|
|
|
|
// Copied and adjusted from mob.cpp
|
|
// Copied and adjusted from mob.cpp
|
|
-static bool mob_parse_row_chatdb(char* fields[], int columns, int current) {
|
|
|
|
|
|
+static bool mob_parse_row_chatdb( char* fields[], size_t columns, size_t current ){
|
|
int msg_id = atoi(fields[0]);
|
|
int msg_id = atoi(fields[0]);
|
|
|
|
|
|
if (msg_id <= 0){
|
|
if (msg_id <= 0){
|
|
@@ -3783,7 +3774,7 @@ static bool read_homunculus_expdb(const char* file) {
|
|
}
|
|
}
|
|
|
|
|
|
// Copied and adjusted from mob.cpp
|
|
// Copied and adjusted from mob.cpp
|
|
-static bool mob_readdb_group(char* str[], int columns, int current) {
|
|
|
|
|
|
+static bool mob_readdb_group( char* str[], size_t columns, size_t current ){
|
|
if (strncasecmp(str[0], "MOBG_", 5) != 0) {
|
|
if (strncasecmp(str[0], "MOBG_", 5) != 0) {
|
|
ShowError("The group %s must start with 'MOBG_'.\n", str[0]);
|
|
ShowError("The group %s must start with 'MOBG_'.\n", str[0]);
|
|
return false;
|
|
return false;
|
|
@@ -3859,8 +3850,7 @@ static bool mob_readdb_group_yaml(void) {
|
|
}
|
|
}
|
|
|
|
|
|
// Copied and adjusted from skill.cpp
|
|
// Copied and adjusted from skill.cpp
|
|
-static bool skill_parse_row_createarrowdb(char* split[], int columns, int current)
|
|
|
|
-{
|
|
|
|
|
|
+static bool skill_parse_row_createarrowdb( char* split[], size_t columns, size_t current ){
|
|
t_itemid nameid = static_cast<t_itemid>(strtoul(split[0], nullptr, 10));
|
|
t_itemid nameid = static_cast<t_itemid>(strtoul(split[0], nullptr, 10));
|
|
|
|
|
|
if (nameid == 0)
|
|
if (nameid == 0)
|
|
@@ -3944,7 +3934,7 @@ static bool pc_read_statsdb(const char* file) {
|
|
}
|
|
}
|
|
|
|
|
|
// Copied and adjusted from guild.cpp
|
|
// Copied and adjusted from guild.cpp
|
|
-static bool guild_read_castledb(char* str[], int columns, int current) {
|
|
|
|
|
|
+static bool guild_read_castledb( char* str[], size_t columns, size_t current ){
|
|
body << YAML::BeginMap;
|
|
body << YAML::BeginMap;
|
|
body << YAML::Key << "Id" << YAML::Value << str[0];
|
|
body << YAML::Key << "Id" << YAML::Value << str[0];
|
|
body << YAML::Key << "Map" << YAML::Value << str[1];
|
|
body << YAML::Key << "Map" << YAML::Value << str[1];
|
|
@@ -3955,7 +3945,7 @@ static bool guild_read_castledb(char* str[], int columns, int current) {
|
|
}
|
|
}
|
|
|
|
|
|
// Copied and adjusted from int_guild.cpp
|
|
// Copied and adjusted from int_guild.cpp
|
|
-static bool exp_guild_parse_row(char* split[], int column, int current) {
|
|
|
|
|
|
+static bool exp_guild_parse_row( char* split[], size_t column, size_t current ){
|
|
t_exp exp = strtoull(split[0], nullptr, 10);
|
|
t_exp exp = strtoull(split[0], nullptr, 10);
|
|
|
|
|
|
if (exp > MAX_GUILD_EXP) {
|
|
if (exp > MAX_GUILD_EXP) {
|
|
@@ -3972,7 +3962,7 @@ static bool exp_guild_parse_row(char* split[], int column, int current) {
|
|
}
|
|
}
|
|
|
|
|
|
// Copied and adjusted from itemdb.cpp
|
|
// Copied and adjusted from itemdb.cpp
|
|
-static bool itemdb_read_group(char* str[], int columns, int current) {
|
|
|
|
|
|
+static bool itemdb_read_group( char* str[], size_t columns, size_t current ){
|
|
if (strncasecmp(str[0], "IG_", 3) != 0) {
|
|
if (strncasecmp(str[0], "IG_", 3) != 0) {
|
|
ShowError("The group %s must start with 'IG_'.\n", str[0]);
|
|
ShowError("The group %s must start with 'IG_'.\n", str[0]);
|
|
return false;
|
|
return false;
|
|
@@ -4122,7 +4112,7 @@ static bool itemdb_read_group_yaml(void) {
|
|
}
|
|
}
|
|
|
|
|
|
// Copied and adjusted from mob.cpp
|
|
// Copied and adjusted from mob.cpp
|
|
-static bool mob_readdb_itemratio(char* str[], int columns, int current) {
|
|
|
|
|
|
+static bool mob_readdb_itemratio( char* str[], size_t columns, size_t current ){
|
|
t_itemid nameid = strtoul(str[0], nullptr, 10);
|
|
t_itemid nameid = strtoul(str[0], nullptr, 10);
|
|
|
|
|
|
std::string *item_name = util::umap_find(aegis_itemnames, nameid);
|
|
std::string *item_name = util::umap_find(aegis_itemnames, nameid);
|
|
@@ -4222,7 +4212,7 @@ static bool status_readdb_attrfix(const char* file) {
|
|
}
|
|
}
|
|
|
|
|
|
// Copied and adjusted from script.cpp
|
|
// Copied and adjusted from script.cpp
|
|
-static bool read_constdb(char* fields[], int columns, int current) {
|
|
|
|
|
|
+static bool read_constdb( char* fields[], size_t columns, size_t current ){
|
|
char name[1024], val[1024];
|
|
char name[1024], val[1024];
|
|
int type = 0;
|
|
int type = 0;
|
|
|
|
|
|
@@ -4252,7 +4242,7 @@ static bool read_constdb(char* fields[], int columns, int current) {
|
|
|
|
|
|
// job_db.yml function
|
|
// job_db.yml function
|
|
//----------------------
|
|
//----------------------
|
|
-static bool pc_readdb_job2(char* fields[], int columns, int current) {
|
|
|
|
|
|
+static bool pc_readdb_job2( char* fields[], size_t columns, size_t current ){
|
|
std::vector<int> stats;
|
|
std::vector<int> stats;
|
|
|
|
|
|
stats.resize(MAX_LEVEL);
|
|
stats.resize(MAX_LEVEL);
|
|
@@ -4267,7 +4257,7 @@ static bool pc_readdb_job2(char* fields[], int columns, int current) {
|
|
|
|
|
|
// job_db.yml function
|
|
// job_db.yml function
|
|
//----------------------
|
|
//----------------------
|
|
-static bool pc_readdb_job_param(char* fields[], int columns, int current) {
|
|
|
|
|
|
+static bool pc_readdb_job_param( char* fields[], size_t columns, size_t current ){
|
|
int job_id = atoi(fields[0]);
|
|
int job_id = atoi(fields[0]);
|
|
s_job_param entry = {};
|
|
s_job_param entry = {};
|
|
|
|
|
|
@@ -4285,7 +4275,7 @@ static bool pc_readdb_job_param(char* fields[], int columns, int current) {
|
|
|
|
|
|
// job_basehpsp_db.yml function
|
|
// job_basehpsp_db.yml function
|
|
//----------------------
|
|
//----------------------
|
|
-static bool pc_readdb_job_exp_sub(char* fields[], int columns, int current) {
|
|
|
|
|
|
+static bool pc_readdb_job_exp_sub( char* fields[], size_t columns, size_t current ){
|
|
int level = atoi(fields[0]), jobs[CLASS_COUNT], job_count = skill_split_atoi(fields[1], jobs, CLASS_COUNT), type = atoi(fields[2]);
|
|
int level = atoi(fields[0]), jobs[CLASS_COUNT], job_count = skill_split_atoi(fields[1], jobs, CLASS_COUNT), type = atoi(fields[2]);
|
|
|
|
|
|
for (int i = 0; i < job_count; i++) {
|
|
for (int i = 0; i < job_count; i++) {
|
|
@@ -4299,7 +4289,7 @@ static bool pc_readdb_job_exp_sub(char* fields[], int columns, int current) {
|
|
}
|
|
}
|
|
|
|
|
|
// Copied and adjusted from pc.cpp
|
|
// Copied and adjusted from pc.cpp
|
|
-static bool pc_readdb_job_exp(char* fields[], int columns, int current) {
|
|
|
|
|
|
+static bool pc_readdb_job_exp( char* fields[], size_t columns, size_t current ){
|
|
int level = atoi(fields[0]), jobs[CLASS_COUNT], job_count = skill_split_atoi(fields[1], jobs, CLASS_COUNT), type = atoi(fields[2]);
|
|
int level = atoi(fields[0]), jobs[CLASS_COUNT], job_count = skill_split_atoi(fields[1], jobs, CLASS_COUNT), type = atoi(fields[2]);
|
|
|
|
|
|
body << YAML::BeginMap;
|
|
body << YAML::BeginMap;
|
|
@@ -4337,7 +4327,7 @@ static bool pc_readdb_job_exp(char* fields[], int columns, int current) {
|
|
}
|
|
}
|
|
|
|
|
|
// Copied and adjusted from pc.cpp
|
|
// Copied and adjusted from pc.cpp
|
|
-static bool pc_readdb_job_basehpsp(char* fields[], int columns, int current) {
|
|
|
|
|
|
+static bool pc_readdb_job_basehpsp( char* fields[], size_t columns, size_t current ){
|
|
int type = atoi(fields[3]), jobs[CLASS_COUNT], job_count = skill_split_atoi(fields[2], jobs, CLASS_COUNT);
|
|
int type = atoi(fields[3]), jobs[CLASS_COUNT], job_count = skill_split_atoi(fields[2], jobs, CLASS_COUNT);
|
|
|
|
|
|
body << YAML::BeginMap;
|
|
body << YAML::BeginMap;
|
|
@@ -4401,7 +4391,7 @@ static bool pc_readdb_job_basehpsp(char* fields[], int columns, int current) {
|
|
}
|
|
}
|
|
|
|
|
|
// Copied and adjusted from pc.cpp
|
|
// Copied and adjusted from pc.cpp
|
|
-static bool pc_readdb_job1(char* fields[], int columns, int current) {
|
|
|
|
|
|
+static bool pc_readdb_job1( char* fields[], size_t columns, size_t current ){
|
|
int job_id = atoi(fields[0]);
|
|
int job_id = atoi(fields[0]);
|
|
|
|
|
|
if (job_id == JOB_WEDDING)
|
|
if (job_id == JOB_WEDDING)
|
|
@@ -4499,7 +4489,7 @@ static bool pc_readdb_job1(char* fields[], int columns, int current) {
|
|
|
|
|
|
// elemental_db.yml function
|
|
// elemental_db.yml function
|
|
//---------------------------
|
|
//---------------------------
|
|
-static bool read_elemental_skilldb(char* str[], int columns, int current) {
|
|
|
|
|
|
+static bool read_elemental_skilldb( char* str[], size_t columns, size_t current ){
|
|
uint16 skill_id = atoi(str[1]);
|
|
uint16 skill_id = atoi(str[1]);
|
|
std::string *skill_name = util::umap_find(aegis_skillnames, skill_id);
|
|
std::string *skill_name = util::umap_find(aegis_skillnames, skill_id);
|
|
|
|
|
|
@@ -4533,7 +4523,7 @@ static bool read_elemental_skilldb(char* str[], int columns, int current) {
|
|
}
|
|
}
|
|
|
|
|
|
// Copied and adjusted from elemental.cpp
|
|
// Copied and adjusted from elemental.cpp
|
|
-static bool read_elementaldb(char* str[], int columns, int current) {
|
|
|
|
|
|
+static bool read_elementaldb( char* str[], size_t columns, size_t current ){
|
|
body << YAML::BeginMap;
|
|
body << YAML::BeginMap;
|
|
body << YAML::Key << "Id" << YAML::Value << str[0];
|
|
body << YAML::Key << "Id" << YAML::Value << str[0];
|
|
body << YAML::Key << "AegisName" << YAML::Value << str[1];
|
|
body << YAML::Key << "AegisName" << YAML::Value << str[1];
|
|
@@ -4609,7 +4599,7 @@ static bool read_elementaldb(char* str[], int columns, int current) {
|
|
|
|
|
|
// mercenary_db.yml function
|
|
// mercenary_db.yml function
|
|
//---------------------------
|
|
//---------------------------
|
|
-static bool mercenary_read_skilldb(char* str[], int columns, int current) {
|
|
|
|
|
|
+static bool mercenary_read_skilldb( char* str[], size_t columns, size_t current ){
|
|
uint16 skill_id = atoi(str[1]);
|
|
uint16 skill_id = atoi(str[1]);
|
|
std::string *skill_name = util::umap_find(aegis_skillnames, skill_id);
|
|
std::string *skill_name = util::umap_find(aegis_skillnames, skill_id);
|
|
|
|
|
|
@@ -4636,7 +4626,7 @@ static bool mercenary_read_skilldb(char* str[], int columns, int current) {
|
|
}
|
|
}
|
|
|
|
|
|
// Copied and adjusted from mercenary.cpp
|
|
// Copied and adjusted from mercenary.cpp
|
|
-static bool mercenary_readdb(char* str[], int columns, int current) {
|
|
|
|
|
|
+static bool mercenary_readdb( char* str[], size_t columns, size_t current ){
|
|
body << YAML::BeginMap;
|
|
body << YAML::BeginMap;
|
|
body << YAML::Key << "Id" << YAML::Value << str[0];
|
|
body << YAML::Key << "Id" << YAML::Value << str[0];
|
|
body << YAML::Key << "AegisName" << YAML::Value << str[1];
|
|
body << YAML::Key << "AegisName" << YAML::Value << str[1];
|
|
@@ -4716,7 +4706,7 @@ static bool mercenary_readdb(char* str[], int columns, int current) {
|
|
}
|
|
}
|
|
|
|
|
|
// Copied and adjusted from pc.cpp
|
|
// Copied and adjusted from pc.cpp
|
|
-static bool pc_readdb_skilltree(char* fields[], int columns, int current) {
|
|
|
|
|
|
+static bool pc_readdb_skilltree( char* fields[], size_t columns, size_t current ){
|
|
uint16 baselv, joblv, offset;
|
|
uint16 baselv, joblv, offset;
|
|
uint16 class_ = (uint16)atoi(fields[0]);
|
|
uint16 class_ = (uint16)atoi(fields[0]);
|
|
uint16 skill_id = (uint16)atoi(fields[1]);
|
|
uint16 skill_id = (uint16)atoi(fields[1]);
|
|
@@ -4947,7 +4937,7 @@ static bool itemdb_read_combos(const char* file) {
|
|
}
|
|
}
|
|
|
|
|
|
// Copied and adjusted from cashshop.cpp
|
|
// Copied and adjusted from cashshop.cpp
|
|
-static bool cashshop_parse_dbrow( char* fields[], int columns, int current ){
|
|
|
|
|
|
+static bool cashshop_parse_dbrow( char* fields[], size_t columns, size_t current ){
|
|
uint16 tab = atoi( fields[0] );
|
|
uint16 tab = atoi( fields[0] );
|
|
t_itemid nameid = strtoul( fields[1], nullptr, 10 );
|
|
t_itemid nameid = strtoul( fields[1], nullptr, 10 );
|
|
uint32 price = atoi( fields[2] );
|
|
uint32 price = atoi( fields[2] );
|
|
@@ -4994,7 +4984,7 @@ static bool cashshop_parse_dbrow( char* fields[], int columns, int current ){
|
|
|
|
|
|
// homunculus_db.yml function
|
|
// homunculus_db.yml function
|
|
//---------------------------
|
|
//---------------------------
|
|
-static bool read_homunculus_skilldb(char* split[], int columns, int current) {
|
|
|
|
|
|
+static bool read_homunculus_skilldb( char* split[], size_t columns, size_t current ){
|
|
s_homun_skill_tree_entry entry = {};
|
|
s_homun_skill_tree_entry entry = {};
|
|
|
|
|
|
entry.id = atoi(split[1]);
|
|
entry.id = atoi(split[1]);
|
|
@@ -5022,7 +5012,7 @@ static bool compareHomSkillId(const s_homun_skill_tree_entry &a, const s_homun_s
|
|
}
|
|
}
|
|
|
|
|
|
// Copied and adjusted from homunculus.cpp
|
|
// Copied and adjusted from homunculus.cpp
|
|
-static bool read_homunculusdb(char* str[], int columns, int current) {
|
|
|
|
|
|
+static bool read_homunculusdb( char* str[], size_t columns, size_t current ){
|
|
bool has_evo = false;
|
|
bool has_evo = false;
|
|
|
|
|
|
body << YAML::BeginMap;
|
|
body << YAML::BeginMap;
|