Skip to content

Commit

Permalink
Added a command to reload cash shop db (rathena#3257)
Browse files Browse the repository at this point in the history
Co-authored-by: Lemongrass3110 <[email protected]>
  • Loading branch information
gengstergile and Lemongrass3110 authored May 7, 2024
1 parent 8546f9f commit fd9b475
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 1 deletion.
6 changes: 6 additions & 0 deletions conf/atcommands.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -956,6 +961,7 @@ Body:
atcommand battleconf statusdb
pcdb motd script
questdb msgconf packetdb
cashdb
- Command: langtype
Help: |
Params: <language>
Expand Down
5 changes: 4 additions & 1 deletion conf/msg_conf/map_msg.conf
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 5 additions & 0 deletions src/map/atcommand.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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();
Expand Down Expand Up @@ -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),
Expand Down

0 comments on commit fd9b475

Please sign in to comment.