Selaa lähdekoodia

Renamed custome headgear constans in src

They now match with those currently used in scripts and also match the ones for normal headgears and additionally they are easier to understand.
Lemongrass3110 9 vuotta sitten
vanhempi
commit
d32c857e16
3 muutettua tiedostoa jossa 8 lisäystä ja 14 poistoa
  1. 2 2
      src/map/pc.c
  2. 3 3
      src/map/pc.h
  3. 3 9
      src/map/script_constants.h

+ 2 - 2
src/map/pc.c

@@ -11674,10 +11674,10 @@ bool pc_is_same_equip_index(enum equip_index eqi, short *equip_index, short inde
 	if (eqi == EQI_HEAD_TOP && (equip_index[EQI_HEAD_MID] == index || equip_index[EQI_HEAD_LOW] == index))
 		return true;
 	// Headgear with Mid & Low location
-	if (eqi == EQI_COSTUME_MID && equip_index[EQI_COSTUME_LOW] == index)
+	if (eqi == EQI_COSTUME_HEAD_MID && equip_index[EQI_COSTUME_HEAD_LOW] == index)
 		return true;
 	// Headgear with Top & Mid or Low location
-	if (eqi == EQI_COSTUME_TOP && (equip_index[EQI_COSTUME_MID] == index || equip_index[EQI_COSTUME_LOW] == index))
+	if (eqi == EQI_COSTUME_HEAD_TOP && (equip_index[EQI_COSTUME_HEAD_MID] == index || equip_index[EQI_COSTUME_HEAD_LOW] == index))
 		return true;
 	return false;
 }

+ 3 - 3
src/map/pc.h

@@ -54,9 +54,9 @@ enum equip_index {
 	EQI_ARMOR,
 	EQI_HAND_L,
 	EQI_HAND_R,
-	EQI_COSTUME_TOP,
-	EQI_COSTUME_MID,
-	EQI_COSTUME_LOW,
+	EQI_COSTUME_HEAD_TOP,
+	EQI_COSTUME_HEAD_MID,
+	EQI_COSTUME_HEAD_LOW,
 	EQI_COSTUME_GARMENT,
 	EQI_AMMO,
 	EQI_SHADOW_ARMOR,

+ 3 - 9
src/map/script_constants.h

@@ -659,15 +659,9 @@
 	export_constant(EQI_ACC_R);
 	export_constant(EQI_HEAD_MID);
 	export_constant(EQI_HEAD_LOW);
-	export_constant(EQI_COSTUME_LOW);
-	// For backwards compatability
-	script_set_constant("EQI_COSTUME_HEAD_LOW",EQI_COSTUME_LOW,false); // TODO: Check if this is used anywhere and remove if possible
-	export_constant(EQI_COSTUME_MID);
-	// For backwards compatability
-	script_set_constant("EQI_COSTUME_HEAD_MID",EQI_COSTUME_MID,false); // TODO: Check if this is used anywhere and remove if possible
-	export_constant(EQI_COSTUME_TOP);
-	// For backwards compatability
-	script_set_constant("EQI_COSTUME_HEAD_TOP",EQI_COSTUME_TOP,false); // TODO: Check if this is used anywhere and remove if possible
+	export_constant(EQI_COSTUME_HEAD_LOW);
+	export_constant(EQI_COSTUME_HEAD_MID);
+	export_constant(EQI_COSTUME_HEAD_TOP);
 	export_constant(EQI_COSTUME_GARMENT);
 	export_constant(EQI_AMMO);
 	export_constant(EQI_SHADOW_ARMOR );