Core/Spells: Check a few aura effects for determining if should be negative (#24930)

* Core/Spells: Check a few aura effects for determining if should be negative

* Rename 9999_99_99_99_world_auras.sql to 2020_07_04_00_world.sql

Co-authored-by: Giacomo Pozzoni <giacomopoz@gmail.com>
This commit is contained in:
Gildor
2020-07-04 15:56:48 +02:00
committed by GitHub
parent 488fbb20fc
commit 26ba4ecd51
2 changed files with 27 additions and 3 deletions

View File

@@ -0,0 +1,8 @@
--
-- Baron Geddon: Ignite Mana isn't needed
DELETE FROM `spell_custom_attr` WHERE `entry`=19659;
-- Mana-Tombs: Death Coil must be negative
DELETE FROM `spell_custom_attr` WHERE `entry`=38065;
INSERT INTO `spell_custom_attr` (`entry`,`attributes`) VALUES
(38065,8192);

View File

@@ -3607,8 +3607,7 @@ bool _isPositiveEffectImpl(SpellInfo const* spellInfo, uint8 effIndex, std::unor
// non-positive aura use
switch (spellInfo->Effects[effIndex].ApplyAuraName)
{
case SPELL_AURA_MOD_DAMAGE_DONE: // dependent from basepoint sign (negative -> negative)
case SPELL_AURA_MOD_STAT:
case SPELL_AURA_MOD_STAT: // dependent from basepoint sign (negative -> negative)
case SPELL_AURA_MOD_SKILL:
case SPELL_AURA_MOD_DODGE_PERCENT:
case SPELL_AURA_MOD_HEALING_PCT:
@@ -3624,18 +3623,22 @@ bool _isPositiveEffectImpl(SpellInfo const* spellInfo, uint8 effIndex, std::unor
case SPELL_AURA_MOD_MELEE_RANGED_HASTE:
case SPELL_AURA_MOD_CASTING_SPEED_NOT_STACK:
case SPELL_AURA_HASTE_SPELLS:
case SPELL_AURA_MOD_RESISTANCE:
case SPELL_AURA_MOD_RESISTANCE_EXCLUSIVE:
case SPELL_AURA_MOD_DETECT_RANGE:
case SPELL_AURA_MOD_INCREASE_HEALTH_PERCENT:
case SPELL_AURA_MOD_TOTAL_STAT_PERCENTAGE:
case SPELL_AURA_MOD_INCREASE_SWIM_SPEED:
case SPELL_AURA_MOD_PERCENT_STAT:
case SPELL_AURA_MOD_INCREASE_HEALTH:
case SPELL_AURA_MOD_SPEED_ALWAYS:
if (bp < 0 || bpScalePerLevel < 0) //TODO: What if both are 0? Should it be a buff or debuff?
return false;
break;
case SPELL_AURA_MOD_ATTACKSPEED: // some buffs have negative bp, check both target and bp
case SPELL_AURA_MOD_MELEE_HASTE:
case SPELL_AURA_HASTE_RANGED:
case SPELL_AURA_MOD_DAMAGE_DONE:
case SPELL_AURA_MOD_RESISTANCE:
case SPELL_AURA_MOD_RESISTANCE_PCT:
case SPELL_AURA_MOD_RATING:
case SPELL_AURA_MOD_ATTACK_POWER:
@@ -3644,6 +3647,7 @@ bool _isPositiveEffectImpl(SpellInfo const* spellInfo, uint8 effIndex, std::unor
case SPELL_AURA_MOD_SPEED_SLOW_ALL:
case SPELL_AURA_MELEE_SLOW:
case SPELL_AURA_MOD_ATTACK_POWER_PCT:
case SPELL_AURA_MOD_HEALING_DONE_PERCENT:
if (!_isPositiveTarget(spellInfo, effIndex) || bp < 0)
return false;
break;
@@ -3722,6 +3726,18 @@ bool _isPositiveEffectImpl(SpellInfo const* spellInfo, uint8 effIndex, std::unor
case SPELL_AURA_DUMMY:
case SPELL_AURA_PERIODIC_DUMMY:
case SPELL_AURA_MOD_HEALING:
case SPELL_AURA_MOD_WEAPON_CRIT_PERCENT:
case SPELL_AURA_POWER_BURN:
case SPELL_AURA_MOD_COOLDOWN:
case SPELL_AURA_MOD_INCREASE_SPEED:
case SPELL_AURA_MOD_PARRY_PERCENT:
case SPELL_AURA_SET_VEHICLE_ID:
case SPELL_AURA_PERIODIC_ENERGIZE:
case SPELL_AURA_EFFECT_IMMUNITY:
case SPELL_AURA_OVERRIDE_CLASS_SCRIPTS:
case SPELL_AURA_MOD_SHAPESHIFT:
case SPELL_AURA_MOD_THREAT:
case SPELL_AURA_PROC_TRIGGER_SPELL_WITH_VALUE:
// check target for positive and negative spells
if (!_isPositiveTarget(spellInfo, effIndex))
return false;