summaryrefslogtreecommitdiff
path: root/src/map/script.h
diff options
context:
space:
mode:
authorshennetsind <ind@henn.et>2014-03-14 13:41:30 -0300
committershennetsind <ind@henn.et>2014-03-14 13:41:30 -0300
commitf4b1ff7426b1c4cd5e8cac37f7e3983cc03c706e (patch)
tree68b403b855daca7d11b86b02fcf2d95b8de974b4 /src/map/script.h
parent571d9e25008d8b386e28d7f1fd02f2690edf1f8c (diff)
downloadhercules-f4b1ff7426b1c4cd5e8cac37f7e3983cc03c706e.tar.gz
hercules-f4b1ff7426b1c4cd5e8cac37f7e3983cc03c706e.tar.bz2
hercules-f4b1ff7426b1c4cd5e8cac37f7e3983cc03c706e.tar.xz
hercules-f4b1ff7426b1c4cd5e8cac37f7e3983cc03c706e.zip
Added internal awareness of active script instances
Fixes the following issues: - donpcevent could cause a crash when used to a event of the same npc - input/other-dialog-interactions could cause a crash when sending data to a disabled-fakenpc-id'd. Special Thanks to Haruna, ossi0110. Signed-off-by: shennetsind <ind@henn.et>
Diffstat (limited to 'src/map/script.h')
-rw-r--r--src/map/script.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/map/script.h b/src/map/script.h
index 73ba7303e..cf7f22aa9 100644
--- a/src/map/script.h
+++ b/src/map/script.h
@@ -371,6 +371,7 @@ struct script_code {
int script_size;
unsigned char *script_buf;
struct reg_db local; ///< Local (npc) vars
+ unsigned short instances;
};
struct script_stack {
@@ -407,7 +408,7 @@ struct script_state {
int pos;
enum e_script_state state;
int rid,oid;
- struct script_code *script, *scriptroot;
+ struct script_code *script;
struct sleep_data {
int tick,timer,charid;
} sleep;