Core/Spells: Named and implemented most of SpellAttr7
This commit is contained in:
1 parent
4b1cf485e0
commit
3c0cf32b43
12 files changed
+135
-130
No files matched your search
@@ -4461,7 +4461,7 @@ void Spell::EffectCharge(SpellEffIndex effIndex)
|
||||
else if (effectHandleMode == SPELL_EFFECT_HANDLE_HIT_TARGET)
|
||||
{
|
||||
// not all charge effects used in negative spells
|
||||
if (!m_spellInfo->IsPositive() && unitCaster->GetTypeId() == TYPEID_PLAYER)
|
||||
if (m_spellInfo->HasAttribute(SPELL_ATTR7_ATTACK_ON_CHARGE_TO_UNIT))
|
||||
unitCaster->Attack(unitTarget, true);
|
||||
|
||||
if (int32 spellId = GetSpellInfo()->Effects[effIndex].TriggerSpell)
|
||||
@@ -5149,7 +5149,7 @@ void Spell::EffectStealBeneficialBuff(SpellEffIndex effIndex)
|
||||
// The charges / stack amounts don't count towards the total number of auras that can be dispelled.
|
||||
// Ie: A dispel on a target with 5 stacks of Winters Chill and a Polymorph has 1 / (1 + 1) -> 50% chance to dispell
|
||||
// Polymorph instead of 1 / (5 + 1) -> 16%.
|
||||
bool dispelCharges = aura->GetSpellInfo()->HasAttribute(SPELL_ATTR7_DISPEL_CHARGES);
|
||||
bool dispelCharges = aura->GetSpellInfo()->HasAttribute(SPELL_ATTR7_DISPEL_REMOVES_CHARGES);
|
||||
uint8 charges = dispelCharges ? aura->GetCharges() : aura->GetStackAmount();
|
||||
if (charges > 0)
|
||||
stealList.emplace_back(aura, chance, charges);
|
||||
@@ -5583,7 +5583,7 @@ void Spell::EffectCastButtons(SpellEffIndex effIndex)
|
||||
if (!player->HasSpell(spell_id) || player->GetSpellHistory()->HasCooldown(spell_id))
|
||||
continue;
|
||||
|
||||
if (!spellInfo->HasAttribute(SPELL_ATTR9_SUMMON_PLAYER_TOTEM))
|
||||
if (!spellInfo->HasAttribute(SPELL_ATTR7_CAN_BE_MULTI_CAST))
|
||||
continue;
|
||||
|
||||
int32 cost = spellInfo->CalcPowerCost(player, spellInfo->GetSchoolMask());
|
||||
|
||||
Reference in new issue
Block a user