summaryrefslogtreecommitdiff
path: root/src/map/atcommand.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/map/atcommand.c')
-rw-r--r--src/map/atcommand.c24
1 files changed, 3 insertions, 21 deletions
diff --git a/src/map/atcommand.c b/src/map/atcommand.c
index 2f54b110e..e656d4eb1 100644
--- a/src/map/atcommand.c
+++ b/src/map/atcommand.c
@@ -2196,7 +2196,7 @@ ACMD_FUNC(killmonster)
if ((map_id = map_mapname2mapid(map_name)) < 0)
map_id = sd->bl.m;
}
-
+
drop_flag = strcmp(command+1, "killmonster2");
map_foreachinmap(atkillmonster_sub, map_id, BL_MOB, -drop_flag);
@@ -2533,25 +2533,7 @@ ACMD_FUNC(zeny)
clif_displaymessage(fd, msg_txt(1012)); // Please enter an amount (usage: @zeny <amount>).
return -1;
}
-
- new_zeny = sd->status.zeny + zeny;
- if (zeny > 0 && (zeny > MAX_ZENY || new_zeny > MAX_ZENY)) // fix positiv overflow
- new_zeny = MAX_ZENY;
- else if (zeny < 0 && (zeny < -MAX_ZENY || new_zeny < 0)) // fix negativ overflow
- new_zeny = 0;
-
- if (new_zeny != sd->status.zeny) {
- sd->status.zeny = new_zeny;
- clif_updatestatus(sd, SP_ZENY);
- clif_displaymessage(fd, msg_txt(176)); // Current amount of zeny changed.
- } else {
- if (zeny < 0)
- clif_displaymessage(fd, msg_txt(41)); // Unable to decrease the number/value.
- else
- clif_displaymessage(fd, msg_txt(149)); // Unable to increase the number/value.
- return -1;
- }
-
+ pc_getzeny(sd,zeny,LOG_TYPE_COMMAND,NULL);
return 0;
}
@@ -3393,7 +3375,7 @@ ACMD_FUNC(spiritball)
if( sd->spiritball > 0 )
pc_delspiritball(sd, sd->spiritball, 1);
sd->spiritball = number;
- clif_spiritball(sd);
+ clif_spiritball(&sd->bl);
// no message, player can look the difference
return 0;