summaryrefslogtreecommitdiff
path: root/src/map/pc.h
diff options
context:
space:
mode:
authorHaru <haru@dotalux.com>2016-04-19 15:26:36 +0200
committerHaru <haru@dotalux.com>2016-04-23 18:42:57 +0200
commit2b1dce1e4acf46941657cab6da008c774f52de7c (patch)
tree008455c1ef1f50c4b2eb8e26f18262f26d9dc5d7 /src/map/pc.h
parent3af03d2a2e8f2054f9a44e272505b1a74d6bdaf6 (diff)
downloadhercules-2b1dce1e4acf46941657cab6da008c774f52de7c.tar.gz
hercules-2b1dce1e4acf46941657cab6da008c774f52de7c.tar.bz2
hercules-2b1dce1e4acf46941657cab6da008c774f52de7c.tar.xz
hercules-2b1dce1e4acf46941657cab6da008c774f52de7c.zip
Changed map_session_data::chatID to int (and renamed to chat_id)
- Chat IDs are signed integers. - Resolves various warnings, depending on the compiler settings. Signed-off-by: Haru <haru@dotalux.com>
Diffstat (limited to 'src/map/pc.h')
-rw-r--r--src/map/pc.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/map/pc.h b/src/map/pc.h
index 5d35fd1cc..58f7a2266 100644
--- a/src/map/pc.h
+++ b/src/map/pc.h
@@ -258,7 +258,7 @@ struct map_session_data {
struct script_state *st;
char npc_str[CHATBOX_SIZE]; // for passing npc input box text to script engine
int npc_timer_id; //For player attached npc timers. [Skotlex]
- unsigned int chatID;
+ int chat_id;
int64 idletime;
struct {
int npc_id;
@@ -610,15 +610,15 @@ END_ZEROED_BLOCK;
#define pc_setsit(sd) ( (sd)->state.dead_sit = (sd)->vd.dead_sit = 2 )
#define pc_isdead(sd) ( (sd)->state.dead_sit == 1 )
#define pc_issit(sd) ( (sd)->vd.dead_sit == 2 )
-#define pc_isidle(sd) ( (sd)->chatID || (sd)->state.vending || (sd)->state.buyingstore || DIFF_TICK(sockt->last_tick, (sd)->idletime) >= battle->bc->idle_no_share )
+#define pc_isidle(sd) ( (sd)->chat_id != 0 || (sd)->state.vending || (sd)->state.buyingstore || DIFF_TICK(sockt->last_tick, (sd)->idletime) >= battle->bc->idle_no_share )
#define pc_istrading(sd) ( (sd)->npc_id || (sd)->state.vending || (sd)->state.buyingstore || (sd)->state.trading )
-#define pc_cant_act(sd) ( (sd)->npc_id || (sd)->state.vending || (sd)->state.buyingstore || (sd)->chatID || ((sd)->sc.opt1 && (sd)->sc.opt1 != OPT1_BURNING) || (sd)->state.trading || (sd)->state.storage_flag || (sd)->state.prevend )
+#define pc_cant_act(sd) ( (sd)->npc_id || (sd)->state.vending || (sd)->state.buyingstore || (sd)->chat_id != 0 || ((sd)->sc.opt1 && (sd)->sc.opt1 != OPT1_BURNING) || (sd)->state.trading || (sd)->state.storage_flag || (sd)->state.prevend )
/* equals pc_cant_act except it doesn't check for chat rooms */
#define pc_cant_act2(sd) ( (sd)->npc_id || (sd)->state.buyingstore || ((sd)->sc.opt1 && (sd)->sc.opt1 != OPT1_BURNING) || (sd)->state.trading || (sd)->state.storage_flag || (sd)->state.prevend )
#define pc_setdir(sd,b,h) ( (sd)->ud.dir = (b) ,(sd)->head_dir = (h) )
-#define pc_setchatid(sd,n) ( (sd)->chatID = n )
+#define pc_setchatid(sd,n) ( (sd)->chat_id = (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) )
#define pc_ischasewalk(sd) ( (sd)->sc.option&OPTION_CHASEWALK )