summaryrefslogtreecommitdiff
path: root/src/map/npc.c
diff options
context:
space:
mode:
authorFlavioJS <FlavioJS@54d463be-8e91-2dee-dedb-b68131a5f0ec>2007-11-27 07:12:30 +0000
committerFlavioJS <FlavioJS@54d463be-8e91-2dee-dedb-b68131a5f0ec>2007-11-27 07:12:30 +0000
commite8524f706aa516778e6e5e926edff2a839989ed8 (patch)
treea7e84171134ee393b87ddb15b667c0db2bbb8963 /src/map/npc.c
parent256091ef87f7eeb6c73e54ab5332e9651bbd36a3 (diff)
downloadhercules-e8524f706aa516778e6e5e926edff2a839989ed8.tar.gz
hercules-e8524f706aa516778e6e5e926edff2a839989ed8.tar.bz2
hercules-e8524f706aa516778e6e5e926edff2a839989ed8.tar.xz
hercules-e8524f706aa516778e6e5e926edff2a839989ed8.zip
* Fixed fake_nd not being exported correctly and being unloaded when reloading scripts. (probably fixes bugreport:444)
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@11816 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/npc.c')
-rw-r--r--src/map/npc.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/map/npc.c b/src/map/npc.c
index a65cf5e83..12d8f0e9b 100644
--- a/src/map/npc.c
+++ b/src/map/npc.c
@@ -33,6 +33,8 @@
#include <time.h>
+struct npc_data* fake_nd;
+
// linked list of npc source files
struct npc_src_list {
struct npc_src_list* next;
@@ -2783,7 +2785,8 @@ static int npc_cleanup_dbsub(DBKey key, void* data, va_list ap)
switch(bl->type) {
case BL_NPC:
- npc_unload((struct npc_data *)bl);
+ if( bl->id != fake_nd->bl.id )// don't remove fake_nd
+ npc_unload((struct npc_data *)bl);
break;
case BL_MOB:
unit_free(bl,0);