Core/Misc: Turn ChrSpecialization into enum
Port From (https://github.com/TrinityCore/TrinityCore/commit/98007f859b7318570c0c923a00aa32fc485c8ec8)
This commit is contained in:
@@ -4023,7 +4023,7 @@ namespace Scripts.Spells.Items
|
||||
|
||||
void updateAuraIfInCorrectSpec(ChrSpecialization spec, AmalgamsSeventhSpineSpellIds aura)
|
||||
{
|
||||
if (target.GetPrimarySpecialization() != (uint)spec)
|
||||
if (target.GetPrimarySpecialization() != spec)
|
||||
target.RemoveAurasDueToSpell((uint)aura);
|
||||
else if (!target.HasAura((uint)aura))
|
||||
target.CastSpell(target, (uint)aura, new CastSpellExtraArgs(aurEff));
|
||||
|
||||
@@ -310,7 +310,7 @@ namespace Scripts.Spells.Paladin
|
||||
if (caster != null)
|
||||
{
|
||||
// 243597 is also being cast as protection, but CreateObject is not sent, either serverside areatrigger for this aura or unused - also no visual is seen
|
||||
if (unit == caster && caster.IsPlayer() && caster.ToPlayer().GetPrimarySpecialization() == (uint)ChrSpecialization.PaladinProtection)
|
||||
if (unit == caster && caster.IsPlayer() && caster.ToPlayer().GetPrimarySpecialization() == ChrSpecialization.PaladinProtection)
|
||||
caster.CastSpell(caster, SpellIds.ConsecrationProtectionAura);
|
||||
|
||||
if (caster.IsValidAttackTarget(unit))
|
||||
|
||||
@@ -537,7 +537,7 @@ namespace Scripts.Spells.Shaman
|
||||
Player player = GetCaster().ToPlayer();
|
||||
byte slot = EquipmentSlot.MainHand;
|
||||
|
||||
if (player.GetPrimarySpecialization() == (uint)ChrSpecialization.ShamanEnhancement)
|
||||
if (player.GetPrimarySpecialization() == ChrSpecialization.ShamanEnhancement)
|
||||
slot = EquipmentSlot.OffHand;
|
||||
|
||||
Item targetItem = player.GetItemByPos(InventorySlots.Bag0, slot);
|
||||
|
||||
@@ -696,7 +696,7 @@ namespace Scripts.Spells.Warrior
|
||||
|
||||
void HandleOnProc(AuraEffect aurEff, ProcEventInfo procInfo)
|
||||
{
|
||||
if (procInfo.GetActor().GetTypeId() == TypeId.Player && procInfo.GetActor().ToPlayer().GetPrimarySpecialization() == (uint)ChrSpecialization.WarriorFury)
|
||||
if (procInfo.GetActor().GetTypeId() == TypeId.Player && procInfo.GetActor().ToPlayer().GetPrimarySpecialization() == ChrSpecialization.WarriorFury)
|
||||
PreventDefaultAction();
|
||||
|
||||
procInfo.GetActor().GetSpellHistory().ResetCooldown(SpellIds.ImpendingVictory, true);
|
||||
|
||||
Reference in New Issue
Block a user