*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
group->ChangeMembersGroup(movedPlayer), groupNr);
group->ChangeMembersGroup(movedPlayer, groupNr);
}
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;
uint8 i=0;
flag96 _mask;
for(int eff=0;eff<96;++eff)
{
uint64 _mask = 0;
uint64 _mask2= 0;
if (eff<64) _mask = uint64(1) << (eff- 0);
else _mask2= uint64(1) << (eff-64);
if ( mod->mask & _mask || mod->mask2 & _mask2)
if ((eff!=0) && (eff%32==0))
i++;
_mask[i] = uint32(1) << (eff-(32*i));
if ( mod->mask & _mask)
{
int32 val = 0;
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 += apply ? mod->value : -(mod->value);
@@ -19190,10 +19192,11 @@ bool Player::CanNoReagentCast(SpellEntry const* spellInfo) const
return true;
// Check no reagent use mask
uint64 noReagentMask_0_1 = GetUInt64Value(PLAYER_NO_REAGENT_COST_1);
uint32 noReagentMask_2 = GetUInt64Value(PLAYER_NO_REAGENT_COST_1+2);
if (spellInfo->SpellFamilyFlags & noReagentMask_0_1 ||
spellInfo->SpellFamilyFlags2 & noReagentMask_2)
flag96 noReagentMask;
noReagentMask[0] = GetUInt32Value(PLAYER_NO_REAGENT_COST_1);
noReagentMask[1] = GetUInt32Value(PLAYER_NO_REAGENT_COST_1+1);
noReagentMask[2] = GetUInt32Value(PLAYER_NO_REAGENT_COST_1+2);
if (spellInfo->SpellFamilyFlags & noReagentMask)
return true;
return false;
+1 -2
View File
@@ -101,8 +101,7 @@ struct SpellModifier
SpellModType type : 8;
int16 charges : 16;
int32 value;
uint64 mask;
uint64 mask2;
flag96 mask;
uint32 spellId;
Spell const* lastAffected;
};
+17 -19
View File
@@ -669,23 +669,24 @@ void Spell::prepareDataForTriggerSystem()
switch (m_spellInfo->SpellFamilyName)
{
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;
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;
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;
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;
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 ||
m_spellInfo->SpellFamilyFlags2 & 0x200) m_canTrigger = true;
if (m_spellInfo->SpellFamilyFlags[1] & 0x01002000
|| m_spellInfo->SpellFamilyFlags[0] & 0x00000214 ||
m_spellInfo->SpellFamilyFlags[2] & 0x200) m_canTrigger = true;
break;
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;
}
}
@@ -730,7 +731,7 @@ void Spell::prepareDataForTriggerSystem()
}
// Hunter traps spells (for Entrapment trigger)
// 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;
}
@@ -998,7 +999,7 @@ void Spell::DoAllEffectOnTarget(TargetInfo *target)
caster->DealSpellDamage(&damageInfo, true);
// 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;
m_caster->CastCustomSpell(m_caster, 32220, &damagePoint, NULL, NULL, true);
@@ -2157,7 +2158,7 @@ void Spell::cast(bool skipCheck)
}
case SPELLFAMILY_MAGE:
{
if (m_spellInfo->SpellFamilyFlags&0x0000008000000000LL) // Ice Block
if (m_spellInfo->SpellFamilyFlags[1] & 0x00000080) // Ice Block
m_preCastSpell = 41425; // Hypothermia
break;
}
@@ -2172,7 +2173,7 @@ void Spell::cast(bool skipCheck)
}
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
break;
}
@@ -3684,14 +3685,11 @@ uint8 Spell::CanCast(bool strict)
//Must be behind the target.
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
if( m_spellInfo->SpellFamilyName != SPELLFAMILY_DRUID || m_spellInfo->SpellFamilyFlags != 0x0000000000020000LL )
{
SendInterrupted(2);
return SPELL_FAILED_NOT_BEHIND;
}
&& (m_spellInfo->SpellFamilyName != SPELLFAMILY_DRUID || !m_spellInfo->SpellFamilyFlags.IsEqual(0x20000,0,0)))
{
SendInterrupted(2);
return SPELL_FAILED_NOT_BEHIND;
}
//Target must be facing you.
@@ -5279,7 +5277,7 @@ bool Spell::CheckTargetCreatureType(Unit* target) const
uint32 spellCreatureTargetMask = m_spellInfo->TargetCreatureType;
// 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
if(target->GetTypeId()==TYPEID_PLAYER)
+51 -93
View File
@@ -842,23 +842,23 @@ void Aura::_AddAura()
m_target->ModifyAuraState(AURA_STATE_JUDGEMENT, true);
// 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);
// 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);
// 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);
// 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);
// 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);
// Enrage aura state
@@ -945,25 +945,25 @@ void Aura::_RemoveAura()
removeState = AURA_STATE_JUDGEMENT; // Update Seals information
break;
case SPELLFAMILY_WARLOCK:
if(m_spellProto->SpellFamilyFlags & 4)
if(m_spellProto->SpellFamilyFlags[0] & 4)
removeState = AURA_STATE_IMMOLATE; // Conflagrate aura state
break;
case SPELLFAMILY_DRUID:
if(m_spellProto->SpellFamilyFlags & 0x0000000000000400LL)
if(m_spellProto->SpellFamilyFlags[0] & 0x400)
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
break;
case SPELLFAMILY_WARRIOR:
if(m_spellProto->SpellFamilyFlags & 0x0004000000000000LL)
if(m_spellProto->SpellFamilyFlags[1] & 0x00040000)
removeState = AURA_STATE_WARRIOR_VICTORY_RUSH; // Victorious
break;
case SPELLFAMILY_ROGUE:
if(m_spellProto->SpellFamilyFlags & 0x10000)
if(m_spellProto->SpellFamilyFlags[0] & 0x10000)
removeState = AURA_STATE_DEADLY_POISON; // Deadly poison aura state
break;
case SPELLFAMILY_HUNTER:
if(m_spellProto->SpellFamilyFlags & 0x1000000000000000LL)
if(m_spellProto->SpellFamilyFlags[1] & 0x10000000)
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)
return false;
// Check EffectClassMask
uint32 const *ptr = getAuraSpellClassMask();
if (((uint64*)ptr)[0] & spell->SpellFamilyFlags)
return true;
if (ptr[2] & spell->SpellFamilyFlags2)
if (m_spellProto->EffectSpellClassMask[m_effIndex] & spell->SpellFamilyFlags)
return true;
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->spellId = GetId();
uint32 const *ptr;
SpellAffectEntry const *spellAffect = spellmgr.GetSpellAffect(GetId(), m_effIndex);
if (spellAffect)
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->mask2= (uint64)ptr[2];
flag96 const *spellAffect = spellmgr.GetSpellAffect(GetId(), m_effIndex);
if (!spellAffect)
spellAffect = &m_spellProto->EffectSpellClassMask[m_effIndex];
mod->mask = *spellAffect;
mod->charges = m_procCharges;
m_spellmod = mod;
}
uint64 spellFamilyMask = m_spellmod->mask;
((Player*)m_target)->AddSpellMod(m_spellmod, apply);
// 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);
@@ -1170,24 +1151,11 @@ void Aura::HandleAddTargetTrigger(bool apply, bool Real)
SpellModifier *mod = new SpellModifier;
mod->spellId = GetId();
uint32 const *ptr;
SpellAffectEntry const *spellAffect = spellmgr.GetSpellAffect(GetId(), m_effIndex);
if (spellAffect)
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;
}
}
flag96 const *spellAffect = spellmgr.GetSpellAffect(GetId(), m_effIndex);
if (!spellAffect)
spellAffect = &m_spellProto->EffectSpellClassMask[m_effIndex];
mod->mask = (uint64)ptr[0] | (uint64)ptr[1]<<32;
mod->mask2= (uint64)ptr[2];
mod->mask = *spellAffect;
m_spellmod = mod;
}
else
@@ -1804,7 +1772,7 @@ void Aura::TriggerSpell()
{
SpellEntry const* spell = itr->second->GetSpellProto();
if( spell->SpellFamilyName == SPELLFAMILY_SHAMAN &&
spell->SpellFamilyFlags & 0x0000000000000400L)
spell->SpellFamilyFlags[0] & 0x400)
return;
}
target->RemoveAurasDueToSpell(28820);
@@ -1982,7 +1950,7 @@ void Aura::HandleAuraDummy(bool apply, bool Real)
}
// 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
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
if (m_spellProto->SpellFamilyName == SPELLFAMILY_MAGE &&
m_spellProto->SpellFamilyFlags&0x0000000000000800LL)
m_spellProto->SpellFamilyFlags[0] & 0x800)
{
caster->InterruptSpell(CURRENT_CHANNELED_SPELL);
return;
}
// Stop caster Penance chanelling on death
if (m_spellProto->SpellFamilyName == SPELLFAMILY_PRIEST &&
m_spellProto->SpellFamilyFlags2 & 0x00000080)
m_spellProto->SpellFamilyFlags[2] & 0x00000080)
{
caster->InterruptSpell(CURRENT_CHANNELED_SPELL);
return;
@@ -2165,8 +2133,7 @@ void Aura::HandleAuraDummy(bool apply, bool Real)
mod->value = m_modifier.m_amount;
mod->type = SPELLMOD_PCT;
mod->spellId = GetId();
mod->mask = 0x0000000200000000LL;
mod->mask2= 0LL;
mod->mask[1] = 0x00000002;
m_spellmod = mod;
}
((Player*)m_target)->AddSpellMod(m_spellmod, apply);
@@ -2177,7 +2144,7 @@ void Aura::HandleAuraDummy(bool apply, bool Real)
case SPELLFAMILY_DRUID:
{
// Lifebloom
if ( GetSpellProto()->SpellFamilyFlags & 0x1000000000LL )
if ( GetSpellProto()->SpellFamilyFlags[1] & 0x10 )
{
if ( apply )
{
@@ -2229,8 +2196,7 @@ void Aura::HandleAuraDummy(bool apply, bool Real)
mod->value = m_modifier.m_amount/7;
mod->type = SPELLMOD_FLAT;
mod->spellId = GetId();
mod->mask = 0x001000000000LL;
mod->mask2= 0LL;
mod->mask[1] = 0x0010;
m_spellmod = mod;
}
@@ -2253,8 +2219,7 @@ void Aura::HandleAuraDummy(bool apply, bool Real)
mod->value = m_modifier.m_amount;
mod->type = SPELLMOD_FLAT;
mod->spellId = GetId();
mod->mask = 0x4000000000000LL;
mod->mask2= 0LL;
mod->mask[1] = 0x40000;
m_spellmod = mod;
}
@@ -2279,12 +2244,10 @@ void Aura::HandleAuraDummy(bool apply, bool Real)
switch (m_effIndex)
{
case 0:
mod->mask = 0x00200000000LL; // Windfury Totem
mod->mask2= 0LL;
mod->mask[1] = 0x002; // Windfury Totem
break;
case 1:
mod->mask = 0x00400000000LL; // Flametongue Totem
mod->mask2= 0LL;
mod->mask[1] = 0x004; // Flametongue Totem
break;
}
@@ -4032,7 +3995,7 @@ void Aura::HandlePeriodicDamage(bool apply, bool Real)
case SPELLFAMILY_WARRIOR:
{
// Rend
if (m_spellProto->SpellFamilyFlags & 0x0000000000000020LL)
if (m_spellProto->SpellFamilyFlags[0] & 0x20)
{
// $0.2*(($MWB+$mwb)/2+$AP/14*$MWS) bonus per tick
float ap = caster->GetTotalAttackPowerValue(BASE_ATTACK);
@@ -4047,21 +4010,21 @@ void Aura::HandlePeriodicDamage(bool apply, bool Real)
case SPELLFAMILY_DRUID:
{
// Rake
if (m_spellProto->SpellFamilyFlags & 0x0000000000001000LL)
if (m_spellProto->SpellFamilyFlags[0] & 0x1000)
{
// $AP*0.06 bonus per tick
m_modifier.m_amount += int32(caster->GetTotalAttackPowerValue(BASE_ATTACK) * 6 / 100);
return;
}
// Lacerate
if (m_spellProto->SpellFamilyFlags & 0x000000010000000000LL)
if (m_spellProto->SpellFamilyFlags[1] & 0x0000000100)
{
// $AP*0.05/5 bonus per tick
m_modifier.m_amount += int32(caster->GetTotalAttackPowerValue(BASE_ATTACK) / 100);
return;
}
// Rip
if (m_spellProto->SpellFamilyFlags & 0x000000000000800000LL)
if (m_spellProto->SpellFamilyFlags[1] & 0x800000)
{
// 0.01*$AP*cp
if (caster->GetTypeId() != TYPEID_PLAYER)
@@ -4083,7 +4046,7 @@ void Aura::HandlePeriodicDamage(bool apply, bool Real)
return;
}
// Lock Jaw
if (m_spellProto->SpellFamilyFlags & 0x1000000000000000LL)
if (m_spellProto->SpellFamilyFlags[1] & 0x10000000)
{
// 0.15*$AP
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:
{
// Rupture
if (m_spellProto->SpellFamilyFlags & 0x000000000000100000LL)
if (m_spellProto->SpellFamilyFlags[0] & 0x100000)
{
if (caster->GetTypeId() != TYPEID_PLAYER)
return;
@@ -4110,14 +4073,14 @@ void Aura::HandlePeriodicDamage(bool apply, bool Real)
return;
}
// Garrote
if (m_spellProto->SpellFamilyFlags & 0x000000000000000100LL)
if (m_spellProto->SpellFamilyFlags[0] & 0x100)
{
// $AP*0.07 bonus per tick
m_modifier.m_amount += int32(caster->GetTotalAttackPowerValue(BASE_ATTACK) * 7 / 100);
return;
}
// Deadly Poison
if (m_spellProto->SpellFamilyFlags & 0x0000000000010000)
if (m_spellProto->SpellFamilyFlags[0] & 0x10000)
{
// 0.08*$AP / 4 * amount of stack
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:
{
// Serpent Sting
if (m_spellProto->SpellFamilyFlags & 0x0000000000004000LL)
if (m_spellProto->SpellFamilyFlags[0] & 0x4000)
{
// $RAP*0.1/5 bonus per tick
m_modifier.m_amount += int32(caster->GetTotalAttackPowerValue(RANGED_ATTACK) * 10 / 500);
return;
}
// 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
m_modifier.m_amount += int32(caster->GetTotalAttackPowerValue(RANGED_ATTACK) * 10 / 500);
@@ -4977,15 +4940,10 @@ void Aura::HandleNoReagentUseAura(bool Apply, bool Real)
return;
if(m_target->GetTypeId() != TYPEID_PLAYER)
return;
uint32 mask[3] = {0, 0, 0};
flag96 mask;
Unit::AuraList const& noReagent = m_target->GetAurasByType(SPELL_AURA_NO_REAGENT_USE);
for(Unit::AuraList::const_iterator i = noReagent.begin(); i != noReagent.end(); ++i)
{
uint32 const *ptr = (*i)->getAuraSpellClassMask();
mask[0]|=ptr[0];
mask[1]|=ptr[1];
mask[2]|=ptr[2];
}
mask = (*i)->m_spellProto->EffectSpellClassMask[(*i)->m_effIndex];
m_target->SetUInt32Value(PLAYER_NO_REAGENT_COST_1 , mask[0]);
m_target->SetUInt32Value(PLAYER_NO_REAGENT_COST_1+1, mask[1]);
@@ -5335,7 +5293,7 @@ void Aura::HandleSpiritOfRedemption( bool apply, bool Real )
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
m_target->RemoveAurasDueToSpell(30069);
@@ -5384,7 +5342,7 @@ void Aura::HandleSchoolAbsorb(bool apply, bool Real)
}
break;
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
//+10% from +spd bonus
@@ -5393,7 +5351,7 @@ void Aura::HandleSchoolAbsorb(bool apply, bool Real)
}
break;
case SPELLFAMILY_WARLOCK:
if(m_spellProto->SpellFamilyFlags == 0x00)
if(m_spellProto->SpellFamilyFlags.IsEqual(0,0,0x40))
{
//shadow ward
//+10% from +spd bonus
@@ -5503,7 +5461,7 @@ void Aura::PeriodicTick()
}
// 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
if (m_duration>=((m_maxduration-m_modifier.periodictime)*2/3))
@@ -6244,7 +6202,7 @@ void Aura::PeriodicDummyTick()
case SPELLFAMILY_HUNTER:
{
// Explosive Shot
if (spell->SpellFamilyFlags & 0x8000000000000000LL)
if (spell->SpellFamilyFlags[1] & 0x80000000)
{
if (!caster)
return;
@@ -6294,7 +6252,7 @@ void Aura::PeriodicDummyTick()
case SPELLFAMILY_DEATHKNIGHT:
{
// Death and Decay
if (spell->SpellFamilyFlags & 0x0000000000000020LL)
if (spell->SpellFamilyFlags[0] & 0x20)
{
if (caster)
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)
// return;
// Chains of Ice
if (spell->SpellFamilyFlags & 0x0000400000000000LL)
if (spell->SpellFamilyFlags[1] & 0x00004000)
{
// Get 0 effect aura
Aura *slow = m_target->GetAura(GetId(), 0);
@@ -6376,7 +6334,7 @@ void Aura::HandleManaShield(bool apply, bool Real)
switch(m_spellProto->SpellFamilyName)
{
case SPELLFAMILY_MAGE:
if(m_spellProto->SpellFamilyFlags & 0x8000)
if(m_spellProto->SpellFamilyFlags[0] & 0x8000)
{
// Mana Shield
// +50% from +spd bonus
-1
View File
@@ -316,7 +316,6 @@ class TRINITY_DLL_SPEC Aura
void PeriodicTick();
void PeriodicDummyTick();
uint32 const *getAuraSpellClassMask() const { return m_spellProto->EffectSpellClassMaskA + m_effIndex * 3; }
bool isAffectedOnSpell(SpellEntry const *spell) const;
protected:
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:
{
// Arcane Blast
if(m_spellInfo->SpellFamilyFlags & 0x20000000LL)
if(m_spellInfo->SpellFamilyFlags[0] & 0x20000000)
{
m_caster->CastSpell(m_caster,36032,true);
}
@@ -389,27 +389,27 @@ void Spell::SpellDamageSchoolDmg(uint32 effect_idx)
case SPELLFAMILY_WARRIOR:
{
// Bloodthirst
if(m_spellInfo->SpellFamilyFlags & 0x40000000000LL)
if(m_spellInfo->SpellFamilyFlags[1] & 0x400)
{
damage = uint32(damage * (m_caster->GetTotalAttackPowerValue(BASE_ATTACK)) / 100);
}
// Shield Slam
else if(m_spellInfo->SpellFamilyFlags & 0x100000000LL)
else if(m_spellInfo->SpellFamilyFlags[1] & 0x1)
damage += int32(m_caster->GetShieldBlockValue());
// Victory Rush
else if(m_spellInfo->SpellFamilyFlags & 0x10000000000LL)
else if(m_spellInfo->SpellFamilyFlags[1] & 0x100)
{
damage = uint32(damage * m_caster->GetTotalAttackPowerValue(BASE_ATTACK) / 100);
m_caster->ModifyAuraState(AURA_STATE_WARRIOR_VICTORY_RUSH, false);
}
// 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);
// 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);
// 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);
if (pct > 0)
@@ -421,7 +421,7 @@ void Spell::SpellDamageSchoolDmg(uint32 effect_idx)
case SPELLFAMILY_WARLOCK:
{
// 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.
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);
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() )
{
unitTarget->RemoveAurasByCasterSpell((*i)->GetId(), m_caster->GetGUID());
@@ -448,14 +448,14 @@ void Spell::SpellDamageSchoolDmg(uint32 effect_idx)
case SPELLFAMILY_PRIEST:
{
// 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);
break;
}
case SPELLFAMILY_DRUID:
{
// 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
float ap = m_caster->GetTotalAttackPowerValue(BASE_ATTACK);
@@ -465,22 +465,22 @@ void Spell::SpellDamageSchoolDmg(uint32 effect_idx)
m_caster->SetPower(POWER_ENERGY,0);
}
// Rake
else if(m_spellInfo->SpellFamilyFlags & 0x0000000000001000LL)
else if(m_spellInfo->SpellFamilyFlags[0] & 0x1000)
{
damage += int32(m_caster->GetTotalAttackPowerValue(BASE_ATTACK) / 100);
}
// Swipe
else if(m_spellInfo->SpellFamilyFlags & 0x0010000000000000LL)
else if(m_spellInfo->SpellFamilyFlags[1] & 0x00100000)
{
damage += int32(m_caster->GetTotalAttackPowerValue(BASE_ATTACK)*0.08f);
}
//Mangle Bonus for the initial damage of Lacerate and Rake
if((m_spellInfo->SpellFamilyFlags==0x0000000000001000LL && m_spellInfo->SpellIconID==494) ||
(m_spellInfo->SpellFamilyFlags==0x0000010000000000LL && m_spellInfo->SpellIconID==2246))
if((m_spellInfo->SpellFamilyFlags.IsEqual(0x1000,0,0) && m_spellInfo->SpellIconID==494) ||
(m_spellInfo->SpellFamilyFlags.IsEqual(0,0x100,0) && m_spellInfo->SpellIconID==2246))
{
Unit::AuraList const& mDummyAuras = unitTarget->GetAurasByType(SPELL_AURA_DUMMY);
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);
break;
@@ -491,7 +491,7 @@ void Spell::SpellDamageSchoolDmg(uint32 effect_idx)
case SPELLFAMILY_ROGUE:
{
// 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
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);
for(Unit::AuraList::const_iterator itr = auras.begin(); itr!=auras.end(); ++itr)
if( (*itr)->GetSpellProto()->SpellFamilyName==SPELLFAMILY_ROGUE &&
(*itr)->GetSpellProto()->SpellFamilyFlags & 0x10000 &&
(*itr)->GetSpellProto()->SpellFamilyFlags[0] & 0x10000 &&
(*itr)->GetCasterGUID()==m_caster->GetGUID() )
{
poison = *itr;
@@ -525,7 +525,7 @@ void Spell::SpellDamageSchoolDmg(uint32 effect_idx)
}
}
// 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())
{
@@ -538,17 +538,17 @@ void Spell::SpellDamageSchoolDmg(uint32 effect_idx)
}
}
// Gouge
else if(m_spellInfo->SpellFamilyFlags & 0x0000000000000008LL)
else if(m_spellInfo->SpellFamilyFlags[0] & 0x8)
{
damage += int32(m_caster->GetTotalAttackPowerValue(BASE_ATTACK)*0.02f);
}
// Instant Poison
else if(m_spellInfo->SpellFamilyFlags & 0x0000000000002000LL)
else if(m_spellInfo->SpellFamilyFlags[0] & 0x2000)
{
damage += int32(m_caster->GetTotalAttackPowerValue(BASE_ATTACK)*0.10f);
}
// Wound Poison
else if(m_spellInfo->SpellFamilyFlags & 0x0000000010000000LL)
else if(m_spellInfo->SpellFamilyFlags[0] & 0x10000000)
{
damage += int32(m_caster->GetTotalAttackPowerValue(BASE_ATTACK)*0.04f);
}
@@ -557,22 +557,22 @@ void Spell::SpellDamageSchoolDmg(uint32 effect_idx)
case SPELLFAMILY_HUNTER:
{
// 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);
}
// Counterattack
else if(m_spellInfo->SpellFamilyFlags & 0x0008000000000000LL)
else if(m_spellInfo->SpellFamilyFlags[1] & 0x00080000)
{
damage += int32(m_caster->GetTotalAttackPowerValue(BASE_ATTACK)*0.2f);
}
// 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);
}
// 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));
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];
}
// 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);
}
@@ -604,7 +604,7 @@ void Spell::SpellDamageSchoolDmg(uint32 effect_idx)
case SPELLFAMILY_PALADIN:
{
// 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);
int32 holy = m_caster->SpellBaseDamageBonus(GetSpellSchoolMask(m_spellInfo)) +
@@ -624,7 +624,7 @@ void Spell::SpellDamageSchoolDmg(uint32 effect_idx)
damage += damage * stacks * 10 /100;
}
// 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);
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);
}
// 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);
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);
}
// Hammer of the Righteous
else if(m_spellInfo->SpellFamilyFlags&0x0004000000000000LL)
else if(m_spellInfo->SpellFamilyFlags[1]&0x00040000)
{
// Add main hand dps * effect[2] amount
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;
}
// Execute
if(m_spellInfo->SpellFamilyFlags & 0x20000000)
if(m_spellInfo->SpellFamilyFlags[0] & 0x20000000)
{
if(!unitTarget)
return;
@@ -1325,7 +1325,7 @@ void Spell::EffectDummy(uint32 i)
return;
}
// Slam
if(m_spellInfo->SpellFamilyFlags & 0x0000000000200000LL)
if(m_spellInfo->SpellFamilyFlags[0] & 0x200000)
{
if(!unitTarget)
return;
@@ -1360,7 +1360,7 @@ void Spell::EffectDummy(uint32 i)
break;
case SPELLFAMILY_WARLOCK:
// Life Tap
if (m_spellInfo->SpellFamilyFlags & 0x0000000000040000LL)
if (m_spellInfo->SpellFamilyFlags[0] & 0x40000)
{
// In 303 exist spirit depend
uint32 spirit = m_caster->GetStat(STAT_SPIRIT);
@@ -1416,7 +1416,7 @@ void Spell::EffectDummy(uint32 i)
break;
case SPELLFAMILY_PRIEST:
// Penance
if (m_spellInfo->SpellFamilyFlags & 0x0080000000000000LL)
if (m_spellInfo->SpellFamilyFlags[1] & 0x00800000)
{
if (!unitTarget)
return;
@@ -1517,7 +1517,7 @@ void Spell::EffectDummy(uint32 i)
uint32 classspell = itr->first;
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);
@@ -1626,8 +1626,7 @@ void Spell::EffectDummy(uint32 i)
mod->value = -50;
mod->type = SPELLMOD_PCT;
mod->spellId = m_spellInfo->Id;
mod->mask = 0x0000020000000000LL;
mod->mask2= 0LL;
mod->mask[1] = 0x00000200;
((Player*)m_caster)->AddSpellMod(mod, true);
m_caster->CastSpell(unitTarget,spell_proto,true,NULL);
@@ -1717,7 +1716,7 @@ void Spell::EffectDummy(uint32 i)
break;
case SPELLFAMILY_SHAMAN:
//Shaman Rockbiter Weapon
if (m_spellInfo->SpellFamilyFlags == 0x400000)
if (m_spellInfo->SpellFamilyFlags.IsEqual(0x400000))
{
// TODO: use expect spell for enchant (if exist talent)
// In 3.0.3 no mods present for rockbiter
@@ -1766,13 +1765,13 @@ void Spell::EffectDummy(uint32 i)
return;
}
// 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);
return;
}
// Mana Spring Totem
if(m_spellInfo->SpellFamilyFlags & 0x0000000000004000LL)
if(m_spellInfo->SpellFamilyFlags[0] & 0x4000)
{
if(unitTarget->getPowerType()!=POWER_MANA)
return;
@@ -1794,7 +1793,7 @@ void Spell::EffectDummy(uint32 i)
return;
}
// Lava Lash
if (m_spellInfo->SpellFamilyFlags2 & 0x00000004)
if (m_spellInfo->SpellFamilyFlags[2] & 0x00000004)
{
if (m_caster->GetTypeId()!=TYPEID_PLAYER)
return;
@@ -1806,7 +1805,7 @@ void Spell::EffectDummy(uint32 i)
for(Unit::AuraList::const_iterator itr = auraDummy.begin(); itr != auraDummy.end(); ++itr)
{
if( (*itr)->GetSpellProto()->SpellFamilyName==SPELLFAMILY_SHAMAN &&
(*itr)->GetSpellProto()->SpellFamilyFlags & 0x0000000000200000LL &&
(*itr)->GetSpellProto()->SpellFamilyFlags[0] & 0x200000 &&
(*itr)->GetCastItemGUID() == item->GetGUID())
{
m_damage += m_damage * damage / 100;
@@ -1935,7 +1934,7 @@ void Spell::EffectTriggerSpell(uint32 i)
if (!spellInfo)
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;
break;
@@ -2270,7 +2269,7 @@ void Spell::EffectApplyAura(uint32 i)
return;
// 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);
}
@@ -2478,7 +2477,7 @@ void Spell::SpellDamageHeal(uint32 /*i*/)
for(Unit::AuraList::const_iterator i = RejorRegr.begin(); i != RejorRegr.end(); ++i)
{
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())
targetAura = *i;
@@ -4379,7 +4378,7 @@ void Spell::SpellDamageWeaponDmg(uint32 i)
{
SpellEntry const *proto = (*itr)->GetSpellProto();
if(proto->SpellFamilyName == SPELLFAMILY_WARRIOR
&& proto->SpellFamilyFlags == SPELLFAMILYFLAG_WARRIOR_SUNDERARMOR
&& proto->SpellFamilyFlags.IsEqual(SPELLFAMILYFLAG_WARRIOR_SUNDERARMOR)
&& (*itr)->GetCasterGUID() == m_caster->GetGUID())
{
(*itr)->RefreshAura();
@@ -4411,7 +4410,7 @@ void Spell::SpellDamageWeaponDmg(uint32 i)
if (!spellInfo)
continue;
if (spellInfo->SpellFamilyFlags == SPELLFAMILYFLAG_WARRIOR_SUNDERARMOR
if (spellInfo->SpellFamilyFlags.IsEqual(SPELLFAMILYFLAG_WARRIOR_SUNDERARMOR)
&& spellInfo->Id != m_spellInfo->Id
&& spellInfo->SpellFamilyName == SPELLFAMILY_WARRIOR)
{
@@ -4428,13 +4427,13 @@ void Spell::SpellDamageWeaponDmg(uint32 i)
case SPELLFAMILY_ROGUE:
{
// Hemorrhage
if(m_spellInfo->SpellFamilyFlags & 0x2000000)
if(m_spellInfo->SpellFamilyFlags[0] & 0x2000000)
{
if(m_caster->GetTypeId()==TYPEID_PLAYER)
((Player*)m_caster)->AddComboPoints(unitTarget, 1);
}
// Mutilate (for each hand)
else if(m_spellInfo->SpellFamilyFlags & 0x600000000LL)
else if(m_spellInfo->SpellFamilyFlags[1] & 0x6)
{
bool found = false;
// fast check
@@ -4462,7 +4461,7 @@ void Spell::SpellDamageWeaponDmg(uint32 i)
case SPELLFAMILY_PALADIN:
{
// 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.29f*m_caster->SpellBaseDamageBonusForVictim(GetSpellSchoolMask(m_spellInfo), unitTarget));
@@ -4473,7 +4472,7 @@ void Spell::SpellDamageWeaponDmg(uint32 i)
{
// Skyshatter Harness item set bonus
// 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);
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:
{
// Mangle (Cat): CP
if(m_spellInfo->SpellFamilyFlags==0x0000040000000000LL)
if(m_spellInfo->SpellFamilyFlags.IsEqual(0,0x00000400))
{
if(m_caster->GetTypeId()==TYPEID_PLAYER)
((Player*)m_caster)->AddComboPoints(unitTarget,1);
@@ -5142,7 +5141,7 @@ void Spell::EffectScriptEffect(uint32 effIndex)
{
SpellEntry const *spellInfo = (*itr).second->GetSpellProto();
if( spellInfo->SpellFamilyName == SPELLFAMILY_PRIEST &&
spellInfo->SpellFamilyFlags & 0x0000000000008000LL &&
spellInfo->SpellFamilyFlags[0] & 0x8000 &&
(*itr).second->GetCasterGUID() == m_caster->GetGUID())
{
(*itr).second->RefreshAura();
@@ -5212,7 +5211,7 @@ void Spell::EffectScriptEffect(uint32 effIndex)
case SPELLFAMILY_PALADIN:
{
// Judgement
if (m_spellInfo->SpellFamilyFlags & 0x0000000000800000LL)
if (m_spellInfo->SpellFamilyFlags[0] & 0x800000)
{
if(!unitTarget || !unitTarget->isAlive())
return;
@@ -5333,7 +5332,7 @@ void Spell::EffectSanctuary(uint32 /*i*/)
unitTarget->CombatStop();
unitTarget->getHostilRefManager().deleteReferences(); // stop all fighting
// 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);
}
+1 -1
View File
@@ -329,7 +329,7 @@ void WorldSession::HandleCancelAuraOpcode( WorldPacket& recvPacket)
return;
// 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;
while((iter = _player->m_Auras.find(Unit::spellEffectPair(spellId, 1))) != _player->m_Auras.end())
+33 -49
View File
@@ -327,17 +327,17 @@ SpellSpecific GetSpellSpecific(uint32 spellId)
case SPELLFAMILY_MAGE:
{
// family flags 18(Molten), 25(Frost/Ice), 28(Mage)
if (spellInfo->SpellFamilyFlags & 0x12040000)
if (spellInfo->SpellFamilyFlags[0] & 0x12040000)
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;
break;
}
case SPELLFAMILY_WARRIOR:
{
if (spellInfo->SpellFamilyFlags & 0x00008000010000LL)
if (spellInfo->SpellFamilyFlags[1] & 0x000080 || spellInfo->SpellFamilyFlags[0] & 0x10000LL)
return SPELL_POSITIVE_SHOUT;
break;
@@ -349,11 +349,11 @@ SpellSpecific GetSpellSpecific(uint32 spellId)
return SPELL_CURSE;
// 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;
//seed of corruption and corruption
if (spellInfo->SpellFamilyFlags & 0x1000000002LL)
if (spellInfo->SpellFamilyFlags[1] & 0x10 || spellInfo->SpellFamilyFlags[0] & 0x2)
return SPELL_WARLOCK_CORRUPTION;
break;
}
@@ -363,11 +363,11 @@ SpellSpecific GetSpellSpecific(uint32 spellId)
if (spellInfo->Dispel == DISPEL_POISON)
return SPELL_STING;
// only hunter aspects have this (but not all aspects in hunter family)
if( spellInfo->SpellFamilyFlags & 0x0044000000380000LL || spellInfo->SpellFamilyFlags2 & 0x00003010)
// only hunter aspects have this
if( spellInfo->SpellFamilyFlags[1] & 0x00440000 || spellInfo->SpellFamilyFlags[0] & 0x00380000 || spellInfo->SpellFamilyFlags[2] & 0x00003010)
return SPELL_ASPECT;
if( spellInfo->SpellFamilyFlags2 & 0x00000002 )
if( spellInfo->SpellFamilyFlags[2] & 0x00000002 )
return SPELL_TRACKER;
break;
@@ -377,10 +377,10 @@ SpellSpecific GetSpellSpecific(uint32 spellId)
if (IsSealSpell(spellInfo))
return SPELL_SEAL;
if (spellInfo->SpellFamilyFlags & 0x0000000011010002LL)
if (spellInfo->SpellFamilyFlags[0] & 0x11010002)
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;
for (int i = 0; i < 3; i++)
@@ -928,22 +928,15 @@ void SpellMgr::LoadSpellAffects()
continue;
}
SpellAffectEntry affect;
affect.SpellClassMask[0] = fields[2].GetUInt32();
affect.SpellClassMask[1] = fields[3].GetUInt32();
affect.SpellClassMask[2] = fields[4].GetUInt32();
flag96 affect(fields[2].GetUInt32(), fields[3].GetUInt32(), fields[4].GetUInt32());
// Spell.dbc have own data
uint32 const *ptr = 0;
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;
}
if(ptr[0] == affect.SpellClassMask[0] || ptr[1] == affect.SpellClassMask[1] || ptr[2] == affect.SpellClassMask[2])
if (effectId>3)
continue;
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";
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) )
continue;
uint32 const *ptr = 0;
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;
}
if(ptr[0] || ptr[1] || ptr[2])
flag96 dbc_affect;
dbc_affect = spellInfo->EffectSpellClassMask[effectId];
if(dbc_affect)
continue;
if(mSpellAffectMap.find((id<<8) + effectId) != mSpellAffectMap.end())
@@ -1006,8 +992,7 @@ bool SpellMgr::IsAffectedByMod(SpellEntry const *spellInfo, SpellModifier *mod)
return false;
// true
if (mod->mask & spellInfo->SpellFamilyFlags ||
mod->mask2 & spellInfo->SpellFamilyFlags2)
if (mod->mask & spellInfo->SpellFamilyFlags)
return true;
return false;
@@ -1164,8 +1149,7 @@ bool SpellMgr::IsSpellProcEventCanTriggeredBy(SpellProcEventEntry const * spellP
// spellFamilyName is Ok need check for spellFamilyMask if present
if(spellProcEvent->spellFamilyMask || spellProcEvent->spellFamilyMask2)
{
if ((spellProcEvent->spellFamilyMask & procSpell->SpellFamilyFlags ) == 0 &&
(spellProcEvent->spellFamilyMask2 & procSpell->SpellFamilyFlags2) == 0)
if ((spellProcEvent->spellFamilyMask & procSpell->SpellFamilyFlags ) == 0)
return false;
active = true; // Spell added manualy -> so its active spell
}
@@ -1608,7 +1592,7 @@ void SpellMgr::LoadSpellChains()
if(sRank.empty())
continue;
//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;
SpellRankEntry entry;
@@ -2332,7 +2316,7 @@ void SpellMgr::LoadPetLevelupSpellMap()
continue;
// not pet spell
if(!(spell->SpellFamilyFlags & 0x1000000000000000LL))
if(!(spell->SpellFamilyFlags[1] & 0x10000000))
continue;
// not Growl or Cower (generics)
@@ -2678,46 +2662,46 @@ DiminishingGroup GetDiminishingReturnsGroupForSpell(SpellEntry const* spellproto
case SPELLFAMILY_ROGUE:
{
// Kidney Shot
if (spellproto->SpellFamilyFlags & 0x00000200000LL)
if (spellproto->SpellFamilyFlags[0] & 0x200000)
return DIMINISHING_KIDNEYSHOT;
// Sap
else if (spellproto->SpellFamilyFlags & 0x00000000080LL)
else if (spellproto->SpellFamilyFlags[0] & 0x80)
return DIMINISHING_POLYMORPH;
// Gouge
else if (spellproto->SpellFamilyFlags & 0x00000000008LL)
else if (spellproto->SpellFamilyFlags[0] & 0x8)
return DIMINISHING_POLYMORPH;
// Blind
else if (spellproto->SpellFamilyFlags & 0x00001000000LL)
else if (spellproto->SpellFamilyFlags[0] & 0x00001000000)
return DIMINISHING_BLIND_CYCLONE;
break;
}
case SPELLFAMILY_WARLOCK:
{
// Death Coil
if (spellproto->SpellFamilyFlags & 0x00000080000LL)
if (spellproto->SpellFamilyFlags[0] & 0x00000080000)
return DIMINISHING_DEATHCOIL;
// Seduction
if (spellproto->SpellFamilyFlags & 0x00040000000LL)
if (spellproto->SpellFamilyFlags[0] & 0x00040000000)
return DIMINISHING_FEAR;
// Fear
//else if (spellproto->SpellFamilyFlags & 0x40840000000LL)
// return DIMINISHING_WARLOCK_FEAR;
// Curses/etc
else if (spellproto->SpellFamilyFlags & 0x00080000000LL)
else if (spellproto->SpellFamilyFlags[0] & 0x80000000)
return DIMINISHING_LIMITONLY;
break;
}
case SPELLFAMILY_DRUID:
{
// Cyclone
if (spellproto->SpellFamilyFlags & 0x02000000000LL)
if (spellproto->SpellFamilyFlags[1] & 0x020)
return DIMINISHING_BLIND_CYCLONE;
break;
}
case SPELLFAMILY_WARRIOR:
{
// Hamstring - limit duration to 10s in PvP
if (spellproto->SpellFamilyFlags & 0x00000000002LL)
if (spellproto->SpellFamilyFlags[0] & 0x00000000002)
return DIMINISHING_LIMITONLY;
break;
}
+17 -19
View File
@@ -275,17 +275,16 @@ enum SpellSelectTargetTypes
};
//Some SpellFamilyFlags
#define SPELLFAMILYFLAG_ROGUE_VANISH 0x000000800LL
#define SPELLFAMILYFLAG_ROGUE_STEALTH 0x000400000LL
#define SPELLFAMILYFLAG_ROGUE_BACKSTAB 0x000800004LL
#define SPELLFAMILYFLAG_ROGUE_SAP 0x000000080LL
#define SPELLFAMILYFLAG_ROGUE_FEINT 0x008000000LL
#define SPELLFAMILYFLAG_ROGUE_KIDNEYSHOT 0x000200000LL
#define SPELLFAMILYFLAG_ROGUE__FINISHING_MOVE 0x9003E0000LL
#define SPELLFAMILYFLAG_WARRIOR_SUNDERARMOR 0x000004000LL
#define SPELLFAMILYFLAG_SHAMAN_FROST_SHOCK 0x080000000LL
#define SPELLFAMILYFLAG_ROGUE_VANISH 0x00000800
#define SPELLFAMILYFLAG_ROGUE_STEALTH 0x00400000
#define SPELLFAMILYFLAG_ROGUE_BACKSTAB 0x00800004
#define SPELLFAMILYFLAG_ROGUE_SAP 0x00000080
#define SPELLFAMILYFLAG_ROGUE_FEINT 0x08000000
#define SPELLFAMILYFLAG_ROGUE_KIDNEYSHOT 0x00200000
//#define SPELLFAMILYFLAG_ROGUE__FINISHING_MOVE 0x9003E0000LL
#define SPELLFAMILYFLAG_WARRIOR_SUNDERARMOR 0x00004000
#define SPELLFAMILYFLAG_SHAMAN_FROST_SHOCK 0x80000000
#define SPELLFAMILYFLAG_PALADIN_SEALS 0x26000C000A000000LL
// Spell clasification
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.
return spellInfo->SpellFamilyName == SPELLFAMILY_PALADIN &&
( spellInfo->SpellFamilyFlags & SPELLFAMILYFLAG_PALADIN_SEALS );
( spellInfo->SpellFamilyFlags[1] & 0x26000C00
|| spellInfo->SpellFamilyFlags[0] & 0x0A000000 );
}
inline bool IsElementalShield(SpellEntry const *spellInfo)
{
// 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)
@@ -512,11 +514,7 @@ bool IsDiminishingReturnsGroupDurationLimited(DiminishingGroup group);
DiminishingReturnsType GetDiminishingReturnsGroupType(DiminishingGroup group);
// Spell affects related declarations (accessed using SpellMgr functions)
struct SpellAffectEntry
{
uint32 SpellClassMask[3];
};
typedef UNORDERED_MAP<uint32, SpellAffectEntry> SpellAffectMap;
typedef UNORDERED_MAP<uint32, flag96> SpellAffectMap;
// Spell proc event related declarations (accessed using SpellMgr functions)
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 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 procFlags; // bitmask for matching proc event
uint32 procEx; // proc Extend info (see ProcFlagsEx)
@@ -794,7 +792,7 @@ class SpellMgr
// Accessors (const or static functions)
public:
// 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);
if( itr != mSpellAffectMap.end( ) )
+52 -54
View File
@@ -3774,7 +3774,7 @@ void Unit::RemoveAurasDueToSpellByDispel(uint32 spellId, uint64 casterGUID, Unit
{
// Custom dispel case
// 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;
uint64 caster_guid = aur->GetCasterGUID();
@@ -4120,13 +4120,13 @@ Aura* Unit::GetAura(uint32 spellId, uint32 effindex)
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);
for(AuraList::const_iterator i = auras.begin();i != auras.end(); ++i)
{
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)
continue;
@@ -4623,7 +4623,7 @@ bool Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, Aura* triggeredByAu
{
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;
break;
@@ -5000,7 +5000,7 @@ bool Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, Aura* triggeredByAu
break;
}
// Incanter's Regalia set (add trigger chance to Mana Shield)
if (dummySpell->SpellFamilyFlags & 0x0000000000008000LL)
if (dummySpell->SpellFamilyFlags[0] & 0x8000)
{
if(GetTypeId() != TYPEID_PLAYER)
return false;
@@ -5052,7 +5052,7 @@ bool Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, Aura* triggeredByAu
case SPELLFAMILY_WARRIOR:
{
// Retaliation
if(dummySpell->SpellFamilyFlags==0x0000000800000000LL)
if(dummySpell->SpellFamilyFlags.IsEqual(0, 0x8, 0))
{
// check attack comes not from behind
if (!HasInArc(M_PI, pVictim))
@@ -5096,7 +5096,7 @@ bool Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, Aura* triggeredByAu
case SPELLFAMILY_WARLOCK:
{
// Seed of Corruption
if (dummySpell->SpellFamilyFlags & 0x0000001000000000LL)
if (dummySpell->SpellFamilyFlags[1] & 0x00000010)
{
Modifier* mod = triggeredByAura->GetModifier();
// 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:
{
// Vampiric Touch
if( dummySpell->SpellFamilyFlags & 0x0000040000000000LL )
if( dummySpell->SpellFamilyFlags[1] & 0x00000400 )
{
if(!pVictim || !pVictim->isAlive())
return false;
@@ -5244,10 +5244,10 @@ bool Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, Aura* triggeredByAu
case 40438:
{
// Shadow Word: Pain
if( procSpell->SpellFamilyFlags & 0x0000000000008000LL )
if( procSpell->SpellFamilyFlags[0] & 0x8000 )
triggered_spell_id = 40441;
// Renew
else if( procSpell->SpellFamilyFlags & 0x0000000000000010LL )
else if( procSpell->SpellFamilyFlags[0] & 0x10 )
triggered_spell_id = 40440;
else
return false;
@@ -5319,19 +5319,19 @@ bool Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, Aura* triggeredByAu
float chance;
// Starfire
if( procSpell->SpellFamilyFlags & 0x0000000000000004LL )
if( procSpell->SpellFamilyFlags[0] & 0x4 )
{
triggered_spell_id = 40445;
chance = 25.f;
}
// Rejuvenation
else if( procSpell->SpellFamilyFlags & 0x0000000000000010LL )
else if( procSpell->SpellFamilyFlags[0] & 0x10 )
{
triggered_spell_id = 40446;
chance = 25.f;
}
// Mangle (cat/bear)
else if( procSpell->SpellFamilyFlags & 0x0000044000000000LL )
else if( procSpell->SpellFamilyFlags[1] & 0x00000440)
{
triggered_spell_id = 40452;
chance = 40.f;
@@ -5362,7 +5362,7 @@ bool Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, Aura* triggeredByAu
if (effIndex!=0)
return true;
// Wrath crit
if (procSpell->SpellFamilyFlags & 0x0000000000000001LL)
if (procSpell->SpellFamilyFlags[0] & 0x1)
{
if (!roll_chance_i(60))
return false;
@@ -5371,7 +5371,7 @@ bool Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, Aura* triggeredByAu
break;
}
// Starfire crit
if (procSpell->SpellFamilyFlags & 0x0000000000000004LL)
if (procSpell->SpellFamilyFlags[0] & 0x4)
{
triggered_spell_id = 48517;
target = this;
@@ -5413,7 +5413,7 @@ bool Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, Aura* triggeredByAu
{
SpellEntry const *spellProto = (*itr)->GetSpellProto();
if( spellProto->SpellFamilyName == SPELLFAMILY_ROGUE &&
spellProto->SpellFamilyFlags & 0x0000000000040000LL)
spellProto->SpellFamilyFlags[0] & 0x40000)
{
(*itr)->SetAuraMaxDuration(GetSpellMaxDuration(spellProto));
(*itr)->RefreshAura();
@@ -5484,7 +5484,7 @@ bool Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, Aura* triggeredByAu
if ( dummySpell->SpellIconID == 3560 )
{
// This effect only from Rapid Killing (mana regen)
if (!(procSpell->SpellFamilyFlags & 0x0100000000000000LL))
if (!(procSpell->SpellFamilyFlags[1] & 0x01000000))
return false;
triggered_spell_id = 56654;
target = this;
@@ -5495,7 +5495,7 @@ bool Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, Aura* triggeredByAu
case SPELLFAMILY_PALADIN:
{
// 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;
float ap = GetTotalAttackPowerValue(BASE_ATTACK);
@@ -5505,7 +5505,7 @@ bool Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, Aura* triggeredByAu
break;
}
// Sacred Shield
if (dummySpell->SpellFamilyFlags&0x0008000000000000LL)
if (dummySpell->SpellFamilyFlags[1]&0x00080000)
{
triggered_spell_id = 58597;
target = this;
@@ -5647,13 +5647,13 @@ bool Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, Aura* triggeredByAu
float chance;
// Flash of light/Holy light
if( procSpell->SpellFamilyFlags & 0x00000000C0000000LL)
if( procSpell->SpellFamilyFlags[0] & 0xC0000000)
{
triggered_spell_id = 40471;
chance = 15.f;
}
// Judgement
else if( procSpell->SpellFamilyFlags & 0x0000000000800000LL )
else if( procSpell->SpellFamilyFlags[0] & 0x800000 )
{
triggered_spell_id = 40472;
chance = 50.f;
@@ -5813,17 +5813,17 @@ bool Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, Aura* triggeredByAu
return false;
float chance;
if (procSpell->SpellFamilyFlags & 0x0000000000000001LL)
if (procSpell->SpellFamilyFlags[0] & 0x1)
{
triggered_spell_id = 40465; // Lightning Bolt
chance = 15.f;
}
else if (procSpell->SpellFamilyFlags & 0x0000000000000080LL)
else if (procSpell->SpellFamilyFlags[0] & 0x80)
{
triggered_spell_id = 40465; // Lesser Healing Wave
chance = 10.f;
}
else if (procSpell->SpellFamilyFlags & 0x0000001000000000LL)
else if (procSpell->SpellFamilyFlags[1] & 0x00000010)
{
triggered_spell_id = 40466; // Stormstrike
chance = 50.f;
@@ -5870,7 +5870,7 @@ bool Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, Aura* triggeredByAu
break;
}
// Earth Shield
if(dummySpell->SpellFamilyFlags & 0x0000040000000000LL)
if(dummySpell->SpellFamilyFlags[1] & 0x00000400)
{
basepoints0 = triggerAmount;
target = this;
@@ -5881,14 +5881,14 @@ bool Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, Aura* triggeredByAu
if (dummySpell->SpellIconID == 2287)
{
// 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;
// lookup water shield
AuraList const& vs = GetAurasByType(SPELL_AURA_PROC_TRIGGER_SPELL);
for(AuraList::const_iterator itr = vs.begin(); itr != vs.end(); ++itr)
{
if( (*itr)->GetSpellProto()->SpellFamilyName == SPELLFAMILY_SHAMAN &&
(*itr)->GetSpellProto()->SpellFamilyFlags & 0x0000002000000000LL)
(*itr)->GetSpellProto()->SpellFamilyFlags[1] & 0x00000020)
{
uint32 spell = (*itr)->GetSpellProto()->EffectTriggerSpell[(*itr)->GetEffIndex()];
CastSpell(this, spell, true, castItem, triggeredByAura);
@@ -5949,12 +5949,11 @@ bool Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, Aura* triggeredByAu
mod->value = -100;
mod->type = SPELLMOD_PCT;
mod->spellId = dummySpell->Id;
mod->mask = 0x0000000000000003LL;
mod->mask2= 0LL;
mod->mask[0] = 0x3;
((Player*)this)->AddSpellMod(mod, true);
// Remove cooldown (Chain Lightning - have Category Recovery time)
if (procSpell->SpellFamilyFlags & 0x0000000000000002LL)
if (procSpell->SpellFamilyFlags[0] & 0x2)
((Player*)this)->RemoveSpellCooldown(spellId);
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)
{
if( (*itr)->GetSpellProto()->SpellFamilyName == SPELLFAMILY_SHAMAN &&
(*itr)->GetSpellProto()->SpellFamilyFlags & 0x0000000000000400LL)
(*itr)->GetSpellProto()->SpellFamilyFlags[0] & 0x400)
{
uint32 spell = 0;
switch ((*itr)->GetId())
@@ -6041,7 +6040,7 @@ bool Unit::HandleDummyAuraProc(Unit *pVictim, uint32 damage, Aura* triggeredByAu
break;
}
// Vendetta
if (dummySpell->SpellFamilyFlags & 0x0000000000010000LL)
if (dummySpell->SpellFamilyFlags[0] & 0x10000)
{
basepoints0 = triggerAmount * GetMaxHealth() / 100;
triggered_spell_id = 50181;
@@ -6304,10 +6303,10 @@ bool Unit::HandleProcTriggerSpell(Unit *pVictim, uint32 damage, Aura* triggeredB
uint32 tick = 1; // Default tick = 1
// Hellfire have 15 tick
if (procSpell->SpellFamilyFlags&0x0000000000000040LL)
if (procSpell->SpellFamilyFlags[0]&0x40)
tick = 15;
// Rain of Fire have 4 tick
else if (procSpell->SpellFamilyFlags&0x0000000000000020LL)
else if (procSpell->SpellFamilyFlags[0]&0x20)
tick = 4;
else
return false;
@@ -6326,7 +6325,7 @@ bool Unit::HandleProcTriggerSpell(Unit *pVictim, uint32 damage, Aura* triggeredB
trigger_spell_id = 18093;
}
// Drain Soul
else if (auraSpellInfo->SpellFamilyFlags & 0x0000000000004000LL)
else if (auraSpellInfo->SpellFamilyFlags[0] & 0x4000)
{
Unit::AuraList const& mAddFlatModifier = GetAurasByType(SPELL_AURA_ADD_FLAT_MODIFIER);
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
uint32 originalSpellId = procSpell->Id;
// Holy Shock heal
if(procSpell->SpellFamilyFlags & 0x0001000000000000LL)
if(procSpell->SpellFamilyFlags[1] & 0x00010000)
{
switch(procSpell->Id)
{
@@ -6523,7 +6522,7 @@ bool Unit::HandleProcTriggerSpell(Unit *pVictim, uint32 damage, Aura* triggeredB
case SPELLFAMILY_SHAMAN:
{
// Lightning Shield (overwrite non existing triggered spell call in spell.dbc
if(auraSpellInfo->SpellFamilyFlags & 0x0000000000000400)
if(auraSpellInfo->SpellFamilyFlags[0] & 0x400)
{
switch(auraSpellInfo->Id)
{
@@ -6702,7 +6701,7 @@ bool Unit::HandleProcTriggerSpell(Unit *pVictim, uint32 damage, Aura* triggeredB
case 53232:
{
// This effect only from Rapid Fire (ability cast)
if (!(procSpell->SpellFamilyFlags & 0x0000000000000020LL))
if (!(procSpell->SpellFamilyFlags[0] & 0x20))
return false;
break;
}
@@ -6760,7 +6759,7 @@ bool Unit::HandleProcTriggerSpell(Unit *pVictim, uint32 damage, Aura* triggeredB
if(!procSpell)
return false;
// 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;
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)
{
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;
modPercent += stepPercent * itr->second->GetStackAmount();
if (modPercent >= maxPercent)
@@ -7670,7 +7669,7 @@ uint32 Unit::SpellDamageBonus(Unit *pVictim, SpellEntry const *spellProto, uint3
break;
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;
break;
}
@@ -7697,7 +7696,7 @@ uint32 Unit::SpellDamageBonus(Unit *pVictim, SpellEntry const *spellProto, uint3
}
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;
break;
}
@@ -7705,14 +7704,14 @@ uint32 Unit::SpellDamageBonus(Unit *pVictim, SpellEntry const *spellProto, uint3
}
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;
break;
}
// Twisted Faith
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;
break;
}
@@ -7723,7 +7722,7 @@ uint32 Unit::SpellDamageBonus(Unit *pVictim, SpellEntry const *spellProto, uint3
case 7601:
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;
break;
}
@@ -8191,7 +8190,7 @@ bool Unit::isSpellCrit(Unit *pVictim, SpellEntry const *spellProto, SpellSchoolM
{
case SPELLFAMILY_PALADIN:
// Sacred Shield
if (spellProto->SpellFamilyFlags & 0x0000000040000000LL)
if (spellProto->SpellFamilyFlags[0] & 0x40000000)
{
Aura *aura = pVictim->GetDummyAura(58597);
if (aura && aura->GetCasterGUID() == GetGUID())
@@ -8201,9 +8200,9 @@ bool Unit::isSpellCrit(Unit *pVictim, SpellEntry const *spellProto, SpellSchoolM
break;
case SPELLFAMILY_SHAMAN:
// 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
if (!GetAura(55447, 0))
@@ -8364,7 +8363,7 @@ uint32 Unit::SpellHealingBonus(Unit *pVictim, SpellEntry const *spellProto, uint
break;
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;
break;
}
@@ -8379,7 +8378,7 @@ uint32 Unit::SpellHealingBonus(Unit *pVictim, SpellEntry const *spellProto, uint
continue;
SpellEntry const* m_spell = itr->second->GetSpellProto();
if ( m_spell->SpellFamilyName != SPELLFAMILY_DRUID ||
!(m_spell->SpellFamilyFlags & 0x0000001000000050LL))
!(m_spell->SpellFamilyFlags[1] & 0x00000010 || m_spell->SpellFamilyFlags[0] & 0x50))
continue;
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
{
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;
break;
}
@@ -8539,7 +8538,7 @@ uint32 Unit::SpellHealingBonus(Unit *pVictim, SpellEntry const *spellProto, uint
// Taken mods
// 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
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)
break;
// 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;
break;
}
@@ -11719,7 +11718,6 @@ bool Unit::HandleMeandingAuraProc( Aura* triggeredByAura )
mod->type = SPELLMOD_FLAT;
mod->spellId = spellProto->Id;
mod->mask = spellProto->SpellFamilyFlags;
mod->mask2 = spellProto->SpellFamilyFlags2;
caster->AddSpellMod(mod, true);
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(); }
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 const& GetAuras() const { return m_Auras; }
+2
View File
@@ -80,6 +80,8 @@
#pragma warning(disable:4305)
#pragma warning(disable:4005)
#pragma warning(disable:4522)//warning when class has 2 constructosr
#endif // __SHOW_STUPID_WARNINGS__
#endif // __GNUC__
+2 -2
View File
@@ -289,11 +289,11 @@ void LoadDBCStores(const std::string& dataPath)
if(spell && spell->Category)
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
#if TRINITY_ENDIAN == TRINITY_BIGENDIAN
std::swap(*((uint32*)(&spell->SpellFamilyFlags)),*(((uint32*)(&spell->SpellFamilyFlags))+1));
#endif
#endif*/
}
for (uint32 j = 0; j < sSkillLineAbilityStore.GetNumRows(); ++j)
+3 -5
View File
@@ -23,6 +23,7 @@
#include "DBCEnums.h"
#include "Platform/Define.h"
#include "Util.h"
#include <map>
#include <set>
@@ -1149,9 +1150,7 @@ struct SpellEntry
int32 EffectMiscValueB[3]; // 116-118 m_effectMiscValueB
uint32 EffectTriggerSpell[3]; // 119-121 m_effectTriggerSpell
float EffectPointsPerComboPoint[3]; // 122-124 m_effectPointsPerCombo
uint32 EffectSpellClassMaskA[3]; // 125-127 m_effectSpellClassMaskA
uint32 EffectSpellClassMaskB[3]; // 128-130 m_effectSpellClassMaskB
uint32 EffectSpellClassMaskC[3]; // 131-133 m_effectSpellClassMaskC
flag96 EffectSpellClassMask[3]; //
uint32 SpellVisual[2]; // 134-135 m_spellVisualID
uint32 SpellIconID; // 136 m_spellIconID
uint32 activeIconID; // 137 m_activeIconID
@@ -1169,8 +1168,7 @@ struct SpellEntry
uint32 StartRecoveryTime; // 209 m_startRecoveryTime
uint32 MaxTargetLevel; // 210 m_maxTargetLevel
uint32 SpellFamilyName; // 211 m_spellClassSet
uint64 SpellFamilyFlags; // 212-213 m_spellClassMask NOTE: size is 12 bytes!!!
uint32 SpellFamilyFlags2; // 214 addition to m_spellClassMask
flag96 SpellFamilyFlags; // 212-214
uint32 MaxAffectedTargets; // 215 m_maxTargets
uint32 DmgClass; // 216 m_defenseType
uint32 PreventionType; // 217 m_preventionType
+229
View File
@@ -316,3 +316,232 @@ bool IsIPAddress(char const* ipaddress);
uint32 CreatePIDFile(const std::string& filename);
#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