aboutsummaryrefslogtreecommitdiff
path: root/src/server/game/Spells
diff options
context:
space:
mode:
authorIntel <chemicstry@gmail.com>2014-11-09 23:53:48 +0200
committerIntel <chemicstry@gmail.com>2014-11-09 23:53:48 +0200
commitf847f55385cd1babc67d701d49f180242c63e83e (patch)
tree60b5ca2094ee359cd297da3a1217959b9bad672c /src/server/game/Spells
parent2a4f56107f6e066211eebfe85ee70a9f5a9735fb (diff)
Core/DataStores: Updating spells dbc part 1
Diffstat (limited to 'src/server/game/Spells')
-rw-r--r--src/server/game/Spells/Auras/SpellAuraEffects.cpp35
-rw-r--r--src/server/game/Spells/Auras/SpellAuraEffects.h8
-rw-r--r--src/server/game/Spells/Auras/SpellAuras.cpp8
-rw-r--r--src/server/game/Spells/Spell.cpp10
-rw-r--r--src/server/game/Spells/SpellInfo.cpp156
-rw-r--r--src/server/game/Spells/SpellInfo.h33
-rw-r--r--src/server/game/Spells/SpellMgr.cpp20
7 files changed, 144 insertions, 126 deletions
diff --git a/src/server/game/Spells/Auras/SpellAuraEffects.cpp b/src/server/game/Spells/Auras/SpellAuraEffects.cpp
index ef83bdced50..88791cc2e77 100644
--- a/src/server/game/Spells/Auras/SpellAuraEffects.cpp
+++ b/src/server/game/Spells/Auras/SpellAuraEffects.cpp
@@ -476,10 +476,10 @@ int32 AuraEffect::CalculateAmount(Unit* caster)
// default amount calculation
int32 amount = 0;
- if (!(m_spellInfo->AttributesEx8 & SPELL_ATTR8_MASTERY_SPECIALIZATION) || G3D::fuzzyEq(m_spellInfo->Effects[m_effIndex].BonusMultiplier, 0.0f))
+ if (!(m_spellInfo->AttributesEx8 & SPELL_ATTR8_MASTERY_SPECIALIZATION) || G3D::fuzzyEq(m_spellInfo->Effects[m_effIndex].BonusCoefficient, 0.0f))
amount = m_spellInfo->Effects[m_effIndex].CalcValue(caster, &m_baseAmount, GetBase()->GetOwner()->ToUnit());
else if (caster && caster->GetTypeId() == TYPEID_PLAYER)
- amount = int32(caster->GetFloatValue(PLAYER_MASTERY) * m_spellInfo->Effects[m_effIndex].BonusMultiplier);
+ amount = int32(caster->GetFloatValue(PLAYER_MASTERY) * m_spellInfo->Effects[m_effIndex].BonusCoefficient);
// check item enchant aura cast
if (!amount && caster)
@@ -604,15 +604,15 @@ int32 AuraEffect::CalculateAmount(Unit* caster)
void AuraEffect::CalculatePeriodic(Unit* caster, bool resetPeriodicTimer /*= true*/, bool load /*= false*/)
{
- m_amplitude = m_spellInfo->Effects[m_effIndex].Amplitude;
+ m_period = m_spellInfo->Effects[m_effIndex].ApplyAuraPeriod;
// prepare periodics
switch (GetAuraType())
{
case SPELL_AURA_OBS_MOD_POWER:
// 3 spells have no amplitude set
- if (!m_amplitude)
- m_amplitude = 1 * IN_MILLISECONDS;
+ if (!m_period)
+ m_period = 1 * IN_MILLISECONDS;
case SPELL_AURA_PERIODIC_DAMAGE:
case SPELL_AURA_PERIODIC_HEAL:
case SPELL_AURA_OBS_MOD_HEALTH:
@@ -631,7 +631,7 @@ void AuraEffect::CalculatePeriodic(Unit* caster, bool resetPeriodicTimer /*= tru
break;
}
- GetBase()->CallScriptEffectCalcPeriodicHandlers(this, m_isPeriodic, m_amplitude);
+ GetBase()->CallScriptEffectCalcPeriodicHandlers(this, m_isPeriodic, m_period);
if (!m_isPeriodic)
return;
@@ -639,11 +639,11 @@ void AuraEffect::CalculatePeriodic(Unit* caster, bool resetPeriodicTimer /*= tru
Player* modOwner = caster ? caster->GetSpellModOwner() : NULL;
// Apply casting time mods
- if (m_amplitude)
+ if (m_period)
{
// Apply periodic time mod
if (modOwner)
- modOwner->ApplySpellMod(GetId(), SPELLMOD_ACTIVATION_TIME, m_amplitude);
+ modOwner->ApplySpellMod(GetId(), SPELLMOD_ACTIVATION_TIME, m_period);
if (caster)
{
@@ -651,17 +651,17 @@ void AuraEffect::CalculatePeriodic(Unit* caster, bool resetPeriodicTimer /*= tru
if (m_spellInfo->IsChanneled())
{
if (m_spellInfo->AttributesEx5 & SPELL_ATTR5_HASTE_AFFECT_DURATION)
- caster->ModSpellCastTime(m_spellInfo, m_amplitude);
+ caster->ModSpellCastTime(m_spellInfo, m_period);
}
else if (m_spellInfo->AttributesEx5 & SPELL_ATTR5_HASTE_AFFECT_DURATION)
- m_amplitude = int32(m_amplitude * caster->GetFloatValue(UNIT_MOD_CAST_SPEED));
+ m_period = int32(m_period * caster->GetFloatValue(UNIT_MOD_CAST_SPEED));
}
}
if (load) // aura loaded from db
{
- m_tickNumber = m_amplitude ? GetBase()->GetDuration() / m_amplitude : 0;
- m_periodicTimer = m_amplitude ? GetBase()->GetDuration() % m_amplitude : 0;
+ m_tickNumber = m_period ? GetBase()->GetDuration() / m_period : 0;
+ m_periodicTimer = m_period ? GetBase()->GetDuration() % m_period : 0;
if (m_spellInfo->AttributesEx5 & SPELL_ATTR5_START_PERIODIC_AT_APPLY)
++m_tickNumber;
}
@@ -675,8 +675,8 @@ void AuraEffect::CalculatePeriodic(Unit* caster, bool resetPeriodicTimer /*= tru
{
m_periodicTimer = 0;
// Start periodic on next tick or at aura apply
- if (m_amplitude && !(m_spellInfo->AttributesEx5 & SPELL_ATTR5_START_PERIODIC_AT_APPLY))
- m_periodicTimer += m_amplitude;
+ if (m_period && !(m_spellInfo->AttributesEx5 & SPELL_ATTR5_START_PERIODIC_AT_APPLY))
+ m_periodicTimer += m_period;
}
}
}
@@ -859,7 +859,7 @@ void AuraEffect::Update(uint32 diff, Unit* caster)
++m_tickNumber;
// update before tick (aura can be removed in TriggerSpell or PeriodicTick calls)
- m_periodicTimer += m_amplitude - diff;
+ m_periodicTimer += m_period - diff;
UpdatePeriodic(caster);
std::list<AuraApplication*> effectApplications;
@@ -1128,7 +1128,7 @@ void AuraEffect::CleanupTriggeredSpells(Unit* target)
// needed for spell 43680, maybe others
/// @todo is there a spell flag, which can solve this in a more sophisticated way?
if (m_spellInfo->Effects[GetEffIndex()].ApplyAuraName == SPELL_AURA_PERIODIC_TRIGGER_SPELL &&
- uint32(m_spellInfo->GetDuration()) == m_spellInfo->Effects[GetEffIndex()].Amplitude)
+ uint32(m_spellInfo->GetDuration()) == m_spellInfo->Effects[GetEffIndex()].ApplyAuraPeriod)
return;
target->RemoveAurasDueToSpell(tSpellId, GetCasterGUID());
@@ -4596,7 +4596,7 @@ void AuraEffect::HandleNoReagentUseAura(AuraApplication const* aurApp, uint8 mod
if (target->GetTypeId() != TYPEID_PLAYER)
return;
- flag96 mask;
+ flag128 mask;
Unit::AuraEffectList const& noReagent = target->GetAuraEffectsByType(SPELL_AURA_NO_REAGENT_USE);
for (Unit::AuraEffectList::const_iterator i = noReagent.begin(); i != noReagent.end(); ++i)
mask |= (*i)->m_spellInfo->Effects[(*i)->m_effIndex].SpellClassMask;
@@ -4604,6 +4604,7 @@ void AuraEffect::HandleNoReagentUseAura(AuraApplication const* aurApp, uint8 mod
target->SetUInt32Value(PLAYER_NO_REAGENT_COST_1 , mask[0]);
target->SetUInt32Value(PLAYER_NO_REAGENT_COST_1+1, mask[1]);
target->SetUInt32Value(PLAYER_NO_REAGENT_COST_1+2, mask[2]);
+ target->SetUInt32Value(PLAYER_NO_REAGENT_COST_1+3, mask[3]);
}
void AuraEffect::HandleAuraRetainComboPoints(AuraApplication const* aurApp, uint8 mode, bool apply) const
diff --git a/src/server/game/Spells/Auras/SpellAuraEffects.h b/src/server/game/Spells/Auras/SpellAuraEffects.h
index d07885aaa83..22571f4851e 100644
--- a/src/server/game/Spells/Auras/SpellAuraEffects.h
+++ b/src/server/game/Spells/Auras/SpellAuraEffects.h
@@ -47,7 +47,7 @@ class AuraEffect
uint32 GetId() const { return m_spellInfo->Id; }
uint32 GetEffIndex() const { return m_effIndex; }
int32 GetBaseAmount() const { return m_baseAmount; }
- int32 GetAmplitude() const { return m_amplitude; }
+ int32 GetPeriod() const { return m_period; }
int32 GetMiscValueB() const { return m_spellInfo->Effects[m_effIndex].MiscValueB; }
int32 GetMiscValue() const { return m_spellInfo->Effects[m_effIndex].MiscValue; }
@@ -81,8 +81,8 @@ class AuraEffect
void UpdatePeriodic(Unit* caster);
uint32 GetTickNumber() const { return m_tickNumber; }
- int32 GetTotalTicks() const { return m_amplitude ? (GetBase()->GetMaxDuration() / m_amplitude) : 1;}
- void ResetPeriodic(bool resetPeriodicTimer = false) { if (resetPeriodicTimer) m_periodicTimer = m_amplitude; m_tickNumber = 0;}
+ int32 GetTotalTicks() const { return m_period ? (GetBase()->GetMaxDuration() / m_period) : 1;}
+ void ResetPeriodic(bool resetPeriodicTimer = false) { if (resetPeriodicTimer) m_periodicTimer = m_period; m_tickNumber = 0;}
bool IsPeriodic() const { return m_isPeriodic; }
void SetPeriodic(bool isPeriodic) { m_isPeriodic = isPeriodic; }
@@ -112,7 +112,7 @@ class AuraEffect
SpellModifier* m_spellmod;
int32 m_periodicTimer;
- int32 m_amplitude;
+ int32 m_period;
uint32 m_tickNumber;
uint8 const m_effIndex;
diff --git a/src/server/game/Spells/Auras/SpellAuras.cpp b/src/server/game/Spells/Auras/SpellAuras.cpp
index d0c40f2bb2b..67df56d892e 100644
--- a/src/server/game/Spells/Auras/SpellAuras.cpp
+++ b/src/server/game/Spells/Auras/SpellAuras.cpp
@@ -781,14 +781,14 @@ void Aura::RefreshTimers()
bool resetPeriodic = true;
if (m_spellInfo->AttributesEx8 & SPELL_ATTR8_DONT_RESET_PERIODIC_TIMER)
{
- int32 minAmplitude = m_maxDuration;
+ int32 minPeriod = m_maxDuration;
for (uint8 i = 0; i < MAX_SPELL_EFFECTS; ++i)
if (AuraEffect const* eff = GetEffect(i))
- if (int32 ampl = eff->GetAmplitude())
- minAmplitude = std::min(ampl, minAmplitude);
+ if (int32 period = eff->GetPeriod())
+ minPeriod = std::min(period, minPeriod);
// If only one tick remaining, roll it over into new duration
- if (GetDuration() <= minAmplitude)
+ if (GetDuration() <= minPeriod)
{
m_maxDuration += GetDuration();
resetPeriodic = false;
diff --git a/src/server/game/Spells/Spell.cpp b/src/server/game/Spells/Spell.cpp
index cb2e2e82e9d..75f6c7d86fa 100644
--- a/src/server/game/Spells/Spell.cpp
+++ b/src/server/game/Spells/Spell.cpp
@@ -1451,7 +1451,7 @@ void Spell::SelectImplicitTargetObjectTargets(SpellEffIndex effIndex, SpellImpli
void Spell::SelectImplicitChainTargets(SpellEffIndex effIndex, SpellImplicitTargetInfo const& targetType, WorldObject* target, uint32 effMask)
{
- uint32 maxTargets = m_spellInfo->Effects[effIndex].ChainTarget;
+ uint32 maxTargets = m_spellInfo->Effects[effIndex].ChainTargets;
if (Player* modOwner = m_caster->GetSpellModOwner())
modOwner->ApplySpellMod(m_spellInfo->Id, SPELLMOD_JUMP_TARGETS, maxTargets, this);
@@ -2626,8 +2626,8 @@ SpellMissInfo Spell::DoSpellHitOnUnit(Unit* unit, uint32 effectMask, bool scaleA
duration = 0;
for (uint8 i = 0; i < MAX_SPELL_EFFECTS; ++i)
if (AuraEffect const* eff = m_spellAura->GetEffect(i))
- if (int32 amplitude = eff->GetAmplitude()) // amplitude is hastened by UNIT_MOD_CAST_SPEED
- duration = std::max(std::max(origDuration / amplitude, 1) * amplitude, duration);
+ if (int32 period = eff->GetPeriod()) // period is hastened by UNIT_MOD_CAST_SPEED
+ duration = std::max(std::max(origDuration / period, 1) * period, duration);
// if there is no periodic effect
if (!duration)
@@ -4815,7 +4815,7 @@ SpellCastResult Spell::CheckCast(bool strict)
{
if (m_spellInfo->CasterAuraState && !m_caster->HasAuraState(AuraStateType(m_spellInfo->CasterAuraState), m_spellInfo, m_caster))
return SPELL_FAILED_CASTER_AURASTATE;
- if (m_spellInfo->CasterAuraStateNot && m_caster->HasAuraState(AuraStateType(m_spellInfo->CasterAuraStateNot), m_spellInfo, m_caster))
+ if (m_spellInfo->ExcludeCasterAuraState && m_caster->HasAuraState(AuraStateType(m_spellInfo->ExcludeCasterAuraState), m_spellInfo, m_caster))
return SPELL_FAILED_CASTER_AURASTATE;
// Note: spell 62473 requres casterAuraSpell = triggering spell
@@ -5476,7 +5476,7 @@ SpellCastResult Spell::CheckCast(bool strict)
InstanceTemplate const* it = sObjectMgr->GetInstanceTemplate(m_caster->GetMapId());
if (it)
allowMount = it->AllowMount;
- if (m_caster->GetTypeId() == TYPEID_PLAYER && !allowMount && !m_spellInfo->AreaGroupId)
+ if (m_caster->GetTypeId() == TYPEID_PLAYER && !allowMount && !m_spellInfo->RequiredAreasID)
return SPELL_FAILED_NO_MOUNTS_ALLOWED;
if (m_caster->IsInDisallowedMountForm())
diff --git a/src/server/game/Spells/SpellInfo.cpp b/src/server/game/Spells/SpellInfo.cpp
index 917f69547a1..dcd3338e0c2 100644
--- a/src/server/game/Spells/SpellInfo.cpp
+++ b/src/server/game/Spells/SpellInfo.cpp
@@ -346,26 +346,26 @@ SpellEffectInfo::SpellEffectInfo(SpellEntry const* /*spellEntry*/, SpellInfo con
_spellInfo = spellInfo;
_effIndex = _effect ? _effect->EffectIndex : effIndex;
Effect = _effect ? _effect->Effect : 0;
- ApplyAuraName = _effect ? _effect->EffectApplyAuraName : 0;
- Amplitude = _effect ? _effect->EffectAmplitude : 0;
+ ApplyAuraName = _effect ? _effect->EffectAura : 0;
+ ApplyAuraPeriod = _effect ? _effect->EffectAuraPeriod : 0;
DieSides = _effect ? _effect->EffectDieSides : 0;
RealPointsPerLevel = _effect ? _effect->EffectRealPointsPerLevel : 0.0f;
BasePoints = _effect ? _effect->EffectBasePoints : 0;
- PointsPerComboPoint = _effect ? _effect->EffectPointsPerComboPoint : 0.0f;
- ValueMultiplier = _effect ? _effect->EffectValueMultiplier : 0.0f;
- DamageMultiplier = _effect ? _effect->EffectDamageMultiplier : 0.0f;
- BonusMultiplier = _effect ? _effect->EffectBonusMultiplier : 0.0f;
+ PointsPerResource = _effect ? _effect->EffectPointsPerResource : 0.0f;
+ Amplitude = _effect ? _effect->EffectAmplitude : 0.0f;
+ ChainAmplitude = _effect ? _effect->EffectChainAmplitude : 0.0f;
+ BonusCoefficient = _effect ? _effect->EffectBonusCoefficient : 0.0f;
MiscValue = _effect ? _effect->EffectMiscValue : 0;
MiscValueB = _effect ? _effect->EffectMiscValueB : 0;
Mechanic = Mechanics(_effect ? _effect->EffectMechanic : 0);
- TargetA = SpellImplicitTargetInfo(_effect ? _effect->EffectImplicitTargetA : 0);
- TargetB = SpellImplicitTargetInfo(_effect ? _effect->EffectImplicitTargetB : 0);
+ TargetA = SpellImplicitTargetInfo(_effect ? _effect->ImplicitTarget[0] : 0);
+ TargetB = SpellImplicitTargetInfo(_effect ? _effect->ImplicitTarget[1] : 0);
RadiusEntry = _effect && _effect->EffectRadiusIndex ? sSpellRadiusStore.LookupEntry(_effect->EffectRadiusIndex) : NULL;
MaxRadiusEntry = _effect && _effect->EffectRadiusMaxIndex ? sSpellRadiusStore.LookupEntry(_effect->EffectRadiusMaxIndex) : NULL;
- ChainTarget = _effect ? _effect->EffectChainTarget : 0;
+ ChainTargets = _effect ? _effect->EffectChainTargets : 0;
ItemType = _effect ? _effect->EffectItemType : 0;
TriggerSpell = _effect ? _effect->EffectTriggerSpell : 0;
- SpellClassMask = _effect ? _effect->EffectSpellClassMask : flag96(0);
+ SpellClassMask = _effect ? _effect->EffectSpellClassMask : flag128();
ImplicitTargetConditions = NULL;
ScalingMultiplier = scaling ? scaling->Multiplier[_effIndex] : 0.0f;
DeltaScalingMultiplier = scaling ? scaling->RandomMultiplier[_effIndex] : 0.0f;
@@ -432,7 +432,7 @@ int32 SpellEffectInfo::CalcValue(Unit const* caster, int32 const* bp, Unit const
{
float basePointsPerLevel = RealPointsPerLevel;
int32 basePoints = bp ? *bp : BasePoints;
- float comboDamage = PointsPerComboPoint;
+ float comboDamage = PointsPerResource;
// base amount modification based on spell lvl vs caster lvl
if (ScalingMultiplier != 0.0f)
@@ -589,7 +589,7 @@ int32 SpellEffectInfo::CalcBaseValue(int32 value) const
float SpellEffectInfo::CalcValueMultiplier(Unit* caster, Spell* spell) const
{
- float multiplier = ValueMultiplier;
+ float multiplier = Amplitude;
if (Player* modOwner = (caster ? caster->GetSpellModOwner() : NULL))
modOwner->ApplySpellMod(_spellInfo->Id, SPELLMOD_VALUE_MULTIPLIER, multiplier, spell);
return multiplier;
@@ -597,7 +597,7 @@ float SpellEffectInfo::CalcValueMultiplier(Unit* caster, Spell* spell) const
float SpellEffectInfo::CalcDamageMultiplier(Unit* caster, Spell* spell) const
{
- float multiplier = DamageMultiplier;
+ float multiplier = ChainAmplitude;
if (Player* modOwner = (caster ? caster->GetSpellModOwner() : NULL))
modOwner->ApplySpellMod(_spellInfo->Id, SPELLMOD_DAMAGE_MULTIPLIER, multiplier, spell);
return multiplier;
@@ -863,50 +863,57 @@ SpellEffectInfo::StaticData SpellEffectInfo::_data[TOTAL_SPELL_EFFECTS] =
SpellInfo::SpellInfo(SpellEntry const* spellEntry, SpellEffectEntry const** effects)
{
- Id = spellEntry->Id;
- Attributes = spellEntry->Attributes;
- AttributesEx = spellEntry->AttributesEx;
- AttributesEx2 = spellEntry->AttributesEx2;
- AttributesEx3 = spellEntry->AttributesEx3;
- AttributesEx4 = spellEntry->AttributesEx4;
- AttributesEx5 = spellEntry->AttributesEx5;
- AttributesEx6 = spellEntry->AttributesEx6;
- AttributesEx7 = spellEntry->AttributesEx7;
- AttributesEx8 = spellEntry->AttributesEx8;
- AttributesEx9 = spellEntry->AttributesEx9;
- AttributesEx10 = spellEntry->AttributesEx10;
+ Id = spellEntry->ID;
+
+ SpellName = spellEntry->Name_lang;
+ //Rank = spellEntry->Rank;
+ RuneCostID = spellEntry->RuneCostID;
+ //SpellDifficultyId = spellEntry->DifficultyID;
+ SpellScalingId = spellEntry->ScalingID;
+ SpellAuraOptionsId = spellEntry->AuraOptionsID;
+ SpellAuraRestrictionsId = spellEntry->AuraRestrictionsID;
+ SpellCastingRequirementsId = spellEntry->CastingRequirementsID;
+ SpellCategoriesId = spellEntry->CategoriesID;
+ SpellClassOptionsId = spellEntry->ClassOptionsID;
+ SpellCooldownsId = spellEntry->CooldownsID;
+ SpellEquippedItemsId = spellEntry->EquippedItemsID;
+ SpellInterruptsId = spellEntry->InterruptsID;
+ SpellLevelsId = spellEntry->LevelsID;
+ //SpellPowerId = spellEntry->PowerID;
+ SpellReagentsId = spellEntry->ReagentsID;
+ SpellShapeshiftId = spellEntry->ShapeshiftID;
+ SpellTargetRestrictionsId = spellEntry->TargetRestrictionsID;
+ SpellTotemsId = spellEntry->TotemsID;
+ SpellMiscId = spellEntry->MiscID;
+
+ // SpellMiscEntry
+ SpellMiscEntry const* _misc = GetSpellMisc();
+ Attributes = _misc ? _misc->Attributes : 0;
+ AttributesEx = _misc ? _misc->AttributesEx : 0;
+ AttributesEx2 = _misc ? _misc->AttributesExB : 0;
+ AttributesEx3 = _misc ? _misc->AttributesExC : 0;
+ AttributesEx4 = _misc ? _misc->AttributesExD : 0;
+ AttributesEx5 = _misc ? _misc->AttributesExE : 0;
+ AttributesEx6 = _misc ? _misc->AttributesExF : 0;
+ AttributesEx7 = _misc ? _misc->AttributesExG : 0;
+ AttributesEx8 = _misc ? _misc->AttributesExH : 0;
+ AttributesEx9 = _misc ? _misc->AttributesExI : 0;
+ AttributesEx10 = _misc ? _misc->AttributesExJ : 0;
+ AttributesEx11 = _misc ? _misc->AttributesExK : 0;
+ AttributesEx12 = _misc ? _misc->AttributesExL : 0;
+ AttributesEx13 = _misc ? _misc->AttributesExM : 0;
+ CastTimeEntry = _misc ? (_misc->CastingTimeIndex ? sSpellCastTimesStore.LookupEntry(_misc->CastingTimeIndex) : NULL) : NULL;
+ DurationEntry = _misc ? (_misc->DurationIndex ? sSpellDurationStore.LookupEntry(_misc->DurationIndex) : NULL) : NULL;
+ RangeEntry = _misc ? (_misc->RangeIndex ? sSpellRangeStore.LookupEntry(_misc->RangeIndex) : NULL) : NULL;
+ Speed = _misc ? _misc->Speed : 0;
+ SchoolMask = _misc ? _misc->SchoolMask : 0;
AttributesCu = 0;
- CastTimeEntry = spellEntry->CastingTimeIndex ? sSpellCastTimesStore.LookupEntry(spellEntry->CastingTimeIndex) : NULL;
- DurationEntry = spellEntry->DurationIndex ? sSpellDurationStore.LookupEntry(spellEntry->DurationIndex) : NULL;
- PowerType = spellEntry->powerType;
- RangeEntry = spellEntry->rangeIndex ? sSpellRangeStore.LookupEntry(spellEntry->rangeIndex) : NULL;
- Speed = spellEntry->speed;
-
+ //PowerType = _misc ? _misc->powerType : 0;
for (uint8 i = 0; i < 2; ++i)
- SpellVisual[i] = spellEntry->SpellVisual[i];
-
- SpellIconID = spellEntry->SpellIconID;
- ActiveIconID = spellEntry->activeIconID;
- SpellName = spellEntry->SpellName;
- Rank = spellEntry->Rank;
- SchoolMask = spellEntry->SchoolMask;
- RuneCostID = spellEntry->runeCostID;
- SpellDifficultyId = spellEntry->SpellDifficultyId;
- SpellScalingId = spellEntry->SpellScalingId;
- SpellAuraOptionsId = spellEntry->SpellAuraOptionsId;
- SpellAuraRestrictionsId = spellEntry->SpellAuraRestrictionsId;
- SpellCastingRequirementsId = spellEntry->SpellCastingRequirementsId;
- SpellCategoriesId = spellEntry->SpellCategoriesId;
- SpellClassOptionsId = spellEntry->SpellClassOptionsId;
- SpellCooldownsId = spellEntry->SpellCooldownsId;
- SpellEquippedItemsId = spellEntry->SpellEquippedItemsId;
- SpellInterruptsId = spellEntry->SpellInterruptsId;
- SpellLevelsId = spellEntry->SpellLevelsId;
- SpellPowerId = spellEntry->SpellPowerId;
- SpellReagentsId = spellEntry->SpellReagentsId;
- SpellShapeshiftId = spellEntry->SpellShapeshiftId;
- SpellTargetRestrictionsId = spellEntry->SpellTargetRestrictionsId;
- SpellTotemsId = spellEntry->SpellTotemsId;
+ SpellVisual[i] = _misc ? _misc->SpellVisualID[i] : 0;
+
+ SpellIconID = _misc ? _misc->SpellIconID : 0;
+ ActiveIconID = _misc ? _misc->ActiveIconID : 0;
// SpellDifficultyEntry
for (uint8 i = 0; i < MAX_SPELL_EFFECTS; ++i)
@@ -923,27 +930,27 @@ SpellInfo::SpellInfo(SpellEntry const* spellEntry, SpellEffectEntry const** effe
// SpellAuraOptionsEntry
SpellAuraOptionsEntry const* _options = GetSpellAuraOptions();
- ProcFlags = _options ? _options->procFlags : 0;
- ProcChance = _options ? _options->procChance : 0;
- ProcCharges = _options ? _options->procCharges : 0;
- StackAmount = _options ? _options->StackAmount : 0;
+ ProcFlags = _options ? _options->ProcTypeMask : 0;
+ ProcChance = _options ? _options->ProcChance : 0;
+ ProcCharges = _options ? _options->ProcCharges : 0;
+ StackAmount = _options ? _options->CumulativeAura : 0;
// SpellAuraRestrictionsEntry
SpellAuraRestrictionsEntry const* _aura = GetSpellAuraRestrictions();
CasterAuraState = _aura ? _aura->CasterAuraState : 0;
TargetAuraState = _aura ? _aura->TargetAuraState : 0;
- CasterAuraStateNot = _aura ? _aura->CasterAuraStateNot : 0;
- TargetAuraStateNot = _aura ? _aura->TargetAuraStateNot : 0;
- CasterAuraSpell = _aura ? _aura->casterAuraSpell : 0;
- TargetAuraSpell = _aura ? _aura->targetAuraSpell : 0;
- ExcludeCasterAuraSpell = _aura ? _aura->excludeCasterAuraSpell : 0;
- ExcludeTargetAuraSpell = _aura ? _aura->excludeTargetAuraSpell : 0;
+ ExcludeCasterAuraState = _aura ? _aura->ExcludeCasterAuraState : 0;
+ ExcludeTargetAuraState = _aura ? _aura->ExcludeTargetAuraState : 0;
+ CasterAuraSpell = _aura ? _aura->CasterAuraSpell : 0;
+ TargetAuraSpell = _aura ? _aura->TargetAuraSpell : 0;
+ ExcludeCasterAuraSpell = _aura ? _aura->ExcludeCasterAuraSpell : 0;
+ ExcludeTargetAuraSpell = _aura ? _aura->ExcludeTargetAuraSpell : 0;
// SpellCastingRequirementsEntry
SpellCastingRequirementsEntry const* _castreq = GetSpellCastingRequirements();
RequiresSpellFocus = _castreq ? _castreq->RequiresSpellFocus : 0;
FacingCasterFlags = _castreq ? _castreq->FacingCasterFlags : 0;
- AreaGroupId = _castreq ? _castreq->AreaGroupId : -1;
+ RequiredAreasID = _castreq ? _castreq->RequiredAreasID : -1;
// SpellCategoriesEntry
SpellCategoriesEntry const* _categorie = GetSpellCategories();
@@ -1522,10 +1529,10 @@ SpellCastResult SpellInfo::CheckShapeshift(uint32 form) const
SpellCastResult SpellInfo::CheckLocation(uint32 map_id, uint32 zone_id, uint32 area_id, Player const* player) const
{
// normal case
- if (AreaGroupId > 0)
+ if (RequiredAreasID > 0)
{
bool found = false;
- AreaGroupEntry const* groupEntry = sAreaGroupStore.LookupEntry(AreaGroupId);
+ AreaGroupEntry const* groupEntry = sAreaGroupStore.LookupEntry(RequiredAreasID);
while (groupEntry)
{
for (uint8 i = 0; i < MAX_GROUP_AREA_IDS; ++i)
@@ -1798,7 +1805,7 @@ SpellCastResult SpellInfo::CheckTarget(Unit const* caster, WorldObject const* ta
if (TargetAuraState && !unitTarget->HasAuraState(AuraStateType(TargetAuraState), this, caster))
return SPELL_FAILED_TARGET_AURASTATE;
- if (TargetAuraStateNot && unitTarget->HasAuraState(AuraStateType(TargetAuraStateNot), this, caster))
+ if (ExcludeTargetAuraState && unitTarget->HasAuraState(AuraStateType(ExcludeTargetAuraState), this, caster))
return SPELL_FAILED_TARGET_AURASTATE;
}
@@ -2168,7 +2175,7 @@ SpellSpecificType SpellInfo::GetSpellSpecific() const
return SPELL_SPECIFIC_STING;
// only hunter aspects have this (but not all aspects in hunter family)
- if (SpellFamilyFlags.HasFlag(0x00380000, 0x00440000, 0x00001010))
+ if (SpellFamilyFlags & flag96(0x00380000, 0x00440000, 0x00001010))
return SPELL_SPECIFIC_ASPECT;
break;
@@ -2317,8 +2324,8 @@ uint32 SpellInfo::GetMaxTicks() const
case SPELL_AURA_PERIODIC_DAMAGE:
case SPELL_AURA_PERIODIC_HEAL:
case SPELL_AURA_PERIODIC_LEECH:
- if (Effects[x].Amplitude != 0)
- return DotDuration / Effects[x].Amplitude;
+ if (Effects[x].ApplyAuraPeriod != 0)
+ return DotDuration / Effects[x].ApplyAuraPeriod;
break;
}
}
@@ -2881,6 +2888,11 @@ SpellTotemsEntry const* SpellInfo::GetSpellTotems() const
return SpellTotemsId ? sSpellTotemsStore.LookupEntry(SpellTotemsId) : NULL;
}
+SpellMiscEntry const* SpellInfo::GetSpellMisc() const
+{
+ return SpellMiscId ? sSpellMiscStore.LookupEntry(SpellMiscId) : NULL;
+}
+
SpellAuraOptionsEntry const* SpellInfo::GetSpellAuraOptions() const
{
return SpellAuraOptionsId ? sSpellAuraOptionsStore.LookupEntry(SpellAuraOptionsId) : NULL;
diff --git a/src/server/game/Spells/SpellInfo.h b/src/server/game/Spells/SpellInfo.h
index ea29eb1b00f..edf997db0e5 100644
--- a/src/server/game/Spells/SpellInfo.h
+++ b/src/server/game/Spells/SpellInfo.h
@@ -233,14 +233,14 @@ class SpellEffectInfo
public:
uint32 Effect;
uint32 ApplyAuraName;
- uint32 Amplitude;
+ uint32 ApplyAuraPeriod;
int32 DieSides;
float RealPointsPerLevel;
int32 BasePoints;
- float PointsPerComboPoint;
- float ValueMultiplier;
- float DamageMultiplier;
- float BonusMultiplier;
+ float PointsPerResource;
+ float Amplitude;
+ float ChainAmplitude;
+ float BonusCoefficient;
int32 MiscValue;
int32 MiscValueB;
Mechanics Mechanic;
@@ -248,19 +248,19 @@ public:
SpellImplicitTargetInfo TargetB;
SpellRadiusEntry const* RadiusEntry;
SpellRadiusEntry const* MaxRadiusEntry;
- uint32 ChainTarget;
+ uint32 ChainTargets;
uint32 ItemType;
uint32 TriggerSpell;
- flag96 SpellClassMask;
+ flag128 SpellClassMask;
std::list<Condition*>* ImplicitTargetConditions;
// SpellScalingEntry
float ScalingMultiplier;
float DeltaScalingMultiplier;
float ComboScalingMultiplier;
- SpellEffectInfo() : _spellInfo(NULL), _effIndex(0), Effect(0), ApplyAuraName(0), Amplitude(0), DieSides(0),
- RealPointsPerLevel(0), BasePoints(0), PointsPerComboPoint(0), ValueMultiplier(0), DamageMultiplier(0),
- BonusMultiplier(0), MiscValue(0), MiscValueB(0), Mechanic(MECHANIC_NONE), RadiusEntry(NULL), ChainTarget(0),
+ SpellEffectInfo() : _spellInfo(NULL), _effIndex(0), Effect(0), ApplyAuraName(0), ApplyAuraPeriod(0), DieSides(0),
+ RealPointsPerLevel(0), BasePoints(0), PointsPerResource(0), Amplitude(0), ChainAmplitude(0),
+ BonusCoefficient(0), MiscValue(0), MiscValueB(0), Mechanic(MECHANIC_NONE), RadiusEntry(NULL), ChainTargets(0),
ItemType(0), TriggerSpell(0), ImplicitTargetConditions(NULL) {}
SpellEffectInfo(SpellEntry const* spellEntry, SpellInfo const* spellInfo, uint8 effIndex, SpellEffectEntry const* effect);
@@ -316,6 +316,9 @@ public:
uint32 AttributesEx8;
uint32 AttributesEx9;
uint32 AttributesEx10;
+ uint32 AttributesEx11;
+ uint32 AttributesEx12;
+ uint32 AttributesEx13;
uint32 AttributesCu;
uint32 Stances;
uint32 StancesNot;
@@ -325,8 +328,8 @@ public:
uint32 FacingCasterFlags;
uint32 CasterAuraState;
uint32 TargetAuraState;
- uint32 CasterAuraStateNot;
- uint32 TargetAuraStateNot;
+ uint32 ExcludeCasterAuraState;
+ uint32 ExcludeTargetAuraState;
uint32 CasterAuraSpell;
uint32 TargetAuraSpell;
uint32 ExcludeCasterAuraSpell;
@@ -370,10 +373,10 @@ public:
uint32 MaxTargetLevel;
uint32 MaxAffectedTargets;
uint32 SpellFamilyName;
- flag96 SpellFamilyFlags;
+ flag128 SpellFamilyFlags;
uint32 DmgClass;
uint32 PreventionType;
- int32 AreaGroupId;
+ int32 RequiredAreasID;
uint32 SchoolMask;
uint32 SpellDifficultyId;
uint32 SpellScalingId;
@@ -391,6 +394,7 @@ public:
uint32 SpellShapeshiftId;
uint32 SpellTargetRestrictionsId;
uint32 SpellTotemsId;
+ uint32 SpellMiscId;
// SpellScalingEntry
int32 CastTimeMin;
int32 CastTimeMax;
@@ -418,6 +422,7 @@ public:
SpellScalingEntry const* GetSpellScaling() const;
SpellShapeshiftEntry const* GetSpellShapeshift() const;
SpellTotemsEntry const* GetSpellTotems() const;
+ SpellMiscEntry const* GetSpellMisc() const;
SpellInfo(SpellEntry const* spellEntry, SpellEffectEntry const** effects);
~SpellInfo();
diff --git a/src/server/game/Spells/SpellMgr.cpp b/src/server/game/Spells/SpellMgr.cpp
index 4463fc0da75..6d2973b1644 100644
--- a/src/server/game/Spells/SpellMgr.cpp
+++ b/src/server/game/Spells/SpellMgr.cpp
@@ -2813,7 +2813,7 @@ void SpellMgr::LoadSpellInfoStore()
if (!effect)
continue;
- effectsBySpell[effect->EffectSpellId].effects[effect->EffectIndex] = effect;
+ effectsBySpell[effect->SpellID].effects[effect->EffectIndex] = effect;
}
for (uint32 i = 0; i < sSpellStore.GetNumRows(); ++i)
@@ -3188,7 +3188,7 @@ void SpellMgr::LoadSpellInfoCorrections()
spellInfo->ProcCharges = 1;
break;
case 44544: // Fingers of Frost
- spellInfo->Effects[EFFECT_0].SpellClassMask = flag96(685904631, 1151048, 0);
+ spellInfo->Effects[EFFECT_0].SpellClassMask = flag128(685904631, 1151048, 0, 0);
break;
case 74396: // Fingers of Frost visual buff
spellInfo->ProcCharges = 2;
@@ -3212,7 +3212,7 @@ void SpellMgr::LoadSpellInfoCorrections()
spellInfo->Effects[EFFECT_0].MiscValue |= 1;
break;
case 51912: // Crafty's Ultra-Advanced Proto-Typical Shortening Blaster
- spellInfo->Effects[EFFECT_0].Amplitude = 3000;
+ spellInfo->Effects[EFFECT_0].ApplyAuraPeriod = 3000;
break;
// Master Shapeshifter: missing stance data for forms other than bear - bear version has correct data
// To prevent aura staying on target after talent unlearned
@@ -3231,7 +3231,7 @@ void SpellMgr::LoadSpellInfoCorrections()
spellInfo->Effects[EFFECT_1].Effect = SPELL_EFFECT_APPLY_AURA;
spellInfo->Effects[EFFECT_1].ApplyAuraName = SPELL_AURA_ADD_FLAT_MODIFIER;
spellInfo->Effects[EFFECT_1].MiscValue = SPELLMOD_EFFECT2;
- spellInfo->Effects[EFFECT_1].SpellClassMask = flag96(0x00000000, 0x00004000, 0x00000000);
+ spellInfo->Effects[EFFECT_1].SpellClassMask = flag128(0x00000000, 0x00004000, 0x00000000, 0x00000000);
break;
case 47569: // Improved Shadowform (Rank 1)
// with this spell atrribute aura can be stacked several times
@@ -3273,7 +3273,7 @@ void SpellMgr::LoadSpellInfoCorrections()
break;
case 53241: // Marked for Death (Rank 1)
case 53243: // Marked for Death (Rank 2)
- spellInfo->Effects[EFFECT_0].SpellClassMask = flag96(0x00067801, 0x10820001, 0x00000801);
+ spellInfo->Effects[EFFECT_0].SpellClassMask = flag128(0x00067801, 0x10820001, 0x00000801, 0x00000000);
break;
case 5176: // Wrath
case 2912: // Starfire
@@ -3294,22 +3294,22 @@ void SpellMgr::LoadSpellInfoCorrections()
// this is done because another spell also uses the same SpellFamilyFlags as Icy Touch
// SpellFamilyFlags[0] & 0x00000040 in SPELLFAMILY_DEATHKNIGHT is currently unused (3.3.5a)
// this needs research on modifier applying rules, does not seem to be in Attributes fields
- spellInfo->Effects[EFFECT_0].SpellClassMask = flag96(0x00000040, 0x00000000, 0x00000000);
+ spellInfo->Effects[EFFECT_0].SpellClassMask = flag128(0x00000040, 0x00000000, 0x00000000, 0x00000000);
break;
case 64949: // Idol of the Flourishing Life
- spellInfo->Effects[EFFECT_0].SpellClassMask = flag96(0x00000000, 0x02000000, 0x00000000);
+ spellInfo->Effects[EFFECT_0].SpellClassMask = flag128(0x00000000, 0x02000000, 0x00000000, 0x00000000);
spellInfo->Effects[EFFECT_0].ApplyAuraName = SPELL_AURA_ADD_FLAT_MODIFIER;
break;
case 34231: // Libram of the Lightbringer
case 60792: // Libram of Tolerance
case 64956: // Libram of the Resolute
- spellInfo->Effects[EFFECT_0].SpellClassMask = flag96(0x80000000, 0x00000000, 0x00000000);
+ spellInfo->Effects[EFFECT_0].SpellClassMask = flag128(0x80000000, 0x00000000, 0x00000000, 0x00000000);
spellInfo->Effects[EFFECT_0].ApplyAuraName = SPELL_AURA_ADD_FLAT_MODIFIER;
break;
case 28851: // Libram of Light
case 28853: // Libram of Divinity
case 32403: // Blessed Book of Nagrand
- spellInfo->Effects[EFFECT_0].SpellClassMask = flag96(0x40000000, 0x00000000, 0x00000000);
+ spellInfo->Effects[EFFECT_0].SpellClassMask = flag128(0x40000000, 0x00000000, 0x00000000, 0x00000000);
spellInfo->Effects[EFFECT_0].ApplyAuraName = SPELL_AURA_ADD_FLAT_MODIFIER;
break;
case 45602: // Ride Carpet
@@ -3540,7 +3540,7 @@ void SpellMgr::LoadSpellInfoCorrections()
break;
case 71266: // Swarming Shadows
case 72890: // Swarming Shadows
- spellInfo->AreaGroupId = 0; // originally, these require area 4522, which is... outside of Icecrown Citadel
+ spellInfo->RequiredAreasID = 0; // originally, these require area 4522, which is... outside of Icecrown Citadel
break;
case 70602: // Corruption
case 48278: // Paralyze