summaryrefslogtreecommitdiff
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
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
-rw-r--r--Changelog.txt1
-rw-r--r--src/map/atcommand.c7
-rw-r--r--src/map/map.c8
-rw-r--r--src/map/npc.c4
4 files changed, 12 insertions, 8 deletions
diff --git a/Changelog.txt b/Changelog.txt
index 812b68fc4..263936753 100644
--- a/Changelog.txt
+++ b/Changelog.txt
@@ -1,5 +1,6 @@
Date Added
11/21
+ * Fixed @whozeny. [Valaris]
* Added rest of mapflags to const.txt. [Valaris]
* Closed AFM files after reading, this fixed the improper char-server session #. [Valaris]
* Skill updates: [Celest]
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);
diff --git a/src/map/map.c b/src/map/map.c
index 8bf0c74f6..358e957fc 100644
--- a/src/map/map.c
+++ b/src/map/map.c
@@ -1480,8 +1480,8 @@ static int map_readafm(int m,char *fn) {
afm_file = fopen(fn, "r");
if (afm_file != NULL) {
- printf("\rLoading Maps [%d/%d]: %-50s ",m,map_num,fn);
- fflush(stdout);
+// printf("\rLoading Maps [%d/%d]: %-50s ",m,map_num,fn);
+// fflush(stdout);
str=fgets(afm_line, sizeof(afm_line)-1, afm_file);
str=fgets(afm_line, sizeof(afm_line)-1, afm_file);
@@ -1569,8 +1569,8 @@ static int map_readmap(int m,char *fn, char *alias) {
if(gat==NULL)
return -1;
- printf("\rLoading Maps [%d/%d]: %-50s ",m,map_num,fn);
- fflush(stdout);
+// printf("\rLoading Maps [%d/%d]: %-50s ",m,map_num,fn);
+// fflush(stdout);
map[m].m=m;
xs=map[m].xs=*(int*)(gat+6);
diff --git a/src/map/npc.c b/src/map/npc.c
index ca15afa2b..09c823815 100644
--- a/src/map/npc.c
+++ b/src/map/npc.c
@@ -2282,8 +2282,8 @@ int do_init_npc(void)
}
}
fclose(fp);
- printf("\rLoading NPCs [%d]: %-54s",npc_id-START_NPC_NUM,nsl->name);
- fflush(stdout);
+// printf("\rLoading NPCs [%d]: %-54s",npc_id-START_NPC_NUM,nsl->name);
+// fflush(stdout);
}
printf("\rNPCs Loaded: %d [Warps:%d Shops:%d Scripts:%d Mobs:%d]\n",
npc_id-START_NPC_NUM,npc_warp,npc_shop,npc_script,npc_mob);