aboutsummaryrefslogtreecommitdiff
path: root/src/game/Player.cpp
diff options
context:
space:
mode:
authormegamage <none@none>2009-09-02 18:11:11 -0500
committermegamage <none@none>2009-09-02 18:11:11 -0500
commit9d161ff757daf47335f7cc84825463cc30818c8c (patch)
tree2699fefb968d8628c3db688fe23527dedd3b9d9f /src/game/Player.cpp
parentb8d1a0cd1794caab60d5815652355945de4586b3 (diff)
[8449] Deprecate healing/damage item mods and merge internal data in to spell power. Author: VladimirMangos
* Report at loading about deprecated ITEM_MOD_SPELL_HEALING_DONE and ITEM_MOD_SPELL_DAMAGE_DONE and drop support code. * Merge healing/damage base spell bonus fields and function to spell power field/function. --HG-- branch : trunk
Diffstat (limited to 'src/game/Player.cpp')
-rw-r--r--src/game/Player.cpp29
1 files changed, 9 insertions, 20 deletions
diff --git a/src/game/Player.cpp b/src/game/Player.cpp
index 73a5ee7c142..4bb7956aa5e 100644
--- a/src/game/Player.cpp
+++ b/src/game/Player.cpp
@@ -445,8 +445,7 @@ Player::Player (WorldSession *session): Unit(), m_achievementMgr(this), m_reputa
for (uint8 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;
@@ -6999,12 +6998,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;
@@ -7012,8 +7005,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;
}
}
@@ -12505,14 +12501,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);
@@ -12522,10 +12510,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;
}