summaryrefslogtreecommitdiff
path: root/src/map/atcommand.c
diff options
context:
space:
mode:
authorvalaris <valaris@54d463be-8e91-2dee-dedb-b68131a5f0ec>2004-11-21 17:49:35 +0000
committervalaris <valaris@54d463be-8e91-2dee-dedb-b68131a5f0ec>2004-11-21 17:49:35 +0000
commit5e8b9c8cd3c97cdbd015e6d87532d945fcae16cc (patch)
tree32fbbf2cd0a373af475a429cf8539963234cdc56 /src/map/atcommand.c
parent2163ef94a833449f20eabed84563604b3685baab (diff)
downloadhercules-5e8b9c8cd3c97cdbd015e6d87532d945fcae16cc.tar.gz
hercules-5e8b9c8cd3c97cdbd015e6d87532d945fcae16cc.tar.bz2
hercules-5e8b9c8cd3c97cdbd015e6d87532d945fcae16cc.tar.xz
hercules-5e8b9c8cd3c97cdbd015e6d87532d945fcae16cc.zip
Fixed @whozeny.
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/athena@300 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/atcommand.c')
-rw-r--r--src/map/atcommand.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/map/atcommand.c b/src/map/atcommand.c
index 996f8be9a..286f5837f 100644
--- a/src/map/atcommand.c
+++ b/src/map/atcommand.c
@@ -1639,7 +1639,7 @@ int atcommand_whozeny(
char match_text[100];
char player_name[24];
int zeny[clif_countusers()];
- char counted[clif_countusers()];
+ int counted[clif_countusers()];
memset(output, '\0', sizeof(output));
memset(match_text, '\0', sizeof(match_text));
@@ -1658,6 +1658,7 @@ int atcommand_whozeny(
player_name[j] = tolower(player_name[j]);
if (strstr(player_name, match_text) != NULL) { // search with no case sensitive
zeny[count]=pl_sd->status.zeny;
+ counted[i]=0;
count++;
}
}
@@ -1668,7 +1669,9 @@ int atcommand_whozeny(
if(!zeny[c])
continue;
for (i = 0; i < fd_max; i++) {
- if (session[i] && (pl_sd = session[i]->session_data) && pl_sd->state.auth && !counted[i] && zeny[c]) {
+ if(!zeny[c])
+ continue;
+ if (session[i] && (pl_sd = session[i]->session_data) && pl_sd->state.auth && zeny[c] && counted[i]==0) {
if(pl_sd->status.zeny==zeny[c]) {
sprintf(output, "Name: %s | Zeny: %d", pl_sd->status.name, pl_sd->status.zeny);
clif_displaymessage(fd, output);