aboutsummaryrefslogtreecommitdiff
path: root/src/server/game/Spells/SpellMgr.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/server/game/Spells/SpellMgr.cpp')
-rw-r--r--src/server/game/Spells/SpellMgr.cpp51
1 files changed, 27 insertions, 24 deletions
diff --git a/src/server/game/Spells/SpellMgr.cpp b/src/server/game/Spells/SpellMgr.cpp
index 46fac6340a8..cf25599cfaa 100644
--- a/src/server/game/Spells/SpellMgr.cpp
+++ b/src/server/game/Spells/SpellMgr.cpp
@@ -35,20 +35,20 @@
bool IsPrimaryProfessionSkill(uint32 skill)
{
SkillLineEntry const* pSkill = sSkillLineStore.LookupEntry(skill);
- return pSkill && pSkill->categoryId == SKILL_CATEGORY_PROFESSION;
+ return pSkill && pSkill->CategoryID == SKILL_CATEGORY_PROFESSION;
}
bool IsWeaponSkill(uint32 skill)
{
SkillLineEntry const* pSkill = sSkillLineStore.LookupEntry(skill);
- return pSkill && pSkill->categoryId == SKILL_CATEGORY_WEAPON;
+ return pSkill && pSkill->CategoryID == SKILL_CATEGORY_WEAPON;
}
bool IsPartOfSkillLine(uint32 skillId, uint32 spellId)
{
SkillLineAbilityMapBounds skillBounds = sSpellMgr->GetSkillLineAbilityMapBounds(spellId);
for (SkillLineAbilityMap::const_iterator itr = skillBounds.first; itr != skillBounds.second; ++itr)
- if (itr->second->skillId == skillId)
+ if (itr->second->SkillLine == skillId)
return true;
return false;
@@ -466,9 +466,10 @@ void SpellMgr::SetSpellDifficultyId(uint32 spellId, uint32 id)
mSpellDifficultySearcherMap[spellId] = id;
}
+// TODO: 6.x adapt to new spell diff system
uint32 SpellMgr::GetSpellIdForDifficulty(uint32 spellId, Unit const* caster) const
{
- if (!GetSpellInfo(spellId))
+ /*if (!GetSpellInfo(spellId))
return spellId;
if (!caster || !caster->GetMap() || !caster->GetMap()->IsDungeon())
@@ -506,6 +507,8 @@ uint32 SpellMgr::GetSpellIdForDifficulty(uint32 spellId, Unit const* caster) con
TC_LOG_DEBUG("spells", "SpellMgr::GetSpellIdForDifficulty: spellid for spell %u in mode %u is %d", spellId, mode, difficultyEntry->SpellID[mode]);
return uint32(difficultyEntry->SpellID[mode]);
+ */
+ return 0;
}
SpellInfo const* SpellMgr::GetSpellForDifficultyFromSpell(SpellInfo const* spell, Unit const* caster) const
@@ -2207,7 +2210,7 @@ void SpellMgr::LoadSkillLineAbilityMap()
if (!SkillInfo)
continue;
- mSkillLineAbilityMap.insert(SkillLineAbilityMap::value_type(SkillInfo->spellId, SkillInfo));
+ mSkillLineAbilityMap.insert(SkillLineAbilityMap::value_type(SkillInfo->SpellID, SkillInfo));
++count;
}
@@ -2432,7 +2435,7 @@ void SpellMgr::LoadPetLevelupSpellMap()
for (uint8 j = 0; j < 2; ++j)
{
- if (!creatureFamily->skillLine[j])
+ if (!creatureFamily->SkillLine[j])
continue;
for (uint32 k = 0; k < sSkillLineAbilityStore.GetNumRows(); ++k)
@@ -2441,17 +2444,17 @@ void SpellMgr::LoadPetLevelupSpellMap()
if (!skillLine)
continue;
- //if (skillLine->skillId != creatureFamily->skillLine[0] &&
- // (!creatureFamily->skillLine[1] || skillLine->skillId != creatureFamily->skillLine[1]))
+ //if (skillLine->skillId != creatureFamily->SkillLine[0] &&
+ // (!creatureFamily->SkillLine[1] || skillLine->skillId != creatureFamily->SkillLine[1]))
// continue;
- if (skillLine->skillId != creatureFamily->skillLine[j])
+ if (skillLine->SkillLine != creatureFamily->SkillLine[j])
continue;
- if (skillLine->AutolearnType != SKILL_LINE_ABILITY_LEARNED_ON_SKILL_LEARN)
+ if (skillLine->AquireMethod != SKILL_LINE_ABILITY_LEARNED_ON_SKILL_LEARN)
continue;
- SpellInfo const* spell = GetSpellInfo(skillLine->spellId);
+ SpellInfo const* spell = GetSpellInfo(skillLine->SpellID);
if (!spell) // not exist or triggered or talent
continue;
@@ -2543,7 +2546,7 @@ void SpellMgr::LoadPetDefaultSpells()
int32 petSpellsId = -int32(itr->second.PetSpellDataId);
PetDefaultSpellsEntry petDefSpells;
for (uint8 j = 0; j < MAX_CREATURE_SPELL_DATA_SLOT; ++j)
- petDefSpells.spellid[j] = spellDataEntry->spellId[j];
+ petDefSpells.spellid[j] = spellDataEntry->Spells[j];
if (LoadPetDefaultSpells_helper(&itr->second, petDefSpells))
{
@@ -2813,7 +2816,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)
@@ -2951,10 +2954,10 @@ void SpellMgr::LoadSpellInfoCustomAttributes()
for (uint8 s = 0; s < MAX_ITEM_ENCHANTMENT_EFFECTS; ++s)
{
- if (enchant->type[s] != ITEM_ENCHANTMENT_TYPE_COMBAT_SPELL)
+ if (enchant->Effect[s] != ITEM_ENCHANTMENT_TYPE_COMBAT_SPELL)
continue;
- SpellInfo* procInfo = _GetSpellInfo(enchant->spellid[s]);
+ SpellInfo* procInfo = _GetSpellInfo(enchant->EffectSpellID[s]);
if (!procInfo)
continue;
@@ -3188,7 +3191,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 +3215,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 +3234,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 +3276,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 +3297,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 +3543,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