Core/StatSystem: Added mastery handling for enchants and reforging

This commit is contained in:
Shauren committed 2013-05-13 14:53:01 +02:00
1 parent 64f0e99958
commit e319e806c6
1 file changed
+10
@@ -13740,6 +13740,9 @@ void Player::ApplyReforgeEnchantment(Item* item, bool apply)
case ITEM_MOD_BLOCK_VALUE:
HandleBaseModValue(SHIELD_BLOCK_VALUE, FLAT_MOD, -removeValue, apply);
break;
case ITEM_MOD_MASTERY_RATING:
ApplyRatingMod(CR_MASTERY, -int32(removeValue), apply);
break;
}
switch (reforge->FinalStat)
@@ -13850,6 +13853,9 @@ void Player::ApplyReforgeEnchantment(Item* item, bool apply)
case ITEM_MOD_BLOCK_VALUE:
HandleBaseModValue(SHIELD_BLOCK_VALUE, FLAT_MOD, addValue, apply);
break;
case ITEM_MOD_MASTERY_RATING:
ApplyRatingMod(CR_MASTERY, int32(addValue), apply);
break;
}
}
@@ -14185,6 +14191,10 @@ void Player::ApplyEnchantment(Item* item, EnchantmentSlot slot, bool apply, bool
HandleBaseModValue(SHIELD_BLOCK_VALUE, FLAT_MOD, float(enchant_amount), apply);
sLog->outDebug(LOG_FILTER_PLAYER_ITEMS, "+ %u BLOCK_VALUE", enchant_amount);
break;
case ITEM_MOD_MASTERY_RATING:
ApplyRatingMod(CR_MASTERY, enchant_amount, apply);
sLog->outDebug(LOG_FILTER_PLAYER_ITEMS, "+ %u MASTERY", enchant_amount);
break;
default:
break;
}