From e67711acbe9d29a2feb9293fccc72cd15603ee76 Mon Sep 17 00:00:00 2001 From: ultramage Date: Fri, 2 May 2008 15:08:14 +0000 Subject: Replaced the very ineffective clif_foreachclient() with map_foreachpc() since they essentially do the same thing (bugreport:1174). Rewrote map_foreachpc() so that its callback function signature now uses a more natural 'sd' instead of a DBKey/void* pair. Rewrote atcommand_users() to use a single function, instead of depending on two helper functions and global objects. git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@12683 54d463be-8e91-2dee-dedb-b68131a5f0ec --- src/map/pc.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/map/pc.c') diff --git a/src/map/pc.c b/src/map/pc.c index 04b1ea0ef..5f9545651 100644 --- a/src/map/pc.c +++ b/src/map/pc.c @@ -6996,7 +6996,7 @@ int map_day_timer(int tid, unsigned int tick, int id, intptr data) return 0; //Already day. night_flag = 0; // 0=day, 1=night [Yor] - clif_foreachclient(pc_daynight_timer_sub); + map_foreachpc(pc_daynight_timer_sub); strcpy(tmp_soutput, (data == 0) ? msg_txt(502) : msg_txt(60)); // The day has arrived! intif_GMmessage(tmp_soutput, strlen(tmp_soutput) + 1, 0); return 0; @@ -7017,7 +7017,7 @@ int map_night_timer(int tid, unsigned int tick, int id, intptr data) return 0; //Already nigth. night_flag = 1; // 0=day, 1=night [Yor] - clif_foreachclient(pc_daynight_timer_sub); + map_foreachpc(pc_daynight_timer_sub); strcpy(tmp_soutput, (data == 0) ? msg_txt(503) : msg_txt(59)); // The night has fallen... intif_GMmessage(tmp_soutput, strlen(tmp_soutput) + 1, 0); return 0; @@ -7093,7 +7093,7 @@ int duel_showinfo(const unsigned int did, struct map_session_data* sd) duel_list[did].members_count + duel_list[did].invites_count); clif_disp_onlyself(sd, output, strlen(output)); - clif_foreachclient(duel_showinfo_sub, sd, &p); + map_foreachpc(duel_showinfo_sub, sd, &p); return 0; } @@ -7155,7 +7155,7 @@ int duel_leave(const unsigned int did, struct map_session_data* sd) duel_list[did].members_count--; if(duel_list[did].members_count == 0) { - clif_foreachclient(duel_leave_sub, did); + map_foreachpc(duel_leave_sub, did); duel_count--; } -- cgit v1.2.3-70-g09d2