aboutsummaryrefslogtreecommitdiff
path: root/src/server/game/Spells/SpellInfo.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/server/game/Spells/SpellInfo.cpp')
-rw-r--r--src/server/game/Spells/SpellInfo.cpp227
1 files changed, 121 insertions, 106 deletions
diff --git a/src/server/game/Spells/SpellInfo.cpp b/src/server/game/Spells/SpellInfo.cpp
index a5804ffd648..9fc99e431d3 100644
--- a/src/server/game/Spells/SpellInfo.cpp
+++ b/src/server/game/Spells/SpellInfo.cpp
@@ -346,30 +346,31 @@ 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;
- ComboScalingMultiplier = scaling ? scaling->OtherMultiplier[_effIndex] : 0.0f;
+ // TODO: 6.x these values are no longer in dbc
+ ScalingMultiplier = /*scaling ? scaling->Multiplier[_effIndex] :*/ 0.0f;
+ DeltaScalingMultiplier = /*scaling ? scaling->RandomMultiplier[_effIndex] :*/ 0.0f;
+ ComboScalingMultiplier = /*scaling ? scaling->OtherMultiplier[_effIndex] :*/ 0.0f;
}
bool SpellEffectInfo::IsEffect() const
@@ -432,7 +433,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 +590,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 +598,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 +864,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)
@@ -918,46 +926,46 @@ SpellInfo::SpellInfo(SpellEntry const* spellEntry, SpellEffectEntry const** effe
CastTimeMax = _scaling ?_scaling->CastTimeMax : 0;
CastTimeMaxLevel = _scaling ? _scaling->CastTimeMaxLevel : 0;
ScalingClass = _scaling ? _scaling->ScalingClass : 0;
- CoefBase = _scaling ? _scaling->CoefBase : 0;
- CoefLevelBase = _scaling ? _scaling->CoefLevelBase : 0;
+ CoefBase = _scaling ? _scaling->NerfFactor : 0;
+ CoefLevelBase = _scaling ? _scaling->NerfMaxLevel : 0;
// 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();
CategoryEntry = _categorie ? sSpellCategoryStore.LookupEntry(_categorie->Category) : NULL;
- Dispel = _categorie ? _categorie->Dispel : 0;
+ Dispel = _categorie ? _categorie->DispelType : 0;
Mechanic = _categorie ? _categorie->Mechanic : 0;
StartRecoveryCategory = _categorie ? _categorie->StartRecoveryCategory : 0;
- DmgClass = _categorie ? _categorie->DmgClass : 0;
+ DmgClass = _categorie ? _categorie->DefenseType : 0;
PreventionType = _categorie ? _categorie->PreventionType : 0;
// SpellClassOptionsEntry
SpellClassOptionsEntry const* _class = GetSpellClassOptions();
- SpellFamilyName = _class ? _class->SpellFamilyName : 0;
- SpellFamilyFlags = _class ? _class->SpellFamilyFlags : flag96(0);
+ SpellFamilyName = _class ? _class->SpellClassSet : 0;
+ SpellFamilyFlags = _class ? _class->SpellClassMask : flag128(0);
// SpellCooldownsEntry
SpellCooldownsEntry const* _cooldowns = GetSpellCooldowns();
@@ -974,21 +982,22 @@ SpellInfo::SpellInfo(SpellEntry const* spellEntry, SpellEffectEntry const** effe
// SpellInterruptsEntry
SpellInterruptsEntry const* _interrupt = GetSpellInterrupts();
InterruptFlags = _interrupt ? _interrupt->InterruptFlags : 0;
- AuraInterruptFlags = _interrupt ? _interrupt->AuraInterruptFlags : 0;
- ChannelInterruptFlags = _interrupt ? _interrupt->ChannelInterruptFlags : 0;
+ // TODO: 6.x these flags have 2 parts
+ AuraInterruptFlags = _interrupt ? _interrupt->AuraInterruptFlags[0] : 0;
+ ChannelInterruptFlags = _interrupt ? _interrupt->ChannelInterruptFlags[0] : 0;
// SpellLevelsEntry
SpellLevelsEntry const* _levels = GetSpellLevels();
- MaxLevel = _levels ? _levels->maxLevel : 0;
- BaseLevel = _levels ? _levels->baseLevel : 0;
- SpellLevel = _levels ? _levels->spellLevel : 0;
+ MaxLevel = _levels ? _levels->MaxLevel : 0;
+ BaseLevel = _levels ? _levels->BaseLevel : 0;
+ SpellLevel = _levels ? _levels->SpellLevel : 0;
// SpellPowerEntry
SpellPowerEntry const* _power = GetSpellPower();
- ManaCost = _power ? _power->manaCost : 0;
- ManaCostPerlevel = _power ? _power->manaCostPerlevel : 0;
+ ManaCost = _power ? _power->ManaCost : 0;
+ ManaCostPerlevel = _power ? _power->ManaCostPerLevel : 0;
ManaCostPercentage = _power ? _power->ManaCostPercentage : 0;
- ManaPerSecond = _power ? _power->manaPerSecond : 0;
+ ManaPerSecond = _power ? _power->ManaCostPerSecond : 0;
// SpellReagentsEntry
SpellReagentsEntry const* _reagents = GetSpellReagents();
@@ -999,8 +1008,9 @@ SpellInfo::SpellInfo(SpellEntry const* spellEntry, SpellEffectEntry const** effe
// SpellShapeshiftEntry
SpellShapeshiftEntry const* _shapeshift = GetSpellShapeshift();
- Stances = _shapeshift ? _shapeshift->Stances : 0;
- StancesNot = _shapeshift ? _shapeshift->StancesNot : 0;
+ // TODO: 6.x these maks have 2 parts
+ Stances = _shapeshift ? _shapeshift->ShapeshiftMask[0] : 0;
+ StancesNot = _shapeshift ? _shapeshift->ShapeshiftExclude[0] : 0;
// SpellTargetRestrictionsEntry
SpellTargetRestrictionsEntry const* _target = GetSpellTargetRestrictions();
@@ -1026,7 +1036,7 @@ SpellInfo::~SpellInfo()
uint32 SpellInfo::GetCategory() const
{
- return CategoryEntry ? CategoryEntry->Id : 0;
+ return CategoryEntry ? CategoryEntry->ID : 0;
}
bool SpellInfo::HasEffect(SpellEffects effect) const
@@ -1131,10 +1141,10 @@ bool SpellInfo::IsAbilityLearnedWithProfession() const
for (SkillLineAbilityMap::const_iterator _spell_idx = bounds.first; _spell_idx != bounds.second; ++_spell_idx)
{
SkillLineAbilityEntry const* pAbility = _spell_idx->second;
- if (!pAbility || pAbility->AutolearnType != SKILL_LINE_ABILITY_LEARNED_ON_SKILL_VALUE)
+ if (!pAbility || pAbility->AquireMethod != SKILL_LINE_ABILITY_LEARNED_ON_SKILL_VALUE)
continue;
- if (pAbility->req_skill_value > 0)
+ if (pAbility->MinSkillLineRank > 0)
return true;
}
@@ -1146,7 +1156,7 @@ bool SpellInfo::IsAbilityOfSkillType(uint32 skillType) const
SkillLineAbilityMapBounds bounds = sSpellMgr->GetSkillLineAbilityMapBounds(Id);
for (SkillLineAbilityMap::const_iterator _spell_idx = bounds.first; _spell_idx != bounds.second; ++_spell_idx)
- if (_spell_idx->second->skillId == uint32(skillType))
+ if (_spell_idx->second->SkillLine == uint32(skillType))
return true;
return false;
@@ -1490,7 +1500,7 @@ SpellCastResult SpellInfo::CheckShapeshift(uint32 form) const
TC_LOG_ERROR("spells", "GetErrorAtShapeshiftedCast: unknown shapeshift %u", form);
return SPELL_CAST_OK;
}
- actAsShifted = !(shapeInfo->flags1 & 1); // shapeshift acts as normal form for spells
+ actAsShifted = !(shapeInfo->Flags & 1); // shapeshift acts as normal form for spells
}
if (actAsShifted)
@@ -1510,7 +1520,7 @@ SpellCastResult SpellInfo::CheckShapeshift(uint32 form) const
// Check if stance disables cast of not-stance spells
// Example: cannot cast any other spells in zombie or ghoul form
/// @todo Find a way to disable use of these spells clientside
- if (shapeInfo && shapeInfo->flags1 & 0x400)
+ if (shapeInfo && shapeInfo->Flags & 0x400)
{
if (!(stanceMask & Stances))
return SPELL_FAILED_ONLY_SHAPESHIFT;
@@ -1522,19 +1532,19 @@ 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)
- if (groupEntry->AreaId[i] == zone_id || groupEntry->AreaId[i] == area_id)
+ if (groupEntry->AreaID[i] == zone_id || groupEntry->AreaID[i] == area_id)
found = true;
- if (found || !groupEntry->nextGroup)
+ if (found || !groupEntry->NextAreaID)
break;
// Try search in next group
- groupEntry = sAreaGroupStore.LookupEntry(groupEntry->nextGroup);
+ groupEntry = sAreaGroupStore.LookupEntry(groupEntry->NextAreaID);
}
if (!found)
@@ -1546,7 +1556,7 @@ SpellCastResult SpellInfo::CheckLocation(uint32 map_id, uint32 zone_id, uint32 a
{
uint32 v_map = GetVirtualMapForMapAndZone(map_id, zone_id);
MapEntry const* mapEntry = sMapStore.LookupEntry(v_map);
- if (!mapEntry || mapEntry->addon < 1 || !mapEntry->IsContinent())
+ if (!mapEntry || mapEntry->ExpansionID < 1 || !mapEntry->IsContinent())
return SPELL_FAILED_INCORRECT_AREA;
}
@@ -1798,7 +1808,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;
}
@@ -1865,7 +1875,7 @@ SpellCastResult SpellInfo::CheckVehicle(Unit const* caster) const
if (Effects[effIndex].ApplyAuraName == SPELL_AURA_MOD_SHAPESHIFT)
{
SpellShapeshiftFormEntry const* shapeShiftFromEntry = sSpellShapeshiftFormStore.LookupEntry(Effects[effIndex].MiscValue);
- if (shapeShiftFromEntry && (shapeShiftFromEntry->flags1 & 1) == 0) // unk flag
+ if (shapeShiftFromEntry && (shapeShiftFromEntry->Flags & 1) == 0) // unk flag
checkMask |= VEHICLE_SEAT_FLAG_UNCONTROLLED;
break;
}
@@ -2168,7 +2178,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;
@@ -2238,8 +2248,8 @@ float SpellInfo::GetMinRange(bool positive) const
if (!RangeEntry)
return 0.0f;
if (positive)
- return RangeEntry->minRangeFriend;
- return RangeEntry->minRangeHostile;
+ return RangeEntry->MinRangeFriend;
+ return RangeEntry->MinRangeHostile;
}
float SpellInfo::GetMaxRange(bool positive, Unit* caster, Spell* spell) const
@@ -2248,9 +2258,9 @@ float SpellInfo::GetMaxRange(bool positive, Unit* caster, Spell* spell) const
return 0.0f;
float range;
if (positive)
- range = RangeEntry->maxRangeFriend;
+ range = RangeEntry->MaxRangeFriend;
else
- range = RangeEntry->maxRangeHostile;
+ range = RangeEntry->MaxRangeHostile;
if (caster)
if (Player* modOwner = caster->GetSpellModOwner())
modOwner->ApplySpellMod(Id, SPELLMOD_RANGE, range, spell);
@@ -2317,8 +2327,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 +2891,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;