*Update to Mangos 7100.
--HG-- branch : trunk
This commit is contained in:
+64
-5
@@ -426,6 +426,11 @@ Player::Player (WorldSession *session): Unit(), m_achievementMgr(this)
|
||||
|
||||
for (int i = 0; i < MAX_COMBAT_RATING; i++)
|
||||
m_baseRatingValue[i] = 0;
|
||||
|
||||
m_baseSpellDamage = 0;
|
||||
m_baseSpellHealing = 0;
|
||||
m_baseFeralAP = 0;
|
||||
m_baseManaRegen = 0;
|
||||
|
||||
// Honor System
|
||||
m_lastHonorUpdateTime = time(NULL);
|
||||
@@ -2963,12 +2968,15 @@ void Player::learnSpell(uint32 spell_id)
|
||||
bool learning = addSpell(spell_id,active,true,false);
|
||||
|
||||
// learn all disabled higher ranks (recursive)
|
||||
SpellChainNode const* node = spellmgr.GetSpellChainNode(spell_id);
|
||||
if (node)
|
||||
if(disabled)
|
||||
{
|
||||
PlayerSpellMap::iterator iter = m_spells.find(node->next);
|
||||
if (disabled && iter != m_spells.end() && iter->second->disabled )
|
||||
learnSpell(node->next);
|
||||
SpellChainNode const* node = spellmgr.GetSpellChainNode(spell_id);
|
||||
if(node)
|
||||
{
|
||||
PlayerSpellMap::iterator iter = m_spells.find(node->next);
|
||||
if (iter != m_spells.end() && iter->second->disabled )
|
||||
learnSpell(node->next);
|
||||
}
|
||||
}
|
||||
|
||||
// prevent duplicated entires in spell book, also not send if not in world (loading)
|
||||
@@ -6792,9 +6800,31 @@ void Player::_ApplyItemBonuses(ItemPrototype const *proto, uint8 slot, bool appl
|
||||
case ITEM_MOD_EXPERTISE_RATING:
|
||||
ApplyRatingMod(CR_EXPERTISE, int32(val), apply);
|
||||
break;
|
||||
case ITEM_MOD_ATTACK_POWER:
|
||||
HandleStatModifier(UNIT_MOD_ATTACK_POWER, TOTAL_VALUE, float(val), apply);
|
||||
break;
|
||||
case ITEM_MOD_RANGED_ATTACK_POWER:
|
||||
HandleStatModifier(UNIT_MOD_ATTACK_POWER_RANGED, TOTAL_VALUE, float(val), apply);
|
||||
break;
|
||||
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;
|
||||
case ITEM_MOD_ARMOR_PENETRATION_RATING:
|
||||
ApplyRatingMod(CR_ARMOR_PENETRATION, int32(val), apply);
|
||||
break;
|
||||
case ITEM_MOD_SPELL_POWER:
|
||||
ApplySpellHealingBonus(int32(val), apply);
|
||||
ApplySpellDamageBonus(int32(val), apply);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -12267,10 +12297,39 @@ void Player::ApplyEnchantment(Item *item,EnchantmentSlot slot,bool apply, bool a
|
||||
((Player*)this)->ApplyRatingMod(CR_EXPERTISE, enchant_amount, apply);
|
||||
sLog.outDebug("+ %u EXPERTISE", enchant_amount);
|
||||
break;
|
||||
case ITEM_MOD_ATTACK_POWER:
|
||||
HandleStatModifier(UNIT_MOD_ATTACK_POWER, TOTAL_VALUE, float(enchant_amount), apply);
|
||||
sLog.outDebug("+ %u ATTACK_POWER", enchant_amount);
|
||||
break;
|
||||
case ITEM_MOD_RANGED_ATTACK_POWER:
|
||||
HandleStatModifier(UNIT_MOD_ATTACK_POWER_RANGED, TOTAL_VALUE, float(enchant_amount), apply);
|
||||
sLog.outDebug("+ %u RANGED_ATTACK_POWER", enchant_amount);
|
||||
break;
|
||||
case ITEM_MOD_FERAL_ATTACK_POWER:
|
||||
((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);
|
||||
break;
|
||||
case ITEM_MOD_ARMOR_PENETRATION_RATING:
|
||||
((Player*)this)->ApplyRatingMod(CR_ARMOR_PENETRATION, enchant_amount, apply);
|
||||
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);
|
||||
sLog.outDebug("+ %u SPELL_POWER", enchant_amount);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user