aboutsummaryrefslogtreecommitdiff
path: root/src
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
parentcbc8a0e4dd5590e053b059f68989127c484bdbf0 (diff)
Core/Spells: Removed most uses of SpellIcon to identify spells
Diffstat (limited to 'src')
-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
-rw-r--r--src/server/scripts/Spells/spell_generic.cpp18
-rw-r--r--src/server/scripts/Spells/spell_item.cpp2
-rw-r--r--src/server/scripts/Spells/spell_mage.cpp308
-rw-r--r--src/server/scripts/Spells/spell_paladin.cpp68
-rw-r--r--src/server/scripts/Spells/spell_pet.cpp29
14 files changed, 88 insertions, 800 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)
diff --git a/src/server/scripts/Spells/spell_generic.cpp b/src/server/scripts/Spells/spell_generic.cpp
index 80774c37171..6557711a160 100644
--- a/src/server/scripts/Spells/spell_generic.cpp
+++ b/src/server/scripts/Spells/spell_generic.cpp
@@ -627,7 +627,7 @@ enum BreakShieldSpells
SPELL_BREAK_SHIELD_TRIGGER_UNK = 66480
};
-class spell_gen_break_shield: public SpellScriptLoader
+class spell_gen_break_shield : public SpellScriptLoader
{
public:
spell_gen_break_shield(const char* name) : SpellScriptLoader(name) { }
@@ -636,6 +636,11 @@ class spell_gen_break_shield: public SpellScriptLoader
{
PrepareSpellScript(spell_gen_break_shield_SpellScript);
+ bool Validate(SpellInfo const* spellInfo) override
+ {
+ return ValidateSpellInfo({ 62552, 62719, 64100, 66482 });
+ }
+
void HandleScriptEffect(SpellEffIndex effIndex)
{
Unit* target = GetHitUnit();
@@ -672,8 +677,7 @@ class spell_gen_break_shield: public SpellScriptLoader
{
if (Aura* aura = itr->second->GetBase())
{
- SpellInfo const* auraInfo = aura->GetSpellInfo();
- if (auraInfo && auraInfo->SpellIconID == 2007 && aura->HasEffectType(SPELL_AURA_MOD_DAMAGE_PERCENT_TAKEN))
+ if (aura->GetId() == 62552 || aura->GetId() == 62719 || aura->GetId() == 64100 || aura->GetId() == 66482)
{
aura->ModStackAmount(-1, AURA_REMOVE_BY_ENEMY_SPELL);
// Remove dummys from rider (Necessary for updating visual shields)
@@ -2008,6 +2012,11 @@ class spell_gen_mounted_charge: public SpellScriptLoader
{
PrepareSpellScript(spell_gen_mounted_charge_SpellScript);
+ bool Validate(SpellInfo const* spellInfo) override
+ {
+ return ValidateSpellInfo({ 62552, 62719, 64100, 66482 });
+ }
+
void HandleScriptEffect(SpellEffIndex effIndex)
{
Unit* target = GetHitUnit();
@@ -2048,8 +2057,7 @@ class spell_gen_mounted_charge: public SpellScriptLoader
{
if (Aura* aura = itr->second->GetBase())
{
- SpellInfo const* auraInfo = aura->GetSpellInfo();
- if (auraInfo && auraInfo->SpellIconID == 2007 && aura->HasEffectType(SPELL_AURA_MOD_DAMAGE_PERCENT_TAKEN))
+ if (aura->GetId() == 62552 || aura->GetId() == 62719 || aura->GetId() == 64100 || aura->GetId() == 66482)
{
aura->ModStackAmount(-1, AURA_REMOVE_BY_ENEMY_SPELL);
// Remove dummys from rider (Necessary for updating visual shields)
diff --git a/src/server/scripts/Spells/spell_item.cpp b/src/server/scripts/Spells/spell_item.cpp
index 85a6335b485..ad22ed56433 100644
--- a/src/server/scripts/Spells/spell_item.cpp
+++ b/src/server/scripts/Spells/spell_item.cpp
@@ -175,7 +175,7 @@ class spell_item_blessing_of_ancient_kings : public SpellScriptLoader
PreventDefaultAction();
int32 absorb = int32(CalculatePct(eventInfo.GetHealInfo()->GetHeal(), 15.0f));
- if (AuraEffect* protEff = eventInfo.GetProcTarget()->GetAuraEffect(SPELL_PROTECTION_OF_ANCIENT_KINGS, 0, eventInfo.GetActor()->GetGUID()))
+ if (AuraEffect* protEff = eventInfo.GetProcTarget()->GetAuraEffect(SPELL_PROTECTION_OF_ANCIENT_KINGS, EFFECT_0, eventInfo.GetActor()->GetGUID()))
{
// The shield can grow to a maximum size of 20,000 damage absorbtion
protEff->SetAmount(std::min<int32>(protEff->GetAmount() + absorb, 20000));
diff --git a/src/server/scripts/Spells/spell_mage.cpp b/src/server/scripts/Spells/spell_mage.cpp
index 1eb02d094e2..f375de663ff 100644
--- a/src/server/scripts/Spells/spell_mage.cpp
+++ b/src/server/scripts/Spells/spell_mage.cpp
@@ -36,20 +36,15 @@ enum MageSpells
SPELL_ARCANCE_POTENCY_TRIGGER_RANK_1 = 57529,
SPELL_ARCANCE_POTENCY_TRIGGER_RANK_2 = 57531,
SPELL_MAGE_BLAZING_BARRIER_TRIGGER = 235314,
- SPELL_MAGE_BLAZING_SPEED = 31643,
- SPELL_MAGE_BURNOUT = 29077,
SPELL_MAGE_COLD_SNAP = 11958,
SPELL_MAGE_CONJURE_REFRESHMENT = 116136,
SPELL_MAGE_CONJURE_REFRESHMENT_TABLE = 167145,
+ SPELL_MAGE_FINGERS_OF_FROST = 44544,
SPELL_MAGE_FOCUS_MAGIC_PROC = 54648,
SPELL_MAGE_FROST_NOVA = 122,
- SPELL_MAGE_FROST_WARDING_R1 = 11189,
- SPELL_MAGE_FROST_WARDING_TRIGGERED = 57776,
SPELL_MAGE_IMPROVED_POLYMORPH_RANK_1 = 11210,
SPELL_MAGE_IMPROVED_POLYMORPH_STUN_RANK_1 = 83046,
SPELL_MAGE_IMPROVED_POLYMORPH_MARKER = 87515,
- SPELL_MAGE_INCANTERS_ABSORBTION_R1 = 44394,
- SPELL_MAGE_INCANTERS_ABSORBTION_TRIGGERED = 44413,
SPELL_MAGE_IGNITE = 12654,
SPELL_MAGE_MASTER_OF_ELEMENTS_ENERGIZE = 29077,
SPELL_MAGE_PERMAFROST = 91394,
@@ -60,38 +55,17 @@ enum MageSpells
SPELL_MAGE_DRAGONHAWK_FORM = 32818,
SPELL_MAGE_WORGEN_FORM = 32819,
SPELL_MAGE_SHEEP_FORM = 32820,
- SPELL_MAGE_GLYPH_OF_ETERNAL_WATER = 70937,
- SPELL_MAGE_SUMMON_WATER_ELEMENTAL_PERMANENT = 70908,
- SPELL_MAGE_SUMMON_WATER_ELEMENTAL_TEMPORARY = 70907,
- SPELL_MAGE_GLYPH_OF_BLAST_WAVE = 62126,
-
- SPELL_MAGE_FLAMESTRIKE = 2120,
-
SPELL_MAGE_CONE_OF_COLD_AURA_R1 = 11190,
SPELL_MAGE_CONE_OF_COLD_AURA_R2 = 12489,
SPELL_MAGE_CONE_OF_COLD_TRIGGER_R1 = 83301,
SPELL_MAGE_CONE_OF_COLD_TRIGGER_R2 = 83302,
-
- SPELL_MAGE_IMPROVED_MANA_GEM_TRIGGERED = 83098,
-
SPELL_MAGE_RING_OF_FROST_SUMMON = 82676,
SPELL_MAGE_RING_OF_FROST_FREEZE = 82691,
SPELL_MAGE_RING_OF_FROST_DUMMY = 91264,
-
- SPELL_MAGE_FINGERS_OF_FROST = 44544,
SPELL_MAGE_TEMPORAL_DISPLACEMENT = 80354,
SPELL_PET_NETHERWINDS_FATIGUED = 160455,
};
-enum MageIcons
-{
- ICON_MAGE_SHATTER = 976,
- ICON_MAGE_IMPROVED_FLAMESTRIKE = 37,
- ICON_MAGE_IMPROVED_FREEZE = 94,
- ICON_MAGE_INCANTER_S_ABSORPTION = 2941,
- ICON_MAGE_IMPROVED_MANA_GEM = 1036
-};
-
enum MiscSpells
{
SPELL_HUNTER_INSANITY = 95809,
@@ -149,85 +123,6 @@ class spell_mage_arcane_potency : public SpellScriptLoader
}
};
-// Incanter's Absorbtion
-class spell_mage_incanters_absorbtion_base_AuraScript : public AuraScript
-{
- public:
- bool Validate(SpellInfo const* /*spellInfo*/) override
- {
- if (!sSpellMgr->GetSpellInfo(SPELL_MAGE_INCANTERS_ABSORBTION_TRIGGERED))
- return false;
- if (!sSpellMgr->GetSpellInfo(SPELL_MAGE_INCANTERS_ABSORBTION_R1))
- return false;
- return true;
- }
-
- void Trigger(AuraEffect* aurEff, DamageInfo& /*dmgInfo*/, uint32& absorbAmount)
- {
- Unit* target = GetTarget();
-
- if (AuraEffect* talentAurEff = target->GetAuraEffectOfRankedSpell(SPELL_MAGE_INCANTERS_ABSORBTION_R1, EFFECT_0))
- {
- int32 bp = CalculatePct(absorbAmount, talentAurEff->GetAmount());
- target->CastCustomSpell(target, SPELL_MAGE_INCANTERS_ABSORBTION_TRIGGERED, &bp, NULL, NULL, true, NULL, aurEff);
- }
- }
-};
-
-// 11113 - Blast Wave
-class spell_mage_blast_wave : public SpellScriptLoader
-{
- public:
- spell_mage_blast_wave() : SpellScriptLoader("spell_mage_blast_wave") { }
-
- class spell_mage_blast_wave_SpellScript : public SpellScript
- {
- PrepareSpellScript(spell_mage_blast_wave_SpellScript);
-
- bool Validate(SpellInfo const* /*spellInfo*/) override
- {
- if (!sSpellMgr->GetSpellInfo(SPELL_MAGE_FLAMESTRIKE))
- return false;
- return true;
- }
-
- void CountTargets(std::list<WorldObject*>& targetList)
- {
- _targetCount = targetList.size();
- }
-
- void HandleImprovedFlamestrike()
- {
- if (_targetCount >= 2)
- if (AuraEffect* aurEff = GetCaster()->GetAuraEffect(SPELL_AURA_DUMMY, SPELLFAMILY_MAGE, ICON_MAGE_IMPROVED_FLAMESTRIKE, EFFECT_0))
- if (roll_chance_i(aurEff->GetAmount()))
- {
- float x, y, z;
- WorldLocation const* loc = GetExplTargetDest();
- if (!loc)
- return;
-
- loc->GetPosition(x, y, z);
- GetCaster()->CastSpell(x, y, z, SPELL_MAGE_FLAMESTRIKE, true);
- }
- }
-
- void Register() override
- {
- OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_mage_blast_wave_SpellScript::CountTargets, EFFECT_0, TARGET_UNIT_DEST_AREA_ENEMY);
- AfterCast += SpellCastFn(spell_mage_blast_wave_SpellScript::HandleImprovedFlamestrike);
- }
-
- private:
- uint32 _targetCount = 0;
- };
-
- SpellScript* GetSpellScript() const override
- {
- return new spell_mage_blast_wave_SpellScript();
- }
-};
-
// 235313 - Blazing Barrier
class spell_mage_blazing_barrier : public SpellScriptLoader
{
@@ -391,71 +286,6 @@ public:
}
};
-// 543 - Fire War
-class spell_mage_fire_frost_ward : public SpellScriptLoader
-{
- public:
- spell_mage_fire_frost_ward() : SpellScriptLoader("spell_mage_fire_frost_ward") { }
-
- class spell_mage_fire_frost_ward_AuraScript : public spell_mage_incanters_absorbtion_base_AuraScript
- {
- PrepareAuraScript(spell_mage_fire_frost_ward_AuraScript);
-
- bool Validate(SpellInfo const* /*spellInfo*/) override
- {
- if (!sSpellMgr->GetSpellInfo(SPELL_MAGE_FROST_WARDING_TRIGGERED) ||
- !sSpellMgr->GetSpellInfo(SPELL_MAGE_FROST_WARDING_R1))
- return false;
- return true;
- }
-
- void CalculateAmount(AuraEffect const* /*aurEff*/, int32& amount, bool& canBeRecalculated)
- {
- canBeRecalculated = false;
- if (Unit* caster = GetCaster())
- {
- // +80.68% from sp bonus
- float bonus = 0.8068f;
-
- bonus *= caster->SpellBaseHealingBonusDone(GetSpellInfo()->GetSchoolMask());
- bonus *= caster->CalculateLevelPenalty(GetSpellInfo());
-
- amount += int32(bonus);
- }
- }
-
- void Absorb(AuraEffect* /*aurEff*/, DamageInfo& /*dmgInfo*/, uint32& /*absorbAmount*/)
- {
- /*Unit* target = GetTarget();
- if (AuraEffect* talentAurEff = target->GetAuraEffectOfRankedSpell(SPELL_MAGE_FROST_WARDING_R1, EFFECT_0))
- {
- int32 chance = talentAurEff->GetSpellInfo()->Effects[EFFECT_1].CalcValue(); // SPELL_EFFECT_DUMMY with NO_TARGET
-
- if (roll_chance_i(chance))
- {
- int32 bp = dmgInfo.GetDamage();
- dmgInfo.AbsorbDamage(bp);
- target->CastCustomSpell(target, SPELL_MAGE_FROST_WARDING_TRIGGERED, &bp, NULL, NULL, true, NULL, aurEff);
- absorbAmount = 0;
- PreventDefaultAction();
- }
- }*/
- }
-
- void Register() override
- {
- DoEffectCalcAmount += AuraEffectCalcAmountFn(spell_mage_fire_frost_ward_AuraScript::CalculateAmount, EFFECT_0, SPELL_AURA_SCHOOL_ABSORB);
- OnEffectAbsorb += AuraEffectAbsorbFn(spell_mage_fire_frost_ward_AuraScript::Absorb, EFFECT_0);
- AfterEffectAbsorb += AuraEffectAbsorbFn(spell_mage_fire_frost_ward_AuraScript::Trigger, EFFECT_0);
- }
- };
-
- AuraScript* GetAuraScript() const override
- {
- return new spell_mage_fire_frost_ward_AuraScript();
- }
-};
-
// 54646 - Focus Magic
class spell_mage_focus_magic : public SpellScriptLoader
{
@@ -754,77 +584,6 @@ class spell_mage_ignite : public SpellScriptLoader
}
};
-// 543 - Mage Ward
-/// Updated 4.3.4
-class spell_mage_mage_ward : public SpellScriptLoader
-{
- public:
- spell_mage_mage_ward() : SpellScriptLoader("spell_mage_mage_ward") { }
-
- class spell_mage_mage_ward_AuraScript : public AuraScript
- {
- PrepareAuraScript(spell_mage_mage_ward_AuraScript);
-
- void HandleAbsorb(AuraEffect* /*aurEff*/, DamageInfo & /*dmgInfo*/, uint32 & absorbAmount)
- {
- if (AuraEffect* aurEff = GetTarget()->GetAuraEffect(SPELL_AURA_DUMMY, SPELLFAMILY_GENERIC, ICON_MAGE_INCANTER_S_ABSORPTION, EFFECT_0))
- {
- int32 bp = CalculatePct(absorbAmount, aurEff->GetAmount());
- GetTarget()->CastCustomSpell(GetTarget(), SPELL_MAGE_INCANTERS_ABSORBTION_TRIGGERED, &bp, NULL, NULL, true);
- }
- }
-
- void Register() override
- {
- AfterEffectAbsorb += AuraEffectAbsorbFn(spell_mage_mage_ward_AuraScript::HandleAbsorb, EFFECT_0);
- }
- };
-
- AuraScript* GetAuraScript() const override
- {
- return new spell_mage_mage_ward_AuraScript();
- }
-};
-
-// 1463 - Mana Shield
-/// Updated 4.3.4
-class spell_mage_mana_shield : public SpellScriptLoader
-{
- public:
- spell_mage_mana_shield() : SpellScriptLoader("spell_mage_mana_shield") { }
-
- class spell_mage_mana_shield_AuraScript : public AuraScript
- {
- PrepareAuraScript(spell_mage_mana_shield_AuraScript);
-
- void HandleAbsorb(AuraEffect* /*aurEff*/, DamageInfo & /*dmgInfo*/, uint32 & absorbAmount)
- {
- if (AuraEffect* aurEff = GetTarget()->GetAuraEffect(SPELL_AURA_DUMMY, SPELLFAMILY_GENERIC, ICON_MAGE_INCANTER_S_ABSORPTION, EFFECT_0))
- {
- int32 bp = CalculatePct(absorbAmount, aurEff->GetAmount());
- GetTarget()->CastCustomSpell(GetTarget(), SPELL_MAGE_INCANTERS_ABSORBTION_TRIGGERED, &bp, NULL, NULL, true);
- }
- }
-
- void AfterRemove(AuraEffect const* /*aurEff*/, AuraEffectHandleModes /*mode*/)
- {
- if (GetTargetApplication()->GetRemoveMode() == AURA_REMOVE_BY_ENEMY_SPELL)
- GetTarget()->CastSpell(GetTarget(), SPELL_MAGE_INCANTERS_ABSORBTION_R1, true);
- }
-
- void Register() override
- {
- AfterEffectManaShield += AuraEffectManaShieldFn(spell_mage_mana_shield_AuraScript::HandleAbsorb, EFFECT_0);
- AfterEffectRemove += AuraEffectRemoveFn(spell_mage_mana_shield_AuraScript::AfterRemove, EFFECT_0, SPELL_AURA_MANA_SHIELD, AURA_EFFECT_HANDLE_REAL);
- }
- };
-
- AuraScript* GetAuraScript() const override
- {
- return new spell_mage_mana_shield_AuraScript();
- }
-};
-
// -29074 - Master of Elements
class spell_mage_master_of_elements : public SpellScriptLoader
{
@@ -1103,45 +862,6 @@ class spell_mage_prismatic_barrier : public SpellScriptLoader
}
};
-// 5405 - Replenish Mana (Mana Gem)
-/// Updated 4.3.4
-class spell_mage_replenish_mana : public SpellScriptLoader
-{
- public:
- spell_mage_replenish_mana() : SpellScriptLoader("spell_mage_replenish_mana") { }
-
- class spell_mage_replenish_mana_SpellScript : public SpellScript
- {
- PrepareSpellScript(spell_mage_replenish_mana_SpellScript);
-
- bool Validate(SpellInfo const* /*spellInfo*/) override
- {
- if (!sSpellMgr->GetSpellInfo(SPELL_MAGE_IMPROVED_MANA_GEM_TRIGGERED))
- return false;
- return true;
- }
-
- void HandleImprovedManaGem()
- {
- if (AuraEffect* aurEff = GetCaster()->GetAuraEffect(SPELL_AURA_DUMMY, SPELLFAMILY_MAGE, ICON_MAGE_IMPROVED_MANA_GEM, EFFECT_0))
- {
- int32 bp = CalculatePct(GetCaster()->GetMaxPower(POWER_MANA), aurEff->GetAmount());
- GetCaster()->CastCustomSpell(GetCaster(), SPELL_MAGE_IMPROVED_MANA_GEM_TRIGGERED, &bp, &bp, NULL, true);
- }
- }
-
- void Register() override
- {
- AfterCast += SpellCastFn(spell_mage_replenish_mana_SpellScript::HandleImprovedManaGem);
- }
- };
-
- SpellScript* GetSpellScript() const override
- {
- return new spell_mage_replenish_mana_SpellScript();
- }
-};
-
// 82676 - Ring of Frost
/// Updated 4.3.4
class spell_mage_ring_of_frost : public SpellScriptLoader
@@ -1381,7 +1101,6 @@ class spell_mage_trigger_chilled : public SpellScriptLoader
};
// 33395 Water Elemental's Freeze
-/// Updated 4.3.4
class spell_mage_water_elemental_freeze : public SpellScriptLoader
{
public:
@@ -1398,35 +1117,19 @@ class spell_mage_water_elemental_freeze : public SpellScriptLoader
return true;
}
- void CountTargets(std::list<WorldObject*>& targetList)
- {
- _didHit = !targetList.empty();
- }
-
void HandleImprovedFreeze()
{
- if (!_didHit)
- return;
-
Unit* owner = GetCaster()->GetOwner();
if (!owner)
return;
- if (AuraEffect* aurEff = owner->GetAuraEffect(SPELL_AURA_DUMMY, SPELLFAMILY_MAGE, ICON_MAGE_IMPROVED_FREEZE, EFFECT_0))
- {
- if (roll_chance_i(aurEff->GetAmount()))
- owner->CastCustomSpell(SPELL_MAGE_FINGERS_OF_FROST, SPELLVALUE_AURA_STACK, 2, owner, true);
- }
+ owner->CastSpell(owner, SPELL_MAGE_FINGERS_OF_FROST, true);
}
void Register() override
{
- OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_mage_water_elemental_freeze_SpellScript::CountTargets, EFFECT_0, TARGET_UNIT_DEST_AREA_ENEMY);
- AfterCast += SpellCastFn(spell_mage_water_elemental_freeze_SpellScript::HandleImprovedFreeze);
+ AfterHit += SpellHitFn(spell_mage_water_elemental_freeze_SpellScript::HandleImprovedFreeze);
}
-
- private:
- bool _didHit = false;
};
SpellScript* GetSpellScript() const override
@@ -1438,12 +1141,10 @@ class spell_mage_water_elemental_freeze : public SpellScriptLoader
void AddSC_mage_spell_scripts()
{
new spell_mage_arcane_potency();
- new spell_mage_blast_wave();
new spell_mage_blazing_barrier();
new spell_mage_cold_snap();
new spell_mage_cone_of_cold();
new spell_mage_conjure_refreshment();
- new spell_mage_fire_frost_ward();
new spell_mage_focus_magic();
new spell_mage_ice_barrier();
new spell_mage_ignite();
@@ -1451,15 +1152,12 @@ void AddSC_mage_spell_scripts()
new spell_mage_glyph_of_icy_veins();
new spell_mage_glyph_of_polymorph();
new spell_mage_living_bomb();
- new spell_mage_mage_ward();
- new spell_mage_mana_shield();
new spell_mage_master_of_elements();
new spell_mage_nether_vortex();
new spell_mage_permafrost();
new spell_mage_polymorph();
new spell_mage_polymorph_cast_visual();
new spell_mage_prismatic_barrier();
- new spell_mage_replenish_mana();
new spell_mage_ring_of_frost();
new spell_mage_ring_of_frost_freeze();
new spell_mage_time_warp();
diff --git a/src/server/scripts/Spells/spell_paladin.cpp b/src/server/scripts/Spells/spell_paladin.cpp
index 195ead6b4ab..56f90d612fd 100644
--- a/src/server/scripts/Spells/spell_paladin.cpp
+++ b/src/server/scripts/Spells/spell_paladin.cpp
@@ -30,7 +30,7 @@
enum PaladinSpells
{
- SPELL_PALADIN_AVENGERS_SHIELD = 31935,
+ SPELL_PALADIN_AVENGERS_SHIELD = 31935,
SPELL_PALADIN_AURA_MASTERY_IMMUNE = 64364,
SPELL_PALADIN_BEACON_OF_LIGHT = 53563,
SPELL_PALADIN_BEACON_OF_LIGHT_HEAL = 53652,
@@ -40,7 +40,6 @@ enum PaladinSpells
SPELL_PALADIN_BLESSING_OF_LOWER_CITY_SHAMAN = 37881,
SPELL_PALADIN_CONCENTRACTION_AURA = 19746,
SPELL_PALADIN_DIVINE_PURPOSE_PROC = 90174,
- SPELL_PALADIN_DIVINE_SACRIFICE = 64205,
SPELL_PALADIN_DIVINE_STEED_HUMAN = 221883,
SPELL_PALADIN_DIVINE_STEED_DRAENEI = 221887,
SPELL_PALADIN_DIVINE_STEED_BLOODELF = 221886,
@@ -49,35 +48,17 @@ enum PaladinSpells
SPELL_PALADIN_EYE_FOR_AN_EYE_RANK_1 = 9799,
SPELL_PALADIN_EYE_FOR_AN_EYE_DAMAGE = 25997,
SPELL_PALADIN_FORBEARANCE = 25771,
- SPELL_PALADIN_GLYPH_OF_SALVATION = 63225,
SPELL_PALADIN_HAND_OF_SACRIFICE = 6940,
- SPELL_PALADIN_HOLY_LIGHT = 635,
SPELL_PALADIN_HOLY_SHOCK_R1 = 20473,
SPELL_PALADIN_HOLY_SHOCK_R1_DAMAGE = 25912,
SPELL_PALADIN_HOLY_SHOCK_R1_HEALING = 25914,
SPELL_PALADIN_IMMUNE_SHIELD_MARKER = 61988,
- SPELL_PALADIN_IMPROVED_CONCENTRACTION_AURA = 63510,
- SPELL_PALADIN_IMPROVED_DEVOTION_AURA = 63514,
SPELL_PALADIN_ITEM_HEALING_TRANCE = 37706,
SPELL_PALADIN_JUDGEMENT_DAMAGE = 54158,
SPELL_PALADIN_RIGHTEOUS_DEFENSE_TAUNT = 31790,
- SPELL_PALADIN_SANCTIFIED_RETRIBUTION_AURA = 63531,
- SPELL_PALADIN_SANCTIFIED_RETRIBUTION_R1 = 31869,
SPELL_PALADIN_SANCTIFIED_WRATH = 57318,
SPELL_PALADIN_SANCTIFIED_WRATH_TALENT_R1 = 53375,
- SPELL_PALADIN_SEAL_OF_RIGHTEOUSNESS = 25742,
- SPELL_PALADIN_SWIFT_RETRIBUTION_R1 = 53379
-};
-
-enum MiscSpells
-{
- SPELL_GENERIC_ARENA_DAMPENING = 74410,
- SPELL_GENERIC_BATTLEGROUND_DAMPENING = 74411
-};
-
-enum PaladinSpellIcons
-{
- PALADIN_ICON_ID_RETRIBUTION_AURA = 555
+ SPELL_PALADIN_SEAL_OF_RIGHTEOUSNESS = 25742
};
enum PaladinSpellVisualKit
@@ -720,48 +701,6 @@ class spell_pal_holy_shock : public SpellScriptLoader
}
};
-// 63510 - Improved Concentraction Aura (Area Aura)
-// 63514 - Improved Devotion Aura (Area Aura)
-// 63531 - Sanctified Retribution (Area Aura)
-class spell_pal_improved_aura_effect : public SpellScriptLoader
-{
- public:
- spell_pal_improved_aura_effect(char const* name) : SpellScriptLoader(name) { }
-
- class spell_pal_improved_aura_effect_AuraScript : public AuraScript
- {
- PrepareAuraScript(spell_pal_improved_aura_effect_AuraScript);
-
- bool CheckAreaTarget(Unit* target)
- {
- Unit::AuraApplicationMap& appliedAuras = target->GetAppliedAuras();
- for (Unit::AuraApplicationMap::iterator itr = appliedAuras.begin(); itr != appliedAuras.end(); ++itr)
- {
- Aura const* aura = itr->second->GetBase();
- if (aura->GetSpellInfo()->GetSpellSpecific() == SPELL_SPECIFIC_AURA && aura->GetCasterGUID() == GetCasterGUID())
- {
- // Not allow for Retribution Aura (prevent stacking) - Retribution Aura Overflow and Retribution Aura has same spell effects
- if (GetSpellInfo()->Id == SPELL_PALADIN_SANCTIFIED_RETRIBUTION_AURA && aura->GetSpellInfo()->SpellIconID == PALADIN_ICON_ID_RETRIBUTION_AURA)
- return false;
- return true;
- }
- }
-
- return false;
- }
-
- void Register() override
- {
- DoCheckAreaTarget += AuraCheckAreaTargetFn(spell_pal_improved_aura_effect_AuraScript::CheckAreaTarget);
- }
- };
-
- AuraScript* GetAuraScript() const override
- {
- return new spell_pal_improved_aura_effect_AuraScript();
- }
-};
-
// 37705 - Healing Discount
class spell_pal_item_healing_discount : public SpellScriptLoader
{
@@ -1238,9 +1177,6 @@ void AddSC_paladin_spell_scripts()
new spell_pal_grand_crusader();
new spell_pal_hand_of_sacrifice();
new spell_pal_holy_shock();
- new spell_pal_improved_aura_effect("spell_pal_improved_concentraction_aura_effect");
- new spell_pal_improved_aura_effect("spell_pal_improved_devotion_aura_effect");
- new spell_pal_improved_aura_effect("spell_pal_sanctified_retribution_effect");
new spell_pal_item_healing_discount();
new spell_pal_judgement();
new spell_pal_lay_on_hands();
diff --git a/src/server/scripts/Spells/spell_pet.cpp b/src/server/scripts/Spells/spell_pet.cpp
index 7f50469679b..0915feb6100 100644
--- a/src/server/scripts/Spells/spell_pet.cpp
+++ b/src/server/scripts/Spells/spell_pet.cpp
@@ -67,7 +67,6 @@ enum DKPetCalculate
SPELL_DEATH_KNIGHT_PET_SCALING_03 = 61697,
SPELL_NIGHT_OF_THE_DEAD = 55620,
ENTRY_ARMY_OF_THE_DEAD_GHOUL = 24207,
- SPELL_DEATH_KNIGHT_GLYPH_OF_GHOUL = 58686,
};
enum ShamanPetCalculate
@@ -1458,17 +1457,7 @@ public:
{
if (Unit* owner = pet->GetOwner())
{
- float mod = 0.3f;
-
- // Ravenous Dead. Check just if owner has Ravenous Dead since it's effect is not an aura
- if (AuraEffect const* aurEff = owner->GetAuraEffect(SPELL_AURA_MOD_TOTAL_STAT_PERCENTAGE, SPELLFAMILY_DEATHKNIGHT, 3010, 0))
- mod += aurEff->GetSpellInfo()->GetEffect(EFFECT_1)->CalcValue()/100; // Ravenous Dead edits the original scale
-
- // Glyph of the Ghoul
- if (AuraEffect const* aurEff = owner->GetAuraEffect(SPELL_DEATH_KNIGHT_GLYPH_OF_GHOUL, 0))
- mod += aurEff->GetAmount()/100;
-
- float ownerBonus = float(owner->GetStat(STAT_STAMINA)) * mod;
+ float ownerBonus = float(owner->GetStat(STAT_STAMINA)) * 0.3f;
amount += ownerBonus;
}
}
@@ -1499,21 +1488,7 @@ public:
if (!owner)
return;
- float mod = 0.7f;
-
- // Ravenous Dead
- AuraEffect const* aurEff = NULL;
- // Check just if owner has Ravenous Dead since it's effect is not an aura
- aurEff = owner->GetAuraEffect(SPELL_AURA_MOD_TOTAL_STAT_PERCENTAGE, SPELLFAMILY_DEATHKNIGHT, 3010, 0);
- if (aurEff)
- {
- mod += CalculatePct(mod, aurEff->GetSpellInfo()->GetEffect(EFFECT_1)->CalcValue()); // 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
- float ownerBonus = float(owner->GetStat(STAT_STRENGTH)) * mod;
+ float ownerBonus = float(owner->GetStat(STAT_STRENGTH)) * 0.7f;
amount += ownerBonus;
}
}