*Fix a typo in prev commit

*Use flag96 instead of unit64+unit32.

--HG--
branch : trunk
This commit is contained in:
QAston
2009-02-02 17:01:56 +01:00
parent bb39eba6c7
commit c385b52997
16 changed files with 478 additions and 313 deletions
+1 -1
View File
@@ -565,7 +565,7 @@ void WorldSession::HandleGroupChangeSubGroupOpcode( WorldPacket & recv_data )
} }
// everything's fine, do it // everything's fine, do it
group->ChangeMembersGroup(movedPlayer), groupNr); group->ChangeMembersGroup(movedPlayer, groupNr);
} }
void WorldSession::HandleGroupAssistantOpcode( WorldPacket & recv_data ) void WorldSession::HandleGroupAssistantOpcode( WorldPacket & recv_data )
+13 -10
View File
@@ -17165,18 +17165,20 @@ void Player::AddSpellMod(SpellModifier* mod, bool apply)
{ {
uint16 Opcode= (mod->type == SPELLMOD_FLAT) ? SMSG_SET_FLAT_SPELL_MODIFIER : SMSG_SET_PCT_SPELL_MODIFIER; uint16 Opcode= (mod->type == SPELLMOD_FLAT) ? SMSG_SET_FLAT_SPELL_MODIFIER : SMSG_SET_PCT_SPELL_MODIFIER;
uint8 i=0;
flag96 _mask;
for(int eff=0;eff<96;++eff) for(int eff=0;eff<96;++eff)
{ {
uint64 _mask = 0; if ((eff!=0) && (eff%32==0))
uint64 _mask2= 0; i++;
if (eff<64) _mask = uint64(1) << (eff- 0);
else _mask2= uint64(1) << (eff-64); _mask[i] = uint32(1) << (eff-(32*i));
if ( mod->mask & _mask || mod->mask2 & _mask2) if ( mod->mask & _mask)
{ {
int32 val = 0; int32 val = 0;
for (SpellModList::iterator itr = m_spellMods[mod->op].begin(); itr != m_spellMods[mod->op].end(); ++itr) for (SpellModList::iterator itr = m_spellMods[mod->op].begin(); itr != m_spellMods[mod->op].end(); ++itr)
{ {
if ((*itr)->type == mod->type && ((*itr)->mask & _mask || (*itr)->mask2 & _mask2)) if ((*itr)->type == mod->type && (*itr)->mask & _mask )
val += (*itr)->value; val += (*itr)->value;
} }
val += apply ? mod->value : -(mod->value); val += apply ? mod->value : -(mod->value);
@@ -19190,10 +19192,11 @@ bool Player::CanNoReagentCast(SpellEntry const* spellInfo) const
return true; return true;
// Check no reagent use mask // Check no reagent use mask
uint64 noReagentMask_0_1 = GetUInt64Value(PLAYER_NO_REAGENT_COST_1); flag96 noReagentMask;
uint32 noReagentMask_2 = GetUInt64Value(PLAYER_NO_REAGENT_COST_1+2); noReagentMask[0] = GetUInt32Value(PLAYER_NO_REAGENT_COST_1);
if (spellInfo->SpellFamilyFlags & noReagentMask_0_1 || noReagentMask[1] = GetUInt32Value(PLAYER_NO_REAGENT_COST_1+1);
spellInfo->SpellFamilyFlags2 & noReagentMask_2) noReagentMask[2] = GetUInt32Value(PLAYER_NO_REAGENT_COST_1+2);
if (spellInfo->SpellFamilyFlags & noReagentMask)
return true; return true;
return false; return false;
+1 -2
View File
@@ -101,8 +101,7 @@ struct SpellModifier
SpellModType type : 8; SpellModType type : 8;
int16 charges : 16; int16 charges : 16;
int32 value; int32 value;
uint64 mask; flag96 mask;
uint64 mask2;
uint32 spellId; uint32 spellId;
Spell const* lastAffected; Spell const* lastAffected;
}; };
+14 -16
View File
@@ -669,23 +669,24 @@ void Spell::prepareDataForTriggerSystem()
switch (m_spellInfo->SpellFamilyName) switch (m_spellInfo->SpellFamilyName)
{ {
case SPELLFAMILY_MAGE: // Arcane Missles / Blizzard triggers need do it case SPELLFAMILY_MAGE: // Arcane Missles / Blizzard triggers need do it
if (m_spellInfo->SpellFamilyFlags & 0x0000000000200080LL) m_canTrigger = true; if (m_spellInfo->SpellFamilyFlags[0] & 0x200080) m_canTrigger = true;
break; break;
case SPELLFAMILY_WARLOCK: // For Hellfire Effect / Rain of Fire / Seed of Corruption triggers need do it case SPELLFAMILY_WARLOCK: // For Hellfire Effect / Rain of Fire / Seed of Corruption triggers need do it
if (m_spellInfo->SpellFamilyFlags & 0x0000800000000060LL) m_canTrigger = true; if (m_spellInfo->SpellFamilyFlags[1] & 0x00008000 || m_spellInfo->SpellFamilyFlags[0] & 0x00000060) m_canTrigger = true;
break; break;
case SPELLFAMILY_PRIEST: // For Penance heal/damage triggers need do it case SPELLFAMILY_PRIEST: // For Penance heal/damage triggers need do it
if (m_spellInfo->SpellFamilyFlags & 0x0001800000000000LL) m_canTrigger = true; if (m_spellInfo->SpellFamilyFlags[1] & 0x00018000) m_canTrigger = true;
break; break;
case SPELLFAMILY_ROGUE: // For poisons need do it case SPELLFAMILY_ROGUE: // For poisons need do it
if (m_spellInfo->SpellFamilyFlags & 0x000000101001E000LL) m_canTrigger = true; if (m_spellInfo->SpellFamilyFlags[1] & 0x00000010 || m_spellInfo->SpellFamilyFlags[0] & 0x1001E000) m_canTrigger = true;
break; break;
case SPELLFAMILY_HUNTER: // Hunter Rapid Killing/Explosive Trap Effect/Immolation Trap Effect/Frost Trap Aura/Snake Trap Effect/Explosive Shot case SPELLFAMILY_HUNTER: // Hunter Rapid Killing/Explosive Trap Effect/Immolation Trap Effect/Frost Trap Aura/Snake Trap Effect/Explosive Shot
if (m_spellInfo->SpellFamilyFlags & 0x0100200000000214LL || if (m_spellInfo->SpellFamilyFlags[1] & 0x01002000
m_spellInfo->SpellFamilyFlags2 & 0x200) m_canTrigger = true; || m_spellInfo->SpellFamilyFlags[0] & 0x00000214 ||
m_spellInfo->SpellFamilyFlags[2] & 0x200) m_canTrigger = true;
break; break;
case SPELLFAMILY_PALADIN: // For Judgements (all) / Holy Shock triggers need do it case SPELLFAMILY_PALADIN: // For Judgements (all) / Holy Shock triggers need do it
if (m_spellInfo->SpellFamilyFlags & 0x0001000900B80400LL) m_canTrigger = true; if (m_spellInfo->SpellFamilyFlags[1] & 0x00010009 || m_spellInfo->SpellFamilyFlags[0] & 0x00B80400) m_canTrigger = true;
break; break;
} }
} }
@@ -730,7 +731,7 @@ void Spell::prepareDataForTriggerSystem()
} }
// Hunter traps spells (for Entrapment trigger) // Hunter traps spells (for Entrapment trigger)
// Gives your Immolation Trap, Frost Trap, Explosive Trap, and Snake Trap .... // Gives your Immolation Trap, Frost Trap, Explosive Trap, and Snake Trap ....
if (m_spellInfo->SpellFamilyName == SPELLFAMILY_HUNTER && m_spellInfo->SpellFamilyFlags & 0x000020000000001CLL) if (m_spellInfo->SpellFamilyName == SPELLFAMILY_HUNTER && (m_spellInfo->SpellFamilyFlags[1] & 0x00002000 || m_spellInfo->SpellFamilyFlags[0] & 0x1C))
m_procAttacker |= PROC_FLAG_ON_TRAP_ACTIVATION; m_procAttacker |= PROC_FLAG_ON_TRAP_ACTIVATION;
} }
@@ -998,7 +999,7 @@ void Spell::DoAllEffectOnTarget(TargetInfo *target)
caster->DealSpellDamage(&damageInfo, true); caster->DealSpellDamage(&damageInfo, true);
// Judgement of Blood // Judgement of Blood
if (m_spellInfo->SpellFamilyName == SPELLFAMILY_PALADIN && m_spellInfo->SpellFamilyFlags & 0x0000000800000000LL && m_spellInfo->SpellIconID==153) if (m_spellInfo->SpellFamilyName == SPELLFAMILY_PALADIN && m_spellInfo->SpellFamilyFlags[1] & 0x00000008 && m_spellInfo->SpellIconID==153)
{ {
int32 damagePoint = damageInfo.damage * 33 / 100; int32 damagePoint = damageInfo.damage * 33 / 100;
m_caster->CastCustomSpell(m_caster, 32220, &damagePoint, NULL, NULL, true); m_caster->CastCustomSpell(m_caster, 32220, &damagePoint, NULL, NULL, true);
@@ -2157,7 +2158,7 @@ void Spell::cast(bool skipCheck)
} }
case SPELLFAMILY_MAGE: case SPELLFAMILY_MAGE:
{ {
if (m_spellInfo->SpellFamilyFlags&0x0000008000000000LL) // Ice Block if (m_spellInfo->SpellFamilyFlags[1] & 0x00000080) // Ice Block
m_preCastSpell = 41425; // Hypothermia m_preCastSpell = 41425; // Hypothermia
break; break;
} }
@@ -2172,7 +2173,7 @@ void Spell::cast(bool skipCheck)
} }
case SPELLFAMILY_PALADIN: case SPELLFAMILY_PALADIN:
{ {
if (m_spellInfo->SpellFamilyFlags&0x0000000000400080LL) // Divine Shield, Divine Protection or Hand of Protection if (m_spellInfo->SpellFamilyFlags[0] & 0x400080) // Divine Shield, Divine Protection or Hand of Protection
m_preCastSpell = 25771; // Forbearance m_preCastSpell = 25771; // Forbearance
break; break;
} }
@@ -3684,15 +3685,12 @@ uint8 Spell::CanCast(bool strict)
//Must be behind the target. //Must be behind the target.
if( m_spellInfo->AttributesEx2 == 0x100000 && (m_spellInfo->AttributesEx & 0x200) == 0x200 && target->HasInArc(M_PI, m_caster) if( m_spellInfo->AttributesEx2 == 0x100000 && (m_spellInfo->AttributesEx & 0x200) == 0x200 && target->HasInArc(M_PI, m_caster)
&& (m_spellInfo->SpellFamilyName != SPELLFAMILY_DRUID || m_spellInfo->SpellFamilyFlags != 0x0000000000020000LL))
{
//Exclusion for Pounce: Facing Limitation was removed in 2.0.1, but it still uses the same, old Ex-Flags //Exclusion for Pounce: Facing Limitation was removed in 2.0.1, but it still uses the same, old Ex-Flags
if( m_spellInfo->SpellFamilyName != SPELLFAMILY_DRUID || m_spellInfo->SpellFamilyFlags != 0x0000000000020000LL ) && (m_spellInfo->SpellFamilyName != SPELLFAMILY_DRUID || !m_spellInfo->SpellFamilyFlags.IsEqual(0x20000,0,0)))
{ {
SendInterrupted(2); SendInterrupted(2);
return SPELL_FAILED_NOT_BEHIND; return SPELL_FAILED_NOT_BEHIND;
} }
}
//Target must be facing you. //Target must be facing you.
if((m_spellInfo->Attributes == 0x150010) && !target->HasInArc(M_PI, m_caster) ) if((m_spellInfo->Attributes == 0x150010) && !target->HasInArc(M_PI, m_caster) )
@@ -5279,7 +5277,7 @@ bool Spell::CheckTargetCreatureType(Unit* target) const
uint32 spellCreatureTargetMask = m_spellInfo->TargetCreatureType; uint32 spellCreatureTargetMask = m_spellInfo->TargetCreatureType;
// Curse of Doom : not find another way to fix spell target check :/ // Curse of Doom : not find another way to fix spell target check :/
if(m_spellInfo->SpellFamilyName==SPELLFAMILY_WARLOCK && m_spellInfo->SpellFamilyFlags == 0x0200000000LL) if(m_spellInfo->SpellFamilyName==SPELLFAMILY_WARLOCK && m_spellInfo->SpellFamilyFlags.IsEqual(0,0x02,0))
{ {
// not allow cast at player // not allow cast at player
if(target->GetTypeId()==TYPEID_PLAYER) if(target->GetTypeId()==TYPEID_PLAYER)
+51 -93
View File
@@ -842,23 +842,23 @@ void Aura::_AddAura()
m_target->ModifyAuraState(AURA_STATE_JUDGEMENT, true); m_target->ModifyAuraState(AURA_STATE_JUDGEMENT, true);
// Conflagrate aura state on Immolate // Conflagrate aura state on Immolate
if (m_spellProto->SpellFamilyName == SPELLFAMILY_WARLOCK && m_spellProto->SpellFamilyFlags & 4) if (m_spellProto->SpellFamilyName == SPELLFAMILY_WARLOCK && m_spellProto->SpellFamilyFlags[0] & 4)
m_target->ModifyAuraState(AURA_STATE_IMMOLATE, true); m_target->ModifyAuraState(AURA_STATE_IMMOLATE, true);
// Faerie Fire (druid versions) // Faerie Fire (druid versions)
if (m_spellProto->SpellFamilyName == SPELLFAMILY_DRUID && m_spellProto->SpellFamilyFlags & 0x0000000000000400LL) if (m_spellProto->SpellFamilyName == SPELLFAMILY_DRUID && m_spellProto->SpellFamilyFlags[0] & 0x400)
m_target->ModifyAuraState(AURA_STATE_FAERIE_FIRE, true); m_target->ModifyAuraState(AURA_STATE_FAERIE_FIRE, true);
// Victorious // Victorious
if (m_spellProto->SpellFamilyName == SPELLFAMILY_WARRIOR && m_spellProto->SpellFamilyFlags & 0x0004000000000000LL) if (m_spellProto->SpellFamilyName == SPELLFAMILY_WARRIOR && m_spellProto->SpellFamilyFlags[1] & 0x00040000)
m_target->ModifyAuraState(AURA_STATE_WARRIOR_VICTORY_RUSH, true); m_target->ModifyAuraState(AURA_STATE_WARRIOR_VICTORY_RUSH, true);
// Swiftmend state on Regrowth & Rejuvenation // Swiftmend state on Regrowth & Rejuvenation
if (m_spellProto->SpellFamilyName == SPELLFAMILY_DRUID && m_spellProto->SpellFamilyFlags & 0x50 ) if (m_spellProto->SpellFamilyName == SPELLFAMILY_DRUID && m_spellProto->SpellFamilyFlags[0] & 0x50 )
m_target->ModifyAuraState(AURA_STATE_SWIFTMEND, true); m_target->ModifyAuraState(AURA_STATE_SWIFTMEND, true);
// Deadly poison aura state // Deadly poison aura state
if(m_spellProto->SpellFamilyName == SPELLFAMILY_ROGUE && m_spellProto->SpellFamilyFlags & 0x10000) if(m_spellProto->SpellFamilyName == SPELLFAMILY_ROGUE && m_spellProto->SpellFamilyFlags[0] & 0x10000)
m_target->ModifyAuraState(AURA_STATE_DEADLY_POISON, true); m_target->ModifyAuraState(AURA_STATE_DEADLY_POISON, true);
// Enrage aura state // Enrage aura state
@@ -945,25 +945,25 @@ void Aura::_RemoveAura()
removeState = AURA_STATE_JUDGEMENT; // Update Seals information removeState = AURA_STATE_JUDGEMENT; // Update Seals information
break; break;
case SPELLFAMILY_WARLOCK: case SPELLFAMILY_WARLOCK:
if(m_spellProto->SpellFamilyFlags & 4) if(m_spellProto->SpellFamilyFlags[0] & 4)
removeState = AURA_STATE_IMMOLATE; // Conflagrate aura state removeState = AURA_STATE_IMMOLATE; // Conflagrate aura state
break; break;
case SPELLFAMILY_DRUID: case SPELLFAMILY_DRUID:
if(m_spellProto->SpellFamilyFlags & 0x0000000000000400LL) if(m_spellProto->SpellFamilyFlags[0] & 0x400)
removeState = AURA_STATE_FAERIE_FIRE; // Faerie Fire (druid versions) removeState = AURA_STATE_FAERIE_FIRE; // Faerie Fire (druid versions)
else if(m_spellProto->SpellFamilyFlags & 0x50) else if(m_spellProto->SpellFamilyFlags[0] & 0x50)
removeState = AURA_STATE_SWIFTMEND; // Swiftmend aura state removeState = AURA_STATE_SWIFTMEND; // Swiftmend aura state
break; break;
case SPELLFAMILY_WARRIOR: case SPELLFAMILY_WARRIOR:
if(m_spellProto->SpellFamilyFlags & 0x0004000000000000LL) if(m_spellProto->SpellFamilyFlags[1] & 0x00040000)
removeState = AURA_STATE_WARRIOR_VICTORY_RUSH; // Victorious removeState = AURA_STATE_WARRIOR_VICTORY_RUSH; // Victorious
break; break;
case SPELLFAMILY_ROGUE: case SPELLFAMILY_ROGUE:
if(m_spellProto->SpellFamilyFlags & 0x10000) if(m_spellProto->SpellFamilyFlags[0] & 0x10000)
removeState = AURA_STATE_DEADLY_POISON; // Deadly poison aura state removeState = AURA_STATE_DEADLY_POISON; // Deadly poison aura state
break; break;
case SPELLFAMILY_HUNTER: case SPELLFAMILY_HUNTER:
if(m_spellProto->SpellFamilyFlags & 0x1000000000000000LL) if(m_spellProto->SpellFamilyFlags[1] & 0x10000000)
removeState = AURA_STATE_FAERIE_FIRE; // Sting (hunter versions) removeState = AURA_STATE_FAERIE_FIRE; // Sting (hunter versions)
} }
@@ -1082,10 +1082,7 @@ bool Aura::isAffectedOnSpell(SpellEntry const *spell) const
if (spell->SpellFamilyName != m_spellProto->SpellFamilyName) if (spell->SpellFamilyName != m_spellProto->SpellFamilyName)
return false; return false;
// Check EffectClassMask // Check EffectClassMask
uint32 const *ptr = getAuraSpellClassMask(); if (m_spellProto->EffectSpellClassMask[m_effIndex] & spell->SpellFamilyFlags)
if (((uint64*)ptr)[0] & spell->SpellFamilyFlags)
return true;
if (ptr[2] & spell->SpellFamilyFlags2)
return true; return true;
return false; return false;
} }
@@ -1124,35 +1121,19 @@ void Aura::HandleAddModifier(bool apply, bool Real)
mod->type = SpellModType(m_modifier.m_auraname); // SpellModType value == spell aura types mod->type = SpellModType(m_modifier.m_auraname); // SpellModType value == spell aura types
mod->spellId = GetId(); mod->spellId = GetId();
uint32 const *ptr; flag96 const *spellAffect = spellmgr.GetSpellAffect(GetId(), m_effIndex);
SpellAffectEntry const *spellAffect = spellmgr.GetSpellAffect(GetId(), m_effIndex); if (!spellAffect)
if (spellAffect) spellAffect = &m_spellProto->EffectSpellClassMask[m_effIndex];
ptr = &spellAffect->SpellClassMask[0]; mod->mask = *spellAffect;
else
{
switch (m_effIndex)
{
case 0: ptr = &m_spellProto->EffectSpellClassMaskA[0]; break;
case 1: ptr = &m_spellProto->EffectSpellClassMaskB[0]; break;
case 2: ptr = &m_spellProto->EffectSpellClassMaskC[0]; break;
default:
return;
}
}
mod->mask = (uint64)ptr[0] | (uint64)ptr[1]<<32;
mod->mask2= (uint64)ptr[2];
mod->charges = m_procCharges; mod->charges = m_procCharges;
m_spellmod = mod; m_spellmod = mod;
} }
uint64 spellFamilyMask = m_spellmod->mask;
((Player*)m_target)->AddSpellMod(m_spellmod, apply); ((Player*)m_target)->AddSpellMod(m_spellmod, apply);
// reapply some passive spells after add/remove related spellmods // reapply some passive spells after add/remove related spellmods
if(m_spellProto->SpellFamilyName==SPELLFAMILY_WARRIOR && (spellFamilyMask & 0x0000100000000000LL)) if(m_spellProto->SpellFamilyName==SPELLFAMILY_WARRIOR && (m_spellmod->mask[1] & 0x00001000))
{ {
m_target->RemoveAurasDueToSpell(45471); m_target->RemoveAurasDueToSpell(45471);
@@ -1170,24 +1151,11 @@ void Aura::HandleAddTargetTrigger(bool apply, bool Real)
SpellModifier *mod = new SpellModifier; SpellModifier *mod = new SpellModifier;
mod->spellId = GetId(); mod->spellId = GetId();
uint32 const *ptr; flag96 const *spellAffect = spellmgr.GetSpellAffect(GetId(), m_effIndex);
SpellAffectEntry const *spellAffect = spellmgr.GetSpellAffect(GetId(), m_effIndex); if (!spellAffect)
if (spellAffect) spellAffect = &m_spellProto->EffectSpellClassMask[m_effIndex];
ptr = &spellAffect->SpellClassMask[0];
else
{
switch (m_effIndex)
{
case 0: ptr = &m_spellProto->EffectSpellClassMaskA[0]; break;
case 1: ptr = &m_spellProto->EffectSpellClassMaskB[0]; break;
case 2: ptr = &m_spellProto->EffectSpellClassMaskC[0]; break;
default:
return;
}
}
mod->mask = (uint64)ptr[0] | (uint64)ptr[1]<<32; mod->mask = *spellAffect;
mod->mask2= (uint64)ptr[2];
m_spellmod = mod; m_spellmod = mod;
} }
else else
@@ -1804,7 +1772,7 @@ void Aura::TriggerSpell()
{ {
SpellEntry const* spell = itr->second->GetSpellProto(); SpellEntry const* spell = itr->second->GetSpellProto();
if( spell->SpellFamilyName == SPELLFAMILY_SHAMAN && if( spell->SpellFamilyName == SPELLFAMILY_SHAMAN &&
spell->SpellFamilyFlags & 0x0000000000000400L) spell->SpellFamilyFlags[0] & 0x400)
return; return;
} }
target->RemoveAurasDueToSpell(28820); target->RemoveAurasDueToSpell(28820);
@@ -1982,7 +1950,7 @@ void Aura::HandleAuraDummy(bool apply, bool Real)
} }
// Earth Shield // Earth Shield
if ( caster && GetSpellProto()->SpellFamilyName == SPELLFAMILY_SHAMAN && (GetSpellProto()->SpellFamilyFlags & 0x40000000000LL)) if ( caster && GetSpellProto()->SpellFamilyName == SPELLFAMILY_SHAMAN && (GetSpellProto()->SpellFamilyFlags[1] & 0x400))
{ {
// prevent double apply bonuses // prevent double apply bonuses
if(m_target->GetTypeId()!=TYPEID_PLAYER || !((Player*)m_target)->GetSession()->PlayerLoading()) if(m_target->GetTypeId()!=TYPEID_PLAYER || !((Player*)m_target)->GetSession()->PlayerLoading())
@@ -2058,14 +2026,14 @@ void Aura::HandleAuraDummy(bool apply, bool Real)
{ {
// Stop caster Arcane Missle chanelling on death // Stop caster Arcane Missle chanelling on death
if (m_spellProto->SpellFamilyName == SPELLFAMILY_MAGE && if (m_spellProto->SpellFamilyName == SPELLFAMILY_MAGE &&
m_spellProto->SpellFamilyFlags&0x0000000000000800LL) m_spellProto->SpellFamilyFlags[0] & 0x800)
{ {
caster->InterruptSpell(CURRENT_CHANNELED_SPELL); caster->InterruptSpell(CURRENT_CHANNELED_SPELL);
return; return;
} }
// Stop caster Penance chanelling on death // Stop caster Penance chanelling on death
if (m_spellProto->SpellFamilyName == SPELLFAMILY_PRIEST && if (m_spellProto->SpellFamilyName == SPELLFAMILY_PRIEST &&
m_spellProto->SpellFamilyFlags2 & 0x00000080) m_spellProto->SpellFamilyFlags[2] & 0x00000080)
{ {
caster->InterruptSpell(CURRENT_CHANNELED_SPELL); caster->InterruptSpell(CURRENT_CHANNELED_SPELL);
return; return;
@@ -2165,8 +2133,7 @@ void Aura::HandleAuraDummy(bool apply, bool Real)
mod->value = m_modifier.m_amount; mod->value = m_modifier.m_amount;
mod->type = SPELLMOD_PCT; mod->type = SPELLMOD_PCT;
mod->spellId = GetId(); mod->spellId = GetId();
mod->mask = 0x0000000200000000LL; mod->mask[1] = 0x00000002;
mod->mask2= 0LL;
m_spellmod = mod; m_spellmod = mod;
} }
((Player*)m_target)->AddSpellMod(m_spellmod, apply); ((Player*)m_target)->AddSpellMod(m_spellmod, apply);
@@ -2177,7 +2144,7 @@ void Aura::HandleAuraDummy(bool apply, bool Real)
case SPELLFAMILY_DRUID: case SPELLFAMILY_DRUID:
{ {
// Lifebloom // Lifebloom
if ( GetSpellProto()->SpellFamilyFlags & 0x1000000000LL ) if ( GetSpellProto()->SpellFamilyFlags[1] & 0x10 )
{ {
if ( apply ) if ( apply )
{ {
@@ -2229,8 +2196,7 @@ void Aura::HandleAuraDummy(bool apply, bool Real)
mod->value = m_modifier.m_amount/7; mod->value = m_modifier.m_amount/7;
mod->type = SPELLMOD_FLAT; mod->type = SPELLMOD_FLAT;
mod->spellId = GetId(); mod->spellId = GetId();
mod->mask = 0x001000000000LL; mod->mask[1] = 0x0010;
mod->mask2= 0LL;
m_spellmod = mod; m_spellmod = mod;
} }
@@ -2253,8 +2219,7 @@ void Aura::HandleAuraDummy(bool apply, bool Real)
mod->value = m_modifier.m_amount; mod->value = m_modifier.m_amount;
mod->type = SPELLMOD_FLAT; mod->type = SPELLMOD_FLAT;
mod->spellId = GetId(); mod->spellId = GetId();
mod->mask = 0x4000000000000LL; mod->mask[1] = 0x40000;
mod->mask2= 0LL;
m_spellmod = mod; m_spellmod = mod;
} }
@@ -2279,12 +2244,10 @@ void Aura::HandleAuraDummy(bool apply, bool Real)
switch (m_effIndex) switch (m_effIndex)
{ {
case 0: case 0:
mod->mask = 0x00200000000LL; // Windfury Totem mod->mask[1] = 0x002; // Windfury Totem
mod->mask2= 0LL;
break; break;
case 1: case 1:
mod->mask = 0x00400000000LL; // Flametongue Totem mod->mask[1] = 0x004; // Flametongue Totem
mod->mask2= 0LL;
break; break;
} }
@@ -4032,7 +3995,7 @@ void Aura::HandlePeriodicDamage(bool apply, bool Real)
case SPELLFAMILY_WARRIOR: case SPELLFAMILY_WARRIOR:
{ {
// Rend // Rend
if (m_spellProto->SpellFamilyFlags & 0x0000000000000020LL) if (m_spellProto->SpellFamilyFlags[0] & 0x20)
{ {
// $0.2*(($MWB+$mwb)/2+$AP/14*$MWS) bonus per tick // $0.2*(($MWB+$mwb)/2+$AP/14*$MWS) bonus per tick
float ap = caster->GetTotalAttackPowerValue(BASE_ATTACK); float ap = caster->GetTotalAttackPowerValue(BASE_ATTACK);
@@ -4047,21 +4010,21 @@ void Aura::HandlePeriodicDamage(bool apply, bool Real)
case SPELLFAMILY_DRUID: case SPELLFAMILY_DRUID:
{ {
// Rake // Rake
if (m_spellProto->SpellFamilyFlags & 0x0000000000001000LL) if (m_spellProto->SpellFamilyFlags[0] & 0x1000)
{ {
// $AP*0.06 bonus per tick // $AP*0.06 bonus per tick
m_modifier.m_amount += int32(caster->GetTotalAttackPowerValue(BASE_ATTACK) * 6 / 100); m_modifier.m_amount += int32(caster->GetTotalAttackPowerValue(BASE_ATTACK) * 6 / 100);
return; return;
} }
// Lacerate // Lacerate
if (m_spellProto->SpellFamilyFlags & 0x000000010000000000LL) if (m_spellProto->SpellFamilyFlags[1] & 0x0000000100)
{ {
// $AP*0.05/5 bonus per tick // $AP*0.05/5 bonus per tick
m_modifier.m_amount += int32(caster->GetTotalAttackPowerValue(BASE_ATTACK) / 100); m_modifier.m_amount += int32(caster->GetTotalAttackPowerValue(BASE_ATTACK) / 100);
return; return;
} }
// Rip // Rip
if (m_spellProto->SpellFamilyFlags & 0x000000000000800000LL) if (m_spellProto->SpellFamilyFlags[1] & 0x800000)
{ {
// 0.01*$AP*cp // 0.01*$AP*cp
if (caster->GetTypeId() != TYPEID_PLAYER) if (caster->GetTypeId() != TYPEID_PLAYER)
@@ -4083,7 +4046,7 @@ void Aura::HandlePeriodicDamage(bool apply, bool Real)
return; return;
} }
// Lock Jaw // Lock Jaw
if (m_spellProto->SpellFamilyFlags & 0x1000000000000000LL) if (m_spellProto->SpellFamilyFlags[1] & 0x10000000)
{ {
// 0.15*$AP // 0.15*$AP
m_modifier.m_amount += int32(caster->GetTotalAttackPowerValue(BASE_ATTACK) * 15 / 100); m_modifier.m_amount += int32(caster->GetTotalAttackPowerValue(BASE_ATTACK) * 15 / 100);
@@ -4094,7 +4057,7 @@ void Aura::HandlePeriodicDamage(bool apply, bool Real)
case SPELLFAMILY_ROGUE: case SPELLFAMILY_ROGUE:
{ {
// Rupture // Rupture
if (m_spellProto->SpellFamilyFlags & 0x000000000000100000LL) if (m_spellProto->SpellFamilyFlags[0] & 0x100000)
{ {
if (caster->GetTypeId() != TYPEID_PLAYER) if (caster->GetTypeId() != TYPEID_PLAYER)
return; return;
@@ -4110,14 +4073,14 @@ void Aura::HandlePeriodicDamage(bool apply, bool Real)
return; return;
} }
// Garrote // Garrote
if (m_spellProto->SpellFamilyFlags & 0x000000000000000100LL) if (m_spellProto->SpellFamilyFlags[0] & 0x100)
{ {
// $AP*0.07 bonus per tick // $AP*0.07 bonus per tick
m_modifier.m_amount += int32(caster->GetTotalAttackPowerValue(BASE_ATTACK) * 7 / 100); m_modifier.m_amount += int32(caster->GetTotalAttackPowerValue(BASE_ATTACK) * 7 / 100);
return; return;
} }
// Deadly Poison // Deadly Poison
if (m_spellProto->SpellFamilyFlags & 0x0000000000010000) if (m_spellProto->SpellFamilyFlags[0] & 0x10000)
{ {
// 0.08*$AP / 4 * amount of stack // 0.08*$AP / 4 * amount of stack
m_modifier.m_amount += int32(caster->GetTotalAttackPowerValue(BASE_ATTACK) * 2 * GetStackAmount() / 100); m_modifier.m_amount += int32(caster->GetTotalAttackPowerValue(BASE_ATTACK) * 2 * GetStackAmount() / 100);
@@ -4128,14 +4091,14 @@ void Aura::HandlePeriodicDamage(bool apply, bool Real)
case SPELLFAMILY_HUNTER: case SPELLFAMILY_HUNTER:
{ {
// Serpent Sting // Serpent Sting
if (m_spellProto->SpellFamilyFlags & 0x0000000000004000LL) if (m_spellProto->SpellFamilyFlags[0] & 0x4000)
{ {
// $RAP*0.1/5 bonus per tick // $RAP*0.1/5 bonus per tick
m_modifier.m_amount += int32(caster->GetTotalAttackPowerValue(RANGED_ATTACK) * 10 / 500); m_modifier.m_amount += int32(caster->GetTotalAttackPowerValue(RANGED_ATTACK) * 10 / 500);
return; return;
} }
// Immolation Trap // Immolation Trap
if (m_spellProto->SpellFamilyFlags & 0x0000000000000004LL && m_spellProto->SpellIconID == 678) if (m_spellProto->SpellFamilyFlags[0] & 0x4 && m_spellProto->SpellIconID == 678)
{ {
// $RAP*0.1/5 bonus per tick // $RAP*0.1/5 bonus per tick
m_modifier.m_amount += int32(caster->GetTotalAttackPowerValue(RANGED_ATTACK) * 10 / 500); m_modifier.m_amount += int32(caster->GetTotalAttackPowerValue(RANGED_ATTACK) * 10 / 500);
@@ -4977,15 +4940,10 @@ void Aura::HandleNoReagentUseAura(bool Apply, bool Real)
return; return;
if(m_target->GetTypeId() != TYPEID_PLAYER) if(m_target->GetTypeId() != TYPEID_PLAYER)
return; return;
uint32 mask[3] = {0, 0, 0}; flag96 mask;
Unit::AuraList const& noReagent = m_target->GetAurasByType(SPELL_AURA_NO_REAGENT_USE); Unit::AuraList const& noReagent = m_target->GetAurasByType(SPELL_AURA_NO_REAGENT_USE);
for(Unit::AuraList::const_iterator i = noReagent.begin(); i != noReagent.end(); ++i) for(Unit::AuraList::const_iterator i = noReagent.begin(); i != noReagent.end(); ++i)
{ mask = (*i)->m_spellProto->EffectSpellClassMask[(*i)->m_effIndex];
uint32 const *ptr = (*i)->getAuraSpellClassMask();
mask[0]|=ptr[0];
mask[1]|=ptr[1];
mask[2]|=ptr[2];
}
m_target->SetUInt32Value(PLAYER_NO_REAGENT_COST_1 , mask[0]); m_target->SetUInt32Value(PLAYER_NO_REAGENT_COST_1 , mask[0]);
m_target->SetUInt32Value(PLAYER_NO_REAGENT_COST_1+1, mask[1]); m_target->SetUInt32Value(PLAYER_NO_REAGENT_COST_1+1, mask[1]);
@@ -5335,7 +5293,7 @@ void Aura::HandleSpiritOfRedemption( bool apply, bool Real )
void Aura::CleanupTriggeredSpells() void Aura::CleanupTriggeredSpells()
{ {
if (m_spellProto->SpellFamilyName == SPELLFAMILY_WARRIOR && m_spellProto->SpellFamilyFlags & 0x0000001000000020LL) if (m_spellProto->SpellFamilyName == SPELLFAMILY_WARRIOR && m_spellProto->SpellFamilyFlags[1] & 0x00000010 || m_spellProto->SpellFamilyFlags[0] & 0x00000020)
{ {
// Blood Frenzy remove // Blood Frenzy remove
m_target->RemoveAurasDueToSpell(30069); m_target->RemoveAurasDueToSpell(30069);
@@ -5384,7 +5342,7 @@ void Aura::HandleSchoolAbsorb(bool apply, bool Real)
} }
break; break;
case SPELLFAMILY_MAGE: case SPELLFAMILY_MAGE:
if(m_spellProto->SpellFamilyFlags == 0x80100 || m_spellProto->SpellFamilyFlags == 0x8 || m_spellProto->SpellFamilyFlags == 0x100000000LL) if(m_spellProto->SpellFamilyFlags.IsEqual(0x80100) || m_spellProto->SpellFamilyFlags.IsEqual(0x8) || m_spellProto->SpellFamilyFlags.IsEqual(0,0x1))
{ {
//frost ward, fire ward, ice barrier //frost ward, fire ward, ice barrier
//+10% from +spd bonus //+10% from +spd bonus
@@ -5393,7 +5351,7 @@ void Aura::HandleSchoolAbsorb(bool apply, bool Real)
} }
break; break;
case SPELLFAMILY_WARLOCK: case SPELLFAMILY_WARLOCK:
if(m_spellProto->SpellFamilyFlags == 0x00) if(m_spellProto->SpellFamilyFlags.IsEqual(0,0,0x40))
{ {
//shadow ward //shadow ward
//+10% from +spd bonus //+10% from +spd bonus
@@ -5503,7 +5461,7 @@ void Aura::PeriodicTick()
} }
// Curse of Agony damage-per-tick calculation // Curse of Agony damage-per-tick calculation
if (GetSpellProto()->SpellFamilyName==SPELLFAMILY_WARLOCK && (GetSpellProto()->SpellFamilyFlags & 0x0000000000000400LL) && GetSpellProto()->SpellIconID==544) if (GetSpellProto()->SpellFamilyName==SPELLFAMILY_WARLOCK && (GetSpellProto()->SpellFamilyFlags[0] & 0x400) && GetSpellProto()->SpellIconID==544)
{ {
// 1..4 ticks, 1/2 from normal tick damage // 1..4 ticks, 1/2 from normal tick damage
if (m_duration>=((m_maxduration-m_modifier.periodictime)*2/3)) if (m_duration>=((m_maxduration-m_modifier.periodictime)*2/3))
@@ -6244,7 +6202,7 @@ void Aura::PeriodicDummyTick()
case SPELLFAMILY_HUNTER: case SPELLFAMILY_HUNTER:
{ {
// Explosive Shot // Explosive Shot
if (spell->SpellFamilyFlags & 0x8000000000000000LL) if (spell->SpellFamilyFlags[1] & 0x80000000)
{ {
if (!caster) if (!caster)
return; return;
@@ -6294,7 +6252,7 @@ void Aura::PeriodicDummyTick()
case SPELLFAMILY_DEATHKNIGHT: case SPELLFAMILY_DEATHKNIGHT:
{ {
// Death and Decay // Death and Decay
if (spell->SpellFamilyFlags & 0x0000000000000020LL) if (spell->SpellFamilyFlags[0] & 0x20)
{ {
if (caster) if (caster)
caster->CastCustomSpell(m_target, 52212, &m_modifier.m_amount, NULL, NULL, true, 0, this); caster->CastCustomSpell(m_target, 52212, &m_modifier.m_amount, NULL, NULL, true, 0, this);
@@ -6304,7 +6262,7 @@ void Aura::PeriodicDummyTick()
// if (spell->SpellFamilyFlags & 0x0000000000001000LL) // if (spell->SpellFamilyFlags & 0x0000000000001000LL)
// return; // return;
// Chains of Ice // Chains of Ice
if (spell->SpellFamilyFlags & 0x0000400000000000LL) if (spell->SpellFamilyFlags[1] & 0x00004000)
{ {
// Get 0 effect aura // Get 0 effect aura
Aura *slow = m_target->GetAura(GetId(), 0); Aura *slow = m_target->GetAura(GetId(), 0);
@@ -6376,7 +6334,7 @@ void Aura::HandleManaShield(bool apply, bool Real)
switch(m_spellProto->SpellFamilyName) switch(m_spellProto->SpellFamilyName)
{ {
case SPELLFAMILY_MAGE: case SPELLFAMILY_MAGE:
if(m_spellProto->SpellFamilyFlags & 0x8000) if(m_spellProto->SpellFamilyFlags[0] & 0x8000)
{ {
// Mana Shield // Mana Shield
// +50% from +spd bonus // +50% from +spd bonus
-1
View File
@@ -316,7 +316,6 @@ class TRINITY_DLL_SPEC Aura
void PeriodicTick(); void PeriodicTick();
void PeriodicDummyTick(); void PeriodicDummyTick();
uint32 const *getAuraSpellClassMask() const { return m_spellProto->EffectSpellClassMaskA + m_effIndex * 3; }
bool isAffectedOnSpell(SpellEntry const *spell) const; bool isAffectedOnSpell(SpellEntry const *spell) const;
protected: protected:
Aura(SpellEntry const* spellproto, uint32 eff, int32 *currentBasePoints, Unit *target, Unit *caster = NULL, Item* castItem = NULL); Aura(SpellEntry const* spellproto, uint32 eff, int32 *currentBasePoints, Unit *target, Unit *caster = NULL, Item* castItem = NULL);
+55 -56
View File
@@ -380,7 +380,7 @@ void Spell::SpellDamageSchoolDmg(uint32 effect_idx)
case SPELLFAMILY_MAGE: case SPELLFAMILY_MAGE:
{ {
// Arcane Blast // Arcane Blast
if(m_spellInfo->SpellFamilyFlags & 0x20000000LL) if(m_spellInfo->SpellFamilyFlags[0] & 0x20000000)
{ {
m_caster->CastSpell(m_caster,36032,true); m_caster->CastSpell(m_caster,36032,true);
} }
@@ -389,27 +389,27 @@ void Spell::SpellDamageSchoolDmg(uint32 effect_idx)
case SPELLFAMILY_WARRIOR: case SPELLFAMILY_WARRIOR:
{ {
// Bloodthirst // Bloodthirst
if(m_spellInfo->SpellFamilyFlags & 0x40000000000LL) if(m_spellInfo->SpellFamilyFlags[1] & 0x400)
{ {
damage = uint32(damage * (m_caster->GetTotalAttackPowerValue(BASE_ATTACK)) / 100); damage = uint32(damage * (m_caster->GetTotalAttackPowerValue(BASE_ATTACK)) / 100);
} }
// Shield Slam // Shield Slam
else if(m_spellInfo->SpellFamilyFlags & 0x100000000LL) else if(m_spellInfo->SpellFamilyFlags[1] & 0x1)
damage += int32(m_caster->GetShieldBlockValue()); damage += int32(m_caster->GetShieldBlockValue());
// Victory Rush // Victory Rush
else if(m_spellInfo->SpellFamilyFlags & 0x10000000000LL) else if(m_spellInfo->SpellFamilyFlags[1] & 0x100)
{ {
damage = uint32(damage * m_caster->GetTotalAttackPowerValue(BASE_ATTACK) / 100); damage = uint32(damage * m_caster->GetTotalAttackPowerValue(BASE_ATTACK) / 100);
m_caster->ModifyAuraState(AURA_STATE_WARRIOR_VICTORY_RUSH, false); m_caster->ModifyAuraState(AURA_STATE_WARRIOR_VICTORY_RUSH, false);
} }
// Revenge ${$m1+$AP*0.207} to ${$M1+$AP*0.207} // Revenge ${$m1+$AP*0.207} to ${$M1+$AP*0.207}
else if(m_spellInfo->SpellFamilyFlags & 0x0000000000000400LL) else if(m_spellInfo->SpellFamilyFlags[0] & 0x400)
damage+= uint32(m_caster->GetTotalAttackPowerValue(BASE_ATTACK) * 0.207f); damage+= uint32(m_caster->GetTotalAttackPowerValue(BASE_ATTACK) * 0.207f);
// Heroic Throw ${$m1+$AP*.50} // Heroic Throw ${$m1+$AP*.50}
else if(m_spellInfo->SpellFamilyFlags & 0x0000000100000000LL) else if(m_spellInfo->SpellFamilyFlags[1] & 0x00000001)
damage+= uint32(m_caster->GetTotalAttackPowerValue(BASE_ATTACK) * 0.5f); damage+= uint32(m_caster->GetTotalAttackPowerValue(BASE_ATTACK) * 0.5f);
// Shockwave ${$m3/100*$AP} // Shockwave ${$m3/100*$AP}
else if(m_spellInfo->SpellFamilyFlags & 0x0000800000000000LL) else if(m_spellInfo->SpellFamilyFlags[1] & 0x00008000)
{ {
int32 pct = m_caster->CalculateSpellDamage(m_spellInfo, 2, m_spellInfo->EffectBasePoints[2], unitTarget); int32 pct = m_caster->CalculateSpellDamage(m_spellInfo, 2, m_spellInfo->EffectBasePoints[2], unitTarget);
if (pct > 0) if (pct > 0)
@@ -421,7 +421,7 @@ void Spell::SpellDamageSchoolDmg(uint32 effect_idx)
case SPELLFAMILY_WARLOCK: case SPELLFAMILY_WARLOCK:
{ {
// Incinerate Rank 1 & 2 // Incinerate Rank 1 & 2
if((m_spellInfo->SpellFamilyFlags & 0x00004000000000LL) && m_spellInfo->SpellIconID==2128) if((m_spellInfo->SpellFamilyFlags[1] & 0x000040) && m_spellInfo->SpellIconID==2128)
{ {
// Incinerate does more dmg (dmg*0.25) if the target is Immolated. // Incinerate does more dmg (dmg*0.25) if the target is Immolated.
if(unitTarget->HasAuraState(AURA_STATE_IMMOLATE)) if(unitTarget->HasAuraState(AURA_STATE_IMMOLATE))
@@ -435,7 +435,7 @@ void Spell::SpellDamageSchoolDmg(uint32 effect_idx)
Unit::AuraList const &mPeriodic = unitTarget->GetAurasByType(SPELL_AURA_PERIODIC_DAMAGE); Unit::AuraList const &mPeriodic = unitTarget->GetAurasByType(SPELL_AURA_PERIODIC_DAMAGE);
for(Unit::AuraList::const_iterator i = mPeriodic.begin(); i != mPeriodic.end(); ++i) for(Unit::AuraList::const_iterator i = mPeriodic.begin(); i != mPeriodic.end(); ++i)
{ {
if( (*i)->GetSpellProto()->SpellFamilyName == SPELLFAMILY_WARLOCK && ((*i)->GetSpellProto()->SpellFamilyFlags & 4) && if( (*i)->GetSpellProto()->SpellFamilyName == SPELLFAMILY_WARLOCK && ((*i)->GetSpellProto()->SpellFamilyFlags[0] & 4) &&
(*i)->GetCasterGUID()==m_caster->GetGUID() ) (*i)->GetCasterGUID()==m_caster->GetGUID() )
{ {
unitTarget->RemoveAurasByCasterSpell((*i)->GetId(), m_caster->GetGUID()); unitTarget->RemoveAurasByCasterSpell((*i)->GetId(), m_caster->GetGUID());
@@ -448,14 +448,14 @@ void Spell::SpellDamageSchoolDmg(uint32 effect_idx)
case SPELLFAMILY_PRIEST: case SPELLFAMILY_PRIEST:
{ {
// Shadow Word: Death - deals damage equal to damage done to caster // Shadow Word: Death - deals damage equal to damage done to caster
if (m_spellInfo->SpellFamilyFlags & 0x0000000200000000LL) if (m_spellInfo->SpellFamilyFlags[1] & 0x2)
m_caster->CastCustomSpell(m_caster, 32409, &damage, 0, 0, true); m_caster->CastCustomSpell(m_caster, 32409, &damage, 0, 0, true);
break; break;
} }
case SPELLFAMILY_DRUID: case SPELLFAMILY_DRUID:
{ {
// Ferocious Bite // Ferocious Bite
if(m_caster->GetTypeId()==TYPEID_PLAYER && (m_spellInfo->SpellFamilyFlags & 0x000800000) && m_spellInfo->SpellVisual[0]==6587) if(m_caster->GetTypeId()==TYPEID_PLAYER && (m_spellInfo->SpellFamilyFlags[0] & 0x000800000) && m_spellInfo->SpellVisual[0]==6587)
{ {
// converts each extra point of energy into ($f1+$AP/410) additional damage // converts each extra point of energy into ($f1+$AP/410) additional damage
float ap = m_caster->GetTotalAttackPowerValue(BASE_ATTACK); float ap = m_caster->GetTotalAttackPowerValue(BASE_ATTACK);
@@ -465,22 +465,22 @@ void Spell::SpellDamageSchoolDmg(uint32 effect_idx)
m_caster->SetPower(POWER_ENERGY,0); m_caster->SetPower(POWER_ENERGY,0);
} }
// Rake // Rake
else if(m_spellInfo->SpellFamilyFlags & 0x0000000000001000LL) else if(m_spellInfo->SpellFamilyFlags[0] & 0x1000)
{ {
damage += int32(m_caster->GetTotalAttackPowerValue(BASE_ATTACK) / 100); damage += int32(m_caster->GetTotalAttackPowerValue(BASE_ATTACK) / 100);
} }
// Swipe // Swipe
else if(m_spellInfo->SpellFamilyFlags & 0x0010000000000000LL) else if(m_spellInfo->SpellFamilyFlags[1] & 0x00100000)
{ {
damage += int32(m_caster->GetTotalAttackPowerValue(BASE_ATTACK)*0.08f); damage += int32(m_caster->GetTotalAttackPowerValue(BASE_ATTACK)*0.08f);
} }
//Mangle Bonus for the initial damage of Lacerate and Rake //Mangle Bonus for the initial damage of Lacerate and Rake
if((m_spellInfo->SpellFamilyFlags==0x0000000000001000LL && m_spellInfo->SpellIconID==494) || if((m_spellInfo->SpellFamilyFlags.IsEqual(0x1000,0,0) && m_spellInfo->SpellIconID==494) ||
(m_spellInfo->SpellFamilyFlags==0x0000010000000000LL && m_spellInfo->SpellIconID==2246)) (m_spellInfo->SpellFamilyFlags.IsEqual(0,0x100,0) && m_spellInfo->SpellIconID==2246))
{ {
Unit::AuraList const& mDummyAuras = unitTarget->GetAurasByType(SPELL_AURA_DUMMY); Unit::AuraList const& mDummyAuras = unitTarget->GetAurasByType(SPELL_AURA_DUMMY);
for(Unit::AuraList::const_iterator i = mDummyAuras.begin(); i != mDummyAuras.end(); ++i) for(Unit::AuraList::const_iterator i = mDummyAuras.begin(); i != mDummyAuras.end(); ++i)
if((*i)->GetSpellProto()->SpellFamilyFlags & 0x0000044000000000LL && (*i)->GetSpellProto()->SpellFamilyName==SPELLFAMILY_DRUID) if((*i)->GetSpellProto()->SpellFamilyFlags[1] & 0x00000440 && (*i)->GetSpellProto()->SpellFamilyName==SPELLFAMILY_DRUID)
{ {
damage = int32(damage*(100.0f+(*i)->GetModifier()->m_amount)/100.0f); damage = int32(damage*(100.0f+(*i)->GetModifier()->m_amount)/100.0f);
break; break;
@@ -491,7 +491,7 @@ void Spell::SpellDamageSchoolDmg(uint32 effect_idx)
case SPELLFAMILY_ROGUE: case SPELLFAMILY_ROGUE:
{ {
// Envenom // Envenom
if(m_caster->GetTypeId()==TYPEID_PLAYER && (m_spellInfo->SpellFamilyFlags & 0x800000000LL)) if(m_caster->GetTypeId()==TYPEID_PLAYER && (m_spellInfo->SpellFamilyFlags[1] & 0x8))
{ {
// consume from stack dozes not more that have combo-points // consume from stack dozes not more that have combo-points
if(uint32 combo = ((Player*)m_caster)->GetComboPoints()) if(uint32 combo = ((Player*)m_caster)->GetComboPoints())
@@ -501,7 +501,7 @@ void Spell::SpellDamageSchoolDmg(uint32 effect_idx)
Unit::AuraList const& auras = unitTarget->GetAurasByType(SPELL_AURA_PERIODIC_DAMAGE); Unit::AuraList const& auras = unitTarget->GetAurasByType(SPELL_AURA_PERIODIC_DAMAGE);
for(Unit::AuraList::const_iterator itr = auras.begin(); itr!=auras.end(); ++itr) for(Unit::AuraList::const_iterator itr = auras.begin(); itr!=auras.end(); ++itr)
if( (*itr)->GetSpellProto()->SpellFamilyName==SPELLFAMILY_ROGUE && if( (*itr)->GetSpellProto()->SpellFamilyName==SPELLFAMILY_ROGUE &&
(*itr)->GetSpellProto()->SpellFamilyFlags & 0x10000 && (*itr)->GetSpellProto()->SpellFamilyFlags[0] & 0x10000 &&
(*itr)->GetCasterGUID()==m_caster->GetGUID() ) (*itr)->GetCasterGUID()==m_caster->GetGUID() )
{ {
poison = *itr; poison = *itr;
@@ -525,7 +525,7 @@ void Spell::SpellDamageSchoolDmg(uint32 effect_idx)
} }
} }
// Eviscerate // Eviscerate
else if((m_spellInfo->SpellFamilyFlags & 0x00020000LL) && m_caster->GetTypeId()==TYPEID_PLAYER) else if((m_spellInfo->SpellFamilyFlags[0] & 0x00020000) && m_caster->GetTypeId()==TYPEID_PLAYER)
{ {
if(uint32 combo = ((Player*)m_caster)->GetComboPoints()) if(uint32 combo = ((Player*)m_caster)->GetComboPoints())
{ {
@@ -538,17 +538,17 @@ void Spell::SpellDamageSchoolDmg(uint32 effect_idx)
} }
} }
// Gouge // Gouge
else if(m_spellInfo->SpellFamilyFlags & 0x0000000000000008LL) else if(m_spellInfo->SpellFamilyFlags[0] & 0x8)
{ {
damage += int32(m_caster->GetTotalAttackPowerValue(BASE_ATTACK)*0.02f); damage += int32(m_caster->GetTotalAttackPowerValue(BASE_ATTACK)*0.02f);
} }
// Instant Poison // Instant Poison
else if(m_spellInfo->SpellFamilyFlags & 0x0000000000002000LL) else if(m_spellInfo->SpellFamilyFlags[0] & 0x2000)
{ {
damage += int32(m_caster->GetTotalAttackPowerValue(BASE_ATTACK)*0.10f); damage += int32(m_caster->GetTotalAttackPowerValue(BASE_ATTACK)*0.10f);
} }
// Wound Poison // Wound Poison
else if(m_spellInfo->SpellFamilyFlags & 0x0000000010000000LL) else if(m_spellInfo->SpellFamilyFlags[0] & 0x10000000)
{ {
damage += int32(m_caster->GetTotalAttackPowerValue(BASE_ATTACK)*0.04f); damage += int32(m_caster->GetTotalAttackPowerValue(BASE_ATTACK)*0.04f);
} }
@@ -557,22 +557,22 @@ void Spell::SpellDamageSchoolDmg(uint32 effect_idx)
case SPELLFAMILY_HUNTER: case SPELLFAMILY_HUNTER:
{ {
// Mongoose Bite // Mongoose Bite
if((m_spellInfo->SpellFamilyFlags & 0x000000002) && m_spellInfo->SpellVisual[0]==342) if((m_spellInfo->SpellFamilyFlags[0] & 0x2) && m_spellInfo->SpellVisual[0]==342)
{ {
damage += int32(m_caster->GetTotalAttackPowerValue(BASE_ATTACK)*0.2f); damage += int32(m_caster->GetTotalAttackPowerValue(BASE_ATTACK)*0.2f);
} }
// Counterattack // Counterattack
else if(m_spellInfo->SpellFamilyFlags & 0x0008000000000000LL) else if(m_spellInfo->SpellFamilyFlags[1] & 0x00080000)
{ {
damage += int32(m_caster->GetTotalAttackPowerValue(BASE_ATTACK)*0.2f); damage += int32(m_caster->GetTotalAttackPowerValue(BASE_ATTACK)*0.2f);
} }
// Arcane Shot // Arcane Shot
else if((m_spellInfo->SpellFamilyFlags & 0x00000800) && m_spellInfo->maxLevel > 0) else if((m_spellInfo->SpellFamilyFlags[0] & 0x00000800) && m_spellInfo->maxLevel > 0)
{ {
damage += int32(m_caster->GetTotalAttackPowerValue(RANGED_ATTACK)*0.15f); damage += int32(m_caster->GetTotalAttackPowerValue(RANGED_ATTACK)*0.15f);
} }
// Steady Shot // Steady Shot
else if(m_spellInfo->SpellFamilyFlags & 0x100000000LL) else if(m_spellInfo->SpellFamilyFlags[1] & 0x1)
{ {
int32 base = irand((int32)m_caster->GetWeaponDamageRange(RANGED_ATTACK, MINDAMAGE),(int32)m_caster->GetWeaponDamageRange(RANGED_ATTACK, MAXDAMAGE)); int32 base = irand((int32)m_caster->GetWeaponDamageRange(RANGED_ATTACK, MINDAMAGE),(int32)m_caster->GetWeaponDamageRange(RANGED_ATTACK, MAXDAMAGE));
damage += int32(float(base)/m_caster->GetAttackTime(RANGED_ATTACK)*2800 + m_caster->GetTotalAttackPowerValue(RANGED_ATTACK)*0.2f); damage += int32(float(base)/m_caster->GetAttackTime(RANGED_ATTACK)*2800 + m_caster->GetTotalAttackPowerValue(RANGED_ATTACK)*0.2f);
@@ -595,7 +595,7 @@ void Spell::SpellDamageSchoolDmg(uint32 effect_idx)
damage += m_spellInfo->EffectBasePoints[1]; damage += m_spellInfo->EffectBasePoints[1];
} }
// Explosive Trap Effect // Explosive Trap Effect
else if(m_spellInfo->SpellFamilyFlags & 0x00000004) else if(m_spellInfo->SpellFamilyFlags[0] & 0x00000004)
{ {
damage += int32(m_caster->GetTotalAttackPowerValue(RANGED_ATTACK)*0.1f); damage += int32(m_caster->GetTotalAttackPowerValue(RANGED_ATTACK)*0.1f);
} }
@@ -604,7 +604,7 @@ void Spell::SpellDamageSchoolDmg(uint32 effect_idx)
case SPELLFAMILY_PALADIN: case SPELLFAMILY_PALADIN:
{ {
// Judgement of Vengeance ${1+0.22*$SPH+0.14*$AP} + 10% for each application of Holy Vengeance on the target // Judgement of Vengeance ${1+0.22*$SPH+0.14*$AP} + 10% for each application of Holy Vengeance on the target
if((m_spellInfo->SpellFamilyFlags & 0x800000000LL) && m_spellInfo->SpellIconID==2292) if((m_spellInfo->SpellFamilyFlags[1] & 0x8) && m_spellInfo->SpellIconID==2292)
{ {
float ap = m_caster->GetTotalAttackPowerValue(BASE_ATTACK); float ap = m_caster->GetTotalAttackPowerValue(BASE_ATTACK);
int32 holy = m_caster->SpellBaseDamageBonus(GetSpellSchoolMask(m_spellInfo)) + int32 holy = m_caster->SpellBaseDamageBonus(GetSpellSchoolMask(m_spellInfo)) +
@@ -624,7 +624,7 @@ void Spell::SpellDamageSchoolDmg(uint32 effect_idx)
damage += damage * stacks * 10 /100; damage += damage * stacks * 10 /100;
} }
// Avenger's Shield ($m1+0.07*$SPH+0.07*$AP) - ranged sdb for future // Avenger's Shield ($m1+0.07*$SPH+0.07*$AP) - ranged sdb for future
else if(m_spellInfo->SpellFamilyFlags & 0x0000000000004000LL) else if(m_spellInfo->SpellFamilyFlags[0] & 0x4000)
{ {
float ap = m_caster->GetTotalAttackPowerValue(BASE_ATTACK); float ap = m_caster->GetTotalAttackPowerValue(BASE_ATTACK);
int32 holy = m_caster->SpellBaseDamageBonus(GetSpellSchoolMask(m_spellInfo)) + int32 holy = m_caster->SpellBaseDamageBonus(GetSpellSchoolMask(m_spellInfo)) +
@@ -632,7 +632,7 @@ void Spell::SpellDamageSchoolDmg(uint32 effect_idx)
damage += int32(ap * 0.07f) + int32(holy * 7 / 100); damage += int32(ap * 0.07f) + int32(holy * 7 / 100);
} }
// Hammer of Wrath ($m1+0.15*$SPH+0.15*$AP) - ranged type sdb future fix // Hammer of Wrath ($m1+0.15*$SPH+0.15*$AP) - ranged type sdb future fix
else if(m_spellInfo->SpellFamilyFlags & 0x0000008000000000LL) else if(m_spellInfo->SpellFamilyFlags[1] & 0x00000080)
{ {
float ap = m_caster->GetTotalAttackPowerValue(BASE_ATTACK); float ap = m_caster->GetTotalAttackPowerValue(BASE_ATTACK);
int32 holy = m_caster->SpellBaseDamageBonus(GetSpellSchoolMask(m_spellInfo)) + int32 holy = m_caster->SpellBaseDamageBonus(GetSpellSchoolMask(m_spellInfo)) +
@@ -640,7 +640,7 @@ void Spell::SpellDamageSchoolDmg(uint32 effect_idx)
damage += int32(ap * 0.15f) + int32(holy * 15 / 100); damage += int32(ap * 0.15f) + int32(holy * 15 / 100);
} }
// Hammer of the Righteous // Hammer of the Righteous
else if(m_spellInfo->SpellFamilyFlags&0x0004000000000000LL) else if(m_spellInfo->SpellFamilyFlags[1]&0x00040000)
{ {
// Add main hand dps * effect[2] amount // Add main hand dps * effect[2] amount
float averange = (m_caster->GetFloatValue(UNIT_FIELD_MINDAMAGE) + m_caster->GetFloatValue(UNIT_FIELD_MAXDAMAGE)) / 2; float averange = (m_caster->GetFloatValue(UNIT_FIELD_MINDAMAGE) + m_caster->GetFloatValue(UNIT_FIELD_MAXDAMAGE)) / 2;
@@ -1308,7 +1308,7 @@ void Spell::EffectDummy(uint32 i)
return; return;
} }
// Execute // Execute
if(m_spellInfo->SpellFamilyFlags & 0x20000000) if(m_spellInfo->SpellFamilyFlags[0] & 0x20000000)
{ {
if(!unitTarget) if(!unitTarget)
return; return;
@@ -1325,7 +1325,7 @@ void Spell::EffectDummy(uint32 i)
return; return;
} }
// Slam // Slam
if(m_spellInfo->SpellFamilyFlags & 0x0000000000200000LL) if(m_spellInfo->SpellFamilyFlags[0] & 0x200000)
{ {
if(!unitTarget) if(!unitTarget)
return; return;
@@ -1360,7 +1360,7 @@ void Spell::EffectDummy(uint32 i)
break; break;
case SPELLFAMILY_WARLOCK: case SPELLFAMILY_WARLOCK:
// Life Tap // Life Tap
if (m_spellInfo->SpellFamilyFlags & 0x0000000000040000LL) if (m_spellInfo->SpellFamilyFlags[0] & 0x40000)
{ {
// In 303 exist spirit depend // In 303 exist spirit depend
uint32 spirit = m_caster->GetStat(STAT_SPIRIT); uint32 spirit = m_caster->GetStat(STAT_SPIRIT);
@@ -1416,7 +1416,7 @@ void Spell::EffectDummy(uint32 i)
break; break;
case SPELLFAMILY_PRIEST: case SPELLFAMILY_PRIEST:
// Penance // Penance
if (m_spellInfo->SpellFamilyFlags & 0x0080000000000000LL) if (m_spellInfo->SpellFamilyFlags[1] & 0x00800000)
{ {
if (!unitTarget) if (!unitTarget)
return; return;
@@ -1517,7 +1517,7 @@ void Spell::EffectDummy(uint32 i)
uint32 classspell = itr->first; uint32 classspell = itr->first;
SpellEntry const *spellInfo = sSpellStore.LookupEntry(classspell); SpellEntry const *spellInfo = sSpellStore.LookupEntry(classspell);
if (spellInfo->SpellFamilyName == SPELLFAMILY_ROGUE && (spellInfo->SpellFamilyFlags & 0x0000024000000860LL)) if (spellInfo->SpellFamilyName == SPELLFAMILY_ROGUE && (spellInfo->SpellFamilyFlags[1] & 0x00000240 || spellInfo->SpellFamilyFlags[0] & 0x00000860))
{ {
((Player*)m_caster)->RemoveSpellCooldown(classspell); ((Player*)m_caster)->RemoveSpellCooldown(classspell);
@@ -1626,8 +1626,7 @@ void Spell::EffectDummy(uint32 i)
mod->value = -50; mod->value = -50;
mod->type = SPELLMOD_PCT; mod->type = SPELLMOD_PCT;
mod->spellId = m_spellInfo->Id; mod->spellId = m_spellInfo->Id;
mod->mask = 0x0000020000000000LL; mod->mask[1] = 0x00000200;
mod->mask2= 0LL;
((Player*)m_caster)->AddSpellMod(mod, true); ((Player*)m_caster)->AddSpellMod(mod, true);
m_caster->CastSpell(unitTarget,spell_proto,true,NULL); m_caster->CastSpell(unitTarget,spell_proto,true,NULL);
@@ -1717,7 +1716,7 @@ void Spell::EffectDummy(uint32 i)
break; break;
case SPELLFAMILY_SHAMAN: case SPELLFAMILY_SHAMAN:
//Shaman Rockbiter Weapon //Shaman Rockbiter Weapon
if (m_spellInfo->SpellFamilyFlags == 0x400000) if (m_spellInfo->SpellFamilyFlags.IsEqual(0x400000))
{ {
// TODO: use expect spell for enchant (if exist talent) // TODO: use expect spell for enchant (if exist talent)
// In 3.0.3 no mods present for rockbiter // In 3.0.3 no mods present for rockbiter
@@ -1766,13 +1765,13 @@ void Spell::EffectDummy(uint32 i)
return; return;
} }
// Healing Stream Totem // Healing Stream Totem
if(m_spellInfo->SpellFamilyFlags & 0x0000000000002000LL) if(m_spellInfo->SpellFamilyFlags[0] & 0x2000)
{ {
m_caster->CastCustomSpell(unitTarget, 52042, &damage, 0, 0, true, 0, 0, m_originalCasterGUID); m_caster->CastCustomSpell(unitTarget, 52042, &damage, 0, 0, true, 0, 0, m_originalCasterGUID);
return; return;
} }
// Mana Spring Totem // Mana Spring Totem
if(m_spellInfo->SpellFamilyFlags & 0x0000000000004000LL) if(m_spellInfo->SpellFamilyFlags[0] & 0x4000)
{ {
if(unitTarget->getPowerType()!=POWER_MANA) if(unitTarget->getPowerType()!=POWER_MANA)
return; return;
@@ -1794,7 +1793,7 @@ void Spell::EffectDummy(uint32 i)
return; return;
} }
// Lava Lash // Lava Lash
if (m_spellInfo->SpellFamilyFlags2 & 0x00000004) if (m_spellInfo->SpellFamilyFlags[2] & 0x00000004)
{ {
if (m_caster->GetTypeId()!=TYPEID_PLAYER) if (m_caster->GetTypeId()!=TYPEID_PLAYER)
return; return;
@@ -1806,7 +1805,7 @@ void Spell::EffectDummy(uint32 i)
for(Unit::AuraList::const_iterator itr = auraDummy.begin(); itr != auraDummy.end(); ++itr) for(Unit::AuraList::const_iterator itr = auraDummy.begin(); itr != auraDummy.end(); ++itr)
{ {
if( (*itr)->GetSpellProto()->SpellFamilyName==SPELLFAMILY_SHAMAN && if( (*itr)->GetSpellProto()->SpellFamilyName==SPELLFAMILY_SHAMAN &&
(*itr)->GetSpellProto()->SpellFamilyFlags & 0x0000000000200000LL && (*itr)->GetSpellProto()->SpellFamilyFlags[0] & 0x200000 &&
(*itr)->GetCastItemGUID() == item->GetGUID()) (*itr)->GetCastItemGUID() == item->GetGUID())
{ {
m_damage += m_damage * damage / 100; m_damage += m_damage * damage / 100;
@@ -1935,7 +1934,7 @@ void Spell::EffectTriggerSpell(uint32 i)
if (!spellInfo) if (!spellInfo)
continue; continue;
if (spellInfo->SpellFamilyName == SPELLFAMILY_ROGUE && spellInfo->SpellFamilyFlags & SPELLFAMILYFLAG_ROGUE_STEALTH) if (spellInfo->SpellFamilyName == SPELLFAMILY_ROGUE && spellInfo->SpellFamilyFlags[0] & SPELLFAMILYFLAG_ROGUE_STEALTH)
{ {
spellId = spellInfo->Id; spellId = spellInfo->Id;
break; break;
@@ -2270,7 +2269,7 @@ void Spell::EffectApplyAura(uint32 i)
return; return;
// Prayer of Mending (jump animation), we need formal caster instead original for correct animation // Prayer of Mending (jump animation), we need formal caster instead original for correct animation
if( m_spellInfo->SpellFamilyName == SPELLFAMILY_PRIEST && (m_spellInfo->SpellFamilyFlags & 0x00002000000000LL)) if( m_spellInfo->SpellFamilyName == SPELLFAMILY_PRIEST && (m_spellInfo->SpellFamilyFlags[1] & 0x000020))
m_caster->CastSpell(unitTarget, 41637, true, NULL, Aur, m_originalCasterGUID); m_caster->CastSpell(unitTarget, 41637, true, NULL, Aur, m_originalCasterGUID);
} }
@@ -2478,7 +2477,7 @@ void Spell::SpellDamageHeal(uint32 /*i*/)
for(Unit::AuraList::const_iterator i = RejorRegr.begin(); i != RejorRegr.end(); ++i) for(Unit::AuraList::const_iterator i = RejorRegr.begin(); i != RejorRegr.end(); ++i)
{ {
if((*i)->GetSpellProto()->SpellFamilyName == SPELLFAMILY_DRUID if((*i)->GetSpellProto()->SpellFamilyName == SPELLFAMILY_DRUID
&& ((*i)->GetSpellProto()->SpellFamilyFlags == 0x40 || (*i)->GetSpellProto()->SpellFamilyFlags == 0x10) ) && ((*i)->GetSpellProto()->SpellFamilyFlags.IsEqual(0x40) || (*i)->GetSpellProto()->SpellFamilyFlags.IsEqual(0x10)) )
{ {
if(!targetAura || (*i)->GetAuraDuration() < targetAura->GetAuraDuration()) if(!targetAura || (*i)->GetAuraDuration() < targetAura->GetAuraDuration())
targetAura = *i; targetAura = *i;
@@ -4379,7 +4378,7 @@ void Spell::SpellDamageWeaponDmg(uint32 i)
{ {
SpellEntry const *proto = (*itr)->GetSpellProto(); SpellEntry const *proto = (*itr)->GetSpellProto();
if(proto->SpellFamilyName == SPELLFAMILY_WARRIOR if(proto->SpellFamilyName == SPELLFAMILY_WARRIOR
&& proto->SpellFamilyFlags == SPELLFAMILYFLAG_WARRIOR_SUNDERARMOR && proto->SpellFamilyFlags.IsEqual(SPELLFAMILYFLAG_WARRIOR_SUNDERARMOR)
&& (*itr)->GetCasterGUID() == m_caster->GetGUID()) && (*itr)->GetCasterGUID() == m_caster->GetGUID())
{ {
(*itr)->RefreshAura(); (*itr)->RefreshAura();
@@ -4411,7 +4410,7 @@ void Spell::SpellDamageWeaponDmg(uint32 i)
if (!spellInfo) if (!spellInfo)
continue; continue;
if (spellInfo->SpellFamilyFlags == SPELLFAMILYFLAG_WARRIOR_SUNDERARMOR if (spellInfo->SpellFamilyFlags.IsEqual(SPELLFAMILYFLAG_WARRIOR_SUNDERARMOR)
&& spellInfo->Id != m_spellInfo->Id && spellInfo->Id != m_spellInfo->Id
&& spellInfo->SpellFamilyName == SPELLFAMILY_WARRIOR) && spellInfo->SpellFamilyName == SPELLFAMILY_WARRIOR)
{ {
@@ -4428,13 +4427,13 @@ void Spell::SpellDamageWeaponDmg(uint32 i)
case SPELLFAMILY_ROGUE: case SPELLFAMILY_ROGUE:
{ {
// Hemorrhage // Hemorrhage
if(m_spellInfo->SpellFamilyFlags & 0x2000000) if(m_spellInfo->SpellFamilyFlags[0] & 0x2000000)
{ {
if(m_caster->GetTypeId()==TYPEID_PLAYER) if(m_caster->GetTypeId()==TYPEID_PLAYER)
((Player*)m_caster)->AddComboPoints(unitTarget, 1); ((Player*)m_caster)->AddComboPoints(unitTarget, 1);
} }
// Mutilate (for each hand) // Mutilate (for each hand)
else if(m_spellInfo->SpellFamilyFlags & 0x600000000LL) else if(m_spellInfo->SpellFamilyFlags[1] & 0x6)
{ {
bool found = false; bool found = false;
// fast check // fast check
@@ -4462,7 +4461,7 @@ void Spell::SpellDamageWeaponDmg(uint32 i)
case SPELLFAMILY_PALADIN: case SPELLFAMILY_PALADIN:
{ {
// Seal of Command - receive benefit from Spell Damage and Healing // Seal of Command - receive benefit from Spell Damage and Healing
if(m_spellInfo->SpellFamilyFlags & 0x00000002000000LL) if(m_spellInfo->SpellFamilyFlags[0] & 0x2000000)
{ {
spell_bonus += int32(0.20f*m_caster->SpellBaseDamageBonus(GetSpellSchoolMask(m_spellInfo))); spell_bonus += int32(0.20f*m_caster->SpellBaseDamageBonus(GetSpellSchoolMask(m_spellInfo)));
spell_bonus += int32(0.29f*m_caster->SpellBaseDamageBonusForVictim(GetSpellSchoolMask(m_spellInfo), unitTarget)); spell_bonus += int32(0.29f*m_caster->SpellBaseDamageBonusForVictim(GetSpellSchoolMask(m_spellInfo), unitTarget));
@@ -4473,7 +4472,7 @@ void Spell::SpellDamageWeaponDmg(uint32 i)
{ {
// Skyshatter Harness item set bonus // Skyshatter Harness item set bonus
// Stormstrike // Stormstrike
if(m_spellInfo->SpellFamilyFlags & 0x001000000000LL) if(m_spellInfo->SpellFamilyFlags[1] & 0x0010)
{ {
Unit::AuraList const& m_OverrideClassScript = m_caster->GetAurasByType(SPELL_AURA_OVERRIDE_CLASS_SCRIPTS); Unit::AuraList const& m_OverrideClassScript = m_caster->GetAurasByType(SPELL_AURA_OVERRIDE_CLASS_SCRIPTS);
for(Unit::AuraList::const_iterator i = m_OverrideClassScript.begin(); i != m_OverrideClassScript.end(); ++i) for(Unit::AuraList::const_iterator i = m_OverrideClassScript.begin(); i != m_OverrideClassScript.end(); ++i)
@@ -4491,7 +4490,7 @@ void Spell::SpellDamageWeaponDmg(uint32 i)
case SPELLFAMILY_DRUID: case SPELLFAMILY_DRUID:
{ {
// Mangle (Cat): CP // Mangle (Cat): CP
if(m_spellInfo->SpellFamilyFlags==0x0000040000000000LL) if(m_spellInfo->SpellFamilyFlags.IsEqual(0,0x00000400))
{ {
if(m_caster->GetTypeId()==TYPEID_PLAYER) if(m_caster->GetTypeId()==TYPEID_PLAYER)
((Player*)m_caster)->AddComboPoints(unitTarget,1); ((Player*)m_caster)->AddComboPoints(unitTarget,1);
@@ -5142,7 +5141,7 @@ void Spell::EffectScriptEffect(uint32 effIndex)
{ {
SpellEntry const *spellInfo = (*itr).second->GetSpellProto(); SpellEntry const *spellInfo = (*itr).second->GetSpellProto();
if( spellInfo->SpellFamilyName == SPELLFAMILY_PRIEST && if( spellInfo->SpellFamilyName == SPELLFAMILY_PRIEST &&
spellInfo->SpellFamilyFlags & 0x0000000000008000LL && spellInfo->SpellFamilyFlags[0] & 0x8000 &&
(*itr).second->GetCasterGUID() == m_caster->GetGUID()) (*itr).second->GetCasterGUID() == m_caster->GetGUID())
{ {
(*itr).second->RefreshAura(); (*itr).second->RefreshAura();
@@ -5212,7 +5211,7 @@ void Spell::EffectScriptEffect(uint32 effIndex)
case SPELLFAMILY_PALADIN: case SPELLFAMILY_PALADIN:
{ {
// Judgement // Judgement
if (m_spellInfo->SpellFamilyFlags & 0x0000000000800000LL) if (m_spellInfo->SpellFamilyFlags[0] & 0x800000)
{ {
if(!unitTarget || !unitTarget->isAlive()) if(!unitTarget || !unitTarget->isAlive())
return; return;
@@ -5333,7 +5332,7 @@ void Spell::EffectSanctuary(uint32 /*i*/)
unitTarget->CombatStop(); unitTarget->CombatStop();
unitTarget->getHostilRefManager().deleteReferences(); // stop all fighting unitTarget->getHostilRefManager().deleteReferences(); // stop all fighting
// Vanish allows to remove all threat and cast regular stealth so other spells can be used // Vanish allows to remove all threat and cast regular stealth so other spells can be used
if(m_spellInfo->SpellFamilyName == SPELLFAMILY_ROGUE && (m_spellInfo->SpellFamilyFlags & SPELLFAMILYFLAG_ROGUE_VANISH)) if(m_spellInfo->SpellFamilyName == SPELLFAMILY_ROGUE && (m_spellInfo->SpellFamilyFlags[0] & SPELLFAMILYFLAG_ROGUE_VANISH))
{ {
((Player *)m_caster)->RemoveSpellsCausingAura(SPELL_AURA_MOD_ROOT); ((Player *)m_caster)->RemoveSpellsCausingAura(SPELL_AURA_MOD_ROOT);
} }
+1 -1
View File
@@ -329,7 +329,7 @@ void WorldSession::HandleCancelAuraOpcode( WorldPacket& recvPacket)
return; return;
// lifebloom must delete final heal effect // lifebloom must delete final heal effect
if (spellInfo->SpellFamilyName == SPELLFAMILY_DRUID && (spellInfo->SpellFamilyFlags & 0x1000000000LL) ) if (spellInfo->SpellFamilyName == SPELLFAMILY_DRUID && (spellInfo->SpellFamilyFlags[1] & 0x10) )
{ {
Unit::AuraMap::iterator iter; Unit::AuraMap::iterator iter;
while((iter = _player->m_Auras.find(Unit::spellEffectPair(spellId, 1))) != _player->m_Auras.end()) while((iter = _player->m_Auras.find(Unit::spellEffectPair(spellId, 1))) != _player->m_Auras.end())
+32 -48
View File
@@ -327,17 +327,17 @@ SpellSpecific GetSpellSpecific(uint32 spellId)
case SPELLFAMILY_MAGE: case SPELLFAMILY_MAGE:
{ {
// family flags 18(Molten), 25(Frost/Ice), 28(Mage) // family flags 18(Molten), 25(Frost/Ice), 28(Mage)
if (spellInfo->SpellFamilyFlags & 0x12040000) if (spellInfo->SpellFamilyFlags[0] & 0x12040000)
return SPELL_MAGE_ARMOR; return SPELL_MAGE_ARMOR;
if ((spellInfo->SpellFamilyFlags & 0x1000000) && spellInfo->EffectApplyAuraName[0]==SPELL_AURA_MOD_CONFUSE) if ((spellInfo->SpellFamilyFlags[0] & 0x1000000) && spellInfo->EffectApplyAuraName[0]==SPELL_AURA_MOD_CONFUSE)
return SPELL_MAGE_POLYMORPH; return SPELL_MAGE_POLYMORPH;
break; break;
} }
case SPELLFAMILY_WARRIOR: case SPELLFAMILY_WARRIOR:
{ {
if (spellInfo->SpellFamilyFlags & 0x00008000010000LL) if (spellInfo->SpellFamilyFlags[1] & 0x000080 || spellInfo->SpellFamilyFlags[0] & 0x10000LL)
return SPELL_POSITIVE_SHOUT; return SPELL_POSITIVE_SHOUT;
break; break;
@@ -349,11 +349,11 @@ SpellSpecific GetSpellSpecific(uint32 spellId)
return SPELL_CURSE; return SPELL_CURSE;
// Warlock (Demon Armor | Demon Skin | Fel Armor) // Warlock (Demon Armor | Demon Skin | Fel Armor)
if (spellInfo->SpellFamilyFlags & 0x2000002000000000LL || spellInfo->SpellFamilyFlags2 & 0x00000010) if (spellInfo->SpellFamilyFlags[1] & 0x20000020 || spellInfo->SpellFamilyFlags[2] & 0x00000010)
return SPELL_WARLOCK_ARMOR; return SPELL_WARLOCK_ARMOR;
//seed of corruption and corruption //seed of corruption and corruption
if (spellInfo->SpellFamilyFlags & 0x1000000002LL) if (spellInfo->SpellFamilyFlags[1] & 0x10 || spellInfo->SpellFamilyFlags[0] & 0x2)
return SPELL_WARLOCK_CORRUPTION; return SPELL_WARLOCK_CORRUPTION;
break; break;
} }
@@ -363,11 +363,11 @@ SpellSpecific GetSpellSpecific(uint32 spellId)
if (spellInfo->Dispel == DISPEL_POISON) if (spellInfo->Dispel == DISPEL_POISON)
return SPELL_STING; return SPELL_STING;
// only hunter aspects have this (but not all aspects in hunter family) // only hunter aspects have this
if( spellInfo->SpellFamilyFlags & 0x0044000000380000LL || spellInfo->SpellFamilyFlags2 & 0x00003010) if( spellInfo->SpellFamilyFlags[1] & 0x00440000 || spellInfo->SpellFamilyFlags[0] & 0x00380000 || spellInfo->SpellFamilyFlags[2] & 0x00003010)
return SPELL_ASPECT; return SPELL_ASPECT;
if( spellInfo->SpellFamilyFlags2 & 0x00000002 ) if( spellInfo->SpellFamilyFlags[2] & 0x00000002 )
return SPELL_TRACKER; return SPELL_TRACKER;
break; break;
@@ -377,10 +377,10 @@ SpellSpecific GetSpellSpecific(uint32 spellId)
if (IsSealSpell(spellInfo)) if (IsSealSpell(spellInfo))
return SPELL_SEAL; return SPELL_SEAL;
if (spellInfo->SpellFamilyFlags & 0x0000000011010002LL) if (spellInfo->SpellFamilyFlags[0] & 0x11010002)
return SPELL_BLESSING; return SPELL_BLESSING;
if ((spellInfo->SpellFamilyFlags & 0x00000820180400LL) && (spellInfo->AttributesEx3 & 0x200)) if ((spellInfo->SpellFamilyFlags[1] & 0x000008 || spellInfo->SpellFamilyFlags[0] & 20180400) && (spellInfo->AttributesEx3 & 0x200))
return SPELL_JUDGEMENT; return SPELL_JUDGEMENT;
for (int i = 0; i < 3; i++) for (int i = 0; i < 3; i++)
@@ -928,22 +928,15 @@ void SpellMgr::LoadSpellAffects()
continue; continue;
} }
SpellAffectEntry affect; flag96 affect(fields[2].GetUInt32(), fields[3].GetUInt32(), fields[4].GetUInt32());
affect.SpellClassMask[0] = fields[2].GetUInt32();
affect.SpellClassMask[1] = fields[3].GetUInt32();
affect.SpellClassMask[2] = fields[4].GetUInt32();
// Spell.dbc have own data // Spell.dbc have own data
uint32 const *ptr = 0; if (effectId>3)
switch (effectId)
{
case 0: ptr = &spellInfo->EffectSpellClassMaskA[0]; break;
case 1: ptr = &spellInfo->EffectSpellClassMaskB[0]; break;
case 2: ptr = &spellInfo->EffectSpellClassMaskC[0]; break;
default:
continue; continue;
}
if(ptr[0] == affect.SpellClassMask[0] || ptr[1] == affect.SpellClassMask[1] || ptr[2] == affect.SpellClassMask[2]) flag96 dbc_affect;
dbc_affect = spellInfo->EffectSpellClassMask[effectId];
if(dbc_affect[0] == affect[0] || dbc_affect[1] == affect[1] || dbc_affect[2] == affect[2])
{ {
char text[]="ABC"; char text[]="ABC";
sLog.outErrorDb("Spell %u listed in `spell_affect` have redundant (same with EffectSpellClassMask%c) data for effect index (%u) and not needed, skipped.", entry, text[effectId], effectId); sLog.outErrorDb("Spell %u listed in `spell_affect` have redundant (same with EffectSpellClassMask%c) data for effect index (%u) and not needed, skipped.", entry, text[effectId], effectId);
@@ -974,16 +967,9 @@ void SpellMgr::LoadSpellAffects()
spellInfo->EffectApplyAuraName[effectId] != SPELL_AURA_ADD_TARGET_TRIGGER) ) spellInfo->EffectApplyAuraName[effectId] != SPELL_AURA_ADD_TARGET_TRIGGER) )
continue; continue;
uint32 const *ptr = 0; flag96 dbc_affect;
switch (effectId) dbc_affect = spellInfo->EffectSpellClassMask[effectId];
{ if(dbc_affect)
case 0: ptr = &spellInfo->EffectSpellClassMaskA[0]; break;
case 1: ptr = &spellInfo->EffectSpellClassMaskB[0]; break;
case 2: ptr = &spellInfo->EffectSpellClassMaskC[0]; break;
default:
continue;
}
if(ptr[0] || ptr[1] || ptr[2])
continue; continue;
if(mSpellAffectMap.find((id<<8) + effectId) != mSpellAffectMap.end()) if(mSpellAffectMap.find((id<<8) + effectId) != mSpellAffectMap.end())
@@ -1006,8 +992,7 @@ bool SpellMgr::IsAffectedByMod(SpellEntry const *spellInfo, SpellModifier *mod)
return false; return false;
// true // true
if (mod->mask & spellInfo->SpellFamilyFlags || if (mod->mask & spellInfo->SpellFamilyFlags)
mod->mask2 & spellInfo->SpellFamilyFlags2)
return true; return true;
return false; return false;
@@ -1164,8 +1149,7 @@ bool SpellMgr::IsSpellProcEventCanTriggeredBy(SpellProcEventEntry const * spellP
// spellFamilyName is Ok need check for spellFamilyMask if present // spellFamilyName is Ok need check for spellFamilyMask if present
if(spellProcEvent->spellFamilyMask || spellProcEvent->spellFamilyMask2) if(spellProcEvent->spellFamilyMask || spellProcEvent->spellFamilyMask2)
{ {
if ((spellProcEvent->spellFamilyMask & procSpell->SpellFamilyFlags ) == 0 && if ((spellProcEvent->spellFamilyMask & procSpell->SpellFamilyFlags ) == 0)
(spellProcEvent->spellFamilyMask2 & procSpell->SpellFamilyFlags2) == 0)
return false; return false;
active = true; // Spell added manualy -> so its active spell active = true; // Spell added manualy -> so its active spell
} }
@@ -1608,7 +1592,7 @@ void SpellMgr::LoadSpellChains()
if(sRank.empty()) if(sRank.empty())
continue; continue;
//exception to polymorph spells-make pig and turtle other chain than sheep //exception to polymorph spells-make pig and turtle other chain than sheep
if ((SpellInfo->SpellFamilyName==SPELLFAMILY_MAGE) && (SpellInfo->SpellFamilyFlags & 0x1000000) && (SpellInfo->SpellIconID!=82)) if ((SpellInfo->SpellFamilyName==SPELLFAMILY_MAGE) && (SpellInfo->SpellFamilyFlags[0] & 0x1000000) && (SpellInfo->SpellIconID!=82))
continue; continue;
SpellRankEntry entry; SpellRankEntry entry;
@@ -2332,7 +2316,7 @@ void SpellMgr::LoadPetLevelupSpellMap()
continue; continue;
// not pet spell // not pet spell
if(!(spell->SpellFamilyFlags & 0x1000000000000000LL)) if(!(spell->SpellFamilyFlags[1] & 0x10000000))
continue; continue;
// not Growl or Cower (generics) // not Growl or Cower (generics)
@@ -2678,46 +2662,46 @@ DiminishingGroup GetDiminishingReturnsGroupForSpell(SpellEntry const* spellproto
case SPELLFAMILY_ROGUE: case SPELLFAMILY_ROGUE:
{ {
// Kidney Shot // Kidney Shot
if (spellproto->SpellFamilyFlags & 0x00000200000LL) if (spellproto->SpellFamilyFlags[0] & 0x200000)
return DIMINISHING_KIDNEYSHOT; return DIMINISHING_KIDNEYSHOT;
// Sap // Sap
else if (spellproto->SpellFamilyFlags & 0x00000000080LL) else if (spellproto->SpellFamilyFlags[0] & 0x80)
return DIMINISHING_POLYMORPH; return DIMINISHING_POLYMORPH;
// Gouge // Gouge
else if (spellproto->SpellFamilyFlags & 0x00000000008LL) else if (spellproto->SpellFamilyFlags[0] & 0x8)
return DIMINISHING_POLYMORPH; return DIMINISHING_POLYMORPH;
// Blind // Blind
else if (spellproto->SpellFamilyFlags & 0x00001000000LL) else if (spellproto->SpellFamilyFlags[0] & 0x00001000000)
return DIMINISHING_BLIND_CYCLONE; return DIMINISHING_BLIND_CYCLONE;
break; break;
} }
case SPELLFAMILY_WARLOCK: case SPELLFAMILY_WARLOCK:
{ {
// Death Coil // Death Coil
if (spellproto->SpellFamilyFlags & 0x00000080000LL) if (spellproto->SpellFamilyFlags[0] & 0x00000080000)
return DIMINISHING_DEATHCOIL; return DIMINISHING_DEATHCOIL;
// Seduction // Seduction
if (spellproto->SpellFamilyFlags & 0x00040000000LL) if (spellproto->SpellFamilyFlags[0] & 0x00040000000)
return DIMINISHING_FEAR; return DIMINISHING_FEAR;
// Fear // Fear
//else if (spellproto->SpellFamilyFlags & 0x40840000000LL) //else if (spellproto->SpellFamilyFlags & 0x40840000000LL)
// return DIMINISHING_WARLOCK_FEAR; // return DIMINISHING_WARLOCK_FEAR;
// Curses/etc // Curses/etc
else if (spellproto->SpellFamilyFlags & 0x00080000000LL) else if (spellproto->SpellFamilyFlags[0] & 0x80000000)
return DIMINISHING_LIMITONLY; return DIMINISHING_LIMITONLY;
break; break;
} }
case SPELLFAMILY_DRUID: case SPELLFAMILY_DRUID:
{ {
// Cyclone // Cyclone
if (spellproto->SpellFamilyFlags & 0x02000000000LL) if (spellproto->SpellFamilyFlags[1] & 0x020)
return DIMINISHING_BLIND_CYCLONE; return DIMINISHING_BLIND_CYCLONE;
break; break;
} }
case SPELLFAMILY_WARRIOR: case SPELLFAMILY_WARRIOR:
{ {
// Hamstring - limit duration to 10s in PvP // Hamstring - limit duration to 10s in PvP
if (spellproto->SpellFamilyFlags & 0x00000000002LL) if (spellproto->SpellFamilyFlags[0] & 0x00000000002)
return DIMINISHING_LIMITONLY; return DIMINISHING_LIMITONLY;
break; break;
} }
+17 -19
View File
@@ -275,17 +275,16 @@ enum SpellSelectTargetTypes
}; };
//Some SpellFamilyFlags //Some SpellFamilyFlags
#define SPELLFAMILYFLAG_ROGUE_VANISH 0x000000800LL #define SPELLFAMILYFLAG_ROGUE_VANISH 0x00000800
#define SPELLFAMILYFLAG_ROGUE_STEALTH 0x000400000LL #define SPELLFAMILYFLAG_ROGUE_STEALTH 0x00400000
#define SPELLFAMILYFLAG_ROGUE_BACKSTAB 0x000800004LL #define SPELLFAMILYFLAG_ROGUE_BACKSTAB 0x00800004
#define SPELLFAMILYFLAG_ROGUE_SAP 0x000000080LL #define SPELLFAMILYFLAG_ROGUE_SAP 0x00000080
#define SPELLFAMILYFLAG_ROGUE_FEINT 0x008000000LL #define SPELLFAMILYFLAG_ROGUE_FEINT 0x08000000
#define SPELLFAMILYFLAG_ROGUE_KIDNEYSHOT 0x000200000LL #define SPELLFAMILYFLAG_ROGUE_KIDNEYSHOT 0x00200000
#define SPELLFAMILYFLAG_ROGUE__FINISHING_MOVE 0x9003E0000LL //#define SPELLFAMILYFLAG_ROGUE__FINISHING_MOVE 0x9003E0000LL
#define SPELLFAMILYFLAG_WARRIOR_SUNDERARMOR 0x000004000LL #define SPELLFAMILYFLAG_WARRIOR_SUNDERARMOR 0x00004000
#define SPELLFAMILYFLAG_SHAMAN_FROST_SHOCK 0x080000000LL #define SPELLFAMILYFLAG_SHAMAN_FROST_SHOCK 0x80000000
#define SPELLFAMILYFLAG_PALADIN_SEALS 0x26000C000A000000LL
// Spell clasification // Spell clasification
enum SpellSpecific enum SpellSpecific
{ {
@@ -339,13 +338,16 @@ inline bool IsSealSpell(SpellEntry const *spellInfo)
{ {
//Collection of all the seal family flags. No other paladin spell has any of those. //Collection of all the seal family flags. No other paladin spell has any of those.
return spellInfo->SpellFamilyName == SPELLFAMILY_PALADIN && return spellInfo->SpellFamilyName == SPELLFAMILY_PALADIN &&
( spellInfo->SpellFamilyFlags & SPELLFAMILYFLAG_PALADIN_SEALS ); ( spellInfo->SpellFamilyFlags[1] & 0x26000C00
|| spellInfo->SpellFamilyFlags[0] & 0x0A000000 );
} }
inline bool IsElementalShield(SpellEntry const *spellInfo) inline bool IsElementalShield(SpellEntry const *spellInfo)
{ {
// family flags 10 (Lightning), 42 (Earth), 37 (Water), proc shield from T2 8 pieces bonus // family flags 10 (Lightning), 42 (Earth), 37 (Water), proc shield from T2 8 pieces bonus
return (spellInfo->SpellFamilyFlags & 0x42000000400LL) || spellInfo->Id == 23552; return (spellInfo->SpellFamilyFlags[1] & 0x420
|| spellInfo->SpellFamilyFlags[0] & 0x00000400
|| spellInfo->Id == 23552);
} }
inline bool IsExplicitDiscoverySpell(SpellEntry const *spellInfo) inline bool IsExplicitDiscoverySpell(SpellEntry const *spellInfo)
@@ -512,11 +514,7 @@ bool IsDiminishingReturnsGroupDurationLimited(DiminishingGroup group);
DiminishingReturnsType GetDiminishingReturnsGroupType(DiminishingGroup group); DiminishingReturnsType GetDiminishingReturnsGroupType(DiminishingGroup group);
// Spell affects related declarations (accessed using SpellMgr functions) // Spell affects related declarations (accessed using SpellMgr functions)
struct SpellAffectEntry typedef UNORDERED_MAP<uint32, flag96> SpellAffectMap;
{
uint32 SpellClassMask[3];
};
typedef UNORDERED_MAP<uint32, SpellAffectEntry> SpellAffectMap;
// Spell proc event related declarations (accessed using SpellMgr functions) // Spell proc event related declarations (accessed using SpellMgr functions)
enum ProcFlags enum ProcFlags
@@ -596,7 +594,7 @@ struct SpellProcEventEntry
{ {
uint32 schoolMask; // if nonzero - bit mask for matching proc condition based on spell candidate's school: Fire=2, Mask=1<<(2-1)=2 uint32 schoolMask; // if nonzero - bit mask for matching proc condition based on spell candidate's school: Fire=2, Mask=1<<(2-1)=2
uint32 spellFamilyName; // if nonzero - for matching proc condition based on candidate spell's SpellFamilyNamer value uint32 spellFamilyName; // if nonzero - for matching proc condition based on candidate spell's SpellFamilyNamer value
uint64 spellFamilyMask; // if nonzero - for matching proc condition based on candidate spell's SpellFamilyFlags (like auras 107 and 108 do) flag96 spellFamilyMask; // if nonzero - for matching proc condition based on candidate spell's SpellFamilyFlags (like auras 107 and 108 do)
uint32 spellFamilyMask2; // if nonzero - for matching proc condition based on candidate spell's SpellFamilyFlags2 (like auras 107 and 108 do) uint32 spellFamilyMask2; // if nonzero - for matching proc condition based on candidate spell's SpellFamilyFlags2 (like auras 107 and 108 do)
uint32 procFlags; // bitmask for matching proc event uint32 procFlags; // bitmask for matching proc event
uint32 procEx; // proc Extend info (see ProcFlagsEx) uint32 procEx; // proc Extend info (see ProcFlagsEx)
@@ -794,7 +792,7 @@ class SpellMgr
// Accessors (const or static functions) // Accessors (const or static functions)
public: public:
// Spell affects // Spell affects
SpellAffectEntry const*GetSpellAffect(uint16 spellId, uint8 effectId) const flag96 const*GetSpellAffect(uint16 spellId, uint8 effectId) const
{ {
SpellAffectMap::const_iterator itr = mSpellAffectMap.find((spellId<<8) + effectId); SpellAffectMap::const_iterator itr = mSpellAffectMap.find((spellId<<8) + effectId);
if( itr != mSpellAffectMap.end( ) ) if( itr != mSpellAffectMap.end( ) )
+52 -54
View File
@@ -3774,7 +3774,7 @@ void Unit::RemoveAurasDueToSpellByDispel(uint32 spellId, uint64 casterGUID, Unit
{ {
// Custom dispel case // Custom dispel case
// Unstable Affliction // Unstable Affliction
if (aur->GetSpellProto()->SpellFamilyName == SPELLFAMILY_WARLOCK && (aur->GetSpellProto()->SpellFamilyFlags & 0x010000000000LL)) if (aur->GetSpellProto()->SpellFamilyName == SPELLFAMILY_WARLOCK && (aur->GetSpellProto()->SpellFamilyFlags[1] & 0x0100))
{ {
int32 damage = aur->GetModifier()->m_amount*9; int32 damage = aur->GetModifier()->m_amount*9;
uint64 caster_guid = aur->GetCasterGUID(); uint64 caster_guid = aur->GetCasterGUID();
@@ -4120,13 +4120,13 @@ Aura* Unit::GetAura(uint32 spellId, uint32 effindex)
return NULL; return NULL;
} }
Aura* Unit::GetAura(AuraType type, uint32 family, uint64 familyFlag, uint32 familyFlag2, uint64 casterGUID) Aura* Unit::GetAura(AuraType type, uint32 family, uint32 familyFlag1, uint32 familyFlag2, uint32 familyFlag3, uint64 casterGUID)
{ {
AuraList const& auras = GetAurasByType(type); AuraList const& auras = GetAurasByType(type);
for(AuraList::const_iterator i = auras.begin();i != auras.end(); ++i) for(AuraList::const_iterator i = auras.begin();i != auras.end(); ++i)
{ {
SpellEntry const *spell = (*i)->GetSpellProto(); SpellEntry const *spell = (*i)->GetSpellProto();
if (spell->SpellFamilyName == family && (spell->SpellFamilyFlags & familyFlag || spell->SpellFamilyFlags2 & familyFlag2)) if (spell->SpellFamilyName == family && spell->SpellFamilyFlags.HasFlag(familyFlag1, familyFlag2, familyFlag3))
{ {
if (casterGUID && (*i)->GetCasterGUID()!=casterGUID) if (casterGUID && (*i)->GetCasterGUID()!=casterGUID)
continue; continue;
@@ -4623,7 +4623,7 @@ bool Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, Aura* triggeredByAu
{ {
if(SpellEntry const* iterSpellProto = (*iter)->GetSpellProto()) if(SpellEntry const* iterSpellProto = (*iter)->GetSpellProto())
{ {
if(iterSpellProto->SpellFamilyName==SPELLFAMILY_MAGE && (iterSpellProto->SpellFamilyFlags & 0x10000000)) if(iterSpellProto->SpellFamilyName==SPELLFAMILY_MAGE && (iterSpellProto->SpellFamilyFlags[0] & 0x10000000))
{ {
found=true; found=true;
break; break;
@@ -5000,7 +5000,7 @@ bool Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, Aura* triggeredByAu
break; break;
} }
// Incanter's Regalia set (add trigger chance to Mana Shield) // Incanter's Regalia set (add trigger chance to Mana Shield)
if (dummySpell->SpellFamilyFlags & 0x0000000000008000LL) if (dummySpell->SpellFamilyFlags[0] & 0x8000)
{ {
if(GetTypeId() != TYPEID_PLAYER) if(GetTypeId() != TYPEID_PLAYER)
return false; return false;
@@ -5052,7 +5052,7 @@ bool Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, Aura* triggeredByAu
case SPELLFAMILY_WARRIOR: case SPELLFAMILY_WARRIOR:
{ {
// Retaliation // Retaliation
if(dummySpell->SpellFamilyFlags==0x0000000800000000LL) if(dummySpell->SpellFamilyFlags.IsEqual(0, 0x8, 0))
{ {
// check attack comes not from behind // check attack comes not from behind
if (!HasInArc(M_PI, pVictim)) if (!HasInArc(M_PI, pVictim))
@@ -5096,7 +5096,7 @@ bool Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, Aura* triggeredByAu
case SPELLFAMILY_WARLOCK: case SPELLFAMILY_WARLOCK:
{ {
// Seed of Corruption // Seed of Corruption
if (dummySpell->SpellFamilyFlags & 0x0000001000000000LL) if (dummySpell->SpellFamilyFlags[1] & 0x00000010)
{ {
Modifier* mod = triggeredByAura->GetModifier(); Modifier* mod = triggeredByAura->GetModifier();
// if damage is more than need or target die from damage deal finish spell // if damage is more than need or target die from damage deal finish spell
@@ -5201,7 +5201,7 @@ bool Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, Aura* triggeredByAu
case SPELLFAMILY_PRIEST: case SPELLFAMILY_PRIEST:
{ {
// Vampiric Touch // Vampiric Touch
if( dummySpell->SpellFamilyFlags & 0x0000040000000000LL ) if( dummySpell->SpellFamilyFlags[1] & 0x00000400 )
{ {
if(!pVictim || !pVictim->isAlive()) if(!pVictim || !pVictim->isAlive())
return false; return false;
@@ -5244,10 +5244,10 @@ bool Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, Aura* triggeredByAu
case 40438: case 40438:
{ {
// Shadow Word: Pain // Shadow Word: Pain
if( procSpell->SpellFamilyFlags & 0x0000000000008000LL ) if( procSpell->SpellFamilyFlags[0] & 0x8000 )
triggered_spell_id = 40441; triggered_spell_id = 40441;
// Renew // Renew
else if( procSpell->SpellFamilyFlags & 0x0000000000000010LL ) else if( procSpell->SpellFamilyFlags[0] & 0x10 )
triggered_spell_id = 40440; triggered_spell_id = 40440;
else else
return false; return false;
@@ -5319,19 +5319,19 @@ bool Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, Aura* triggeredByAu
float chance; float chance;
// Starfire // Starfire
if( procSpell->SpellFamilyFlags & 0x0000000000000004LL ) if( procSpell->SpellFamilyFlags[0] & 0x4 )
{ {
triggered_spell_id = 40445; triggered_spell_id = 40445;
chance = 25.f; chance = 25.f;
} }
// Rejuvenation // Rejuvenation
else if( procSpell->SpellFamilyFlags & 0x0000000000000010LL ) else if( procSpell->SpellFamilyFlags[0] & 0x10 )
{ {
triggered_spell_id = 40446; triggered_spell_id = 40446;
chance = 25.f; chance = 25.f;
} }
// Mangle (cat/bear) // Mangle (cat/bear)
else if( procSpell->SpellFamilyFlags & 0x0000044000000000LL ) else if( procSpell->SpellFamilyFlags[1] & 0x00000440)
{ {
triggered_spell_id = 40452; triggered_spell_id = 40452;
chance = 40.f; chance = 40.f;
@@ -5362,7 +5362,7 @@ bool Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, Aura* triggeredByAu
if (effIndex!=0) if (effIndex!=0)
return true; return true;
// Wrath crit // Wrath crit
if (procSpell->SpellFamilyFlags & 0x0000000000000001LL) if (procSpell->SpellFamilyFlags[0] & 0x1)
{ {
if (!roll_chance_i(60)) if (!roll_chance_i(60))
return false; return false;
@@ -5371,7 +5371,7 @@ bool Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, Aura* triggeredByAu
break; break;
} }
// Starfire crit // Starfire crit
if (procSpell->SpellFamilyFlags & 0x0000000000000004LL) if (procSpell->SpellFamilyFlags[0] & 0x4)
{ {
triggered_spell_id = 48517; triggered_spell_id = 48517;
target = this; target = this;
@@ -5413,7 +5413,7 @@ bool Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, Aura* triggeredByAu
{ {
SpellEntry const *spellProto = (*itr)->GetSpellProto(); SpellEntry const *spellProto = (*itr)->GetSpellProto();
if( spellProto->SpellFamilyName == SPELLFAMILY_ROGUE && if( spellProto->SpellFamilyName == SPELLFAMILY_ROGUE &&
spellProto->SpellFamilyFlags & 0x0000000000040000LL) spellProto->SpellFamilyFlags[0] & 0x40000)
{ {
(*itr)->SetAuraMaxDuration(GetSpellMaxDuration(spellProto)); (*itr)->SetAuraMaxDuration(GetSpellMaxDuration(spellProto));
(*itr)->RefreshAura(); (*itr)->RefreshAura();
@@ -5484,7 +5484,7 @@ bool Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, Aura* triggeredByAu
if ( dummySpell->SpellIconID == 3560 ) if ( dummySpell->SpellIconID == 3560 )
{ {
// This effect only from Rapid Killing (mana regen) // This effect only from Rapid Killing (mana regen)
if (!(procSpell->SpellFamilyFlags & 0x0100000000000000LL)) if (!(procSpell->SpellFamilyFlags[1] & 0x01000000))
return false; return false;
triggered_spell_id = 56654; triggered_spell_id = 56654;
target = this; target = this;
@@ -5495,7 +5495,7 @@ bool Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, Aura* triggeredByAu
case SPELLFAMILY_PALADIN: 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.022*$AP+0.044*$SPH)} damage)
if (dummySpell->SpellFamilyFlags&0x000000008000000LL && effIndex==0) if (dummySpell->SpellFamilyFlags[0]&0x8000000 && effIndex==0)
{ {
triggered_spell_id = 25742; triggered_spell_id = 25742;
float ap = GetTotalAttackPowerValue(BASE_ATTACK); float ap = GetTotalAttackPowerValue(BASE_ATTACK);
@@ -5505,7 +5505,7 @@ bool Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, Aura* triggeredByAu
break; break;
} }
// Sacred Shield // Sacred Shield
if (dummySpell->SpellFamilyFlags&0x0008000000000000LL) if (dummySpell->SpellFamilyFlags[1]&0x00080000)
{ {
triggered_spell_id = 58597; triggered_spell_id = 58597;
target = this; target = this;
@@ -5647,13 +5647,13 @@ bool Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, Aura* triggeredByAu
float chance; float chance;
// Flash of light/Holy light // Flash of light/Holy light
if( procSpell->SpellFamilyFlags & 0x00000000C0000000LL) if( procSpell->SpellFamilyFlags[0] & 0xC0000000)
{ {
triggered_spell_id = 40471; triggered_spell_id = 40471;
chance = 15.f; chance = 15.f;
} }
// Judgement // Judgement
else if( procSpell->SpellFamilyFlags & 0x0000000000800000LL ) else if( procSpell->SpellFamilyFlags[0] & 0x800000 )
{ {
triggered_spell_id = 40472; triggered_spell_id = 40472;
chance = 50.f; chance = 50.f;
@@ -5813,17 +5813,17 @@ bool Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, Aura* triggeredByAu
return false; return false;
float chance; float chance;
if (procSpell->SpellFamilyFlags & 0x0000000000000001LL) if (procSpell->SpellFamilyFlags[0] & 0x1)
{ {
triggered_spell_id = 40465; // Lightning Bolt triggered_spell_id = 40465; // Lightning Bolt
chance = 15.f; chance = 15.f;
} }
else if (procSpell->SpellFamilyFlags & 0x0000000000000080LL) else if (procSpell->SpellFamilyFlags[0] & 0x80)
{ {
triggered_spell_id = 40465; // Lesser Healing Wave triggered_spell_id = 40465; // Lesser Healing Wave
chance = 10.f; chance = 10.f;
} }
else if (procSpell->SpellFamilyFlags & 0x0000001000000000LL) else if (procSpell->SpellFamilyFlags[1] & 0x00000010)
{ {
triggered_spell_id = 40466; // Stormstrike triggered_spell_id = 40466; // Stormstrike
chance = 50.f; chance = 50.f;
@@ -5870,7 +5870,7 @@ bool Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, Aura* triggeredByAu
break; break;
} }
// Earth Shield // Earth Shield
if(dummySpell->SpellFamilyFlags & 0x0000040000000000LL) if(dummySpell->SpellFamilyFlags[1] & 0x00000400)
{ {
basepoints0 = triggerAmount; basepoints0 = triggerAmount;
target = this; target = this;
@@ -5881,14 +5881,14 @@ bool Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, Aura* triggeredByAu
if (dummySpell->SpellIconID == 2287) if (dummySpell->SpellIconID == 2287)
{ {
// Lesser Healing Wave need aditional 60% roll // Lesser Healing Wave need aditional 60% roll
if (procSpell->SpellFamilyFlags & 0x0000000000000080LL && !roll_chance_i(60)) if (procSpell->SpellFamilyFlags[0] & 0x80 && !roll_chance_i(60))
return false; return false;
// lookup water shield // lookup water shield
AuraList const& vs = GetAurasByType(SPELL_AURA_PROC_TRIGGER_SPELL); AuraList const& vs = GetAurasByType(SPELL_AURA_PROC_TRIGGER_SPELL);
for(AuraList::const_iterator itr = vs.begin(); itr != vs.end(); ++itr) for(AuraList::const_iterator itr = vs.begin(); itr != vs.end(); ++itr)
{ {
if( (*itr)->GetSpellProto()->SpellFamilyName == SPELLFAMILY_SHAMAN && if( (*itr)->GetSpellProto()->SpellFamilyName == SPELLFAMILY_SHAMAN &&
(*itr)->GetSpellProto()->SpellFamilyFlags & 0x0000002000000000LL) (*itr)->GetSpellProto()->SpellFamilyFlags[1] & 0x00000020)
{ {
uint32 spell = (*itr)->GetSpellProto()->EffectTriggerSpell[(*itr)->GetEffIndex()]; uint32 spell = (*itr)->GetSpellProto()->EffectTriggerSpell[(*itr)->GetEffIndex()];
CastSpell(this, spell, true, castItem, triggeredByAura); CastSpell(this, spell, true, castItem, triggeredByAura);
@@ -5949,12 +5949,11 @@ bool Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, Aura* triggeredByAu
mod->value = -100; mod->value = -100;
mod->type = SPELLMOD_PCT; mod->type = SPELLMOD_PCT;
mod->spellId = dummySpell->Id; mod->spellId = dummySpell->Id;
mod->mask = 0x0000000000000003LL; mod->mask[0] = 0x3;
mod->mask2= 0LL;
((Player*)this)->AddSpellMod(mod, true); ((Player*)this)->AddSpellMod(mod, true);
// Remove cooldown (Chain Lightning - have Category Recovery time) // Remove cooldown (Chain Lightning - have Category Recovery time)
if (procSpell->SpellFamilyFlags & 0x0000000000000002LL) if (procSpell->SpellFamilyFlags[0] & 0x2)
((Player*)this)->RemoveSpellCooldown(spellId); ((Player*)this)->RemoveSpellCooldown(spellId);
CastSpell(pVictim, spellId, true, castItem, triggeredByAura); CastSpell(pVictim, spellId, true, castItem, triggeredByAura);
@@ -5974,7 +5973,7 @@ bool Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, Aura* triggeredByAu
for(AuraList::const_iterator itr = vs.begin(); itr != vs.end(); ++itr) for(AuraList::const_iterator itr = vs.begin(); itr != vs.end(); ++itr)
{ {
if( (*itr)->GetSpellProto()->SpellFamilyName == SPELLFAMILY_SHAMAN && if( (*itr)->GetSpellProto()->SpellFamilyName == SPELLFAMILY_SHAMAN &&
(*itr)->GetSpellProto()->SpellFamilyFlags & 0x0000000000000400LL) (*itr)->GetSpellProto()->SpellFamilyFlags[0] & 0x400)
{ {
uint32 spell = 0; uint32 spell = 0;
switch ((*itr)->GetId()) switch ((*itr)->GetId())
@@ -6041,7 +6040,7 @@ bool Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, Aura* triggeredByAu
break; break;
} }
// Vendetta // Vendetta
if (dummySpell->SpellFamilyFlags & 0x0000000000010000LL) if (dummySpell->SpellFamilyFlags[0] & 0x10000)
{ {
basepoints0 = triggerAmount * GetMaxHealth() / 100; basepoints0 = triggerAmount * GetMaxHealth() / 100;
triggered_spell_id = 50181; triggered_spell_id = 50181;
@@ -6304,10 +6303,10 @@ bool Unit::HandleProcTriggerSpell(Unit *pVictim, uint32 damage, Aura* triggeredB
uint32 tick = 1; // Default tick = 1 uint32 tick = 1; // Default tick = 1
// Hellfire have 15 tick // Hellfire have 15 tick
if (procSpell->SpellFamilyFlags&0x0000000000000040LL) if (procSpell->SpellFamilyFlags[0]&0x40)
tick = 15; tick = 15;
// Rain of Fire have 4 tick // Rain of Fire have 4 tick
else if (procSpell->SpellFamilyFlags&0x0000000000000020LL) else if (procSpell->SpellFamilyFlags[0]&0x20)
tick = 4; tick = 4;
else else
return false; return false;
@@ -6326,7 +6325,7 @@ bool Unit::HandleProcTriggerSpell(Unit *pVictim, uint32 damage, Aura* triggeredB
trigger_spell_id = 18093; trigger_spell_id = 18093;
} }
// Drain Soul // Drain Soul
else if (auraSpellInfo->SpellFamilyFlags & 0x0000000000004000LL) else if (auraSpellInfo->SpellFamilyFlags[0] & 0x4000)
{ {
Unit::AuraList const& mAddFlatModifier = GetAurasByType(SPELL_AURA_ADD_FLAT_MODIFIER); Unit::AuraList const& mAddFlatModifier = GetAurasByType(SPELL_AURA_ADD_FLAT_MODIFIER);
for(Unit::AuraList::const_iterator i = mAddFlatModifier.begin(); i != mAddFlatModifier.end(); ++i) for(Unit::AuraList::const_iterator i = mAddFlatModifier.begin(); i != mAddFlatModifier.end(); ++i)
@@ -6455,7 +6454,7 @@ bool Unit::HandleProcTriggerSpell(Unit *pVictim, uint32 damage, Aura* triggeredB
// procspell is triggered spell but we need mana cost of original casted spell // procspell is triggered spell but we need mana cost of original casted spell
uint32 originalSpellId = procSpell->Id; uint32 originalSpellId = procSpell->Id;
// Holy Shock heal // Holy Shock heal
if(procSpell->SpellFamilyFlags & 0x0001000000000000LL) if(procSpell->SpellFamilyFlags[1] & 0x00010000)
{ {
switch(procSpell->Id) switch(procSpell->Id)
{ {
@@ -6523,7 +6522,7 @@ bool Unit::HandleProcTriggerSpell(Unit *pVictim, uint32 damage, Aura* triggeredB
case SPELLFAMILY_SHAMAN: case SPELLFAMILY_SHAMAN:
{ {
// Lightning Shield (overwrite non existing triggered spell call in spell.dbc // Lightning Shield (overwrite non existing triggered spell call in spell.dbc
if(auraSpellInfo->SpellFamilyFlags & 0x0000000000000400) if(auraSpellInfo->SpellFamilyFlags[0] & 0x400)
{ {
switch(auraSpellInfo->Id) switch(auraSpellInfo->Id)
{ {
@@ -6702,7 +6701,7 @@ bool Unit::HandleProcTriggerSpell(Unit *pVictim, uint32 damage, Aura* triggeredB
case 53232: case 53232:
{ {
// This effect only from Rapid Fire (ability cast) // This effect only from Rapid Fire (ability cast)
if (!(procSpell->SpellFamilyFlags & 0x0000000000000020LL)) if (!(procSpell->SpellFamilyFlags[0] & 0x20))
return false; return false;
break; break;
} }
@@ -6760,7 +6759,7 @@ bool Unit::HandleProcTriggerSpell(Unit *pVictim, uint32 damage, Aura* triggeredB
if(!procSpell) if(!procSpell)
return false; return false;
// For trigger from Blizzard need exist Improved Blizzard // For trigger from Blizzard need exist Improved Blizzard
if (procSpell->SpellFamilyName==SPELLFAMILY_MAGE && procSpell->SpellFamilyFlags & 0x0000000000000080LL) if (procSpell->SpellFamilyName==SPELLFAMILY_MAGE && procSpell->SpellFamilyFlags[0] & 0x80)
{ {
bool found = false; bool found = false;
AuraList const& mOverrideClassScript = GetAurasByType(SPELL_AURA_OVERRIDE_CLASS_SCRIPTS); AuraList const& mOverrideClassScript = GetAurasByType(SPELL_AURA_OVERRIDE_CLASS_SCRIPTS);
@@ -7650,7 +7649,7 @@ uint32 Unit::SpellDamageBonus(Unit *pVictim, SpellEntry const *spellProto, uint3
for (AuraMap::const_iterator itr = victimAuras.begin(); itr != victimAuras.end(); ++itr) for (AuraMap::const_iterator itr = victimAuras.begin(); itr != victimAuras.end(); ++itr)
{ {
SpellEntry const* m_spell = itr->second->GetSpellProto(); SpellEntry const* m_spell = itr->second->GetSpellProto();
if (m_spell->SpellFamilyName != SPELLFAMILY_WARLOCK || !(m_spell->SpellFamilyFlags & 0x0004071B8044C402LL)) if (m_spell->SpellFamilyName != SPELLFAMILY_WARLOCK || !(m_spell->SpellFamilyFlags[1] & 0x0004071B || m_spell->SpellFamilyFlags[0] & 0x8044C402))
continue; continue;
modPercent += stepPercent * itr->second->GetStackAmount(); modPercent += stepPercent * itr->second->GetStackAmount();
if (modPercent >= maxPercent) if (modPercent >= maxPercent)
@@ -7670,7 +7669,7 @@ uint32 Unit::SpellDamageBonus(Unit *pVictim, SpellEntry const *spellProto, uint3
break; break;
case 5481: // Starfire Bonus case 5481: // Starfire Bonus
{ {
if (pVictim->GetAura(SPELL_AURA_PERIODIC_DAMAGE, SPELLFAMILY_DRUID, 0x0000000000200002LL)) if (pVictim->GetAura(SPELL_AURA_PERIODIC_DAMAGE, SPELLFAMILY_DRUID, 0x200002))
DoneTotalMod *= ((*i)->GetModifier()->m_amount+100.0f)/100.0f; DoneTotalMod *= ((*i)->GetModifier()->m_amount+100.0f)/100.0f;
break; break;
} }
@@ -7697,7 +7696,7 @@ uint32 Unit::SpellDamageBonus(Unit *pVictim, SpellEntry const *spellProto, uint3
} }
else // Tundra Stalker else // Tundra Stalker
{ {
if (pVictim->GetAura(SPELL_AURA_DUMMY, SPELLFAMILY_DEATHKNIGHT, 0x0400000000000000LL)) if (pVictim->GetAura(SPELL_AURA_DUMMY, SPELLFAMILY_DEATHKNIGHT,0, 0x04000000,0))
DoneTotalMod *= ((*i)->GetModifier()->m_amount+100.0f)/100.0f; DoneTotalMod *= ((*i)->GetModifier()->m_amount+100.0f)/100.0f;
break; break;
} }
@@ -7705,14 +7704,14 @@ uint32 Unit::SpellDamageBonus(Unit *pVictim, SpellEntry const *spellProto, uint3
} }
case 7293: // Rage of Rivendare case 7293: // Rage of Rivendare
{ {
if (pVictim->GetAura(SPELL_AURA_PERIODIC_DAMAGE, SPELLFAMILY_DEATHKNIGHT, 0x0200000000000000LL)) if (pVictim->GetAura(SPELL_AURA_PERIODIC_DAMAGE, SPELLFAMILY_DEATHKNIGHT, 0,0x02000000,0))
DoneTotalMod *= ((*i)->GetModifier()->m_amount+100.0f)/100.0f; DoneTotalMod *= ((*i)->GetModifier()->m_amount+100.0f)/100.0f;
break; break;
} }
// Twisted Faith // Twisted Faith
case 7377: case 7377:
{ {
if (pVictim->GetAura(SPELL_AURA_PERIODIC_DAMAGE, SPELLFAMILY_PRIEST, 0x0000000000008000LL, 0, GetGUID())) if (pVictim->GetAura(SPELL_AURA_PERIODIC_DAMAGE, SPELLFAMILY_PRIEST, 0x8000, 0,0, GetGUID()))
DoneTotalMod *= ((*i)->GetModifier()->m_amount+100.0f)/100.0f; DoneTotalMod *= ((*i)->GetModifier()->m_amount+100.0f)/100.0f;
break; break;
} }
@@ -7723,7 +7722,7 @@ uint32 Unit::SpellDamageBonus(Unit *pVictim, SpellEntry const *spellProto, uint3
case 7601: case 7601:
case 7602: case 7602:
{ {
if (pVictim->GetAura(SPELL_AURA_MOD_STALKED, SPELLFAMILY_HUNTER, 0x0000000000000400LL)) if (pVictim->GetAura(SPELL_AURA_MOD_STALKED, SPELLFAMILY_HUNTER, 0x400))
DoneTotalMod *= ((*i)->GetModifier()->m_amount+100.0f)/100.0f; DoneTotalMod *= ((*i)->GetModifier()->m_amount+100.0f)/100.0f;
break; break;
} }
@@ -8191,7 +8190,7 @@ bool Unit::isSpellCrit(Unit *pVictim, SpellEntry const *spellProto, SpellSchoolM
{ {
case SPELLFAMILY_PALADIN: case SPELLFAMILY_PALADIN:
// Sacred Shield // Sacred Shield
if (spellProto->SpellFamilyFlags & 0x0000000040000000LL) if (spellProto->SpellFamilyFlags[0] & 0x40000000)
{ {
Aura *aura = pVictim->GetDummyAura(58597); Aura *aura = pVictim->GetDummyAura(58597);
if (aura && aura->GetCasterGUID() == GetGUID()) if (aura && aura->GetCasterGUID() == GetGUID())
@@ -8201,9 +8200,9 @@ bool Unit::isSpellCrit(Unit *pVictim, SpellEntry const *spellProto, SpellSchoolM
break; break;
case SPELLFAMILY_SHAMAN: case SPELLFAMILY_SHAMAN:
// Lava Burst // Lava Burst
if (spellProto->SpellFamilyFlags & 0x0000100000000000LL) if (spellProto->SpellFamilyFlags[1] & 0x00001000)
{ {
if (Aura *flameShock = pVictim->GetAura(SPELL_AURA_PERIODIC_DAMAGE, SPELLFAMILY_SHAMAN, 0x0000000010000000LL, 0, GetGUID())) if (Aura *flameShock = pVictim->GetAura(SPELL_AURA_PERIODIC_DAMAGE, SPELLFAMILY_SHAMAN, 10000000, 0,0, GetGUID()))
{ {
// Consume shock aura if not have Glyph of Flame Shock // Consume shock aura if not have Glyph of Flame Shock
if (!GetAura(55447, 0)) if (!GetAura(55447, 0))
@@ -8364,7 +8363,7 @@ uint32 Unit::SpellHealingBonus(Unit *pVictim, SpellEntry const *spellProto, uint
break; break;
case 7798: // Glyph of Regrowth case 7798: // Glyph of Regrowth
{ {
if (pVictim->GetAura(SPELL_AURA_PERIODIC_HEAL, SPELLFAMILY_DRUID, 0x0000000000000040LL)) if (pVictim->GetAura(SPELL_AURA_PERIODIC_HEAL, SPELLFAMILY_DRUID, 0x40))
DoneTotalMod *= ((*i)->GetModifier()->m_amount+100.0f)/100.0f; DoneTotalMod *= ((*i)->GetModifier()->m_amount+100.0f)/100.0f;
break; break;
} }
@@ -8379,7 +8378,7 @@ uint32 Unit::SpellHealingBonus(Unit *pVictim, SpellEntry const *spellProto, uint
continue; continue;
SpellEntry const* m_spell = itr->second->GetSpellProto(); SpellEntry const* m_spell = itr->second->GetSpellProto();
if ( m_spell->SpellFamilyName != SPELLFAMILY_DRUID || if ( m_spell->SpellFamilyName != SPELLFAMILY_DRUID ||
!(m_spell->SpellFamilyFlags & 0x0000001000000050LL)) !(m_spell->SpellFamilyFlags[1] & 0x00000010 || m_spell->SpellFamilyFlags[0] & 0x50))
continue; continue;
modPercent += stepPercent * itr->second->GetStackAmount(); modPercent += stepPercent * itr->second->GetStackAmount();
} }
@@ -8388,7 +8387,7 @@ uint32 Unit::SpellHealingBonus(Unit *pVictim, SpellEntry const *spellProto, uint
} }
case 7871: // Glyph of Lesser Healing Wave case 7871: // Glyph of Lesser Healing Wave
{ {
if (pVictim->GetAura(SPELL_AURA_DUMMY, SPELLFAMILY_SHAMAN, 0x0000040000000000LL, 0, GetGUID())) if (pVictim->GetAura(SPELL_AURA_DUMMY, SPELLFAMILY_SHAMAN, 0 , 0x00000400, 0, GetGUID()))
DoneTotalMod *= ((*i)->GetModifier()->m_amount+100.0f)/100.0f; DoneTotalMod *= ((*i)->GetModifier()->m_amount+100.0f)/100.0f;
break; break;
} }
@@ -8539,7 +8538,7 @@ uint32 Unit::SpellHealingBonus(Unit *pVictim, SpellEntry const *spellProto, uint
// Taken mods // Taken mods
// Healing Wave cast // Healing Wave cast
if (spellProto->SpellFamilyName == SPELLFAMILY_SHAMAN && spellProto->SpellFamilyFlags & 0x0000000000000040LL) if (spellProto->SpellFamilyName == SPELLFAMILY_SHAMAN && spellProto->SpellFamilyFlags[0] & 0x40)
{ {
// Search for Healing Way on Victim // Search for Healing Way on Victim
Unit::AuraList const& auraDummy = pVictim->GetAurasByType(SPELL_AURA_DUMMY); Unit::AuraList const& auraDummy = pVictim->GetAurasByType(SPELL_AURA_DUMMY);
@@ -8836,7 +8835,7 @@ void Unit::MeleeDamageBonus(Unit *pVictim, uint32 *pdamage,WeaponAttackType attT
if(spellProto==NULL) if(spellProto==NULL)
break; break;
// Should increase Shred (initial Damage of Lacerate and Rake handled in Spell::EffectSchoolDMG) // Should increase Shred (initial Damage of Lacerate and Rake handled in Spell::EffectSchoolDMG)
if(spellProto->SpellFamilyName==SPELLFAMILY_DRUID && (spellProto->SpellFamilyFlags==0x00008000LL)) if(spellProto->SpellFamilyName==SPELLFAMILY_DRUID && spellProto->SpellFamilyFlags.IsEqual (0x00008000,0,0))
TakenTotalMod *= (100.0f+(*i)->GetModifier()->m_amount)/100.0f; TakenTotalMod *= (100.0f+(*i)->GetModifier()->m_amount)/100.0f;
break; break;
} }
@@ -11719,7 +11718,6 @@ bool Unit::HandleMeandingAuraProc( Aura* triggeredByAura )
mod->type = SPELLMOD_FLAT; mod->type = SPELLMOD_FLAT;
mod->spellId = spellProto->Id; mod->spellId = spellProto->Id;
mod->mask = spellProto->SpellFamilyFlags; mod->mask = spellProto->SpellFamilyFlags;
mod->mask2 = spellProto->SpellFamilyFlags2;
caster->AddSpellMod(mod, true); caster->AddSpellMod(mod, true);
CastCustomSpell(target,spellProto->Id,&heal,NULL,NULL,true,NULL,triggeredByAura,caster->GetGUID()); CastCustomSpell(target,spellProto->Id,&heal,NULL,NULL,true,NULL,triggeredByAura,caster->GetGUID());
+1 -1
View File
@@ -1335,7 +1335,7 @@ class TRINITY_DLL_SPEC Unit : public WorldObject
uint8 GetVisibleAurasCount() { return m_visibleAuras.size(); } uint8 GetVisibleAurasCount() { return m_visibleAuras.size(); }
Aura* GetAura(uint32 spellId, uint32 effindex); Aura* GetAura(uint32 spellId, uint32 effindex);
Aura* GetAura(AuraType type, uint32 family, uint64 familyFlag, uint32 familyFlag2 = 0, uint64 casterGUID = 0); Aura* GetAura(AuraType type, uint32 family, uint32 familyFlag1 = 0, uint32 familyFlag2 = 0, uint32 familyFlag3 = 0, uint64 casterGUID = 0);
AuraMap & GetAuras() { return m_Auras; } AuraMap & GetAuras() { return m_Auras; }
AuraMap const& GetAuras() const { return m_Auras; } AuraMap const& GetAuras() const { return m_Auras; }
+2
View File
@@ -80,6 +80,8 @@
#pragma warning(disable:4305) #pragma warning(disable:4305)
#pragma warning(disable:4005) #pragma warning(disable:4005)
#pragma warning(disable:4522)//warning when class has 2 constructosr
#endif // __SHOW_STUPID_WARNINGS__ #endif // __SHOW_STUPID_WARNINGS__
#endif // __GNUC__ #endif // __GNUC__
+2 -2
View File
@@ -289,11 +289,11 @@ void LoadDBCStores(const std::string& dataPath)
if(spell && spell->Category) if(spell && spell->Category)
sSpellCategoryStore[spell->Category].insert(i); sSpellCategoryStore[spell->Category].insert(i);
// DBC not support uint64 fields but SpellEntry have SpellFamilyFlags mapped at 2 uint32 fields /*// DBC not support uint64 fields but SpellEntry have SpellFamilyFlags mapped at 2 uint32 fields
// uint32 field already converted to bigendian if need, but must be swapped for correct uint64 bigendian view // uint32 field already converted to bigendian if need, but must be swapped for correct uint64 bigendian view
#if TRINITY_ENDIAN == TRINITY_BIGENDIAN #if TRINITY_ENDIAN == TRINITY_BIGENDIAN
std::swap(*((uint32*)(&spell->SpellFamilyFlags)),*(((uint32*)(&spell->SpellFamilyFlags))+1)); std::swap(*((uint32*)(&spell->SpellFamilyFlags)),*(((uint32*)(&spell->SpellFamilyFlags))+1));
#endif #endif*/
} }
for (uint32 j = 0; j < sSkillLineAbilityStore.GetNumRows(); ++j) for (uint32 j = 0; j < sSkillLineAbilityStore.GetNumRows(); ++j)
+3 -5
View File
@@ -23,6 +23,7 @@
#include "DBCEnums.h" #include "DBCEnums.h"
#include "Platform/Define.h" #include "Platform/Define.h"
#include "Util.h"
#include <map> #include <map>
#include <set> #include <set>
@@ -1149,9 +1150,7 @@ struct SpellEntry
int32 EffectMiscValueB[3]; // 116-118 m_effectMiscValueB int32 EffectMiscValueB[3]; // 116-118 m_effectMiscValueB
uint32 EffectTriggerSpell[3]; // 119-121 m_effectTriggerSpell uint32 EffectTriggerSpell[3]; // 119-121 m_effectTriggerSpell
float EffectPointsPerComboPoint[3]; // 122-124 m_effectPointsPerCombo float EffectPointsPerComboPoint[3]; // 122-124 m_effectPointsPerCombo
uint32 EffectSpellClassMaskA[3]; // 125-127 m_effectSpellClassMaskA flag96 EffectSpellClassMask[3]; //
uint32 EffectSpellClassMaskB[3]; // 128-130 m_effectSpellClassMaskB
uint32 EffectSpellClassMaskC[3]; // 131-133 m_effectSpellClassMaskC
uint32 SpellVisual[2]; // 134-135 m_spellVisualID uint32 SpellVisual[2]; // 134-135 m_spellVisualID
uint32 SpellIconID; // 136 m_spellIconID uint32 SpellIconID; // 136 m_spellIconID
uint32 activeIconID; // 137 m_activeIconID uint32 activeIconID; // 137 m_activeIconID
@@ -1169,8 +1168,7 @@ struct SpellEntry
uint32 StartRecoveryTime; // 209 m_startRecoveryTime uint32 StartRecoveryTime; // 209 m_startRecoveryTime
uint32 MaxTargetLevel; // 210 m_maxTargetLevel uint32 MaxTargetLevel; // 210 m_maxTargetLevel
uint32 SpellFamilyName; // 211 m_spellClassSet uint32 SpellFamilyName; // 211 m_spellClassSet
uint64 SpellFamilyFlags; // 212-213 m_spellClassMask NOTE: size is 12 bytes!!! flag96 SpellFamilyFlags; // 212-214
uint32 SpellFamilyFlags2; // 214 addition to m_spellClassMask
uint32 MaxAffectedTargets; // 215 m_maxTargets uint32 MaxAffectedTargets; // 215 m_maxTargets
uint32 DmgClass; // 216 m_defenseType uint32 DmgClass; // 216 m_defenseType
uint32 PreventionType; // 217 m_preventionType uint32 PreventionType; // 217 m_preventionType
+229
View File
@@ -316,3 +316,232 @@ bool IsIPAddress(char const* ipaddress);
uint32 CreatePIDFile(const std::string& filename); uint32 CreatePIDFile(const std::string& filename);
#endif #endif
//handler for operations on large flags
#ifndef _FLAG96
#define _FLAG96
class flag96
{
private:
uint32 part[3];
public:
flag96(uint32 p1=0,uint32 p2=0,uint32 p3=0)
{
part[0]=p1;
part[1]=p2;
part[2]=p3;
}
inline bool IsEqual(uint32 p1=0, uint32 p2=0, uint32 p3=0) const
{
return (
part[0]==p1 &&
part[1]==p2 &&
part[2]==p3);
};
inline bool HasFlag(uint32 p1=0, uint32 p2=0, uint32 p3=0) const
{
return (
part[0]&p1 ||
part[1]&p2 ||
part[2]&p3);
};
inline void Set(uint32 p1=0, uint32 p2=0, uint32 p3=0)
{
part[0]=p1;
part[1]=p2;
part[2]=p3;
};
template<class type>
inline bool operator < (type & right)
{
for (uint8 i=3;i>0;i--)
{
if (part[i-1]<right.part[i-1])
return 1;
else if (part[i-1]>right.part[i-1])
return 0;
}
return 0;
};
template<class type>
inline bool operator < (type & right) const
{
for (uint8 i=3;i>0;i--)
{
if (part[i-1]<right.part[i-1])
return 1;
else if (part[i-1]>right.part[i-1])
return 0;
}
return 0;
};
template<class type>
inline bool operator != (type & right)
{
if (part[0]!=right.part[0]
|| part[1]!=right.part[1]
|| part[2]!=right.part[2])
return true;
return false;
}
template<class type>
inline bool operator != (type & right) const
{
if (part[0]!=right.part[0]
|| part[1]!=right.part[1]
|| part[2]!=right.part[2])
return true;
return false;
};
template<class type>
inline bool operator == (type & right)
{
if (part[0]!=right.part[0]
|| part[1]!=right.part[1]
|| part[2]!=right.part[2])
return false;
return true;
};
template<class type>
inline bool operator == (type & right) const
{
if (part[0]!=right.part[0]
|| part[1]!=right.part[1]
|| part[2]!=right.part[2])
return false;
return true;
};
template<class type>
inline void operator = (type & right)
{
part[0]=right.part[0];
part[1]=right.part[1];
part[2]=right.part[2];
};
template<class type>
inline flag96 operator & (type & right)
{
flag96 ret(part[0] & right.part[0],part[1] & right.part[1],part[2] & right.part[2]);
return
ret;
};
template<class type>
inline flag96 operator & (type & right) const
{
flag96 ret(part[0] & right.part[0],part[1] & right.part[1],part[2] & right.part[2]);
return
ret;
};
template<class type>
inline void operator &= (type & right)
{
*this=*this & right;
};
template<class type>
inline flag96 operator | (type & right)
{
flag96 ret(part[0] | right.part[0],part[1] | right.part[1],part[2] | right.part[2]);
return
ret;
};
template<class type>
inline flag96 operator | (type & right) const
{
flag96 ret(part[0] | right.part[0],part[1] | right.part[1],part[2] | right.part[2]);
return
ret;
};
template<class type>
inline void operator |= (type & right)
{
*this=*this | right;
};
inline void operator ~ ()
{
part[2]=~part[2];
part[1]=~part[1];
part[0]=~part[0];
};
template<class type>
inline flag96 operator ^ (type & right)
{
flag96 ret(part[0] ^ right.part[0],part[1] ^ right.part[1],part[2] ^ right.part[2]);
return
ret;
};
template<class type>
inline flag96 operator ^ (type & right) const
{
flag96 ret(part[0] ^ right.part[0],part[1] ^ right.part[1],part[2] ^ right.part[2]);
return
ret;
};
template<class type>
inline void operator ^= (type & right)
{
*this=*this^right;
};
inline operator bool() const
{
return(
part[0] != 0 ||
part[1] != 0 ||
part[2] != 0);
};
inline operator bool()
{
return(
part[0] != 0 ||
part[1] != 0 ||
part[2] != 0);
};
inline bool operator ! () const
{
return(
part[0] == 0 &&
part[1] == 0 &&
part[2] == 0);
};
inline bool operator ! ()
{
return(
part[0] == 0 &&
part[1] == 0 &&
part[2] == 0);
};
inline uint32 & operator[](uint8 el)
{
return (part[el]);
};
inline const uint32 & operator[](uint8 el) const
{
return (part[el]);
};
};
#endif