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.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/map/atcommand.c b/src/map/atcommand.c
index 3ec709b57..bedb58478 100644
--- a/src/map/atcommand.c
+++ b/src/map/atcommand.c
@@ -55,6 +55,7 @@
#include "map/storage.h"
#include "map/trade.h"
#include "map/unit.h"
+#include "map/achievement.h"
#include "common/cbasetypes.h"
#include "common/conf.h"
#include "common/core.h"
@@ -1421,6 +1422,10 @@ ACMD(baselevelup)
clif->updatestatus(sd, SP_BASEEXP);
clif->updatestatus(sd, SP_NEXTBASEEXP);
pc->baselevelchanged(sd);
+
+ // achievements
+ achievement->validate_stats(sd, SP_BASELEVEL, sd->status.base_level);
+
if(sd->status.party_id)
party->send_levelup(sd);
@@ -2526,6 +2531,7 @@ ACMD(param)
clif->updatestatus(sd, SP_USTR + i);
status_calc_pc(sd, SCO_FORCE);
clif->message(fd, msg_fd(fd,42)); // Stat changed.
+ achievement->validate_stats(sd, SP_STR + i, new_value); // Achievements [Smokexyz/Hercules]
} else {
if (value < 0)
clif->message(fd, msg_fd(fd,41)); // Unable to decrease the number/value.
@@ -9466,6 +9472,8 @@ ACMD(costume)
};
unsigned short k = 0, len = ARRAYLENGTH(names);
+ bool isChangeDress = (strcmpi(info->command, "changedress") == 0 || strcmpi(info->command, "nocosplay") == 0);
+
if (!*message) {
for (k = 0; k < len; k++) {
if (sd->sc.data[name2id[k]]) {
@@ -9476,6 +9484,8 @@ ACMD(costume)
}
}
+ if (isChangeDress)
+ return true;
clif->message(sd->fd, msg_fd(fd, 1472)); // - Available Costumes
for (k = 0; k < len; k++) {
@@ -9485,6 +9495,9 @@ ACMD(costume)
return false;
}
+ if (isChangeDress)
+ return true;
+
for (k = 0; k < len; k++) {
if (sd->sc.data[name2id[k]]) {
safesnprintf(atcmd_output, sizeof(atcmd_output), msg_fd(fd, 1470), names[k]); // You're already with a '%s' costume, type '@costume' to remove it.
@@ -10008,6 +10021,8 @@ static void atcommand_basecommands(void)
ACMD_DEF(fontcolor),
ACMD_DEF(searchstore),
ACMD_DEF(costume),
+ ACMD_DEF2("changedress", costume),
+ ACMD_DEF2("nocosplay", costume),
ACMD_DEF(skdebug),
ACMD_DEF(cddebug),
ACMD_DEF(lang),