aboutsummaryrefslogtreecommitdiff
path: root/src/server/game
diff options
context:
space:
mode:
authorShauren <shauren.trinity@gmail.com>2017-04-02 23:29:26 +0200
committerShauren <shauren.trinity@gmail.com>2017-04-02 23:29:26 +0200
commit2a8294031b9ec73f1f082bd0137d9431545808ff (patch)
tree5b81787abdc35730e480512a9e76fbf4cfa1fa34 /src/server/game
parentcbc8a0e4dd5590e053b059f68989127c484bdbf0 (diff)
Core/Spells: Removed most uses of SpellIcon to identify spells
Diffstat (limited to 'src/server/game')
-rw-r--r--src/server/game/Entities/Unit/StatSystem.cpp12
-rw-r--r--src/server/game/Entities/Unit/Unit.cpp175
-rw-r--r--src/server/game/Entities/Unit/Unit.h1
-rw-r--r--src/server/game/Spells/Auras/SpellAuraEffects.cpp37
-rw-r--r--src/server/game/Spells/Auras/SpellAuraEffects.h28
-rw-r--r--src/server/game/Spells/Auras/SpellAuras.cpp48
-rw-r--r--src/server/game/Spells/SpellEffects.cpp41
-rw-r--r--src/server/game/Spells/SpellInfo.cpp5
-rw-r--r--src/server/game/Spells/SpellMgr.cpp116
9 files changed, 67 insertions, 396 deletions
diff --git a/src/server/game/Entities/Unit/StatSystem.cpp b/src/server/game/Entities/Unit/StatSystem.cpp
index d64a4848581..fab73a76b40 100644
--- a/src/server/game/Entities/Unit/StatSystem.cpp
+++ b/src/server/game/Entities/Unit/StatSystem.cpp
@@ -960,18 +960,6 @@ bool Guardian::UpdateStats(Stats stat)
else
mod = 0.7f; // Default Owner's Strength scale
- // Check just if owner has Ravenous Dead since it's effect is not an aura
- AuraEffect const* aurEff = owner->GetAuraEffect(SPELL_AURA_MOD_TOTAL_STAT_PERCENTAGE, SPELLFAMILY_DEATHKNIGHT, 3010, 0);
- if (aurEff)
- {
- SpellInfo const* spellInfo = aurEff->GetSpellInfo(); // Then get the SpellProto and add the dummy effect value
- if (SpellEffectInfo const* effect = spellInfo->GetEffect(GetMap()->GetDifficultyID(), EFFECT_1))
- AddPct(mod, effect->CalcValue(owner)); // Ravenous Dead edits the original scale
- }
- // Glyph of the Ghoul
- aurEff = owner->GetAuraEffect(58686, 0);
- if (aurEff)
- mod += CalculatePct(1.0f, aurEff->GetAmount()); // Glyph of the Ghoul adds a flat value to the scale mod
ownersBonus = float(owner->GetStat(stat)) * mod;
value += ownersBonus;
}
diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp
index 870ec2dd233..98b66c1a7b1 100644
--- a/src/server/game/Entities/Unit/Unit.cpp
+++ b/src/server/game/Entities/Unit/Unit.cpp
@@ -4218,20 +4218,6 @@ AuraEffect* Unit::GetAuraEffectOfRankedSpell(uint32 spellId, uint8 effIndex, Obj
return NULL;
}
-AuraEffect* Unit::GetAuraEffect(AuraType type, SpellFamilyNames name, uint32 iconId, uint8 effIndex) const
-{
- AuraEffectList const& auras = GetAuraEffectsByType(type);
- for (Unit::AuraEffectList::const_iterator itr = auras.begin(); itr != auras.end(); ++itr)
- {
- if (effIndex != (*itr)->GetEffIndex())
- continue;
- SpellInfo const* spell = (*itr)->GetSpellInfo();
- if (spell->SpellIconID == iconId && spell->SpellFamilyName == uint32(name) && !spell->SpellFamilyFlags)
- return *itr;
- }
- return NULL;
-}
-
AuraEffect* Unit::GetAuraEffect(AuraType type, SpellFamilyNames family, flag128 const& familyFlag, ObjectGuid casterGUID) const
{
AuraEffectList const& auras = GetAuraEffectsByType(type);
@@ -6111,24 +6097,6 @@ bool Unit::HandleDummyAuraProc(Unit* victim, uint32 damage, AuraEffect* triggere
else
return false;
}
- // Threat of Thassarian
- if (dummySpell->SpellIconID == 2023)
- {
- // Must Dual Wield
- if (!procSpell || !haveOffhandWeapon())
- return false;
-
- switch (procSpell->Id)
- {
- case 49020: triggered_spell_id = 66198; break; // Obliterate
- case 49143: triggered_spell_id = 66196; break; // Frost Strike
- case 45462: triggered_spell_id = 66216; break; // Plague Strike
- case 49998: triggered_spell_id = 66188; break; // Death Strike
- default:
- return false;
- }
- break;
- }
// Runic Power Back on Snare/Root
if (dummySpell->Id == 61257)
{
@@ -7889,27 +7857,10 @@ float Unit::SpellDamagePctDone(Unit* victim, SpellInfo const* spellProto, Damage
switch (spellProto->SpellFamilyName)
{
case SPELLFAMILY_MAGE:
- // Ice Lance
- if (spellProto->SpellIconID == 186)
+ // Ice Lance (no unique family flag)
+ if (spellProto->Id == 228598)
if (victim->HasAuraState(AURA_STATE_FROZEN, spellProto, this))
- DoneTotalMod *= 2.0f;
-
- // Torment the weak
- if (spellProto->GetSchoolMask() & SPELL_SCHOOL_MASK_ARCANE)
- {
- if (victim->HasAuraWithMechanic((1<<MECHANIC_SNARE)|(1<<MECHANIC_SLOW_ATTACK)))
- {
- AuraEffectList const& mDumyAuras = GetAuraEffectsByType(SPELL_AURA_DUMMY);
- for (AuraEffectList::const_iterator i = mDumyAuras.begin(); i != mDumyAuras.end(); ++i)
- {
- if ((*i)->GetSpellInfo()->SpellIconID == 2215)
- {
- AddPct(DoneTotalMod, (*i)->GetAmount());
- break;
- }
- }
- }
- }
+ DoneTotalMod *= 3.0f;
break;
case SPELLFAMILY_PRIEST:
// Smite
@@ -7922,19 +7873,6 @@ float Unit::SpellDamagePctDone(Unit* victim, SpellInfo const* spellProto, Damage
}
break;
case SPELLFAMILY_WARLOCK:
- // Fire and Brimstone
- if (spellProto->SpellFamilyFlags[1] & 0x00020040)
- if (victim->HasAuraState(AURA_STATE_CONFLAGRATE))
- {
- AuraEffectList const& mDumyAuras = GetAuraEffectsByType(SPELL_AURA_DUMMY);
- for (AuraEffectList::const_iterator i = mDumyAuras.begin(); i != mDumyAuras.end(); ++i)
- if ((*i)->GetSpellInfo()->SpellIconID == 3173)
- {
- AddPct(DoneTotalMod, (*i)->GetAmount());
- break;
- }
- }
-
// Shadow Bite (30% increase from each dot)
if (spellProto->SpellFamilyFlags[1] & 0x00400000 && IsPet())
if (uint8 count = victim->GetDoTsByCaster(GetOwnerGUID()))
@@ -7974,20 +7912,11 @@ uint32 Unit::SpellDamageBonusTaken(Unit* caster, SpellInfo const* spellProto, ui
AddPct(TakenTotalMod, (*i)->GetAmount());
}
- //.. taken pct: dummy auras
- AuraEffectList const& mDummyAuras = GetAuraEffectsByType(SPELL_AURA_DUMMY);
- for (AuraEffectList::const_iterator i = mDummyAuras.begin(); i != mDummyAuras.end(); ++i)
- {
- switch ((*i)->GetSpellInfo()->SpellIconID)
- {
- // Cheat Death
- case 2109:
- if ((*i)->GetMiscValue() & SPELL_SCHOOL_MASK_NORMAL)
- AddPct(TakenTotalMod, (*i)->GetAmount());
- break;
- }
- }
- // Spells with SPELL_ATTR4_FIXED_DAMAGE should only benefit from mechanic damage mod auras.
+ if (AuraEffect const* cheatDeath = GetAuraEffect(45182, EFFECT_0))
+ if (cheatDeath->GetMiscValue() & SPELL_SCHOOL_MASK_NORMAL)
+ AddPct(TakenTotalMod, cheatDeath->GetAmount());
+
+ // Spells with SPELL_ATTR4_FIXED_DAMAGE should only benefit from mechanic damage mod auras.
if (!spellProto->HasAttribute(SPELL_ATTR4_FIXED_DAMAGE))
{
// get all auras from caster that allow the spell to ignore resistance (sanctified wrath)
@@ -8180,30 +8109,12 @@ float Unit::GetUnitSpellCriticalChance(Unit* victim, SpellInfo const* spellProto
// Custom crit by class
switch (spellProto->SpellFamilyName)
{
- case SPELLFAMILY_MAGE:
- // Glyph of Fire Blast
- if (spellProto->SpellFamilyFlags[0] == 0x2 && spellProto->SpellIconID == 12)
- if (victim->HasAuraWithMechanic((1 << MECHANIC_STUN) | (1 << MECHANIC_KNOCKOUT)))
- if (AuraEffect const* aurEff = GetAuraEffect(56369, EFFECT_0))
- crit_chance += aurEff->GetAmount();
- break;
case SPELLFAMILY_DRUID:
// Improved Faerie Fire
if (victim->HasAuraState(AURA_STATE_FAERIE_FIRE))
if (AuraEffect const* aurEff = GetDummyAuraEffect(SPELLFAMILY_DRUID, 109, 0))
crit_chance += aurEff->GetAmount();
- // cumulative effect - don't break
-
- // Starfire
- if (spellProto->SpellFamilyFlags[0] & 0x4 && spellProto->SpellIconID == 1485)
- {
- // Improved Insect Swarm
- if (AuraEffect const* aurEff = GetDummyAuraEffect(SPELLFAMILY_DRUID, 1771, 0))
- if (victim->GetAuraEffect(SPELL_AURA_PERIODIC_DAMAGE, SPELLFAMILY_DRUID, flag128(0x00000002, 0, 0)))
- crit_chance += aurEff->GetAmount();
- break;
- }
break;
case SPELLFAMILY_ROGUE:
// Shiv-applied poisons can't crit
@@ -8242,24 +8153,6 @@ float Unit::GetUnitSpellCriticalChance(Unit* victim, SpellInfo const* spellProto
break;
}
case SPELL_DAMAGE_CLASS_MELEE:
- if (victim)
- {
- // Custom crit by class
- switch (spellProto->SpellFamilyName)
- {
- case SPELLFAMILY_DRUID:
- // Rend and Tear - bonus crit chance for Ferocious Bite on bleeding targets
- if (spellProto->SpellFamilyFlags[0] & 0x00800000
- && spellProto->SpellIconID == 1680
- && victim->HasAuraState(AURA_STATE_BLEEDING))
- {
- if (AuraEffect const* rendAndTear = GetDummyAuraEffect(SPELLFAMILY_DRUID, 2859, 1))
- crit_chance += rendAndTear->GetAmount();
- break;
- }
- break;
- }
- }
/// Intentional fallback. Calculate critical strike chance for both Ranged and Melee spells
case SPELL_DAMAGE_CLASS_RANGED:
{
@@ -8909,25 +8802,8 @@ uint32 Unit::MeleeDamageBonusTaken(Unit* attacker, uint32 pdamage, WeaponAttackT
}
}
- // .. taken pct: dummy auras
- AuraEffectList const& mDummyAuras = GetAuraEffectsByType(SPELL_AURA_DUMMY);
- for (AuraEffectList::const_iterator i = mDummyAuras.begin(); i != mDummyAuras.end(); ++i)
- {
- switch ((*i)->GetSpellInfo()->SpellIconID)
- {
- // Cheat Death
- case 2109:
- if ((*i)->GetMiscValue() & SPELL_SCHOOL_MASK_NORMAL)
- {
- if (Player* player = ToPlayer())
- {
- float mod = player->GetRatingBonusValue(CR_RESILIENCE_PLAYER_DAMAGE) * (-8.0f);
- AddPct(TakenTotalMod, std::max(mod, float((*i)->GetAmount())));
- }
- }
- break;
- }
- }
+ if (AuraEffect const* cheatDeath = GetAuraEffect(45182, EFFECT_0))
+ AddPct(TakenTotalMod, cheatDeath->GetAmount());
if (attType != RANGED_ATTACK)
{
@@ -13071,26 +12947,21 @@ void Unit::Kill(Unit* victim, bool durabilityLoss)
bool spiritOfRedemption = false;
if (victim->GetTypeId() == TYPEID_PLAYER && victim->getClass() == CLASS_PRIEST)
{
- AuraEffectList const& dummyAuras = victim->GetAuraEffectsByType(SPELL_AURA_DUMMY);
- for (AuraEffectList::const_iterator itr = dummyAuras.begin(); itr != dummyAuras.end(); ++itr)
+ if (AuraEffect const* spiritOfRedemptionEffect = GetAuraEffect(20711, EFFECT_0))
{
- if ((*itr)->GetSpellInfo()->SpellIconID == 1654)
- {
- AuraEffect const* aurEff = *itr;
- // save value before aura remove
- uint32 ressSpellId = victim->GetUInt32Value(PLAYER_SELF_RES_SPELL);
- if (!ressSpellId)
- ressSpellId = victim->ToPlayer()->GetResurrectionSpellId();
- // Remove all expected to remove at death auras (most important negative case like DoT or periodic triggers)
- victim->RemoveAllAurasOnDeath();
- // restore for use at real death
- victim->SetUInt32Value(PLAYER_SELF_RES_SPELL, ressSpellId);
+ // save value before aura remove
+ uint32 ressSpellId = victim->GetUInt32Value(PLAYER_SELF_RES_SPELL);
+ if (!ressSpellId)
+ ressSpellId = victim->ToPlayer()->GetResurrectionSpellId();
+ // Remove all expected to remove at death auras (most important negative case like DoT or periodic triggers)
+ victim->RemoveAllAurasOnDeath();
+ // restore for use at real death
+ victim->SetUInt32Value(PLAYER_SELF_RES_SPELL, ressSpellId);
- // FORM_SPIRIT_OF_REDEMPTION and related auras
- victim->CastSpell(victim, 27827, true, NULL, aurEff);
- spiritOfRedemption = true;
- break;
- }
+ // FORM_SPIRIT_OF_REDEMPTION and related auras
+ victim->CastSpell(victim, 27827, true, NULL, spiritOfRedemptionEffect);
+ spiritOfRedemption = true;
+ break;
}
}
diff --git a/src/server/game/Entities/Unit/Unit.h b/src/server/game/Entities/Unit/Unit.h
index f7796d22908..686c367e918 100644
--- a/src/server/game/Entities/Unit/Unit.h
+++ b/src/server/game/Entities/Unit/Unit.h
@@ -1883,7 +1883,6 @@ class TC_GAME_API Unit : public WorldObject
AuraEffect* GetAuraEffect(uint32 spellId, uint8 effIndex, ObjectGuid casterGUID = ObjectGuid::Empty) const;
AuraEffect* GetAuraEffectOfRankedSpell(uint32 spellId, uint8 effIndex, ObjectGuid casterGUID = ObjectGuid::Empty) const;
- AuraEffect* GetAuraEffect(AuraType type, SpellFamilyNames name, uint32 iconId, uint8 effIndex) const; // spell mustn't have familyflags
AuraEffect* GetAuraEffect(AuraType type, SpellFamilyNames family, flag128 const& familyFlag, ObjectGuid casterGUID = ObjectGuid::Empty) const;
AuraEffect* GetDummyAuraEffect(SpellFamilyNames name, uint32 iconId, uint8 effIndex) const;
diff --git a/src/server/game/Spells/Auras/SpellAuraEffects.cpp b/src/server/game/Spells/Auras/SpellAuraEffects.cpp
index e3de268c89e..f77ba5c3596 100644
--- a/src/server/game/Spells/Auras/SpellAuraEffects.cpp
+++ b/src/server/game/Spells/Auras/SpellAuraEffects.cpp
@@ -1763,29 +1763,6 @@ void AuraEffect::HandleAuraModShapeshift(AuraApplication const* aurApp, uint8 mo
if (AuraEffect* dummy = target->GetAuraEffect(37324, 0))
target->CastSpell(target, 37325, true, NULL, dummy);
break;
- case FORM_BATTLE_STANCE:
- case FORM_DEFENSIVE_STANCE:
- case FORM_BERSERKER_STANCE:
- {
- int32 Rage_val = 0;
- // Stance mastery + Tactical mastery (both passive, and last have aura only in defense stance, but need apply at any stance switch)
- if (target->GetTypeId() == TYPEID_PLAYER)
- {
- PlayerSpellMap const& sp_list = target->ToPlayer()->GetSpellMap();
- for (PlayerSpellMap::const_iterator itr = sp_list.begin(); itr != sp_list.end(); ++itr)
- {
- if (itr->second->state == PLAYERSPELL_REMOVED || itr->second->disabled)
- continue;
-
- SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(itr->first);
- if (spellInfo && spellInfo->SpellFamilyName == SPELLFAMILY_WARRIOR && spellInfo->SpellIconID == 139)
- Rage_val += target->CalculateSpellDamage(target, spellInfo, 0) * 10;
- }
- }
- if (target->GetPower(POWER_RAGE) > Rage_val)
- target->SetPower(POWER_RAGE, Rage_val);
- break;
- }
default:
break;
}
@@ -5766,18 +5743,6 @@ void AuraEffect::HandlePeriodicDamageAurasTick(Unit* target, Unit* caster) const
damage = damageReductedArmor;
}
- // Curse of Agony damage-per-tick calculation
- if (GetSpellInfo()->SpellFamilyName == SPELLFAMILY_WARLOCK && (GetSpellInfo()->SpellFamilyFlags[0] & 0x400) && GetSpellInfo()->SpellIconID == 544)
- {
- uint32 totalTick = GetTotalTicks();
- // 1..4 ticks, 1/2 from normal tick damage
- if (m_tickNumber <= totalTick / 3)
- damage = damage/2;
- // 9..12 ticks, 3/2 from normal tick damage
- else if (m_tickNumber > totalTick * 2 / 3)
- damage += (damage+1)/2; // +1 prevent 0.5 damage possible lost at 1..4 ticks
- // 5..8 ticks have normal tick damage
- }
// There is a Chance to make a Soul Shard when Drain soul does damage
if (GetSpellInfo()->SpellFamilyName == SPELLFAMILY_WARLOCK && (GetSpellInfo()->SpellFamilyFlags[0] & 0x00004000))
{
@@ -6036,7 +6001,7 @@ void AuraEffect::HandlePeriodicHealAurasTick(Unit* target, Unit* caster) const
else
{
// Wild Growth = amount + (6 - 2*doneTicks) * ticks* amount / 100
- if (m_spellInfo->SpellFamilyName == SPELLFAMILY_DRUID && m_spellInfo->SpellIconID == 2864)
+ if (m_spellInfo->SpellFamilyName == SPELLFAMILY_DRUID && m_spellInfo->SpellFamilyFlags & flag128(0, 0x04000000, 0, 0))
{
int32 addition = int32(float(damage * GetTotalTicks()) * ((6-float(2*(GetTickNumber()-1)))/100));
diff --git a/src/server/game/Spells/Auras/SpellAuraEffects.h b/src/server/game/Spells/Auras/SpellAuraEffects.h
index 494884f355e..4c639f8a339 100644
--- a/src/server/game/Spells/Auras/SpellAuraEffects.h
+++ b/src/server/game/Spells/Auras/SpellAuraEffects.h
@@ -346,34 +346,12 @@ namespace Trinity
SpellInfo const* spellProtoA = aurEffA->GetSpellInfo();
SpellInfo const* spellProtoB = aurEffB->GetSpellInfo();
- // Wards
- if ((spellProtoA->SpellFamilyName == SPELLFAMILY_MAGE) ||
- (spellProtoA->SpellFamilyName == SPELLFAMILY_WARLOCK))
- if (spellProtoA->GetCategory() == 56)
- return true;
- if ((spellProtoB->SpellFamilyName == SPELLFAMILY_MAGE) ||
- (spellProtoB->SpellFamilyName == SPELLFAMILY_WARLOCK))
- if (spellProtoB->GetCategory() == 56)
- return false;
-
- // Sacred Shield
- if (spellProtoA->Id == 58597)
- return true;
- if (spellProtoB->Id == 58597)
- return false;
-
// Fel Blossom
if (spellProtoA->Id == 28527)
return true;
if (spellProtoB->Id == 28527)
return false;
- // Divine Aegis
- if (spellProtoA->Id == 47753)
- return true;
- if (spellProtoB->Id == 47753)
- return false;
-
// Ice Barrier
if (spellProtoA->GetCategory() == 471)
return true;
@@ -381,11 +359,9 @@ namespace Trinity
return false;
// Sacrifice
- if ((spellProtoA->SpellFamilyName == SPELLFAMILY_WARLOCK) &&
- (spellProtoA->SpellIconID == 693))
+ if (spellProtoA->Id == 7812)
return true;
- if ((spellProtoB->SpellFamilyName == SPELLFAMILY_WARLOCK) &&
- (spellProtoB->SpellIconID == 693))
+ if (spellProtoB->Id == 7812)
return false;
return false;
diff --git a/src/server/game/Spells/Auras/SpellAuras.cpp b/src/server/game/Spells/Auras/SpellAuras.cpp
index 8f902062a8e..d3291cb9006 100644
--- a/src/server/game/Spells/Auras/SpellAuras.cpp
+++ b/src/server/game/Spells/Auras/SpellAuras.cpp
@@ -1316,33 +1316,6 @@ void Aura::HandleAuraSpecificMods(AuraApplication const* aurApp, Unit* caster, b
}
}
break;
- case SPELLFAMILY_MAGE:
- if (!caster)
- break;
- switch (GetId())
- {
- case 12536: // Clearcasting
- case 12043: // Presence of Mind
- // Arcane Potency
- if (AuraEffect const* aurEff = caster->GetAuraEffect(SPELL_AURA_DUMMY, SPELLFAMILY_MAGE, 2120, 0))
- {
- uint32 spellId = 0;
-
- switch (aurEff->GetId())
- {
- case 31571: spellId = 57529; break;
- case 31572: spellId = 57531; break;
- default:
- TC_LOG_ERROR("spells", "Aura::HandleAuraSpecificMods: Unknown rank of Arcane Potency (%d) found", aurEff->GetId());
- }
- if (spellId)
- caster->CastSpell(caster, spellId, true);
- }
- break;
- default:
- break;
- }
- break;
case SPELLFAMILY_PRIEST:
if (!caster)
break;
@@ -1413,27 +1386,6 @@ void Aura::HandleAuraSpecificMods(AuraApplication const* aurApp, Unit* caster, b
break;
}
break;
- case SPELLFAMILY_WARLOCK:
- if (!caster)
- break;
- // Improved Fear
- if (GetSpellInfo()->SpellFamilyFlags[1] & 0x00000400)
- {
- if (AuraEffect* aurEff = caster->GetAuraEffect(SPELL_AURA_DUMMY, SPELLFAMILY_WARLOCK, 98, 0))
- {
- uint32 spellId = 0;
- switch (aurEff->GetId())
- {
- case 53759: spellId = 60947; break;
- case 53754: spellId = 60946; break;
- default:
- TC_LOG_ERROR("spells", "Aura::HandleAuraSpecificMods: Unknown rank of Improved Fear (%d) found", aurEff->GetId());
- }
- if (spellId)
- caster->CastSpell(target, spellId, true);
- }
- }
- break;
case SPELLFAMILY_PRIEST:
if (!caster)
break;
diff --git a/src/server/game/Spells/SpellEffects.cpp b/src/server/game/Spells/SpellEffects.cpp
index af1fc188256..e45218d0840 100644
--- a/src/server/game/Spells/SpellEffects.cpp
+++ b/src/server/game/Spells/SpellEffects.cpp
@@ -481,17 +481,6 @@ void Spell::EffectSchoolDMG(SpellEffIndex effIndex)
}
case SPELLFAMILY_WARLOCK:
{
- // Incinerate Rank 1 & 2
- if ((m_spellInfo->SpellFamilyFlags[1] & 0x000040) && m_spellInfo->SpellIconID == 2128)
- {
- // Incinerate does more dmg (dmg/6) if the target have Immolate debuff.
- // Check aura state for speed but aura state set not only for Immolate spell
- if (unitTarget->HasAuraState(AURA_STATE_CONFLAGRATE))
- {
- if (unitTarget->GetAuraEffect(SPELL_AURA_PERIODIC_DAMAGE, SPELLFAMILY_WARLOCK, flag128(0x4, 0, 0)))
- damage += damage / 6;
- }
- }
break;
}
case SPELLFAMILY_PRIEST:
@@ -3228,36 +3217,6 @@ void Spell::EffectScriptEffect(SpellEffIndex effIndex)
{
switch (m_spellInfo->Id)
{
- // Glyph of Scourge Strike
- case 69961:
- {
- Unit::AuraEffectList const &mPeriodic = unitTarget->GetAuraEffectsByType(SPELL_AURA_PERIODIC_DAMAGE);
- for (Unit::AuraEffectList::const_iterator i = mPeriodic.begin(); i != mPeriodic.end(); ++i)
- {
- AuraEffect const* aurEff = *i;
- SpellInfo const* spellInfo = aurEff->GetSpellInfo();
- // search our Blood Plague and Frost Fever on target
- if (spellInfo->SpellFamilyName == SPELLFAMILY_DEATHKNIGHT && spellInfo->SpellFamilyFlags[2] & 0x2 &&
- aurEff->GetCasterGUID() == m_caster->GetGUID())
- {
- uint32 countMin = aurEff->GetBase()->GetMaxDuration();
- uint32 countMax = spellInfo->GetMaxDuration();
-
- // this Glyph
- countMax += 9000;
- // talent Epidemic
- if (AuraEffect const* epidemic = m_caster->GetAuraEffect(SPELL_AURA_ADD_FLAT_MODIFIER, SPELLFAMILY_DEATHKNIGHT, 234, EFFECT_0))
- countMax += epidemic->GetAmount();
-
- if (countMin < countMax)
- {
- aurEff->GetBase()->SetDuration(aurEff->GetBase()->GetDuration() + 3000);
- aurEff->GetBase()->SetMaxDuration(countMin + 3000);
- }
- }
- }
- return;
- }
case 55693: // Remove Collapsing Cave Aura
if (!unitTarget)
return;
diff --git a/src/server/game/Spells/SpellInfo.cpp b/src/server/game/Spells/SpellInfo.cpp
index c92c9f499b5..0b6d46071e4 100644
--- a/src/server/game/Spells/SpellInfo.cpp
+++ b/src/server/game/Spells/SpellInfo.cpp
@@ -3086,11 +3086,6 @@ bool SpellInfo::_IsPositiveEffect(uint32 effIndex, bool deep) const
break;
}
break;
- case SPELLFAMILY_MAGE:
- // Ignite
- if (SpellIconID == 45)
- return true;
- break;
case SPELLFAMILY_PRIEST:
switch (Id)
{
diff --git a/src/server/game/Spells/SpellMgr.cpp b/src/server/game/Spells/SpellMgr.cpp
index 3686d41178f..f7d015cb248 100644
--- a/src/server/game/Spells/SpellMgr.cpp
+++ b/src/server/game/Spells/SpellMgr.cpp
@@ -56,39 +56,31 @@ DiminishingGroup GetDiminishingReturnsGroupForSpell(SpellInfo const* spellproto)
if (spellproto->IsPositive())
return DIMINISHING_NONE;
- for (SpellEffectInfo const* effect: spellproto->GetEffectsForDifficulty(DIFFICULTY_NONE))
- {
- if (effect && effect->ApplyAuraName == SPELL_AURA_MOD_TAUNT)
- return DIMINISHING_TAUNT;
+ if (spellproto->HasAura(DIFFICULTY_NONE, SPELL_AURA_MOD_TAUNT))
+ return DIMINISHING_TAUNT;
+
+ switch (spellproto->Id)
+ {
+ case 64803: // Entrapment
+ case 135373: // Entrapment
+ return DIMINISHING_ROOT;
+ case 24394: // Intimidation
+ return DIMINISHING_STUN;
+ case 118345: // Pulverize (Primal Earth Elemental)
+ return DIMINISHING_STUN;
+ case 118905: // Static Charge (Capacitor Totem)
+ return DIMINISHING_STUN;
+ case 108199: // Gorefiend's Grasp
+ return DIMINISHING_AOE_KNOCKBACK;
+ default:
+ break;
}
// Explicit Diminishing Groups
switch (spellproto->SpellFamilyName)
{
case SPELLFAMILY_GENERIC:
- {
- // Entrapment -- 135373
- if (spellproto->SpellIconID == 20 && spellproto->GetSpellVisual() == 39588)
- return DIMINISHING_ROOT;
-
- // Intimidation -- 24394
- if (spellproto->SpellIconID == 166 && spellproto->GetSpellVisual() == 2816)
- return DIMINISHING_STUN;
- // Pulverize (Primal Earth Elemental) -- 118345
- if (spellproto->SpellIconID == 4507 && spellproto->GetSpellVisual() == 39877)
- return DIMINISHING_STUN;
- // Static Charge (Capacitor Totem) -- 118905
- if (spellproto->SpellIconID == 54 && spellproto->GetSpellVisual() == 24442)
- return DIMINISHING_STUN;
- // Remorseless Winter -- 115001
- if (spellproto->SpellIconID == 5744 && spellproto->GetSpellVisual() == 23514)
- return DIMINISHING_STUN;
-
- // Gorefiend's Grasp -- 108199
- if (spellproto->SpellIconID == 5743 && spellproto->GetSpellVisual() == 28937)
- return DIMINISHING_AOE_KNOCKBACK;
break;
- }
case SPELLFAMILY_MAGE:
{
// Frostjaw -- 102051
@@ -149,9 +141,6 @@ DiminishingGroup GetDiminishingReturnsGroupForSpell(SpellInfo const* spellproto)
// Banish -- 710
if (spellproto->SpellFamilyFlags[1] & 0x8000000)
return DIMINISHING_INCAPACITATE;
- // Blood Horror -- 137143, no flags (17986)
- if (spellproto->SpellIconID == 6447 && spellproto->GetSpellVisual() == 26758)
- return DIMINISHING_INCAPACITATE;
// Fear -- 118699
if (spellproto->SpellFamilyFlags[1] & 0x400)
@@ -193,34 +182,30 @@ DiminishingGroup GetDiminishingReturnsGroupForSpell(SpellInfo const* spellproto)
// Mighty Bash -- 5211
if (spellproto->SpellFamilyFlags[0] & 0x2000)
return DIMINISHING_STUN;
- // Rake -- 163505 -- no flags on the stun, 20490
- if (spellproto->SpellIconID == 494 && spellproto->GetSpellVisual() == 38283)
+ // Rake -- 163505 -- no flags on the stun
+ if (spellproto->Id == 163505)
return DIMINISHING_STUN;
// Incapacitating Roar -- 99, no flags on the stun, 14
- if (spellproto->SpellIconID == 960 && spellproto->GetSpellVisual() == 38528)
+ if (spellproto->SpellFamilyFlags[1] 0x1)
return DIMINISHING_INCAPACITATE;
// Cyclone -- 33786
if (spellproto->SpellFamilyFlags[1] & 0x20)
return DIMINISHING_DISORIENT;
- // Glyph of Fae Silence -- 114238, no flags on the silence, 15035
- if (spellproto->SpellIconID == 957 && spellproto->SchoolMask == 8)
- return DIMINISHING_SILENCE;
-
// Typhoon -- 61391
if (spellproto->SpellFamilyFlags[1] & 0x1000000)
return DIMINISHING_AOE_KNOCKBACK;
- // Ursol's Vortex -- 127797, no flags on the effect, 16921
- if (spellproto->SpellIconID == 5784 && spellproto->SchoolMask == 8)
+ // Ursol's Vortex -- 118283, no family flags
+ if (spellproto->Id == 118283)
return DIMINISHING_AOE_KNOCKBACK;
// Entangling Roots -- 339
if (spellproto->SpellFamilyFlags[0] & 0x200)
return DIMINISHING_ROOT;
- // Mass Entanglement -- 102359, no flags on the root, 13535
- if (spellproto->SpellIconID == 5782 && spellproto->GetSpellVisual() == 38269)
+ // Mass Entanglement -- 102359
+ if (spellproto->SpellFamilyFlags[2] 0x4)
return DIMINISHING_ROOT;
// Faerie Fire -- 770, 20 seconds in PvP (6.0)
@@ -255,18 +240,15 @@ DiminishingGroup GetDiminishingReturnsGroupForSpell(SpellInfo const* spellproto)
}
case SPELLFAMILY_HUNTER:
{
- // Glyph of Explosive Trap -- 149575 maybe? @todo
- // return DIMINISHING_AOE_KNOCKBACK;
-
- // Charge (Tenacity pet) -- 53148, no flags (5526)
- if (spellproto->SpellIconID == 1559 && spellproto->GetSpellVisual() == 39480)
+ // Charge (Tenacity pet) -- 53148, no flags
+ if (spellproto->Id == 53148)
return DIMINISHING_ROOT;
- // Narrow Escape -- 136634, no flags (17964)
- if (spellproto->SpellIconID == 3342 && spellproto->SchoolMask == 8)
+ // Narrow Escape -- 136634, no flags
+ if (spellproto->Id == 136634)
return DIMINISHING_ROOT;
- // Binding Shot -- 117526, no flags (15581)
- if (spellproto->SpellIconID == 4612 && spellproto->GetSpellVisual() == 6859)
+ // Binding Shot -- 117526, no flags
+ if (spellproto->Id == 117526)
return DIMINISHING_STUN;
// Freezing Trap -- 3355
@@ -309,12 +291,10 @@ DiminishingGroup GetDiminishingReturnsGroupForSpell(SpellInfo const* spellproto)
// Thunderstorm -- 51490
if (spellproto->SpellFamilyFlags[1] & 0x2000)
return DIMINISHING_AOE_KNOCKBACK;
+
// Earthgrab Totem -- 64695
if (spellproto->SpellFamilyFlags[2] & 0x4000)
return DIMINISHING_ROOT;
- // Frost Shock (with Frozen Power) -- 63685, no flags (6918)
- if (spellproto->SpellIconID == 193 && spellproto->GetSpellVisual() == 39876)
- return DIMINISHING_ROOT;
break;
}
case SPELLFAMILY_DEATHKNIGHT:
@@ -323,30 +303,19 @@ DiminishingGroup GetDiminishingReturnsGroupForSpell(SpellInfo const* spellproto)
if (spellproto->SpellFamilyFlags[0] & 0x200)
return DIMINISHING_SILENCE;
- // Chains of Ice (with Chilblains) -- 96294, no flags (13020)
- if (spellproto->SpellIconID == 180 && spellproto->GetSpellVisual() == 20135)
- return DIMINISHING_ROOT;
-
// Asphyxiate -- 108194
if (spellproto->SpellFamilyFlags[2] & 0x100000)
return DIMINISHING_STUN;
- // Gnaw (Ghoul) -- 91800, no flags (12511)
- if (spellproto->SpellIconID == 3010 && spellproto->GetSpellVisual() == 38760)
+ // Gnaw (Ghoul) -- 91800, no flags
+ if (spellproto->Id == 91800)
return DIMINISHING_STUN;
- // Monstrous Blow (Ghoul w/ Dark Transformation active) -- 91797, no flags (12510)
- if (spellproto->SpellIconID == 15 && spellproto->GetSpellVisual() == 38761)
+ // Monstrous Blow (Ghoul w/ Dark Transformation active) -- 91797
+ if (spellproto->Id == 91797)
return DIMINISHING_STUN;
break;
}
case SPELLFAMILY_PRIEST:
{
- // Glyph of Mind Blast -- 87194, no flags (10092)
- if (spellproto->SpellIconID == 2114 && spellproto->GetSpellVisual() == 38927)
- return DIMINISHING_ROOT;
- // Void Tendrils -- 114404, no flags (15067)
- if (spellproto->SpellIconID == 5816 && spellproto->GetSpellVisual() == 25199)
- return DIMINISHING_ROOT;
-
// Dominate Mind -- 605
if (spellproto->SpellFamilyFlags[0] & 0x20000 && spellproto->GetSpellVisual() == 39068)
return DIMINISHING_INCAPACITATE;
@@ -368,8 +337,8 @@ DiminishingGroup GetDiminishingReturnsGroupForSpell(SpellInfo const* spellproto)
}
case SPELLFAMILY_MONK:
{
- // Disable -- 116706, no flags (15483)
- if (spellproto->SpellIconID == 23 && spellproto->GetSpellVisual() == 39984)
+ // Disable -- 116706, no flags
+ if (spellproto->Id == 116706)
return DIMINISHING_ROOT;
// Charging Ox Wave -- 119392
@@ -382,15 +351,12 @@ DiminishingGroup GetDiminishingReturnsGroupForSpell(SpellInfo const* spellproto)
if (spellproto->SpellFamilyFlags[1] & 0x200)
return DIMINISHING_STUN;
- // Glyph of Breath of Fire -- 123393, no flags (16504)
- if (spellproto->SpellIconID == 15 && spellproto->GetSpellVisual() == 25408)
+ // Incendiary Breath (honor talent) -- 202274, no flags
+ if (spellproto->Id == 202274)
return DIMINISHING_INCAPACITATE;
// Paralysis -- 115078
if (spellproto->SpellFamilyFlags[2] & 0x800000)
return DIMINISHING_INCAPACITATE;
- // Ring of Peace -- 137460, no flags (18006)
- if (spellproto->SpellIconID == 7195 && spellproto->GetSpellVisual() == 39999)
- return DIMINISHING_INCAPACITATE;
break;
}
default:
@@ -443,7 +409,7 @@ int32 GetDiminishingReturnsLimitDuration(SpellInfo const* spellproto)
case SPELLFAMILY_HUNTER:
{
// Binding Shot - 3 seconds in PvP (6.0)
- if (spellproto->SpellIconID == 4612 && spellproto->GetSpellVisual() == 6859)
+ if (spellproto->Id == 117526)
return 3 * IN_MILLISECONDS;
// Wyvern Sting - 6 seconds in PvP (6.0)
if (spellproto->SpellFamilyFlags[1] & 0x1000)