diff options
author | Andrei Karas <akaras@inbox.ru> | 2015-08-09 15:38:31 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2015-08-09 15:38:31 +0300 |
commit | 4ecce8c5c00c835c8ebeeb6bc5a51dbf7ed25817 (patch) | |
tree | e4ac3e10a641571b5eb50ffacd35a9d16e24cc88 /src/map | |
parent | 1ba65502886eebedc7befa56cff559b4af624992 (diff) | |
parent | 31ed4cbe1a9fc11a914952f832719e458c8ceb9c (diff) | |
download | hercules-4ecce8c5c00c835c8ebeeb6bc5a51dbf7ed25817.tar.gz hercules-4ecce8c5c00c835c8ebeeb6bc5a51dbf7ed25817.tar.bz2 hercules-4ecce8c5c00c835c8ebeeb6bc5a51dbf7ed25817.tar.xz hercules-4ecce8c5c00c835c8ebeeb6bc5a51dbf7ed25817.zip |
Merge pull request #464 from dastgir/AdditionalStatus
Additional Status Calculation for Plugins.
Diffstat (limited to 'src/map')
-rw-r--r-- | src/map/status.c | 8 | ||||
-rw-r--r-- | src/map/status.h | 1 |
2 files changed, 9 insertions, 0 deletions
diff --git a/src/map/status.c b/src/map/status.c index c21e81aab..b513c6975 100644 --- a/src/map/status.c +++ b/src/map/status.c @@ -2127,6 +2127,11 @@ unsigned int status_get_base_maxhp(struct map_session_data *sd, struct status_da return (unsigned int)cap_value(val,0,UINT_MAX); } +void status_calc_pc_additional(struct map_session_data* sd, enum e_status_calc_opt opt) { + /* Just used for Plugin to give bonuses. */ + return; +} + //Calculates player data from scratch without counting SC adjustments. //Should be invoked whenever players raise stats, learn passive skills or change equipment. int status_calc_pc_(struct map_session_data* sd, enum e_status_calc_opt opt) { @@ -2448,6 +2453,8 @@ int status_calc_pc_(struct map_session_data* sd, enum e_status_calc_opt opt) { if( data && data->script ) script->run(data->script,0,sd->bl.id,0); } + + status->calc_pc_additional(sd, opt); if( sd->pd ) { // Pet Bonus struct pet_data *pd = sd->pd; @@ -12434,6 +12441,7 @@ void status_defaults(void) { status->calc_mob_ = status_calc_mob_; status->calc_pet_ = status_calc_pet_; status->calc_pc_ = status_calc_pc_; + status->calc_pc_additional = status_calc_pc_additional; status->calc_homunculus_ = status_calc_homunculus_; status->calc_mercenary_ = status_calc_mercenary_; status->calc_elemental_ = status_calc_elemental_; diff --git a/src/map/status.h b/src/map/status.h index 9143df6ae..45a1300a0 100644 --- a/src/map/status.h +++ b/src/map/status.h @@ -2019,6 +2019,7 @@ struct status_interface { int (*calc_mob_) (struct mob_data* md, enum e_status_calc_opt opt); int (*calc_pet_) (struct pet_data* pd, enum e_status_calc_opt opt); int (*calc_pc_) (struct map_session_data* sd, enum e_status_calc_opt opt); + void (*calc_pc_additional) (struct map_session_data* sd, enum e_status_calc_opt opt); int (*calc_homunculus_) (struct homun_data *hd, enum e_status_calc_opt opt); int (*calc_mercenary_) (struct mercenary_data *md, enum e_status_calc_opt opt); int (*calc_elemental_) (struct elemental_data *ed, enum e_status_calc_opt opt); |