diff options
author | Lance <Lance@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2006-06-14 06:55:27 +0000 |
---|---|---|
committer | Lance <Lance@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2006-06-14 06:55:27 +0000 |
commit | 043adb4391aae776a2288fcba9096adcea31b9dc (patch) | |
tree | 6c980f0fa957fcf4789d0d78e4f8676069900eef /src | |
parent | c8b67a10b98d24a8c9ca365bb6171ad1419f6a6f (diff) | |
download | hercules-043adb4391aae776a2288fcba9096adcea31b9dc.tar.gz hercules-043adb4391aae776a2288fcba9096adcea31b9dc.tar.bz2 hercules-043adb4391aae776a2288fcba9096adcea31b9dc.tar.xz hercules-043adb4391aae776a2288fcba9096adcea31b9dc.zip |
* [Improved]:
- npc_parse_script to show information and remove duplicated NPCs.
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@7148 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src')
-rw-r--r-- | src/map/npc.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/map/npc.c b/src/map/npc.c index 8e4182615..5ba7696d1 100644 --- a/src/map/npc.c +++ b/src/map/npc.c @@ -1835,7 +1835,7 @@ static int npc_parse_script (char *w1,char *w2,char *w3,char *w4,char *first_lin int startline = 0;
unsigned char line[1024];
int i;
- struct npc_data *nd;
+ struct npc_data *nd, *dnd;
struct dbt *label_db;
char *p;
struct npc_label_list *label_dup = NULL;
@@ -1967,6 +1967,11 @@ static int npc_parse_script (char *w1,char *w2,char *w3,char *w4,char *first_lin nd->bl.type = BL_NPC;
nd->bl.subtype = SCRIPT;
+ if((dnd = npc_name2id(nd->exname))){
+ ShowInfo("npc_parse_script: Removing duplicated NPC '%s::%s'...\n", dnd->name, dnd->exname);
+ npc_unload(dnd);
+ }
+
for (i = 0; i < MAX_EVENTTIMER; i++)
nd->eventtimer[i] = -1;
if (m >= 0) {
|