Follow up to 9c2026d

* Renamed atcommand reloadnpc to reloadnpcfile.
* Adjusted documentation to fit.
This commit is contained in:
aleos89 2017-01-25 13:48:37 -05:00
parent 9c2026d216
commit 65427737bf
3 changed files with 9 additions and 9 deletions

View File

@ -770,7 +770,7 @@
732: Item cannot be opened when your inventory is full.
733: Please enter a NPC name (usage: @reloadnpc <NPC_name>).
733: Please enter a NPC file name (usage: @reloadnpcfile <file name>).
// @cloneequip/@clonestat
734: Cannot clone your own %s.

View File

@ -1435,13 +1435,13 @@ Example:
---------------------------------------
@reloadnpc <npc name>
@reloadnpcfile <path>
Unloads and loads an NPC.
Same as @unloadnpc and @loadnpc but ran as one command.
Same as @unloadnpcfile and @loadnpc but ran as one command.
Example:
@reloadnpc npc/custom/jobmaster.txt
@reloadnpcfile npc/custom/jobmaster.txt
---------------------------------------

View File

@ -4648,9 +4648,9 @@ ACMD_FUNC(unloadnpc)
return 0;
}
ACMD_FUNC(reloadnpc) {
ACMD_FUNC(reloadnpcfile) {
if (!message || !*message) {
clif_displaymessage(fd, msg_txt(sd,733)); // Please enter a NPC name (usage: @reloadnpc <NPC_name>).
clif_displaymessage(fd, msg_txt(sd,733)); // Please enter a NPC file name (usage: @reloadnpcfile <file name>).
return -1;
}
@ -4658,13 +4658,13 @@ ACMD_FUNC(reloadnpc) {
clif_displaymessage(fd, msg_txt(sd,1386)); // File unloaded. Be aware that mapflags and monsters spawned directly are not removed.
if (!npc_addsrcfile(message, true)) {
clif_displaymessage(fd, msg_txt(sd,261));
clif_displaymessage(fd, msg_txt(sd,261)); // Script could not be loaded.
return -1;
}
npc_read_event_script();
clif_displaymessage(fd, msg_txt(sd,262));
clif_displaymessage(fd, msg_txt(sd,262)); // Script loaded.
return 0;
}
@ -10080,7 +10080,7 @@ void atcommand_basecommands(void) {
ACMD_DEF(hidenpc),
ACMD_DEF(loadnpc),
ACMD_DEF(unloadnpc),
ACMD_DEF(reloadnpc),
ACMD_DEF(reloadnpcfile),
ACMD_DEF2("time", servertime),
ACMD_DEF(jail),
ACMD_DEF(unjail),