summaryrefslogtreecommitdiff
path: root/src/emap/script.c
diff options
context:
space:
mode:
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;
}