diff options
Diffstat (limited to 'src/map/script.c')
-rw-r--r-- | src/map/script.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/map/script.c b/src/map/script.c index 7fc4f6b39..800b58428 100644 --- a/src/map/script.c +++ b/src/map/script.c @@ -6104,7 +6104,7 @@ BUILDIN(warpguild) } iter = mapit_getallusers(); - for (pl_sd = (struct map_session_data *)mapit->first(iter); mapit->exists(iter); pl_sd = (struct map_session_data *)mapit->next(iter)) { + for (pl_sd = BL_UCAST(BL_PC, mapit->first(iter)); mapit->exists(iter); pl_sd = BL_UCAST(BL_PC, mapit->next(iter))) { if( pl_sd->status.guild_id != gid ) continue; @@ -10530,7 +10530,8 @@ BUILDIN(getusers) { *------------------------------------------*/ BUILDIN(getusersname) { - struct map_session_data *sd, *pl_sd; + struct map_session_data *sd; + const struct map_session_data *pl_sd; int /*disp_num=1,*/ group_level = 0; struct s_mapiterator* iter; @@ -10539,7 +10540,7 @@ BUILDIN(getusersname) group_level = pc_get_group_level(sd); iter = mapit_getallusers(); - for (pl_sd = (struct map_session_data *)mapit->first(iter); mapit->exists(iter); pl_sd = (struct map_session_data *)mapit->next(iter)) { + for (pl_sd = BL_UCCAST(BL_PC, mapit->first(iter)); mapit->exists(iter); pl_sd = BL_UCCAST(BL_PC, mapit->next(iter))) { if (pc_has_permission(pl_sd, PC_PERM_HIDE_SESSION) && pc_get_group_level(pl_sd) > group_level) continue; // skip hidden sessions @@ -11884,7 +11885,7 @@ BUILDIN(pvpon) return true; iter = mapit_getallusers(); - for (sd = (struct map_session_data *)mapit->first(iter); mapit->exists(iter); sd = (struct map_session_data *)mapit->next(iter)) { + for (sd = BL_UCAST(BL_PC, mapit->first(iter)); mapit->exists(iter); sd = BL_UCAST(BL_PC, mapit->next(iter))) { if( sd->bl.m != m || sd->pvp_timer != INVALID_TIMER ) continue; // not applicable @@ -13605,7 +13606,7 @@ BUILDIN(recovery) struct s_mapiterator* iter; iter = mapit_getallusers(); - for (sd = (struct map_session_data *)mapit->first(iter); mapit->exists(iter); sd = (struct map_session_data *)mapit->next(iter)) { + for (sd = BL_UCAST(BL_PC, mapit->first(iter)); mapit->exists(iter); sd = BL_UCAST(BL_PC, mapit->next(iter))) { if(pc_isdead(sd)) status->revive(&sd->bl, 100, 100); else |