From 8d16a79dea4c0100d36e13b068c42499a3a48154 Mon Sep 17 00:00:00 2001 From: Shauren Date: Sun, 1 May 2022 20:01:13 +0200 Subject: Core/Spells: Rename SpellAttr4 to use official attribute names * Corrected implementation of SPELL_ATTR4_CLASS_TRIGGER_ONLY_ON_TARGET * Implemented SPELL_ATTR4_NO_HELPFUL_THREAT * Implemented SPELL_ATTR4_NO_PARTIAL_IMMUNITY * Implemented SPELL_ATTR4_ALLOW_PROC_WHILE_SITTING * Implemented SPELL_ATTR4_USE_FACING_FROM_SPELL * Implemented SPELL_ATTR4_BOUNCY_CHAIN_MISSILES * Implemented SPELL_ATTR4_AURA_NEVER_BOUNCES * Implemented SPELL_ATTR4_AURA_BOUNCE_FAILS_SPELL * Implemented SPELL_ATTR4_AURA_IS_BUFF * Implemented SPELL_ATTR5_MELEE_CHAIN_TARGETING * Implemented SpellEffectAttributes::ChainFromInitialTarget --- src/server/game/Spells/SpellInfo.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'src/server/game/Spells/SpellInfo.cpp') diff --git a/src/server/game/Spells/SpellInfo.cpp b/src/server/game/Spells/SpellInfo.cpp index 23c1b9c670c..b362e91621c 100644 --- a/src/server/game/Spells/SpellInfo.cpp +++ b/src/server/game/Spells/SpellInfo.cpp @@ -1675,7 +1675,7 @@ bool SpellInfo::IsAutoRepeatRangedSpell() const bool SpellInfo::HasInitialAggro() const { - return !(HasAttribute(SPELL_ATTR1_NO_THREAT) || HasAttribute(SPELL_ATTR2_NO_INITIAL_THREAT)); + return !(HasAttribute(SPELL_ATTR1_NO_THREAT) || HasAttribute(SPELL_ATTR2_NO_INITIAL_THREAT) || HasAttribute(SPELL_ATTR4_NO_HARMFUL_THREAT)); } bool SpellInfo::HasHitDelay() const @@ -1952,7 +1952,7 @@ SpellCastResult SpellInfo::CheckLocation(uint32 map_id, uint32 zone_id, uint32 a } // continent limitation (virtual continent) - if (HasAttribute(SPELL_ATTR4_CAST_ONLY_IN_OUTLAND)) + if (HasAttribute(SPELL_ATTR4_ONLY_FLYING_AREAS)) { uint32 mountFlags = 0; if (player && player->HasAuraType(SPELL_AURA_MOUNT_RESTRICTIONS)) @@ -3943,7 +3943,7 @@ Optional SpellInfo::CalcPowerCost(SpellPowerEntry const* power, bool initiallyNegative = powerCost < 0; // Shiv - costs 20 + weaponSpeed*10 energy (apply only to non-triggered spell with energy cost) - if (HasAttribute(SPELL_ATTR4_SPELL_VS_EXTEND_COST)) + if (HasAttribute(SPELL_ATTR4_WEAPON_SPEED_COST_SCALING)) { uint32 speed = 0; if (SpellShapeshiftFormEntry const* ss = sSpellShapeshiftFormStore.LookupEntry(unitCaster->GetShapeshiftForm())) @@ -4407,6 +4407,9 @@ bool _isPositiveEffectImpl(SpellInfo const* spellInfo, SpellEffectInfo const& ef if (spellInfo->HasAttribute(SPELL_ATTR0_AURA_IS_DEBUFF)) return false; + if (spellInfo->HasAttribute(SPELL_ATTR4_AURA_IS_BUFF)) + return true; + visited.insert({ spellInfo, effect.EffectIndex }); //We need scaling level info for some auras that compute bp 0 or positive but should be debuffs -- cgit v1.2.3