From 19d898c8367c9f5a2c95b8f5a392a60bc9486226 Mon Sep 17 00:00:00 2001 From: Yaki Khadafi Date: Tue, 14 Aug 2012 19:06:50 +0300 Subject: [PATCH] [0091] Define SPELL_ATTR_EX8_IGNORE_TARGET_FOR_COMBO_POINTS Signed-off-by: Yaki Khadafi --- src/game/SharedDefines.h | 4 ++-- src/game/Spell.cpp | 3 ++- src/game/Unit.cpp | 3 ++- src/shared/revision_nr.h | 2 +- 4 files changed, 7 insertions(+), 5 deletions(-) diff --git a/src/game/SharedDefines.h b/src/game/SharedDefines.h index 476f53f31..18416ce74 100644 --- a/src/game/SharedDefines.h +++ b/src/game/SharedDefines.h @@ -300,7 +300,7 @@ enum SpellAttributesEx SPELL_ATTR_EX_UNK19 = 0x00080000,// 19 SPELL_ATTR_EX_REQ_TARGET_COMBO_POINTS = 0x00100000,// 20 Req combo points on target SPELL_ATTR_EX_UNK21 = 0x00200000,// 21 - SPELL_ATTR_EX_REQ_COMBO_POINTS = 0x00400000,// 22 Use combo points (in 4.x not required combo point target selected) + SPELL_ATTR_EX_REQ_COMBO_POINTS = 0x00400000,// 22 Use combo points SPELL_ATTR_EX_UNK23 = 0x00800000,// 23 SPELL_ATTR_EX_UNK24 = 0x01000000,// 24 Req fishing pole?? SPELL_ATTR_EX_UNK25 = 0x02000000,// 25 @@ -549,7 +549,7 @@ enum SpellAttributesEx8 SPELL_ATTR_EX8_UNK16 = 0x00010000,// 16 SPELL_ATTR_EX8_UNK17 = 0x00020000,// 17 SPELL_ATTR_EX8_UNK18 = 0x00040000,// 18 Dark Simulacrum, Soul Swap - SPELL_ATTR_EX8_UNK19 = 0x00080000,// 19 Slice and Dice, Savage Roar, Recuperate + SPELL_ATTR_EX8_IGNORE_TARGET_FOR_COMBO_POINTS = 0x00080000,// 19 Slice and Dice, Savage Roar, Recuperate SPELL_ATTR_EX8_ARMOR_SPECIALIZATION = 0x00100000,// 20 SPELL_ATTR_EX8_UNK21 = 0x00200000,// 21 some spells that summon smth SPELL_ATTR_EX8_UNK22 = 0x00400000,// 22 some health-affecting spells diff --git a/src/game/Spell.cpp b/src/game/Spell.cpp index baf662b91..f6ab2e26c 100644 --- a/src/game/Spell.cpp +++ b/src/game/Spell.cpp @@ -5132,7 +5132,8 @@ SpellCastResult Spell::CheckCast(bool strict) } if (!m_IsTriggeredSpell && NeedsComboPoints(m_spellInfo) && !m_caster->IsIgnoreUnitState(m_spellInfo, IGNORE_UNIT_TARGET_STATE) && - (!m_targets.getUnitTarget() || m_targets.getUnitTarget()->GetObjectGuid() != ((Player*)m_caster)->GetComboTargetGuid())) + (!m_targets.getUnitTarget() || m_targets.getUnitTarget()->GetObjectGuid() != ((Player*)m_caster)->GetComboTargetGuid()) && + !m_spellInfo->HasAttribute(SPELL_ATTR_EX8_IGNORE_TARGET_FOR_COMBO_POINTS)) // warrior not have real combo-points at client side but use this way for mark allow Overpower use return m_caster->getClass() == CLASS_WARRIOR ? SPELL_FAILED_CASTER_AURASTATE : SPELL_FAILED_NO_COMBO_POINTS; } diff --git a/src/game/Unit.cpp b/src/game/Unit.cpp index 031fc2677..8544d680a 100644 --- a/src/game/Unit.cpp +++ b/src/game/Unit.cpp @@ -9291,7 +9291,8 @@ int32 Unit::CalculateSpellDamage(Unit const* target, SpellEntry const* spellProt int32 value = basePoints; // random damage - if (comboDamage != 0 && unitPlayer && target && (target->GetObjectGuid() == unitPlayer->GetComboTargetGuid())) + if (comboDamage != 0 && unitPlayer && + (target && target->GetObjectGuid() == unitPlayer->GetComboTargetGuid() || spellProto->HasAttribute(SPELL_ATTR_EX8_IGNORE_TARGET_FOR_COMBO_POINTS))) value += (int32)(comboDamage * comboPoints); if (Player* modOwner = GetSpellModOwner()) diff --git a/src/shared/revision_nr.h b/src/shared/revision_nr.h index f06b1ab58..d60215866 100644 --- a/src/shared/revision_nr.h +++ b/src/shared/revision_nr.h @@ -1,4 +1,4 @@ #ifndef __REVISION_NR_H__ #define __REVISION_NR_H__ - #define REVISION_NR "0090" + #define REVISION_NR "0091" #endif // __REVISION_NR_H__