[10636] Implement server side check combo points req. for spell cast.

Thanks to nos4r2zod for problem research.
This commit is contained in:
VladimirMangos 2010-10-21 14:08:00 +04:00
parent 7a26fdd45d
commit 691412d05c
7 changed files with 35 additions and 29 deletions

View file

@ -6261,8 +6261,8 @@ void Aura::HandleAuraRetainComboPoints(bool apply, bool Real)
// combo points was added in SPELL_EFFECT_ADD_COMBO_POINTS handler
// remove only if aura expire by time (in case combo points amount change aura removed without combo points lost)
if( !apply && m_removeMode == AURA_REMOVE_BY_EXPIRE && target->GetComboTarget())
if(Unit* unit = ObjectAccessor::GetUnit(*GetTarget(),target->GetComboTarget()))
if (!apply && m_removeMode == AURA_REMOVE_BY_EXPIRE && !target->GetComboTargetGuid().IsEmpty())
if (Unit* unit = ObjectAccessor::GetUnit(*GetTarget(),target->GetComboTargetGuid()))
target->AddComboPoints(unit, -m_modifier.m_amount);
}