mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-22 18:15:31 +01:00
*Fix Ferocious Bite energy to dmg conversion
*Remove duplicated AP coefficients for Hammer of Wrath and Avengers Shield *Correctly do effectaddcombopoints for spells which take them. *Do not proc spelleffects on player login. --HG-- branch : trunk
This commit is contained in:
@@ -363,6 +363,7 @@ Spell::Spell( Unit* Caster, SpellEntry const *info, bool triggered, uint64 origi
|
||||
m_referencedFromCurrentSpell = false;
|
||||
m_executedCurrently = false;
|
||||
m_needComboPoints = NeedsComboPoints(m_spellInfo);
|
||||
m_comboPointGain = 0;
|
||||
m_delayStart = 0;
|
||||
m_delayAtDamageCount = 0;
|
||||
|
||||
@@ -2730,7 +2731,13 @@ void Spell::cast(bool skipCheck)
|
||||
((Player*)m_caster)->GetAchievementMgr().UpdateAchievementCriteria(ACHIEVEMENT_CRITERIA_TYPE_CAST_SPELL, m_spellInfo->Id);
|
||||
}
|
||||
|
||||
// this is related to combo points so must be done before takepower
|
||||
if(!m_IsTriggeredSpell)
|
||||
{
|
||||
// Powers have to be taken before SendSpellGo
|
||||
TakePower();
|
||||
TakeReagents(); // we must remove reagents before HandleEffects to allow place crafted item in same slot
|
||||
}
|
||||
|
||||
// are there any spells need to be triggered after hit?
|
||||
// handle SPELL_AURA_ADD_TARGET_TRIGGER auras
|
||||
Unit::AuraEffectList const& targetTriggers = m_caster->GetAurasByType(SPELL_AURA_ADD_TARGET_TRIGGER);
|
||||
@@ -2748,17 +2755,9 @@ void Spell::cast(bool skipCheck)
|
||||
}
|
||||
}
|
||||
|
||||
// this is related to combo points so must be done before takepower
|
||||
if(m_customAttr & SPELL_ATTR_CU_DIRECT_DAMAGE)
|
||||
CalculateDamageDoneForAllTargets();
|
||||
|
||||
if(!m_IsTriggeredSpell)
|
||||
{
|
||||
// Powers have to be taken before SendSpellGo
|
||||
TakePower();
|
||||
TakeReagents(); // we must remove reagents before HandleEffects to allow place crafted item in same slot
|
||||
}
|
||||
|
||||
// CAST SPELL
|
||||
SendSpellCooldown();
|
||||
//SendCastResult(castResult);
|
||||
@@ -2972,6 +2971,10 @@ void Spell::_handle_finish_phase()
|
||||
if (m_needComboPoints)
|
||||
((Player*)m_caster)->ClearComboPoints();
|
||||
|
||||
// Real add combo points from effects
|
||||
if (m_caster->GetTypeId()==TYPEID_PLAYER)
|
||||
((Player*)m_caster)->GainSpellComboPoints(m_comboPointGain);
|
||||
|
||||
// spell log
|
||||
if(m_needSpellLog)
|
||||
SendLogExecute();
|
||||
|
||||
Reference in New Issue
Block a user