Fixes an issue with reloading the item database
* Fixes an issue where players prior autobonuses were not properly recalculated when reloading the item database.
This commit is contained in:
parent
920b57965c
commit
bb8d09dfca
@ -3526,7 +3526,7 @@ void itemdb_reload(void) {
|
|||||||
pc_setinventorydata(sd);
|
pc_setinventorydata(sd);
|
||||||
pc_check_available_item(sd, ITMCHK_ALL); // Check for invalid(ated) items.
|
pc_check_available_item(sd, ITMCHK_ALL); // Check for invalid(ated) items.
|
||||||
pc_load_combo(sd); // Check to see if new combos are available
|
pc_load_combo(sd); // Check to see if new combos are available
|
||||||
status_calc_pc(sd, SCO_FORCE); //
|
status_calc_pc(sd, SCO_FORCE|SCO_ITEM_RELOAD); //
|
||||||
}
|
}
|
||||||
mapit_free(iter);
|
mapit_free(iter);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -3619,9 +3619,9 @@ int status_calc_pc_sub(struct map_session_data* sd, uint8 opt)
|
|||||||
memset(&sd->bonus, 0, sizeof(sd->bonus));
|
memset(&sd->bonus, 0, sizeof(sd->bonus));
|
||||||
|
|
||||||
// Autobonus
|
// Autobonus
|
||||||
pc_delautobonus(*sd, sd->autobonus, true);
|
pc_delautobonus(*sd, sd->autobonus, (opt & SCO_ITEM_RELOAD) ? false : true);
|
||||||
pc_delautobonus(*sd, sd->autobonus2, true);
|
pc_delautobonus(*sd, sd->autobonus2, (opt & SCO_ITEM_RELOAD) ? false : true);
|
||||||
pc_delautobonus(*sd, sd->autobonus3, true);
|
pc_delautobonus(*sd, sd->autobonus3, (opt & SCO_ITEM_RELOAD) ? false : true);
|
||||||
|
|
||||||
// Parse equipment
|
// Parse equipment
|
||||||
for (i = 0; i < EQI_MAX; i++) {
|
for (i = 0; i < EQI_MAX; i++) {
|
||||||
|
|||||||
@ -2806,6 +2806,7 @@ enum e_status_calc_opt : uint8 {
|
|||||||
SCO_NONE = 0x0,
|
SCO_NONE = 0x0,
|
||||||
SCO_FIRST = 0x1, ///< Trigger the calculations that should take place only onspawn/once, process base status initialization code
|
SCO_FIRST = 0x1, ///< Trigger the calculations that should take place only onspawn/once, process base status initialization code
|
||||||
SCO_FORCE = 0x2, ///< Only relevant to BL_PC types, ensures call bypasses the queue caused by delayed damage
|
SCO_FORCE = 0x2, ///< Only relevant to BL_PC types, ensures call bypasses the queue caused by delayed damage
|
||||||
|
SCO_ITEM_RELOAD = 0x4, ///< Triggered when the item database is reloaded to force autobonus types to reset
|
||||||
};
|
};
|
||||||
|
|
||||||
/// Flags for status_change_start and status_get_sc_def
|
/// Flags for status_change_start and status_get_sc_def
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user