Forráskód Böngészése

Monster RaceGroups corrections (#9158)

* Added missing columns in doc/yaml/sql/mob_db*.sql files, files used by the yaml to sql convertion tool
* Removed extra bonus in combo DB. Thanks to @Pokye !
* Flag RC_NONE and RC_ALL as script constant deprecated
Atemo 2 hónapja
szülő
commit
3f1cee7a88

+ 0 - 1
db/re/item_combos.yml

@@ -58610,7 +58610,6 @@ Body:
       bonus2 bSkillAtk,"NJ_KOUENKA",15;
       bonus2 bSkillAtk,"NJ_HYOUSENSOU",15;
       bonus2 bSkillAtk,"NJ_HUUJIN",15;
-            bonus2 bMagicAddClass,Class_All,30;
   - Combos:
       - Combo:
           - S_EM_CO_Earring   # 24979

+ 6 - 0
doc/yaml/sql/mob_db.sql

@@ -63,6 +63,12 @@ CREATE TABLE `mob_db` (
   `racegroup_illusion_turtle` tinyint(1) unsigned DEFAULT NULL,
   `racegroup_rachel_sanctuary` tinyint(1) unsigned DEFAULT NULL,
   `racegroup_illusion_luanda` tinyint(1) unsigned DEFAULT NULL,
+  `racegroup_illusion_frozen` tinyint(1) unsigned DEFAULT NULL,
+  `racegroup_illusion_moonlight` tinyint(1) unsigned DEFAULT NULL,
+  `racegroup_ep16_def` tinyint(1) unsigned DEFAULT NULL,
+  `racegroup_edda_arunafeltz` tinyint(1) unsigned DEFAULT NULL,
+  `racegroup_lasagna` tinyint(1) unsigned DEFAULT NULL,
+  `racegroup_glast_heim_abyss` tinyint(1) unsigned DEFAULT NULL,
   `element` varchar(24) DEFAULT NULL,
   `element_level` tinyint(4) unsigned DEFAULT NULL,
   `walk_speed` smallint(6) unsigned DEFAULT NULL,

+ 6 - 0
doc/yaml/sql/mob_db2.sql

@@ -63,6 +63,12 @@ CREATE TABLE `mob_db2` (
   `racegroup_illusion_turtle` tinyint(1) unsigned DEFAULT NULL,
   `racegroup_rachel_sanctuary` tinyint(1) unsigned DEFAULT NULL,
   `racegroup_illusion_luanda` tinyint(1) unsigned DEFAULT NULL,
+  `racegroup_illusion_frozen` tinyint(1) unsigned DEFAULT NULL,
+  `racegroup_illusion_moonlight` tinyint(1) unsigned DEFAULT NULL,
+  `racegroup_ep16_def` tinyint(1) unsigned DEFAULT NULL,
+  `racegroup_edda_arunafeltz` tinyint(1) unsigned DEFAULT NULL,
+  `racegroup_lasagna` tinyint(1) unsigned DEFAULT NULL,
+  `racegroup_glast_heim_abyss` tinyint(1) unsigned DEFAULT NULL,
   `element` varchar(24) DEFAULT NULL,
   `element_level` tinyint(4) unsigned DEFAULT NULL,
   `walk_speed` smallint(6) unsigned DEFAULT NULL,

+ 6 - 0
doc/yaml/sql/mob_db2_re.sql

@@ -65,6 +65,12 @@ CREATE TABLE `mob_db2_re` (
   `racegroup_illusion_turtle` tinyint(1) unsigned DEFAULT NULL,
   `racegroup_rachel_sanctuary` tinyint(1) unsigned DEFAULT NULL,
   `racegroup_illusion_luanda` tinyint(1) unsigned DEFAULT NULL,
+  `racegroup_illusion_frozen` tinyint(1) unsigned DEFAULT NULL,
+  `racegroup_illusion_moonlight` tinyint(1) unsigned DEFAULT NULL,
+  `racegroup_ep16_def` tinyint(1) unsigned DEFAULT NULL,
+  `racegroup_edda_arunafeltz` tinyint(1) unsigned DEFAULT NULL,
+  `racegroup_lasagna` tinyint(1) unsigned DEFAULT NULL,
+  `racegroup_glast_heim_abyss` tinyint(1) unsigned DEFAULT NULL,
   `element` varchar(24) DEFAULT NULL,
   `element_level` tinyint(4) unsigned DEFAULT NULL,
   `walk_speed` smallint(6) unsigned DEFAULT NULL,

+ 2 - 0
doc/yaml/sql/mob_db_re.sql

@@ -69,6 +69,8 @@ CREATE TABLE `mob_db_re` (
   `racegroup_illusion_moonlight` tinyint(1) unsigned DEFAULT NULL,
   `racegroup_ep16_def` tinyint(1) unsigned DEFAULT NULL,
   `racegroup_edda_arunafeltz` tinyint(1) unsigned DEFAULT NULL,
+  `racegroup_lasagna` tinyint(1) unsigned DEFAULT NULL,
+  `racegroup_glast_heim_abyss` tinyint(1) unsigned DEFAULT NULL,
   `element` varchar(24) DEFAULT NULL,
   `element_level` tinyint(4) unsigned DEFAULT NULL,
   `walk_speed` smallint(6) unsigned DEFAULT NULL,

+ 0 - 1
src/map/map.hpp

@@ -1253,7 +1253,6 @@ bool map_setmapflag_sub(int16 m, enum e_mapflag mapflag, bool status, union u_ma
 #define CHK_ELEMENT(ele) ((ele) > ELE_NONE && (ele) < ELE_MAX) /// Check valid Element
 #define CHK_ELEMENT_LEVEL(lv) ((lv) >= 1 && (lv) <= MAX_ELE_LEVEL) /// Check valid element level
 #define CHK_RACE(race) ((race) > RC_NONE_ && (race) < RC_MAX) /// Check valid Race
-#define CHK_RACE2(race2) ((race2) >= RC2_NONE && (race2) < RC2_MAX) /// Check valid Race2
 #define CHK_CLASS(class_) ((class_) > CLASS_NONE && (class_) < CLASS_MAX) /// Check valid Class
 
 //Other languages supported

+ 1 - 1
src/map/mob.cpp

@@ -5116,7 +5116,7 @@ uint64 MobDatabase::parseBodyNode(const ryml::NodeRef& node) {
 				continue;
 			}
 
-			if (!CHK_RACE2(constant)) {
+			if (constant <= RC2_NONE || constant >= RC2_MAX) {
 				this->invalidWarning(raceNode[raceit.key()], "Invalid monster race group %s, skipping.\n", raceName.c_str());
 				continue;
 			}

+ 1 - 1
src/map/pc.cpp

@@ -3034,7 +3034,7 @@ int32 pc_disguise(map_session_data *sd, int32 class_)
 /// Check for valid Race, break & show error message if invalid Race
 #define PC_BONUS_CHK_RACE(rc,bonus) { if (!CHK_RACE((rc))) { PC_BONUS_SHOW_ERROR((bonus),Race,(rc)); }}
 /// Check for valid Race2, break & show error message if invalid Race2
-#define PC_BONUS_CHK_RACE2(rc2,bonus) { if (!CHK_RACE2((rc2))) { PC_BONUS_SHOW_ERROR((bonus),Race2,(rc2)); }}
+#define PC_BONUS_CHK_RACE2(rc2,bonus) { if ((rc2) <= RC2_NONE || (rc2) >= RC2_MAX) { PC_BONUS_SHOW_ERROR((bonus),Race2,(rc2)); }}
 /// Check for valid Class, break & show error message if invalid Class
 #define PC_BONUS_CHK_CLASS(cl,bonus) { if (!CHK_CLASS((cl))) { PC_BONUS_SHOW_ERROR((bonus),Class,(cl)); }}
 /// Check for valid Size, break & show error message if invalid Size

+ 2 - 2
src/map/script_constants.hpp

@@ -3464,7 +3464,7 @@
 	export_constant(RC_PLAYER_DORAM);
 	export_constant(RC_ALL);
 
-	export_constant(RC2_NONE);
+	export_deprecated_constant(RC2_NONE);	// Mar. 2025
 	export_constant(RC2_GOBLIN);
 	export_constant(RC2_KOBOLD);
 	export_constant(RC2_ORC);
@@ -3503,7 +3503,7 @@
 	export_constant(RC2_EDDA_ARUNAFELTZ);
 	export_constant(RC2_LASAGNA);
 	export_constant(RC2_GLAST_HEIM_ABYSS);
-	export_constant(RC2_MAX);
+	export_deprecated_constant(RC2_MAX);	// Mar. 2025
 
 	/* monster ai */
 	export_constant(MONSTER_TYPE_01);