aboutsummaryrefslogtreecommitdiff
path: root/src/server/game/Spells/SpellInfo.cpp
diff options
context:
space:
mode:
authorShauren <shauren.trinity@gmail.com>2022-05-01 20:01:13 +0200
committerShauren <shauren.trinity@gmail.com>2022-05-01 20:01:13 +0200
commit8d16a79dea4c0100d36e13b068c42499a3a48154 (patch)
treeb7eb987d783e46e9fb74da6bec06dc1b91e29f14 /src/server/game/Spells/SpellInfo.cpp
parent524d14a162e8d032ad3324acf7cd2ebea5c29fc6 (diff)
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
Diffstat (limited to 'src/server/game/Spells/SpellInfo.cpp')
-rw-r--r--src/server/game/Spells/SpellInfo.cpp9
1 files changed, 6 insertions, 3 deletions
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<SpellPowerCost> 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