[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

@ -8628,7 +8628,7 @@ int32 Unit::CalculateSpellDamage(Unit const* target, SpellEntry const* spellProt
int32 value = basePoints;
// random damage
if(comboDamage != 0 && unitPlayer && target && (target->GetGUID() == unitPlayer->GetComboTarget()))
if (comboDamage != 0 && unitPlayer && target && (target->GetObjectGuid() == unitPlayer->GetComboTargetGuid()))
value += (int32)(comboDamage * comboPoints);
if(Player* modOwner = GetSpellModOwner())
@ -10021,7 +10021,7 @@ void Unit::ClearComboPointHolders()
uint32 lowguid = *m_ComboPointHolders.begin();
Player* plr = sObjectMgr.GetPlayer(ObjectGuid(HIGHGUID_PLAYER, lowguid));
if(plr && plr->GetComboTarget()==GetGUID()) // recheck for safe
if (plr && plr->GetComboTargetGuid() == GetObjectGuid())// recheck for safe
plr->ClearComboPoints(); // remove also guid from m_ComboPointHolders;
else
m_ComboPointHolders.erase(lowguid); // or remove manually