Spell_Miss will Restore Rage and Energy
This commit is contained in:
parent
4084a1c77b
commit
c81505475b
@ -3795,7 +3795,33 @@ void Spell::TakePower()
|
||||
|
||||
Powers powerType = Powers(m_spellInfo->powerType);
|
||||
|
||||
m_caster->ModifyPower(powerType, -(int32)m_powerCost);
|
||||
bool hit = true;
|
||||
for (uint8 j = 0; j < 3; ++j)
|
||||
{
|
||||
// Spell targets a single enemy
|
||||
if (m_spellInfo->EffectImplicitTargetA[j] == TARGET_CHAIN_DAMAGE ||
|
||||
m_spellInfo->EffectImplicitTargetA[j] == TARGET_CURRENT_ENEMY_COORDINATES)
|
||||
{
|
||||
if (m_caster->GetTypeId() == TYPEID_PLAYER)
|
||||
{
|
||||
if (powerType == POWER_ENERGY)
|
||||
if (uint64 targetGUID = m_targets.getUnitTargetGuid())
|
||||
for (std::list<TargetInfo>::iterator ihit = m_UniqueTargetInfo.begin(); ihit != m_UniqueTargetInfo.end(); ++ihit)
|
||||
if (ihit->targetGUID = targetGUID)
|
||||
{
|
||||
if (ihit->missCondition != SPELL_MISS_NONE)
|
||||
{
|
||||
hit = false;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (hit || m_spellInfo->AttributesEx & SPELL_ATTR_EX_REQ_TARGET_COMBO_POINTS || m_spellInfo->AttributesEx & SPELL_ATTR_EX_REQ_COMBO_POINTS)
|
||||
m_caster->ModifyPower(powerType, -(int32)m_powerCost);
|
||||
else
|
||||
m_caster->ModifyPower(powerType, -(int32)m_powerCost / 5);
|
||||
|
||||
// Set the five second timer
|
||||
if (powerType == POWER_MANA && m_powerCost > 0)
|
||||
|
Loading…
x
Reference in New Issue
Block a user