summaryrefslogtreecommitdiff
path: root/src/emap/script.c
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2018-09-25 01:52:30 +0300
committerAndrei Karas <akaras@inbox.ru>2018-09-25 01:52:30 +0300
commit505d310c38ab4c2ce80edb082a609959ee0ec5e6 (patch)
tree97ebe470cc15429a305d962ae8d50657066c1e41 /src/emap/script.c
parentebd03c49cf2196bfe6cc10e64d9249b0e9b4a08e (diff)
downloadevol-hercules-505d310c38ab4c2ce80edb082a609959ee0ec5e6.tar.gz
evol-hercules-505d310c38ab4c2ce80edb082a609959ee0ec5e6.tar.bz2
evol-hercules-505d310c38ab4c2ce80edb082a609959ee0ec5e6.tar.xz
evol-hercules-505d310c38ab4c2ce80edb082a609959ee0ec5e6.zip
Hercules update.
Diffstat (limited to 'src/emap/script.c')
-rw-r--r--src/emap/script.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/src/emap/script.c b/src/emap/script.c
index 4bc427b..5e8d1ae 100644
--- a/src/emap/script.c
+++ b/src/emap/script.c
@@ -410,7 +410,7 @@ void escript_run_use_script_pre(struct map_session_data **sdPtr,
const int oid = *oidPtr;
if (oid == 0)
{
- pc->setreg(sd, script->add_str("@useType"), 0);
+ pc->setreg(sd, script->add_variable("@useType"), 0);
script->current_item_id = itemData->nameid;
script->run(itemData->script, 0, sd->bl.id, oid);
script->current_item_id = 0;
@@ -425,11 +425,11 @@ void escript_run_use_script_pre(struct map_session_data **sdPtr,
return;
}
- pc->setreg(sd, script->add_str("@useType"), data->tmpUseType);
+ pc->setreg(sd, script->add_variable("@useType"), data->tmpUseType);
script->current_item_id = itemData->nameid;
script->run(itemData->script, 0, sd->bl.id, oid);
script->current_item_id = 0;
- pc->setreg(sd, script->add_str("@useType"), 0);
+ pc->setreg(sd, script->add_variable("@useType"), 0);
data->tmpUseType = 0;
}
hookStop();
@@ -444,11 +444,11 @@ void script_run_item_amount_script(TBL_PC *sd,
return;
script->current_item_id = itemId;
- pc->setreg(sd, script->add_str("@itemId"), itemId);
- pc->setreg(sd, script->add_str("@itemAmount"), amount);
+ pc->setreg(sd, script->add_variable("@itemId"), itemId);
+ pc->setreg(sd, script->add_variable("@itemAmount"), amount);
script->run(itemScript, 0, sd->bl.id, npc->fake_nd->bl.id);
- pc->setreg(sd, script->add_str("@itemId"), 0);
- pc->setreg(sd, script->add_str("@itemAmount"), 0);
+ pc->setreg(sd, script->add_variable("@itemId"), 0);
+ pc->setreg(sd, script->add_variable("@itemAmount"), 0);
script->current_item_id = 0;
}
@@ -461,10 +461,10 @@ void script_run_card_script(TBL_PC *sd,
return;
script->current_item_id = itemId;
- pc->setreg(sd, script->add_str("@itemId"), itemId);
- pc->setreg(sd, script->add_str("@cardId"), cardId);
+ pc->setreg(sd, script->add_variable("@itemId"), itemId);
+ pc->setreg(sd, script->add_variable("@cardId"), cardId);
script->run(itemScript, 0, sd->bl.id, npc->fake_nd->bl.id);
- pc->setreg(sd, script->add_str("@itemId"), 0);
- pc->setreg(sd, script->add_str("@cardId"), 0);
+ pc->setreg(sd, script->add_variable("@itemId"), 0);
+ pc->setreg(sd, script->add_variable("@cardId"), 0);
script->current_item_id = 0;
}