Resolved bonus WeaponMATKRate (#2383)

* Fixes #2275.
* Moved the bonus check after equipment is parsed.
Thanks to @Felleonel!
This commit is contained in:
Aleos 2017-08-31 14:26:17 -04:00 committed by GitHub
parent a0da1ffb75
commit e92fc9672f

View File

@ -3497,8 +3497,6 @@ int status_calc_pc_(struct map_session_data* sd, enum e_status_calc_opt opt)
wa->wlv = wlv;
if(r && sd->weapontype1 != W_BOW) // Renewal magic attack refine bonus
wa->matk += refine_info[wlv].bonus[r-1] / 100;
if (sd->bonus.weapon_matk_rate)
wa->matk += wa->matk * sd->bonus.weapon_matk_rate / 100;
#endif
if(r) // Overrefine bonus.
wd->overrefine = refine_info[wlv].randombonus_max[r-1] / 100;
@ -3513,6 +3511,10 @@ int status_calc_pc_(struct map_session_data* sd, enum e_status_calc_opt opt)
if (!calculating) // Abort, run_script retriggered this. [Skotlex]
return 1;
}
#ifdef RENEWAL
if (sd->bonus.weapon_matk_rate)
wa->matk += wa->matk * sd->bonus.weapon_matk_rate / 100;
#endif
if(sd->inventory.u.items_inventory[index].card[0] == CARD0_FORGE) { // Forged weapon
wd->star += (sd->inventory.u.items_inventory[index].card[1]>>8);
if(wd->star >= 15) wd->star = 40; // 3 Star Crumbs now give +40 dmg