summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorshennetsind <ind@henn.et>2013-06-13 08:51:01 -0300
committerEuphy <euphy@rathena.org>2013-06-15 15:52:50 -0400
commit643f76fdcbace78b97e9f211535d50abff721dba (patch)
treeac083d1d0c8587d60515499c32801a39f87a7ad6
parent1ed244517953b0ac74950e7ec1b388f915c78b86 (diff)
downloadhercules-643f76fdcbace78b97e9f211535d50abff721dba.tar.gz
hercules-643f76fdcbace78b97e9f211535d50abff721dba.tar.bz2
hercules-643f76fdcbace78b97e9f211535d50abff721dba.tar.xz
hercules-643f76fdcbace78b97e9f211535d50abff721dba.zip
Script.c Interface : detach rid
Special Thanks to Shizaku for pointing it out! Signed-off-by: shennetsind <ind@henn.et>
-rw-r--r--src/map/script.c7
-rw-r--r--src/map/script.h1
2 files changed, 4 insertions, 4 deletions
diff --git a/src/map/script.c b/src/map/script.c
index b414247da..bc5959003 100644
--- a/src/map/script.c
+++ b/src/map/script.c
@@ -10176,10 +10176,8 @@ BUILDIN(warpwaitingpc)
/// Detaches a character from a script.
///
/// @param st Script state to detach the character from.
-static void script_detach_rid(struct script_state* st)
-{
- if(st->rid)
- {
+void script_detach_rid(struct script_state* st) {
+ if(st->rid) {
script_detach_state(st, false);
st->rid = 0;
}
@@ -17864,6 +17862,7 @@ void script_defaults(void) {
script->conv_num = conv_num;
script->conv_str = conv_str;
script->rid2sd = script_rid2sd;
+ script->detach_rid = script_detach_rid;
script->push_val = push_val;
script->get_val = get_val;
script->get_val2 = get_val2;
diff --git a/src/map/script.h b/src/map/script.h
index 96fcdc23a..92a083556 100644
--- a/src/map/script.h
+++ b/src/map/script.h
@@ -361,6 +361,7 @@ struct script_interface {
int (*conv_num) (struct script_state *st,struct script_data *data);
const char* (*conv_str) (struct script_state *st,struct script_data *data);
TBL_PC *(*rid2sd) (struct script_state *st);
+ void (*detach_rid) (struct script_state* st);
struct script_data* (*push_val)(struct script_stack* stack, enum c_op type, int val, struct DBMap** ref);
void (*get_val) (struct script_state* st, struct script_data* data);
void* (*get_val2) (struct script_state* st, int uid, struct DBMap** ref);