diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/map/atcommand.c | 1 | ||||
-rw-r--r-- | src/map/npc.c | 8 |
2 files changed, 4 insertions, 5 deletions
diff --git a/src/map/atcommand.c b/src/map/atcommand.c index 38d335377..44f689c2d 100644 --- a/src/map/atcommand.c +++ b/src/map/atcommand.c @@ -5519,7 +5519,6 @@ int atcommand_reloadscript( //do_init_npc();
script_reload();
npc_reload();
- npc_event_do_oninit();
clif_displaymessage(fd, msg_table[100]); // Scripts reloaded.
diff --git a/src/map/npc.c b/src/map/npc.c index 276d615be..e3abe5eaa 100644 --- a/src/map/npc.c +++ b/src/map/npc.c @@ -2800,17 +2800,17 @@ int npc_reload (void) int busy = 0, npc_new_min = npc_id;
char c = '-';
+ //Remove all npcs/mobs. [Skotlex]
+ map_foreachiddb(npc_cleanup_dbsub);
for (m = 0; m < map_num; m++) {
- map_foreachinmap(npc_cleanup_sub, m, 0);
if(battle_config.dynamic_mobs) { //dynamic check by [random]
for (i = 0; i < MAX_MOB_LIST_PER_MAP; i++)
if (map[m].moblist[i]) aFree(map[m].moblist[i]);
memset (map[m].moblist, 0, sizeof(map[m].moblist));
}
- map[m].npc_num = 0;
+ if (map[m].npc_num > 0 && battle_config.error_log)
+ ShowWarning("npc_reload: %d npcs weren't removed at map %s!\n", map[m].npc_num, map[m].name);
}
- //Remove any npcs/mobs that weren't caught by the previous loop. [Skotlex]
- map_foreachiddb(npc_cleanup_dbsub);
// anything else we should cleanup?
// Reloading npc's now
|