Replace the bitshift optimizations for multiplication (#7590)
* These were originally bitshifts because it was 'faster', but now with modern compilers and hardware, the only thing it does now is confuse developers who have to read the code
This commit is contained in:
@@ -10389,7 +10389,7 @@ int pc_itemheal(map_session_data *sd, t_itemid itemid, int hp, int sp)
|
||||
int bonus, tmp, penalty = 0;
|
||||
|
||||
if (hp) {
|
||||
bonus = 100 + (sd->battle_status.vit << 1) + pc_checkskill(sd, SM_RECOVERY) * 10 + pc_checkskill(sd, AM_LEARNINGPOTION) * 5;
|
||||
bonus = 100 + (sd->battle_status.vit * 2) + pc_checkskill(sd, SM_RECOVERY) * 10 + pc_checkskill(sd, AM_LEARNINGPOTION) * 5;
|
||||
// A potion produced by an Alchemist in the Fame Top 10 gets +50% effect [DracoRPG]
|
||||
if (potion_flag == 2) {
|
||||
bonus += bonus * 50 / 100;
|
||||
@@ -10425,7 +10425,7 @@ int pc_itemheal(map_session_data *sd, t_itemid itemid, int hp, int sp)
|
||||
hp = tmp;
|
||||
}
|
||||
if (sp) {
|
||||
bonus = 100 + (sd->battle_status.int_ << 1) + pc_checkskill(sd, MG_SRECOVERY) * 10 + pc_checkskill(sd, AM_LEARNINGPOTION) * 5;
|
||||
bonus = 100 + (sd->battle_status.int_ * 2) + pc_checkskill(sd, MG_SRECOVERY) * 10 + pc_checkskill(sd, AM_LEARNINGPOTION) * 5;
|
||||
// A potion produced by an Alchemist in the Fame Top 10 gets +50% effect [DracoRPG]
|
||||
if (potion_flag == 2)
|
||||
bonus += bonus * 50 / 100;
|
||||
|
||||
Reference in New Issue
Block a user