diff options
Diffstat (limited to 'src/map/pc.h')
-rw-r--r-- | src/map/pc.h | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/src/map/pc.h b/src/map/pc.h index 66591adc8..a6e65a3b5 100644 --- a/src/map/pc.h +++ b/src/map/pc.h @@ -5,6 +5,7 @@ #define _PC_H_
#include "map.h"
+#include "unit.h"
#define OPTION_MASK 0xd7b8
#define CART_MASK 0x788
@@ -16,7 +17,7 @@ #define pc_setsit(sd) ((sd)->state.dead_sit = 2)
#define pc_isdead(sd) ((sd)->state.dead_sit == 1)
#define pc_issit(sd) ((sd)->state.dead_sit == 2)
-#define pc_setdir(sd,b,h) ((sd)->dir = (b) ,(sd)->head_dir = (h) )
+#define pc_setdir(sd,b,h) ((sd)->ud.dir = (b) ,(sd)->head_dir = (h) )
#define pc_setchatid(sd,n) ((sd)->chatID = n)
#define pc_ishiding(sd) ((sd)->sc.option&(OPTION_HIDE|OPTION_CLOAK|OPTION_CHASEWALK))
#define pc_iscloaking(sd) (!((sd)->sc.option&OPTION_CHASEWALK) && ((sd)->sc.option&OPTION_CLOAK))
@@ -28,13 +29,16 @@ #define pc_is50overweight(sd) (sd->weight*2 >= sd->max_weight)
#define pc_is90overweight(sd) (sd->weight*10 >= sd->max_weight*9)
#define pc_maxparameter(sd) ((sd->class_&JOBL_BABY) ? battle_config.max_baby_parameter : battle_config.max_parameter)
+
+#define pc_stop_attack(sd) { if (sd->ud.attacktimer!=-1) unit_stop_attack(&sd->bl); }
+#define pc_stop_walking(sd, type) { if (sd->ud.walktimer!=-1) unit_stop_walking(&sd->bl, type); }
+
//Checks if the given class value corresponds to a player class. [Skotlex]
#define pcdb_checkid(class_) ((class_ >= JOB_NOVICE && class_ <= JOB_XMAS) || (class_ >= JOB_NOVICE_HIGH && class_ <= JOB_SOUL_LINKER))
int pc_isGM(struct map_session_data *sd);
int pc_iskiller(struct map_session_data *src, struct map_session_data *target); // [MouseJstr]
int pc_getrefinebonus(int lv,int type);
-int pc_can_move(struct map_session_data *sd); //[Skotlex]
int pc_can_give_items(int level); //[Lupus]
int pc_setrestartvalue(struct map_session_data *sd,int type);
@@ -58,10 +62,6 @@ int pc_clean_skilltree(struct map_session_data *sd); int pc_checkoverhp(struct map_session_data*);
int pc_checkoversp(struct map_session_data*);
-int pc_can_reach(struct map_session_data*,int,int);
-int pc_walktoxy(struct map_session_data*,int,int);
-int pc_stop_walking(struct map_session_data*,int);
-int pc_movepos(struct map_session_data*,int,int,int);
int pc_setpos(struct map_session_data*,unsigned short,int,int,int);
int pc_setsavepoint(struct map_session_data*,short,int,int);
int pc_randomwarp(struct map_session_data *sd,int type);
@@ -102,9 +102,6 @@ int pc_steal_coin(struct map_session_data *sd,struct block_list *bl); int pc_modifybuyvalue(struct map_session_data*,int);
int pc_modifysellvalue(struct map_session_data*,int);
-int pc_attack(struct map_session_data*,int,int);
-int pc_stopattack(struct map_session_data*);
-
int pc_follow(struct map_session_data*, int); // [MouseJstr]
int pc_stop_following(struct map_session_data*);
|