Jelajahi Sumber

Migrated all battle and auto trigger flag constants to source exports

Lemongrass3110 9 tahun lalu
induk
melakukan
43d9445c6d
2 mengubah file dengan 20 tambahan dan 17 penghapusan
  1. 0 17
      db/const.txt
  2. 20 0
      src/map/script_constants.h

+ 0 - 17
db/const.txt

@@ -247,23 +247,6 @@ bSubSkill	2077
 bSubDefEle	2078
 bStateNoRecoverRace	2079
 
-BF_WEAPON	0x0001
-BF_MAGIC	0x0002
-BF_MISC	0x0004
-BF_SHORT	0x0010
-BF_LONG	0x0040
-BF_SKILL	0x0100
-BF_NORMAL	0x0200
-
-ATF_SELF	0x01
-ATF_TARGET	0x02
-ATF_SHORT	0x04
-ATF_LONG	0x08
-ATF_WEAPON	0x10
-ATF_MAGIC	0x20
-ATF_MISC	0x40
-ATF_SKILL	0x60
-
 //Item Group ID
 IG_BlueBox	1
 IG_VioletBox	2

+ 20 - 0
src/map/script_constants.h

@@ -2112,6 +2112,26 @@
 	script_set_constant("Size_Large",SZ_BIG,false);
 	script_set_constant("Size_All",SZ_ALL,false);
 
+	/* battle flags */
+	export_constant(BF_WEAPON);
+	export_constant(BF_MAGIC);
+	export_constant(BF_MISC);
+	export_constant(BF_SHORT);
+	export_constant(BF_LONG);
+	export_constant(BF_SKILL);
+	export_constant(BF_NORMAL);
+
+	/* auto trigger flags */
+	export_constant(ATF_SELF);
+	export_constant(ATF_TARGET);
+	export_constant(ATF_SHORT);
+	export_constant(ATF_LONG);
+	export_constant(ATF_WEAPON);
+	export_constant(ATF_MAGIC);
+	export_constant(ATF_MISC);
+	// TODO: Check why this was in const.txt, but not on source side
+	script_set_constant("ATF_SKILL",ATF_MAGIC|ATF_MISC,false);
+
 	/* status options */
 	export_constant(OPTION_NOTHING);
 	export_constant(OPTION_SIGHT);