mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-17 16:10:49 +01:00
*Remove hack from spell::cast.
--HG-- branch : trunk
This commit is contained in:
@@ -2150,48 +2150,17 @@ void Spell::cast(bool skipCheck)
|
||||
if(m_customAttr & SPELL_ATTR_CU_DIRECT_DAMAGE)
|
||||
CalculateDamageDoneForAllTargets();
|
||||
|
||||
switch(m_spellInfo->SpellFamilyName)
|
||||
if(m_spellInfo->SpellFamilyName)
|
||||
{
|
||||
case SPELLFAMILY_GENERIC:
|
||||
{
|
||||
if (m_spellInfo->Mechanic == MECHANIC_BANDAGE) // Bandages
|
||||
m_preCastSpell = 11196; // Recently Bandaged
|
||||
else if(m_spellInfo->SpellIconID == 1662 && m_spellInfo->AttributesEx & 0x20) // Blood Fury (Racial)
|
||||
m_preCastSpell = 23230; // Blood Fury - Healing Reduction
|
||||
break;
|
||||
}
|
||||
case SPELLFAMILY_MAGE:
|
||||
{
|
||||
if (m_spellInfo->SpellFamilyFlags[1] & 0x00000080) // Ice Block
|
||||
m_preCastSpell = 41425; // Hypothermia
|
||||
break;
|
||||
}
|
||||
case SPELLFAMILY_PRIEST:
|
||||
{
|
||||
if (m_spellInfo->Mechanic == MECHANIC_SHIELD &&
|
||||
m_spellInfo->SpellIconID == 566) // Power Word: Shield
|
||||
m_preCastSpell = 6788; // Weakened Soul
|
||||
if (m_spellInfo->Id == 47585) // Dispersion (transform)
|
||||
m_preCastSpell = 60069; // Dispersion (mana regen)
|
||||
break;
|
||||
}
|
||||
case SPELLFAMILY_PALADIN:
|
||||
{
|
||||
if (m_spellInfo->SpellFamilyFlags[0] & 0x400080) // Divine Shield, Divine Protection or Hand of Protection
|
||||
m_preCastSpell = 25771; // Forbearance
|
||||
break;
|
||||
}
|
||||
case SPELLFAMILY_SHAMAN:
|
||||
{
|
||||
if (m_spellInfo->Id == 2825) // Bloodlust
|
||||
m_preCastSpell = 57724; // Sated
|
||||
else if (m_spellInfo->Id == 32182) // Heroism
|
||||
m_preCastSpell = 57723; // Exhaustion
|
||||
break;
|
||||
}
|
||||
default:
|
||||
break;
|
||||
if (m_spellInfo->excludeCasterAuraSpell)
|
||||
m_preCastSpell = m_spellInfo->excludeCasterAuraSpell;
|
||||
else if (m_spellInfo->excludeTargetAuraSpell)
|
||||
m_preCastSpell = m_spellInfo->excludeTargetAuraSpell;
|
||||
}
|
||||
else if (m_spellInfo->Mechanic == MECHANIC_BANDAGE) // Bandages
|
||||
m_preCastSpell = 11196; // Recently Bandaged
|
||||
else if(m_spellInfo->SpellIconID == 1662 && m_spellInfo->AttributesEx & 0x20)
|
||||
m_preCastSpell = 23230; // Blood Fury - Healing Reduction
|
||||
|
||||
// traded items have trade slot instead of guid in m_itemTargetGUID
|
||||
// set to real guid to be sent later to the client
|
||||
|
||||
@@ -4943,7 +4943,7 @@ void Aura::HandleNoReagentUseAura(bool Apply, bool Real)
|
||||
flag96 mask;
|
||||
Unit::AuraList const& noReagent = m_target->GetAurasByType(SPELL_AURA_NO_REAGENT_USE);
|
||||
for(Unit::AuraList::const_iterator i = noReagent.begin(); i != noReagent.end(); ++i)
|
||||
mask = (*i)->m_spellProto->EffectSpellClassMask[(*i)->m_effIndex];
|
||||
mask |= (*i)->m_spellProto->EffectSpellClassMask[(*i)->m_effIndex];
|
||||
|
||||
m_target->SetUInt32Value(PLAYER_NO_REAGENT_COST_1 , mask[0]);
|
||||
m_target->SetUInt32Value(PLAYER_NO_REAGENT_COST_1+1, mask[1]);
|
||||
|
||||
@@ -346,8 +346,8 @@ inline bool IsElementalShield(SpellEntry const *spellInfo)
|
||||
{
|
||||
// family flags 10 (Lightning), 42 (Earth), 37 (Water), proc shield from T2 8 pieces bonus
|
||||
return (spellInfo->SpellFamilyFlags[1] & 0x420
|
||||
|| spellInfo->SpellFamilyFlags[0] & 0x00000400
|
||||
|| spellInfo->Id == 23552);
|
||||
|| spellInfo->SpellFamilyFlags[0] & 0x00000400)
|
||||
|| spellInfo->Id == 23552;
|
||||
}
|
||||
|
||||
inline bool IsExplicitDiscoverySpell(SpellEntry const *spellInfo)
|
||||
|
||||
Reference in New Issue
Block a user