mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-16 23:50:44 +01:00
Core/Spells: Removed more deprecated spells code for Cataclysm
This commit is contained in:
@@ -5688,16 +5688,8 @@ bool Unit::HandleDummyAuraProc(Unit* victim, uint32 damage, AuraEffect* triggere
|
||||
if (!player)
|
||||
return false;
|
||||
|
||||
SpellCooldowns const cooldowns = player->GetSpellCooldowns();
|
||||
// remove cooldowns on all ranks of Frost Nova
|
||||
for (SpellCooldowns::const_iterator itr = cooldowns.begin(); itr != cooldowns.end(); ++itr)
|
||||
{
|
||||
SpellInfo const* cdSpell = sSpellMgr->GetSpellInfo(itr->first);
|
||||
// Frost Nova
|
||||
if (cdSpell && cdSpell->SpellFamilyName == SPELLFAMILY_MAGE
|
||||
&& cdSpell->SpellFamilyFlags[0] & 0x00000040)
|
||||
player->RemoveSpellCooldown(cdSpell->Id, true);
|
||||
}
|
||||
// Remove Frost Nova cooldown
|
||||
player->RemoveSpellCooldown(122, true);
|
||||
break;
|
||||
}
|
||||
// Blessing of Ancient Kings (Val'anyr, Hammer of Ancient Kings)
|
||||
@@ -6078,7 +6070,7 @@ bool Unit::HandleDummyAuraProc(Unit* victim, uint32 damage, AuraEffect* triggere
|
||||
if (procSpell->SpellIconID != 62)
|
||||
return false;
|
||||
|
||||
basepoints0 = int32(CalculatePctN(GetCreatePowers(POWER_MANA), triggerAmount) / 10);
|
||||
basepoints0 = int32(CalculatePctN(GetCreatePowers(POWER_MANA), triggerAmount) / 5);
|
||||
triggered_spell_id = 54833;
|
||||
target = this;
|
||||
break;
|
||||
@@ -6284,11 +6276,6 @@ bool Unit::HandleDummyAuraProc(Unit* victim, uint32 damage, AuraEffect* triggere
|
||||
{
|
||||
switch (dummySpell->Id)
|
||||
{
|
||||
case 56800: // Glyph of Backstab
|
||||
{
|
||||
triggered_spell_id = 63975;
|
||||
break;
|
||||
}
|
||||
case 32748: // Deadly Throw Interrupt
|
||||
{
|
||||
// Prevent cast Deadly Throw Interrupt on self from last effect (apply dummy) of Deadly Throw
|
||||
@@ -6312,27 +6299,13 @@ bool Unit::HandleDummyAuraProc(Unit* victim, uint32 damage, AuraEffect* triggere
|
||||
|
||||
switch (dummySpell->SpellIconID)
|
||||
{
|
||||
case 2116: // Quick Recovery
|
||||
{
|
||||
if (!procSpell)
|
||||
return false;
|
||||
|
||||
// energy cost save
|
||||
basepoints0 = CalculatePctN(int32(procSpell->ManaCost), triggerAmount);
|
||||
if (basepoints0 <= 0)
|
||||
return false;
|
||||
|
||||
target = this;
|
||||
triggered_spell_id = 31663;
|
||||
break;
|
||||
}
|
||||
case 2909: // Cut to the Chase
|
||||
{
|
||||
// "refresh your Slice and Dice duration to its 5 combo point maximum"
|
||||
// lookup Slice and Dice
|
||||
if (AuraEffect const* aur = GetAuraEffect(SPELL_AURA_MOD_MELEE_HASTE, SPELLFAMILY_ROGUE, 0x40000, 0, 0))
|
||||
if (Aura const* aur = GetAura(5171))
|
||||
{
|
||||
aur->GetBase()->SetDuration(aur->GetSpellInfo()->GetMaxDuration(), true);
|
||||
aur->SetDuration(aur->GetSpellInfo()->GetMaxDuration(), true);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
@@ -6351,8 +6324,7 @@ bool Unit::HandleDummyAuraProc(Unit* victim, uint32 damage, AuraEffect* triggere
|
||||
{
|
||||
case 267: // Improved Mend Pet
|
||||
{
|
||||
int32 chance = triggeredByAura->GetSpellInfo()->Effects[triggeredByAura->GetEffIndex()].CalcValue();
|
||||
if (!roll_chance_i(chance))
|
||||
if (!roll_chance_i(triggerAmount))
|
||||
return false;
|
||||
|
||||
triggered_spell_id = 24406;
|
||||
@@ -6363,23 +6335,7 @@ bool Unit::HandleDummyAuraProc(Unit* victim, uint32 damage, AuraEffect* triggere
|
||||
if (!procSpell)
|
||||
return false;
|
||||
|
||||
Spell* spell = ToPlayer()->m_spellModTakingSpell;
|
||||
|
||||
// Disable charge drop because of Lock and Load
|
||||
ToPlayer()->SetSpellModTakingSpell(spell, false);
|
||||
|
||||
// Explosive Shot
|
||||
if (procSpell->SpellFamilyFlags[2] & 0x200)
|
||||
{
|
||||
if (!victim)
|
||||
return false;
|
||||
if (AuraEffect const* pEff = victim->GetAuraEffect(SPELL_AURA_PERIODIC_DUMMY, SPELLFAMILY_HUNTER, 0x0, 0x80000000, 0x0, GetGUID()))
|
||||
basepoints0 = pEff->GetSpellInfo()->CalcPowerCost(this, SpellSchoolMask(pEff->GetSpellInfo()->SchoolMask)) * 4/10/3;
|
||||
}
|
||||
else
|
||||
basepoints0 = procSpell->CalcPowerCost(this, SpellSchoolMask(procSpell->SchoolMask)) * 4/10;
|
||||
|
||||
ToPlayer()->SetSpellModTakingSpell(spell, true);
|
||||
basepoints0 = CalculatePctN(procSpell->CalcPowerCost(this, SpellSchoolMask(procSpell->SchoolMask)), triggerAmount);
|
||||
|
||||
if (basepoints0 <= 0)
|
||||
return false;
|
||||
@@ -6388,38 +6344,15 @@ bool Unit::HandleDummyAuraProc(Unit* victim, uint32 damage, AuraEffect* triggere
|
||||
triggered_spell_id = 34720;
|
||||
break;
|
||||
}
|
||||
case 3406: // Hunting Party
|
||||
{
|
||||
triggered_spell_id = 57669;
|
||||
target = this;
|
||||
break;
|
||||
}
|
||||
case 3560: // Rapid Recuperation
|
||||
{
|
||||
// This effect only from Rapid Killing (mana regen)
|
||||
// This effect only from Rapid Killing (focus regen)
|
||||
if (!(procSpell->SpellFamilyFlags[1] & 0x01000000))
|
||||
return false;
|
||||
|
||||
target = this;
|
||||
|
||||
switch (dummySpell->Id)
|
||||
{
|
||||
case 53228: // Rank 1
|
||||
triggered_spell_id = 56654;
|
||||
break;
|
||||
case 53232: // Rank 2
|
||||
triggered_spell_id = 58882;
|
||||
break;
|
||||
}
|
||||
break;
|
||||
}
|
||||
case 3579: // Lock and Load
|
||||
{
|
||||
// Proc only from periodic (from trap activation proc another aura of this spell)
|
||||
if (!(procFlag & PROC_FLAG_DONE_PERIODIC) || !roll_chance_i(triggerAmount))
|
||||
return false;
|
||||
triggered_spell_id = 56453;
|
||||
target = this;
|
||||
triggered_spell_id = 58883;
|
||||
basepoints0 = CalculatePctN(GetMaxPower(POWER_FOCUS), triggerAmount);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -6434,17 +6367,12 @@ bool Unit::HandleDummyAuraProc(Unit* victim, uint32 damage, AuraEffect* triggere
|
||||
target = this;
|
||||
break;
|
||||
}
|
||||
case 57870: // Glyph of Mend Pet
|
||||
{
|
||||
victim->CastSpell(victim, 57894, true, NULL, NULL, GetGUID());
|
||||
return true;
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
case SPELLFAMILY_PALADIN:
|
||||
{
|
||||
// Seal of Righteousness - melee proc dummy (addition ${$MWS*(0.022*$AP+0.044*$SPH)} damage)
|
||||
// Seal of Righteousness - melee proc dummy (addition (MWS * (0.011 * AP.022 * holy spell power) * 100 / 100) damage)
|
||||
if (dummySpell->SpellFamilyFlags[0] & 0x8000000)
|
||||
{
|
||||
if (effIndex != 0)
|
||||
@@ -6453,7 +6381,7 @@ bool Unit::HandleDummyAuraProc(Unit* victim, uint32 damage, AuraEffect* triggere
|
||||
float ap = GetTotalAttackPowerValue(BASE_ATTACK);
|
||||
int32 holy = SpellBaseDamageBonusDone(SPELL_SCHOOL_MASK_HOLY) +
|
||||
victim->SpellBaseDamageBonusTaken(SPELL_SCHOOL_MASK_HOLY);
|
||||
basepoints0 = (int32)GetAttackTime(BASE_ATTACK) * int32(ap * 0.022f + 0.044f * holy) / 1000;
|
||||
basepoints0 = (int32)GetAttackTime(BASE_ATTACK) * int32(ap * 0.011f + 0.022f * holy) / 1000;
|
||||
break;
|
||||
}
|
||||
// Light's Beacon - Beacon of Light
|
||||
@@ -6470,8 +6398,22 @@ bool Unit::HandleDummyAuraProc(Unit* victim, uint32 damage, AuraEffect* triggere
|
||||
{
|
||||
if (beaconTarget->IsWithinLOSInMap(victim))
|
||||
{
|
||||
basepoints0 = damage;
|
||||
victim->CastCustomSpell(beaconTarget, 53654, &basepoints0, NULL, NULL, true);
|
||||
int32 percent = 0;
|
||||
switch (procSpell->Id)
|
||||
{
|
||||
case 85673: // Word of Glory
|
||||
case 20473: // Holy Shock
|
||||
case 19750: // Flash of Light
|
||||
case 82326: // Divine Light
|
||||
case 85222: // Light of Dawn
|
||||
percent = triggerAmount; // 50% heal from these spells
|
||||
break;
|
||||
case 635: // Holy Light
|
||||
percent = triggerAmount * 2; // 100% heal from Holy Light
|
||||
break;
|
||||
}
|
||||
basepoints0 = CalculatePctN(damage, percent);
|
||||
victim->CastCustomSpell(beaconTarget, 53652, &basepoints0, NULL, NULL, true);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@@ -6483,96 +6425,10 @@ bool Unit::HandleDummyAuraProc(Unit* victim, uint32 damage, AuraEffect* triggere
|
||||
{
|
||||
target = this;
|
||||
triggered_spell_id = 31930;
|
||||
// replenishment
|
||||
CastSpell(this, 57669, true, castItem, triggeredByAura);
|
||||
break;
|
||||
}
|
||||
// Sanctified Wrath
|
||||
if (dummySpell->SpellIconID == 3029)
|
||||
{
|
||||
triggered_spell_id = 57318;
|
||||
target = this;
|
||||
basepoints0 = triggerAmount;
|
||||
CastCustomSpell(target, triggered_spell_id, &basepoints0, &basepoints0, NULL, true, castItem, triggeredByAura);
|
||||
return true;
|
||||
}
|
||||
// Sacred Shield
|
||||
if (dummySpell->SpellFamilyFlags[1] & 0x80000)
|
||||
{
|
||||
if (procFlag & PROC_FLAG_TAKEN_SPELL_MAGIC_DMG_CLASS_POS)
|
||||
{
|
||||
if (procSpell->SpellFamilyName == SPELLFAMILY_PALADIN && (procSpell->SpellFamilyFlags[0] & 0x40000000))
|
||||
{
|
||||
basepoints0 = damage / 12;
|
||||
|
||||
if (basepoints0)
|
||||
CastCustomSpell(this, 66922, &basepoints0, NULL, NULL, true, 0, triggeredByAura, victim->GetGUID());
|
||||
|
||||
return true;
|
||||
}
|
||||
else
|
||||
return false;
|
||||
}
|
||||
else if (damage > 0)
|
||||
triggered_spell_id = 58597;
|
||||
|
||||
// Item - Paladin T8 Holy 4P Bonus
|
||||
if (Unit* caster = triggeredByAura->GetCaster())
|
||||
if (AuraEffect const* aurEff = caster->GetAuraEffect(64895, 0))
|
||||
cooldown = aurEff->GetAmount();
|
||||
|
||||
target = this;
|
||||
break;
|
||||
}
|
||||
// Righteous Vengeance
|
||||
if (dummySpell->SpellIconID == 3025)
|
||||
{
|
||||
// 4 damage tick
|
||||
basepoints0 = triggerAmount * damage / 400;
|
||||
triggered_spell_id = 61840;
|
||||
// Add remaining ticks to damage done
|
||||
basepoints0 += victim->GetRemainingPeriodicAmount(GetGUID(), triggered_spell_id, SPELL_AURA_PERIODIC_DAMAGE);
|
||||
break;
|
||||
}
|
||||
// Sheath of Light
|
||||
if (dummySpell->SpellIconID == 3030)
|
||||
{
|
||||
// 4 healing tick
|
||||
basepoints0 = triggerAmount * damage / 400;
|
||||
triggered_spell_id = 54203;
|
||||
break;
|
||||
}
|
||||
switch (dummySpell->Id)
|
||||
{
|
||||
// Heart of the Crusader
|
||||
case 20335: // rank 1
|
||||
triggered_spell_id = 21183;
|
||||
break;
|
||||
case 20336: // rank 2
|
||||
triggered_spell_id = 54498;
|
||||
break;
|
||||
case 20337: // rank 3
|
||||
triggered_spell_id = 54499;
|
||||
break;
|
||||
// Judgement of Light
|
||||
case 20185:
|
||||
{
|
||||
// 2% of base mana
|
||||
basepoints0 = int32(victim->CountPctFromMaxHealth(2));
|
||||
victim->CastCustomSpell(victim, 20267, &basepoints0, 0, 0, true, 0, triggeredByAura);
|
||||
return true;
|
||||
}
|
||||
// Judgement of Wisdom
|
||||
case 20186:
|
||||
{
|
||||
if (victim && victim->isAlive() && victim->getPowerType() == POWER_MANA)
|
||||
{
|
||||
// 2% of base mana
|
||||
basepoints0 = int32(CalculatePctN(victim->GetCreateMana(), 2));
|
||||
victim->CastCustomSpell(victim, 20268, &basepoints0, NULL, NULL, true, 0, triggeredByAura);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
// Holy Power (Redemption Armor set)
|
||||
case 28789:
|
||||
{
|
||||
@@ -6604,24 +6460,10 @@ bool Unit::HandleDummyAuraProc(Unit* victim, uint32 damage, AuraEffect* triggere
|
||||
}
|
||||
break;
|
||||
}
|
||||
case 25899: // Greater Blessing of Sanctuary
|
||||
case 20911: // Blessing of Sanctuary
|
||||
{
|
||||
target = this;
|
||||
switch (target->getPowerType())
|
||||
{
|
||||
case POWER_MANA:
|
||||
triggered_spell_id = 57319;
|
||||
break;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
}
|
||||
// Seal of Vengeance (damage calc on apply aura)
|
||||
// Seal of Truth (damage calc on apply aura)
|
||||
case 31801:
|
||||
{
|
||||
if (effIndex != 0) // effect 1, 2 used by seal unleashing code
|
||||
if (effIndex != 0) // effect 2 used by seal unleashing code
|
||||
return false;
|
||||
|
||||
// At melee attack or Hammer of the Righteous spell damage considered as melee attack
|
||||
@@ -6634,7 +6476,7 @@ bool Unit::HandleDummyAuraProc(Unit* victim, uint32 damage, AuraEffect* triggere
|
||||
|
||||
triggered_spell_id = 31803;
|
||||
|
||||
// On target with 5 stacks of Holy Vengeance direct damage is done
|
||||
// On target with 5 stacks of Censure direct damage is done
|
||||
if (Aura* aur = victim->GetAura(triggered_spell_id, GetGUID()))
|
||||
{
|
||||
if (aur->GetStackAmount() == 5)
|
||||
@@ -6650,61 +6492,13 @@ bool Unit::HandleDummyAuraProc(Unit* victim, uint32 damage, AuraEffect* triggere
|
||||
return false;
|
||||
break;
|
||||
}
|
||||
// Seal of Corruption
|
||||
case 53736:
|
||||
{
|
||||
if (effIndex != 0) // effect 1, 2 used by seal unleashing code
|
||||
return false;
|
||||
|
||||
// At melee attack or Hammer of the Righteous spell damage considered as melee attack
|
||||
bool stacker = !procSpell || procSpell->Id == 53595;
|
||||
// spells with SPELL_DAMAGE_CLASS_MELEE excluding Judgements
|
||||
bool damager = procSpell && procSpell->EquippedItemClass != -1;
|
||||
|
||||
if (!stacker && !damager)
|
||||
return false;
|
||||
|
||||
triggered_spell_id = 53742;
|
||||
|
||||
// On target with 5 stacks of Blood Corruption direct damage is done
|
||||
if (Aura* aur = victim->GetAura(triggered_spell_id, GetGUID()))
|
||||
{
|
||||
if (aur->GetStackAmount() == 5)
|
||||
{
|
||||
if (stacker)
|
||||
aur->RefreshDuration();
|
||||
CastSpell(victim, 53739, true);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
if (!stacker)
|
||||
return false;
|
||||
break;
|
||||
}
|
||||
// Spiritual Attunement
|
||||
case 31785:
|
||||
case 33776:
|
||||
{
|
||||
// if healed by another unit (victim)
|
||||
if (this == victim)
|
||||
return false;
|
||||
|
||||
// heal amount
|
||||
basepoints0 = int32(CalculatePctN(std::min(damage, GetMaxHealth() - GetHealth()), triggerAmount));
|
||||
target = this;
|
||||
|
||||
if (basepoints0)
|
||||
triggered_spell_id = 31786;
|
||||
break;
|
||||
}
|
||||
// Paladin Tier 6 Trinket (Ashtongue Talisman of Zeal)
|
||||
case 40470:
|
||||
{
|
||||
if (!procSpell)
|
||||
return false;
|
||||
|
||||
float chance;
|
||||
float chance;
|
||||
|
||||
// Flash of light/Holy light
|
||||
if (procSpell->SpellFamilyFlags[0] & 0xC0000000)
|
||||
@@ -6726,13 +6520,6 @@ bool Unit::HandleDummyAuraProc(Unit* victim, uint32 damage, AuraEffect* triggere
|
||||
|
||||
break;
|
||||
}
|
||||
// Glyph of Holy Light
|
||||
case 54937:
|
||||
{
|
||||
triggered_spell_id = 54968;
|
||||
basepoints0 = CalculatePctN(int32(damage), triggerAmount);
|
||||
break;
|
||||
}
|
||||
// Item - Paladin T8 Holy 2P Bonus
|
||||
case 64890:
|
||||
{
|
||||
@@ -10366,24 +10153,6 @@ uint32 Unit::SpellDamageBonusDone(Unit* victim, SpellInfo const* spellProto, uin
|
||||
AddPctN(DoneTotalMod, aurEff->GetAmount());
|
||||
}
|
||||
break;
|
||||
case SPELLFAMILY_PALADIN:
|
||||
// Judgement of Vengeance/Judgement of Corruption
|
||||
if ((spellProto->SpellFamilyFlags[1] & 0x400000) && spellProto->SpellIconID == 2292)
|
||||
{
|
||||
// Get stack of Holy Vengeance/Blood Corruption on the target added by caster
|
||||
uint32 stacks = 0;
|
||||
Unit::AuraEffectList const& auras = victim->GetAuraEffectsByType(SPELL_AURA_PERIODIC_DAMAGE);
|
||||
for (Unit::AuraEffectList::const_iterator itr = auras.begin(); itr != auras.end(); ++itr)
|
||||
if (((*itr)->GetId() == 31803 || (*itr)->GetId() == 53742) && (*itr)->GetCasterGUID() == GetGUID())
|
||||
{
|
||||
stacks = (*itr)->GetBase()->GetStackAmount();
|
||||
break;
|
||||
}
|
||||
// + 10% for each application of Holy Vengeance/Blood Corruption on the target
|
||||
if (stacks)
|
||||
AddPctU(DoneTotalMod, 10 * stacks);
|
||||
}
|
||||
break;
|
||||
case SPELLFAMILY_DRUID:
|
||||
// Thorns
|
||||
if (spellProto->SpellFamilyFlags[0] & 0x100)
|
||||
|
||||
Reference in New Issue
Block a user