summaryrefslogtreecommitdiff
path: root/src/map
diff options
context:
space:
mode:
authorshennetsind <ind@henn.et>2013-03-29 14:58:16 -0300
committershennetsind <ind@henn.et>2013-03-29 14:58:16 -0300
commitea42e92c2d130f723cd09a637448cd20a52777e8 (patch)
tree9119f1cf31f44be0c05efd9df26d55d5c5cce7ed /src/map
parent1bd560a547c419da3327cc9a54af18e69f96095f (diff)
downloadhercules-ea42e92c2d130f723cd09a637448cd20a52777e8.tar.gz
hercules-ea42e92c2d130f723cd09a637448cd20a52777e8.tar.bz2
hercules-ea42e92c2d130f723cd09a637448cd20a52777e8.tar.xz
hercules-ea42e92c2d130f723cd09a637448cd20a52777e8.zip
Follow up 1bd560a547c419da3327cc9a54af18e69f96095f
this way no one will ever have to remember about updating this index, and 1bd560a547c419da3327cc9a54af18e69f96095f bug wont happen ever again o: Signed-off-by: shennetsind <ind@henn.et>
Diffstat (limited to 'src/map')
-rw-r--r--src/map/pc.h44
1 files changed, 22 insertions, 22 deletions
diff --git a/src/map/pc.h b/src/map/pc.h
index ea277072e..f7afdd223 100644
--- a/src/map/pc.h
+++ b/src/map/pc.h
@@ -25,6 +25,27 @@
#define MAX_PC_SKILL_REQUIRE 5
#define MAX_PC_FEELHATE 3
+//Equip indexes constants. (eg: sd->equip_index[EQI_AMMO] returns the index
+//where the arrows are equipped)
+enum equip_index {
+ EQI_ACC_L = 0,
+ EQI_ACC_R,
+ EQI_SHOES,
+ EQI_GARMENT,
+ EQI_HEAD_LOW,
+ EQI_HEAD_MID,
+ EQI_HEAD_TOP,
+ EQI_ARMOR,
+ EQI_HAND_L,
+ EQI_HAND_R,
+ EQI_COSTUME_TOP,
+ EQI_COSTUME_MID,
+ EQI_COSTUME_LOW,
+ EQI_COSTUME_GARMENT,
+ EQI_AMMO,
+ EQI_MAX
+};
+
struct weapon_data {
int atkmods[3];
// all the variables except atkmods get zero'ed in each call of status_calc_pc
@@ -168,7 +189,7 @@ struct map_session_data {
struct registry save_reg;
struct item_data* inventory_data[MAX_INVENTORY]; // direct pointers to itemdb entries (faster than doing item_id lookups)
- short equip_index[15];
+ short equip_index[EQI_MAX];
unsigned int weight,max_weight;
int cart_weight,cart_num,cart_weight_max;
int fd;
@@ -568,27 +589,6 @@ enum equip_pos {
#define EQP_VISIBLE (EQP_HELM|EQP_GARMENT|EQP_COSTUME)
#endif
-//Equip indexes constants. (eg: sd->equip_index[EQI_AMMO] returns the index
-//where the arrows are equipped)
-enum equip_index {
- EQI_ACC_L = 0,
- EQI_ACC_R,
- EQI_SHOES,
- EQI_GARMENT,
- EQI_HEAD_LOW,
- EQI_HEAD_MID,
- EQI_HEAD_TOP,
- EQI_ARMOR,
- EQI_HAND_L,
- EQI_HAND_R,
- EQI_COSTUME_TOP,
- EQI_COSTUME_MID,
- EQI_COSTUME_LOW,
- EQI_COSTUME_GARMENT,
- EQI_AMMO,
- EQI_MAX
-};
-
#define pc_setdead(sd) ( (sd)->state.dead_sit = (sd)->vd.dead_sit = 1 )
#define pc_setsit(sd) ( (sd)->state.dead_sit = (sd)->vd.dead_sit = 2 )
#define pc_isdead(sd) ( (sd)->state.dead_sit == 1 )