diff options
author | skotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2006-03-14 19:10:09 +0000 |
---|---|---|
committer | skotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2006-03-14 19:10:09 +0000 |
commit | b4d6890957c2c3e74b49ce3ceb33c1dfafd529da (patch) | |
tree | 2d137ff8cfcde18e161addd844ee22b760d72073 /src | |
parent | de8f91ae9dcda19d7a931e67104cc8fde86d0b73 (diff) | |
download | hercules-b4d6890957c2c3e74b49ce3ceb33c1dfafd529da.tar.gz hercules-b4d6890957c2c3e74b49ce3ceb33c1dfafd529da.tar.bz2 hercules-b4d6890957c2c3e74b49ce3ceb33c1dfafd529da.tar.xz hercules-b4d6890957c2c3e74b49ce3ceb33c1dfafd529da.zip |
- Some small cleanups of how @reloadscript works.
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@5600 54d463be-8e91-2dee-dedb-b68131a5f0ec
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
|