Added a command to reload cash shop db (#3257)

Co-authored-by: Lemongrass3110 <lemongrass@kstp.at>
This commit is contained in:
Banana
2024-05-07 16:08:55 +08:00
committed by GitHub
parent 8546f9f089
commit fd9b475446
3 changed files with 15 additions and 1 deletions

View File

@@ -37,6 +37,7 @@
#include "instance.hpp"
#include "intif.hpp"
#include "itemdb.hpp" // MAX_ITEMGROUP
#include "cashshop.hpp"
#include "log.hpp"
#include "mail.hpp"
#include "map.hpp"
@@ -4212,6 +4213,9 @@ ACMD_FUNC(reload) {
if (strstr(command, "itemdb") || strncmp(message, "itemdb", 4) == 0) {
itemdb_reload();
clif_displaymessage(fd, msg_txt(sd,97)); // Item database has been reloaded.
} else if (strstr(command, "cashdb") || strncmp(message, "cashdb", 4) == 0) {
cashshop_reloaddb();
clif_displaymessage( fd, msg_txt( sd, 832 ) ); // Cash shop database has been reloaded.
} else if (strstr(command, "mobdb") || strncmp(message, "mobdb", 3) == 0) {
mob_reload();
pet_db.reload();
@@ -11076,6 +11080,7 @@ void atcommand_basecommands(void) {
ACMD_DEF(recallall),
ACMD_DEFR(reload,ATCMD_NOSCRIPT),
ACMD_DEF2("reloaditemdb", reload),
ACMD_DEF2("reloadcashdb", reload),
ACMD_DEF2("reloadmobdb", reload),
ACMD_DEF2("reloadskilldb", reload),
ACMD_DEF2R("reloadscript", reload, ATCMD_NOSCRIPT),