From 7d356806e1645ade7083734d4e1c3db937f26f57 Mon Sep 17 00:00:00 2001 From: Aleos Date: Fri, 17 Jun 2022 12:06:49 -0400 Subject: [PATCH] Adds support for Spirit Handler in SQL items (#7041) --- sql-files/item_db2_re.sql | 1 + sql-files/item_db_re.sql | 1 + src/map/itemdb.cpp | 4 +++- src/tool/yaml2sql.cpp | 4 ++++ 4 files changed, 9 insertions(+), 1 deletion(-) diff --git a/sql-files/item_db2_re.sql b/sql-files/item_db2_re.sql index d9012c6f69..1975b17f16 100644 --- a/sql-files/item_db2_re.sql +++ b/sql-files/item_db2_re.sql @@ -39,6 +39,7 @@ CREATE TABLE `item_db2_re` ( `job_rogue` tinyint(1) unsigned DEFAULT NULL, `job_sage` tinyint(1) unsigned DEFAULT NULL, `job_soullinker` tinyint(1) unsigned DEFAULT NULL, + `job_spirit_handler` tinyint(1) unsigned DEFAULT NULL, `job_stargladiator` tinyint(1) unsigned DEFAULT NULL, `job_summoner` tinyint(1) unsigned DEFAULT NULL, `job_supernovice` tinyint(1) unsigned DEFAULT NULL, diff --git a/sql-files/item_db_re.sql b/sql-files/item_db_re.sql index 4302497ef8..6ecae4fffc 100644 --- a/sql-files/item_db_re.sql +++ b/sql-files/item_db_re.sql @@ -39,6 +39,7 @@ CREATE TABLE `item_db_re` ( `job_rogue` tinyint(1) unsigned DEFAULT NULL, `job_sage` tinyint(1) unsigned DEFAULT NULL, `job_soullinker` tinyint(1) unsigned DEFAULT NULL, + `job_spirit_handler` tinyint(1) unsigned DEFAULT NULL, `job_stargladiator` tinyint(1) unsigned DEFAULT NULL, `job_summoner` tinyint(1) unsigned DEFAULT NULL, `job_supernovice` tinyint(1) unsigned DEFAULT NULL, diff --git a/src/map/itemdb.cpp b/src/map/itemdb.cpp index e75abec461..07941665ba 100644 --- a/src/map/itemdb.cpp +++ b/src/map/itemdb.cpp @@ -2911,6 +2911,8 @@ static bool itemdb_read_sqldb_sub(std::vector str) { jobs["Rebellion"] << (std::stoi(str[index]) ? "true" : "false"); if (!str[++index].empty()) jobs["Summoner"] << (std::stoi(str[index]) ? "true" : "false"); + if (!str[++index].empty()) + jobs["Spirit_Handler"] << (std::stoi(str[index]) ? "true" : "false"); #endif if( !jobs.has_children() ){ @@ -2970,7 +2972,7 @@ static int itemdb_read_sqldb(void) { "`delay_duration`,`delay_status`,`stack_amount`,`stack_inventory`,`stack_cart`,`stack_storage`,`stack_guildstorage`,`nouse_override`,`nouse_sitting`," "`trade_override`,`trade_nodrop`,`trade_notrade`,`trade_tradepartner`,`trade_nosell`,`trade_nocart`,`trade_nostorage`,`trade_noguildstorage`,`trade_nomail`,`trade_noauction`,`script`,`equip_script`,`unequip_script`" #ifdef RENEWAL - ",`magic_attack`,`class_third`,`class_third_upper`,`class_third_baby`,`class_fourth`,`job_kagerouoboro`,`job_rebellion`,`job_summoner`" + ",`magic_attack`,`class_third`,`class_third_upper`,`class_third_baby`,`class_fourth`,`job_kagerouoboro`,`job_rebellion`,`job_summoner`,`job_spirit_handler`" #endif " FROM `%s`", item_db_name[fi]) ) { Sql_ShowDebug(mmysql_handle); diff --git a/src/tool/yaml2sql.cpp b/src/tool/yaml2sql.cpp index 994fb94d38..09e6d55484 100644 --- a/src/tool/yaml2sql.cpp +++ b/src/tool/yaml2sql.cpp @@ -445,6 +445,10 @@ static bool item_db_yaml2sql(const std::string &file, const std::string &table) column.append("`job_sage`,"); if (appendEntry(jobs["SoulLinker"], value)) column.append("`job_soullinker`,"); +#ifdef RENEWAL + if (appendEntry(jobs["Spirit_Handler"], value)) + column.append("`job_spirit_handler`,"); +#endif if (appendEntry(jobs["StarGladiator"], value)) column.append("`job_stargladiator`,"); #ifdef RENEWAL