- Added function npc_unload_duplicates(), it unloads all npcs that are a duplicate of the passed one. For use with @unloadnpc to prevent crashes when you unload the npc that has duplicates.
git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@8939 54d463be-8e91-2dee-dedb-b68131a5f0ec
This commit is contained in:
@@ -6234,6 +6234,7 @@ int atcommand_unloadnpc(const int fd, struct map_session_data* sd,
|
||||
}
|
||||
|
||||
if ((nd = npc_name2id(NPCname)) != NULL) {
|
||||
npc_unload_duplicates(nd);
|
||||
npc_unload(nd);
|
||||
clif_displaymessage(fd, msg_txt(112)); // Npc Disabled.
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user