summaryrefslogtreecommitdiff
path: root/src/map/script.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/script.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/script.c')
-rw-r--r--src/map/script.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/map/script.c b/src/map/script.c
index 57b11f305..fac794ba4 100644
--- a/src/map/script.c
+++ b/src/map/script.c
@@ -14004,6 +14004,13 @@ BUILDIN_FUNC(instance_set_timeout)
BUILDIN_FUNC(instance_init)
{
int instance_id = script_getnum(st, 2);
+
+ if( instance[instance_id].state != INSTANCE_IDLE )
+ {
+ ShowError("instance_init: instance already initialized.\n");
+ return 0;
+ }
+
instance_init(instance_id);
return 0;
}