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
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 15 additions and 1 deletions

View File

@ -918,6 +918,11 @@ Body:
- Command: reloadbattleconf
Help: |
Reload battle settings.
- Command: reloadcashdb
Aliases:
- reloadcashshop
Help: |
Reload cash shop database.
- Command: reloadinstancedb
Help: |
Reload instance database.
@ -956,6 +961,7 @@ Body:
atcommand battleconf statusdb
pcdb motd script
questdb msgconf packetdb
cashdb
- Command: langtype
Help: |
Params: <language>

View File

@ -933,7 +933,10 @@
// NoBank Mapflag
831: You cannot use the Bank on this map.
//832-899 free
// @reloadcashdb
832: Cash shop database has been reloaded.
//833-899 free
//------------------------------------
// More atcommands message

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),