Skip to content
Permalink
Browse files

Corrected Weapon Forging inventory search (#4192)

* Fixes an issue with Weapon Forging not checking for index 0.
Thanks to @Tokeiburu!
  • Loading branch information...
aleos89 committed Jun 3, 2019
1 parent 754274b commit 052a4fd1e401658ef98cf22f72c92108fb50b7ec
Showing with 4 additions and 4 deletions.
  1. +4 −4 src/map/skill.cpp
@@ -19443,10 +19443,10 @@ bool skill_produce_mix(struct map_session_data *sd, uint16 skill_id, unsigned sh
make_per += pc_checkskill(sd,skill_id)*500; // Smithing skills bonus: +5/+10/+15
make_per += pc_checkskill(sd,BS_WEAPONRESEARCH)*100 +((wlv >= 3)? pc_checkskill(sd,BS_ORIDEOCON)*100:0); // Weaponry Research bonus: +1/+2/+3/+4/+5/+6/+7/+8/+9/+10, Oridecon Research bonus (custom): +1/+2/+3/+4/+5
make_per -= (ele?2000:0) + sc*1500 + (wlv>1?wlv*1000:0); // Element Stone: -20%, Star Crumb: -15% each, Weapon level malus: -0/-20/-30
if (pc_search_inventory(sd,ITEMID_EMPERIUM_ANVIL) > 0) make_per+= 1000; // Emperium Anvil: +10
else if (pc_search_inventory(sd,ITEMID_GOLDEN_ANVIL) > 0) make_per+= 500; // Golden Anvil: +5
else if (pc_search_inventory(sd,ITEMID_ORIDECON_ANVIL) > 0) make_per+= 300; // Oridecon Anvil: +3
else if (pc_search_inventory(sd,ITEMID_ANVIL) > 0) make_per+= 0; // Anvil: +0?
if (pc_search_inventory(sd,ITEMID_EMPERIUM_ANVIL) > -1) make_per+= 1000; // Emperium Anvil: +10
else if (pc_search_inventory(sd,ITEMID_GOLDEN_ANVIL) > -1) make_per+= 500; // Golden Anvil: +5
else if (pc_search_inventory(sd,ITEMID_ORIDECON_ANVIL) > -1) make_per+= 300; // Oridecon Anvil: +3
else if (pc_search_inventory(sd,ITEMID_ANVIL) > -1) make_per+= 0; // Anvil: +0?
if (battle_config.wp_rate != 100)
make_per = make_per * battle_config.wp_rate / 100;
}

0 comments on commit 052a4fd

Please sign in to comment.
You can’t perform that action at this time.