summaryrefslogtreecommitdiff
path: root/src/map/chrif.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/map/chrif.c')
-rw-r--r--src/map/chrif.c16
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++;