diff --git a/src/game/ItemPrototype.h b/src/game/ItemPrototype.h index 9974030ac..af7c29e1a 100644 --- a/src/game/ItemPrototype.h +++ b/src/game/ItemPrototype.h @@ -59,8 +59,8 @@ enum ItemModType ITEM_MOD_ATTACK_POWER = 38, ITEM_MOD_RANGED_ATTACK_POWER = 39, ITEM_MOD_FERAL_ATTACK_POWER = 40, - ITEM_MOD_SPELL_HEALING_DONE = 41, - ITEM_MOD_SPELL_DAMAGE_DONE = 42, + ITEM_MOD_SPELL_HEALING_DONE = 41, // deprecated + ITEM_MOD_SPELL_DAMAGE_DONE = 42, // deprecated ITEM_MOD_MANA_REGENERATION = 43, ITEM_MOD_ARMOR_PENETRATION_RATING = 44, ITEM_MOD_SPELL_POWER = 45 diff --git a/src/game/ObjectMgr.cpp b/src/game/ObjectMgr.cpp index cd34c4338..d6a70f0d8 100644 --- a/src/game/ObjectMgr.cpp +++ b/src/game/ObjectMgr.cpp @@ -1768,6 +1768,16 @@ void ObjectMgr::LoadItemPrototypes() sLog.outErrorDb("Item (Entry: %u) has wrong stat_type%d (%u)",i,j+1,proto->ItemStat[j].ItemStatType); const_cast(proto)->ItemStat[j].ItemStatType = 0; } + + switch(proto->ItemStat[j].ItemStatType) + { + case ITEM_MOD_SPELL_HEALING_DONE: + case ITEM_MOD_SPELL_DAMAGE_DONE: + sLog.outErrorDb("Item (Entry: %u) has deprecated stat_type%d (%u)",i,j+1,proto->ItemStat[j].ItemStatType); + break; + default: + break; + } } for (int j = 0; j < MAX_ITEM_PROTO_DAMAGES; ++j) diff --git a/src/game/Player.cpp b/src/game/Player.cpp index 77538a1c8..65247bce1 100644 --- a/src/game/Player.cpp +++ b/src/game/Player.cpp @@ -436,8 +436,7 @@ Player::Player (WorldSession *session): Unit(), m_achievementMgr(this), m_reputa for (int i = 0; i < MAX_COMBAT_RATING; ++i) m_baseRatingValue[i] = 0; - m_baseSpellDamage = 0; - m_baseSpellHealing = 0; + m_baseSpellPower = 0; m_baseFeralAP = 0; m_baseManaRegen = 0; @@ -6663,12 +6662,6 @@ void Player::_ApplyItemBonuses(ItemPrototype const *proto, uint8 slot, bool appl case ITEM_MOD_FERAL_ATTACK_POWER: ApplyFeralAPBonus(int32(val), apply); break; - case ITEM_MOD_SPELL_HEALING_DONE: - ApplySpellHealingBonus(int32(val), apply); - break; - case ITEM_MOD_SPELL_DAMAGE_DONE: - ApplySpellDamageBonus(int32(val), apply); - break; case ITEM_MOD_MANA_REGENERATION: ApplyManaRegenBonus(int32(val), apply); break; @@ -6676,8 +6669,11 @@ void Player::_ApplyItemBonuses(ItemPrototype const *proto, uint8 slot, bool appl ApplyRatingMod(CR_ARMOR_PENETRATION, int32(val), apply); break; case ITEM_MOD_SPELL_POWER: - ApplySpellHealingBonus(int32(val), apply); - ApplySpellDamageBonus(int32(val), apply); + ApplySpellPowerBonus(int32(val), apply); + break; + // depricated item mods + case ITEM_MOD_SPELL_HEALING_DONE: + case ITEM_MOD_SPELL_DAMAGE_DONE: break; } } @@ -11936,14 +11932,6 @@ void Player::ApplyEnchantment(Item *item, EnchantmentSlot slot, bool apply, bool ((Player*)this)->ApplyFeralAPBonus(enchant_amount, apply); sLog.outDebug("+ %u FERAL_ATTACK_POWER", enchant_amount); break; - case ITEM_MOD_SPELL_HEALING_DONE: - ((Player*)this)->ApplySpellHealingBonus(enchant_amount, apply); - sLog.outDebug("+ %u SPELL_HEALING_DONE", enchant_amount); - break; - case ITEM_MOD_SPELL_DAMAGE_DONE: - ((Player*)this)->ApplySpellDamageBonus(enchant_amount, apply); - sLog.outDebug("+ %u SPELL_DAMAGE_DONE", enchant_amount); - break; case ITEM_MOD_MANA_REGENERATION: ((Player*)this)->ApplyManaRegenBonus(enchant_amount, apply); sLog.outDebug("+ %u MANA_REGENERATION", enchant_amount); @@ -11953,10 +11941,11 @@ void Player::ApplyEnchantment(Item *item, EnchantmentSlot slot, bool apply, bool sLog.outDebug("+ %u ARMOR PENETRATION", enchant_amount); break; case ITEM_MOD_SPELL_POWER: - ((Player*)this)->ApplySpellHealingBonus(enchant_amount, apply); - ((Player*)this)->ApplySpellDamageBonus(enchant_amount, apply); + ((Player*)this)->ApplySpellPowerBonus(enchant_amount, apply); sLog.outDebug("+ %u SPELL_POWER", enchant_amount); break; + case ITEM_MOD_SPELL_HEALING_DONE: // deprecated + case ITEM_MOD_SPELL_DAMAGE_DONE: // deprecated default: break; } diff --git a/src/game/Player.h b/src/game/Player.h index 863e4ef5d..9766119d8 100644 --- a/src/game/Player.h +++ b/src/game/Player.h @@ -1686,8 +1686,7 @@ class MANGOS_DLL_SPEC Player : public Unit void UpdateAttackPowerAndDamage(bool ranged = false); void UpdateShieldBlockValue(); void UpdateDamagePhysical(WeaponAttackType attType); - void ApplySpellDamageBonus(int32 amount, bool apply); - void ApplySpellHealingBonus(int32 amount, bool apply); + void ApplySpellPowerBonus(int32 amount, bool apply); void UpdateSpellDamageAndHealingBonus(); void CalculateMinMaxDamage(WeaponAttackType attType, bool normalized, float& min_damage, float& max_damage); @@ -1705,8 +1704,7 @@ class MANGOS_DLL_SPEC Player : public Unit uint32 GetRangedCritDamageReduction(uint32 damage) const; uint32 GetSpellCritDamageReduction(uint32 damage) const; uint32 GetDotDamageReduction(uint32 damage) const; - uint32 GetBaseSpellDamageBonus() { return m_baseSpellDamage;} - uint32 GetBaseSpellHealingBonus() { return m_baseSpellHealing;} + uint32 GetBaseSpellPowerBonus() { return m_baseSpellPower; } float GetExpertiseDodgeOrParryReduction(WeaponAttackType attType) const; void UpdateBlockPercentage(); @@ -2348,8 +2346,7 @@ class MANGOS_DLL_SPEC Player : public Unit float m_auraBaseMod[BASEMOD_END][MOD_END]; int16 m_baseRatingValue[MAX_COMBAT_RATING]; - uint16 m_baseSpellDamage; - uint16 m_baseSpellHealing; + uint16 m_baseSpellPower; uint16 m_baseFeralAP; uint16 m_baseManaRegen; diff --git a/src/game/StatSystem.cpp b/src/game/StatSystem.cpp index f21555543..9ec67fc9e 100644 --- a/src/game/StatSystem.cpp +++ b/src/game/StatSystem.cpp @@ -91,17 +91,12 @@ bool Player::UpdateStats(Stats stat) return true; } -void Player::ApplySpellDamageBonus(int32 amount, bool apply) +void Player::ApplySpellPowerBonus(int32 amount, bool apply) { - m_baseSpellDamage+=apply?amount:-amount; + m_baseSpellPower+=apply?amount:-amount; + // For speed just update for client ApplyModUInt32Value(PLAYER_FIELD_MOD_HEALING_DONE_POS, amount, apply); -} - -void Player::ApplySpellHealingBonus(int32 amount, bool apply) -{ - m_baseSpellHealing+=apply?amount:-amount; - // For speed just update for client for(int i = SPELL_SCHOOL_HOLY; i < MAX_SPELL_SCHOOL; ++i) ApplyModUInt32Value(PLAYER_FIELD_MOD_DAMAGE_DONE_POS+i, amount, apply);; } diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp index 10e28af5e..d5abf0315 100644 --- a/src/game/Unit.cpp +++ b/src/game/Unit.cpp @@ -8267,7 +8267,7 @@ int32 Unit::SpellBaseDamageBonus(SpellSchoolMask schoolMask) if (GetTypeId() == TYPEID_PLAYER) { // Base value - DoneAdvertisedBenefit +=((Player*)this)->GetBaseSpellDamageBonus(); + DoneAdvertisedBenefit +=((Player*)this)->GetBaseSpellPowerBonus(); // Damage bonus from stats AuraList const& mDamageDoneOfStatPercent = GetAurasByType(SPELL_AURA_MOD_SPELL_DAMAGE_OF_STAT_PERCENT); @@ -8714,7 +8714,7 @@ int32 Unit::SpellBaseHealingBonus(SpellSchoolMask schoolMask) if (GetTypeId() == TYPEID_PLAYER) { // Base value - AdvertisedBenefit +=((Player*)this)->GetBaseSpellHealingBonus(); + AdvertisedBenefit +=((Player*)this)->GetBaseSpellPowerBonus(); // Healing bonus from stats AuraList const& mHealingDoneOfStatPercent = GetAurasByType(SPELL_AURA_MOD_SPELL_HEALING_OF_STAT_PERCENT); diff --git a/src/shared/revision_nr.h b/src/shared/revision_nr.h index 663da8171..5fb4ec863 100644 --- a/src/shared/revision_nr.h +++ b/src/shared/revision_nr.h @@ -1,4 +1,4 @@ #ifndef __REVISION_NR_H__ #define __REVISION_NR_H__ - #define REVISION_NR "8448" + #define REVISION_NR "8449" #endif // __REVISION_NR_H__