mirror of
https://github.com/mangosfour/server.git
synced 2025-12-12 10:37:03 +00:00
[10636] Implement server side check combo points req. for spell cast.
Thanks to nos4r2zod for problem research.
This commit is contained in:
parent
7a26fdd45d
commit
691412d05c
7 changed files with 35 additions and 29 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue