diff options
author | Andrei Karas <akaras@inbox.ru> | 2016-01-06 17:36:33 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2016-01-06 17:36:33 +0300 |
commit | d5199cee806fb9f18987dea0c3a20a2d381927ca (patch) | |
tree | 135f15dadc1c7964b3078fd8223771f94d1ed0e6 /src/map/chrif.c | |
parent | 756be9835054a3b2b8ebace388546fa15ffd4a92 (diff) | |
parent | e3eac134b1607cfe78331e298aaa20b260662571 (diff) | |
download | hercules-d5199cee806fb9f18987dea0c3a20a2d381927ca.tar.gz hercules-d5199cee806fb9f18987dea0c3a20a2d381927ca.tar.bz2 hercules-d5199cee806fb9f18987dea0c3a20a2d381927ca.tar.xz hercules-d5199cee806fb9f18987dea0c3a20a2d381927ca.zip |
Merge pull request #1034 from HerculesWS/bl_cast
Changed all TBL_* to the appropriate structs
Diffstat (limited to 'src/map/chrif.c')
-rw-r--r-- | src/map/chrif.c | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/src/map/chrif.c b/src/map/chrif.c index e9227db73..1f7fbe96e 100644 --- a/src/map/chrif.c +++ b/src/map/chrif.c @@ -163,7 +163,8 @@ bool chrif_auth_delete(int account_id, int char_id, enum sd_state state) { } //Moves the sd character to the auth_db structure. -bool chrif_sd_to_auth(TBL_PC* sd, enum sd_state state) { +bool chrif_sd_to_auth(struct map_session_data *sd, enum sd_state state) +{ struct auth_node *node; nullpo_retr(false, sd); @@ -191,7 +192,7 @@ bool chrif_sd_to_auth(TBL_PC* sd, enum sd_state state) { return true; } -bool chrif_auth_logout(TBL_PC* sd, enum sd_state state) +bool chrif_auth_logout(struct map_session_data *sd, enum sd_state state) { nullpo_retr(false, sd); if(sd->fd && state == ST_LOGOUT) { //Disassociate player, and free it after saving ack returns. [Skotlex] @@ -204,7 +205,8 @@ bool chrif_auth_logout(TBL_PC* sd, enum sd_state state) return chrif->sd_to_auth(sd, state); } -bool chrif_auth_finished(TBL_PC* sd) { +bool chrif_auth_finished(struct map_session_data *sd) +{ struct auth_node *node; nullpo_retr(false, sd); @@ -593,7 +595,7 @@ void chrif_authok(int fd) { struct mmo_charstatus* charstatus; struct auth_node *node; bool changing_mapservers; - TBL_PC* sd; + struct map_session_data *sd = NULL; //Check if both servers agree on the struct's size if( RFIFOW(fd,2) - 25 != sizeof(struct mmo_charstatus) ) { @@ -1476,8 +1478,8 @@ int send_usercount_tochar(int tid, int64 tick, int id, intptr_t data) { *------------------------------------------*/ bool send_users_tochar(void) { int users = 0, i = 0; - struct map_session_data* sd; - struct s_mapiterator* iter; + const struct map_session_data *sd; + struct s_mapiterator *iter; chrif_check(false); @@ -1487,7 +1489,7 @@ bool send_users_tochar(void) { WFIFOW(chrif->fd,0) = 0x2aff; iter = mapit_getallusers(); - for( sd = (TBL_PC*)mapit->first(iter); mapit->exists(iter); sd = (TBL_PC*)mapit->next(iter) ) { + for (sd = BL_UCCAST(BL_PC, mapit->first(iter)); mapit->exists(iter); sd = BL_UCCAST(BL_PC, mapit->next(iter))) { WFIFOL(chrif->fd,6+8*i) = sd->status.account_id; WFIFOL(chrif->fd,6+8*i+4) = sd->status.char_id; i++; |