diff options
author | Andrei Karas <akaras@inbox.ru> | 2015-08-07 21:13:07 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2015-08-10 23:06:08 +0300 |
commit | c0367b69fd226be21643cd4b620fff2aadb0e742 (patch) | |
tree | 94b6cb16c7c5232020a22896496813be378a340e /src/map/status.c | |
parent | 5ad96bcc2af2a5a76348fca87e52a0f038461808 (diff) | |
download | hercules-c0367b69fd226be21643cd4b620fff2aadb0e742.tar.gz hercules-c0367b69fd226be21643cd4b620fff2aadb0e742.tar.bz2 hercules-c0367b69fd226be21643cd4b620fff2aadb0e742.tar.xz hercules-c0367b69fd226be21643cd4b620fff2aadb0e742.zip |
Move use item script function call into function script_run_use_script.
Diffstat (limited to 'src/map/status.c')
-rw-r--r-- | src/map/status.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/map/status.c b/src/map/status.c index b513c6975..d19ce0511 100644 --- a/src/map/status.c +++ b/src/map/status.c @@ -2308,10 +2308,10 @@ int status_calc_pc_(struct map_session_data* sd, enum e_status_calc_opt opt) { if(sd->inventory_data[index]->script) { if (wd == &sd->left_weapon) { sd->state.lr_flag = 1; - script->run(sd->inventory_data[index]->script,0,sd->bl.id,0); + script->run_use_script(sd, sd->inventory_data[index], 0); sd->state.lr_flag = 0; } else - script->run(sd->inventory_data[index]->script,0,sd->bl.id,0); + script->run_use_script(sd, sd->inventory_data[index], 0); if (!calculating) //Abort, script->run retriggered this. [Skotlex] return 1; } @@ -2334,7 +2334,7 @@ int status_calc_pc_(struct map_session_data* sd, enum e_status_calc_opt opt) { if(sd->inventory_data[index]->script) { if( i == EQI_HAND_L ) //Shield sd->state.lr_flag = 3; - script->run(sd->inventory_data[index]->script,0,sd->bl.id,0); + script->run_use_script(sd, sd->inventory_data[index], 0); if( i == EQI_HAND_L ) //Shield sd->state.lr_flag = 0; if (!calculating) //Abort, script->run retriggered this. [Skotlex] @@ -2350,7 +2350,7 @@ int status_calc_pc_(struct map_session_data* sd, enum e_status_calc_opt opt) { sd->bonus.arrow_atk += sd->inventory_data[index]->atk; sd->state.lr_flag = 2; if( !itemdb_is_GNthrowable(sd->inventory_data[index]->nameid) ) //don't run scripts on throwable items - script->run(sd->inventory_data[index]->script,0,sd->bl.id,0); + script->run_use_script(sd, sd->inventory_data[index], 0); sd->state.lr_flag = 0; if (!calculating) //Abort, script->run retriggered status_calc_pc. [Skotlex] return 1; @@ -2438,10 +2438,10 @@ int status_calc_pc_(struct map_session_data* sd, enum e_status_calc_opt opt) { if(i == EQI_HAND_L && sd->status.inventory[index].equip == EQP_HAND_L) { //Left hand status. sd->state.lr_flag = 1; - script->run(data->script,0,sd->bl.id,0); + script->run_use_script(sd, data, 0); sd->state.lr_flag = 0; } else - script->run(data->script,0,sd->bl.id,0); + script->run_use_script(sd, data, 0); if (!calculating) //Abort, script->run his function. [Skotlex] return 1; } @@ -2451,7 +2451,7 @@ int status_calc_pc_(struct map_session_data* sd, enum e_status_calc_opt opt) { if( sc->count && sc->data[SC_ITEMSCRIPT] ) { struct item_data *data = itemdb->exists(sc->data[SC_ITEMSCRIPT]->val1); if( data && data->script ) - script->run(data->script,0,sd->bl.id,0); + script->run_use_script(sd, data, 0); } status->calc_pc_additional(sd, opt); |