*Calculate spell points when casting but not hitting.

--HG--
branch : trunk
This commit is contained in:
megamage
2008-12-23 15:51:07 -06:00
parent c230fb2c28
commit 7fe4b221db
3 changed files with 20 additions and 13 deletions

View File

@@ -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())