Explorar el Código

Adds support for Spirit Handler in SQL items (#7041)

Aleos hace 2 años
padre
commit
7d356806e1
Se han modificado 4 ficheros con 9 adiciones y 1 borrados
  1. 1 0
      sql-files/item_db2_re.sql
  2. 1 0
      sql-files/item_db_re.sql
  3. 3 1
      src/map/itemdb.cpp
  4. 4 0
      src/tool/yaml2sql.cpp

+ 1 - 0
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,

+ 1 - 0
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,

+ 3 - 1
src/map/itemdb.cpp

@@ -2911,6 +2911,8 @@ static bool itemdb_read_sqldb_sub(std::vector<std::string> 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);

+ 4 - 0
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