diff options
Diffstat (limited to 'src/server/scripts')
6 files changed, 17 insertions, 13 deletions
diff --git a/src/server/scripts/Commands/cs_learn.cpp b/src/server/scripts/Commands/cs_learn.cpp index d06cce75a78..2986bb3ce13 100644 --- a/src/server/scripts/Commands/cs_learn.cpp +++ b/src/server/scripts/Commands/cs_learn.cpp @@ -195,7 +195,7 @@ public: if (playerClass != talentInfo->ClassID) continue; - if (talentInfo->SpecID && player->GetPrimarySpecialization() != talentInfo->SpecID) + if (talentInfo->SpecID && player->GetPrimarySpecialization() != ChrSpecialization(talentInfo->SpecID)) continue; SpellInfo const* spellInfo = sSpellMgr->GetSpellInfo(talentInfo->SpellID, DIFFICULTY_NONE); diff --git a/src/server/scripts/Northrend/AzjolNerub/Ahnkahet/boss_herald_volazj.cpp b/src/server/scripts/Northrend/AzjolNerub/Ahnkahet/boss_herald_volazj.cpp index 6f66ed7d1fd..b2157756451 100644 --- a/src/server/scripts/Northrend/AzjolNerub/Ahnkahet/boss_herald_volazj.cpp +++ b/src/server/scripts/Northrend/AzjolNerub/Ahnkahet/boss_herald_volazj.cpp @@ -16,6 +16,7 @@ */ #include "ahnkahet.h" +#include "DB2Stores.h" #include "InstanceScript.h" #include "Map.h" #include "ObjectAccessor.h" @@ -241,7 +242,7 @@ struct boss_volazj : public BossAI // clone player->CastSpell(summon, SPELL_CLONE_PLAYER, true); summon->GetAI()->SetData(DATA_TWISTED_VISAGE_PLAYER_CLASS, player->GetClass()); - summon->GetAI()->SetData(DATA_TWISTED_VISAGE_PLAYER_SPEC, player->GetPrimarySpecialization()); + summon->GetAI()->SetData(DATA_TWISTED_VISAGE_PLAYER_SPEC, AsUnderlyingType(player->GetPrimarySpecialization())); summon->SetReactState(REACT_AGGRESSIVE); DoZoneInCombat(summon); // set phase @@ -441,7 +442,7 @@ struct npc_twisted_visage : public ScriptedAI switch (_playerClass) { case CLASS_WARRIOR: - switch (data) + switch (ChrSpecialization(data)) { case ChrSpecialization::WarriorArms: _scheduler.Schedule(3s, [this](TaskContext mortalStrike) @@ -485,7 +486,7 @@ struct npc_twisted_visage : public ScriptedAI } break; case CLASS_PALADIN: - switch (data) + switch (ChrSpecialization(data)) { case ChrSpecialization::PaladinProtection: _scheduler.Schedule(5s, [this](TaskContext consecration) @@ -544,7 +545,7 @@ struct npc_twisted_visage : public ScriptedAI }); break; case CLASS_PRIEST: - switch (data) + switch (ChrSpecialization(data)) { case ChrSpecialization::PriestShadow: _scheduler.Schedule(5s, [this](TaskContext shadowWordPain) @@ -597,7 +598,7 @@ struct npc_twisted_visage : public ScriptedAI }); break; case CLASS_SHAMAN: - switch (data) + switch (ChrSpecialization(data)) { default: case ChrSpecialization::ShamanElemental: @@ -664,7 +665,7 @@ struct npc_twisted_visage : public ScriptedAI }); break; case CLASS_DRUID: - switch (data) + switch (ChrSpecialization(data)) { case ChrSpecialization::DruidBalance: _scheduler.Schedule(2s, [this](TaskContext moonfire) diff --git a/src/server/scripts/Northrend/IcecrownCitadel/boss_sindragosa.cpp b/src/server/scripts/Northrend/IcecrownCitadel/boss_sindragosa.cpp index e4d74a47faa..9d7a7df5dbe 100644 --- a/src/server/scripts/Northrend/IcecrownCitadel/boss_sindragosa.cpp +++ b/src/server/scripts/Northrend/IcecrownCitadel/boss_sindragosa.cpp @@ -1098,7 +1098,10 @@ class spell_sindragosa_unchained_magic : public SpellScript if (!player) continue; - ChrSpecializationEntry const* specialization = sChrSpecializationStore.LookupEntry(player->GetPrimarySpecialization()); + ChrSpecializationEntry const* specialization = player->GetPrimarySpecializationEntry(); + if (!specialization) + continue; + if (specialization->GetRole() == ChrSpecializationRole::Healer) { healers.push_back(target); diff --git a/src/server/scripts/Spells/spell_druid.cpp b/src/server/scripts/Spells/spell_druid.cpp index 28258e7d1a7..70fe5014d81 100644 --- a/src/server/scripts/Spells/spell_druid.cpp +++ b/src/server/scripts/Spells/spell_druid.cpp @@ -803,7 +803,7 @@ class spell_dru_innervate : public SpellScript if (!target) return SPELL_FAILED_BAD_TARGETS; - ChrSpecializationEntry const* spec = sChrSpecializationStore.LookupEntry(target->GetPrimarySpecialization()); + ChrSpecializationEntry const* spec = target->GetPrimarySpecializationEntry(); if (!spec || spec->GetRole() != ChrSpecializationRole::Healer) return SPELL_FAILED_BAD_TARGETS; diff --git a/src/server/scripts/Spells/spell_item.cpp b/src/server/scripts/Spells/spell_item.cpp index 0efa1ec332e..ce116529c4c 100644 --- a/src/server/scripts/Spells/spell_item.cpp +++ b/src/server/scripts/Spells/spell_item.cpp @@ -4344,7 +4344,7 @@ class spell_item_amalgams_seventh_spine : public AuraScript auto updateAuraIfInCorrectSpec = [&](ChrSpecialization spec, AmalgamsSeventhSpine aura) { - if (target->GetPrimarySpecialization() != uint32(spec)) + if (target->GetPrimarySpecialization() != spec) target->RemoveAurasDueToSpell(aura); else if (!target->HasAura(aura)) target->CastSpell(target, aura, aurEff); diff --git a/src/server/scripts/Spells/spell_shaman.cpp b/src/server/scripts/Spells/spell_shaman.cpp index a4a01575978..d810f044216 100644 --- a/src/server/scripts/Spells/spell_shaman.cpp +++ b/src/server/scripts/Spells/spell_shaman.cpp @@ -390,19 +390,19 @@ class spell_sha_deeply_rooted_elements : public AuraScript void Register() override { - if (!GetAura() || GetUnitOwner()->ToPlayer()->GetPrimarySpecialization() == TALENT_SPEC_SHAMAN_ELEMENTAL) + if (!GetAura() || GetUnitOwner()->ToPlayer()->GetPrimarySpecialization() == ChrSpecialization::ShamanElemental) { DoCheckEffectProc += AuraCheckEffectProcFn(spell_sha_deeply_rooted_elements::CheckProc<SPELL_SHAMAN_LAVA_BURST>, EFFECT_1, SPELL_AURA_DUMMY); OnEffectProc += AuraEffectProcFn(spell_sha_deeply_rooted_elements::HandleProc<SPELL_SHAMAN_ASCENDANCE_ELEMENTAL>, EFFECT_1, SPELL_AURA_DUMMY); } - if (!GetAura() || GetUnitOwner()->ToPlayer()->GetPrimarySpecialization() == TALENT_SPEC_SHAMAN_ENHANCEMENT) + if (!GetAura() || GetUnitOwner()->ToPlayer()->GetPrimarySpecialization() == ChrSpecialization::ShamanEnhancement) { DoCheckEffectProc += AuraCheckEffectProcFn(spell_sha_deeply_rooted_elements::CheckProc<SPELL_SHAMAN_STORMSTRIKE>, EFFECT_2, SPELL_AURA_DUMMY); OnEffectProc += AuraEffectProcFn(spell_sha_deeply_rooted_elements::HandleProc<SPELL_SHAMAN_ASCENDANCE_ENHANCEMENT>, EFFECT_2, SPELL_AURA_DUMMY); } - if (!GetAura() || GetUnitOwner()->ToPlayer()->GetPrimarySpecialization() == TALENT_SPEC_SHAMAN_RESTORATION) + if (!GetAura() || GetUnitOwner()->ToPlayer()->GetPrimarySpecialization() == ChrSpecialization::ShamanRestoration) { DoCheckEffectProc += AuraCheckEffectProcFn(spell_sha_deeply_rooted_elements::CheckProc<SPELL_SHAMAN_RIPTIDE>, EFFECT_3, SPELL_AURA_DUMMY); OnEffectProc += AuraEffectProcFn(spell_sha_deeply_rooted_elements::HandleProc<SPELL_SHAMAN_ASCENDANCE_RESTORATION>, EFFECT_3, SPELL_AURA_DUMMY); |
