- 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:
skotlex
2006-10-05 14:37:06 +00:00
parent 858596b92b
commit 0db4ee6126
4 changed files with 27 additions and 0 deletions

View File

@@ -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 {