mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-21 17:54:48 +01:00
*Calculate spell points when casting but not hitting.
--HG-- branch : trunk
This commit is contained in:
@@ -10454,7 +10454,7 @@ bool Unit::SelectHostilTarget()
|
||||
//======================================================================
|
||||
//======================================================================
|
||||
|
||||
int32 Unit::CalculateSpellDamage(SpellEntry const* spellProto, uint8 effect_index, int32 effBasePoints, Unit const* target)
|
||||
int32 Unit::CalculateSpellDamage(SpellEntry const* spellProto, uint8 effect_index, int32 effBasePoints, Unit const* /*target*/)
|
||||
{
|
||||
Player* unitPlayer = (GetTypeId() == TYPEID_PLAYER) ? (Player*)this : NULL;
|
||||
|
||||
@@ -10477,7 +10477,7 @@ int32 Unit::CalculateSpellDamage(SpellEntry const* spellProto, uint8 effect_inde
|
||||
int32 randvalue = spellProto->EffectBaseDice[effect_index] >= randomPoints ? spellProto->EffectBaseDice[effect_index]:irand(spellProto->EffectBaseDice[effect_index], randomPoints);
|
||||
int32 value = basePoints + randvalue;
|
||||
//random damage
|
||||
if(comboDamage != 0 && unitPlayer && target && (target->GetGUID() == unitPlayer->GetComboTarget()))
|
||||
if(comboDamage != 0 && unitPlayer /*&& target && (target->GetGUID() == unitPlayer->GetComboTarget())*/)
|
||||
value += (int32)(comboDamage * comboPoints);
|
||||
|
||||
if(Player* modOwner = GetSpellModOwner())
|
||||
|
||||
Reference in New Issue
Block a user