diff options
Diffstat (limited to 'src/map/status.c')
-rw-r--r-- | src/map/status.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/map/status.c b/src/map/status.c index b513c6975..e70fb1eb1 100644 --- a/src/map/status.c +++ b/src/map/status.c @@ -2267,7 +2267,7 @@ int status_calc_pc_(struct map_session_data* sd, enum e_status_calc_opt opt) { if (opt&SCO_FIRST && sd->inventory_data[index]->equip_script) { //Execute equip-script on login - script->run(sd->inventory_data[index]->equip_script,0,sd->bl.id,0); + script->run_item_equip_script(sd, sd->inventory_data[index], 0); if (!calculating) return 1; } @@ -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; @@ -2428,7 +2428,7 @@ int status_calc_pc_(struct map_session_data* sd, enum e_status_calc_opt opt) { continue; if(opt&SCO_FIRST && data->equip_script) {//Execute equip-script on login - script->run(data->equip_script,0,sd->bl.id,0); + script->run_item_equip_script(sd, data, 0); if (!calculating) 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); |