aboutsummaryrefslogtreecommitdiff
path: root/src/server/game/Spells/SpellInfo.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/server/game/Spells/SpellInfo.cpp')
-rw-r--r--src/server/game/Spells/SpellInfo.cpp20
1 files changed, 13 insertions, 7 deletions
diff --git a/src/server/game/Spells/SpellInfo.cpp b/src/server/game/Spells/SpellInfo.cpp
index 12eb37b6861..b9f26ed4e08 100644
--- a/src/server/game/Spells/SpellInfo.cpp
+++ b/src/server/game/Spells/SpellInfo.cpp
@@ -510,14 +510,16 @@ int32 SpellEffectInfo::CalcValue(Unit const* caster /*= nullptr*/, int32 const*
if (Scaling.ResourceCoefficient)
comboDamage = Scaling.ResourceCoefficient * value;
}
- else
+ else if (GetScalingExpectedStat() == ExpectedStatType::None)
{
- if (GetScalingExpectedStat() == ExpectedStatType::None)
+ if (caster && basePointsPerLevel != 0.0f)
{
- int32 level = caster ? int32(caster->getLevel()) : 0;
+ int32 level = int32(caster->getLevel());
if (level > int32(_spellInfo->MaxLevel) && _spellInfo->MaxLevel > 0)
level = int32(_spellInfo->MaxLevel);
- level -= int32(_spellInfo->BaseLevel);
+
+ // if base level is greater than spell level, reduce by base level (eg. pilgrims foods)
+ level -= int32(std::max(_spellInfo->BaseLevel, _spellInfo->SpellLevel));
if (level < 0)
level = 0;
value += level * basePointsPerLevel;
@@ -1673,7 +1675,7 @@ bool SpellInfo::IsChanneled() const
bool SpellInfo::IsMoveAllowedChannel() const
{
- return IsChanneled() && HasAttribute(SPELL_ATTR5_CAN_CHANNEL_WHEN_MOVING);
+ return IsChanneled() && (HasAttribute(SPELL_ATTR5_CAN_CHANNEL_WHEN_MOVING) || (!(ChannelInterruptFlags[0] & (AURA_INTERRUPT_FLAG_MOVE | AURA_INTERRUPT_FLAG_TURNING))));
}
bool SpellInfo::NeedsComboPoints() const
@@ -3382,11 +3384,14 @@ void SpellInfo::_LoadImmunityInfo()
{
switch (Id)
{
+ case 42292: // PvP trinket
+ case 59752: // Every Man for Himself
+ mechanicImmunityMask |= IMMUNE_TO_MOVEMENT_IMPAIRMENT_AND_LOSS_CONTROL_MASK;
+ immuneInfo.AuraTypeImmune.insert(SPELL_AURA_USE_NORMAL_MOVEMENT_SPEED);
+ break;
case 34471: // The Beast Within
case 19574: // Bestial Wrath
- case 42292: // PvP trinket
case 46227: // Medallion of Immunity
- case 59752: // Every Man for Himself
case 53490: // Bullheaded
case 65547: // PvP Trinket
case 134946: // Supremacy of the Alliance
@@ -4507,6 +4512,7 @@ bool SpellInfo::_IsPositiveEffect(uint32 effIndex, bool deep) const
case SPELL_AURA_MOD_STALKED:
case SPELL_AURA_PERIODIC_DAMAGE_PERCENT:
case SPELL_AURA_PREVENT_RESURRECTION:
+ case SPELL_AURA_EMPATHY:
return false;
case SPELL_AURA_PERIODIC_DAMAGE: // used in positive spells also.
// part of negative spell if cast at self (prevent cancel)