summaryrefslogtreecommitdiff
path: root/src/map/instance.c
diff options
context:
space:
mode:
authorultramage <ultramage@54d463be-8e91-2dee-dedb-b68131a5f0ec>2009-11-24 17:15:23 +0000
committerultramage <ultramage@54d463be-8e91-2dee-dedb-b68131a5f0ec>2009-11-24 17:15:23 +0000
commit23658c125f6c9e44b2015043d8dd913c687b9df6 (patch)
tree9747bd392a144f5e935293116ac87682e3b18105 /src/map/instance.c
parent67b396bd39ce915cd2f93029080aff0cab9aec85 (diff)
downloadhercules-23658c125f6c9e44b2015043d8dd913c687b9df6.tar.gz
hercules-23658c125f6c9e44b2015043d8dd913c687b9df6.tar.bz2
hercules-23658c125f6c9e44b2015043d8dd913c687b9df6.tar.xz
hercules-23658c125f6c9e44b2015043d8dd913c687b9df6.zip
Fixed instances not initializing after reloadscript (bugreport:3522).
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@14167 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/instance.c')
-rw-r--r--src/map/instance.c11
1 files changed, 4 insertions, 7 deletions
diff --git a/src/map/instance.c b/src/map/instance.c
index 8c8f9e2fd..454f92e98 100644
--- a/src/map/instance.c
+++ b/src/map/instance.c
@@ -214,12 +214,9 @@ int instance_map_npcsub(struct block_list* bl, va_list args)
void instance_init(int instance_id)
{
int i;
- if( !instance_id ) return;
- if( instance[instance_id].state != INSTANCE_IDLE )
- {
- ShowError("instance_init: instance already initialited.\n");
- return;
- }
+
+ if( !instance_id )
+ return; // nothing to do
for( i = 0; i < instance[instance_id].num_map; i++ )
map_foreachinmap(instance_map_npcsub, map[instance[instance_id].map[i]].instance_src_map, BL_NPC, instance[instance_id].map[i]);
@@ -314,7 +311,7 @@ void instance_destroy(int instance_id)
time_t now = time(NULL);
if( !instance_id || instance[instance_id].state == INSTANCE_FREE )
- return;
+ return; // nothing to do
if( instance[instance_id].progress_timeout && instance[instance_id].progress_timeout <= now )
type = 1;