aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorShauren <shauren.trinity@gmail.com>2013-05-13 14:53:01 +0200
committerShauren <shauren.trinity@gmail.com>2013-05-13 14:53:01 +0200
commite319e806c6d315be3d2aa6fcda546d0ddb72489a (patch)
treece01101e1d5cb9d857f1114255b3098b8357294f /src
parent64f0e99958dadecdec19fba5f33c4a0c40149eb2 (diff)
Core/StatSystem: Added mastery handling for enchants and reforging
Diffstat (limited to 'src')
-rw-r--r--src/server/game/Entities/Player/Player.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/server/game/Entities/Player/Player.cpp b/src/server/game/Entities/Player/Player.cpp
index f828616a46f..70e8be67837 100644
--- a/src/server/game/Entities/Player/Player.cpp
+++ b/src/server/game/Entities/Player/Player.cpp
@@ -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;
}