Core/Misc: Turn ChrSpecialization into enum
Port From (https://github.com/TrinityCore/TrinityCore/commit/98007f859b7318570c0c923a00aa32fc485c8ec8)
This commit is contained in:
@@ -159,7 +159,7 @@ namespace Game.Entities
|
||||
selectedEssences.ModifyValue(selectedEssences.AzeriteEssenceID, i) = selectedEssenceData.AzeriteEssenceId[i];
|
||||
}
|
||||
|
||||
if (owner != null && owner.GetPrimarySpecialization() == selectedEssenceData.SpecializationId)
|
||||
if (owner != null && owner.GetPrimarySpecialization() == (ChrSpecialization)selectedEssenceData.SpecializationId)
|
||||
selectedEssences.ModifyValue(selectedEssences.Enabled).SetValue(true);
|
||||
|
||||
AddDynamicUpdateFieldValue(m_values.ModifyValue(m_azeriteItemData).ModifyValue(m_azeriteItemData.SelectedEssences), selectedEssences);
|
||||
@@ -167,7 +167,7 @@ namespace Game.Entities
|
||||
|
||||
// add selected essences for current spec
|
||||
if (owner != null && GetSelectedAzeriteEssences() == null)
|
||||
CreateSelectedAzeriteEssences(owner.GetPrimarySpecialization());
|
||||
CreateSelectedAzeriteEssences((uint)owner.GetPrimarySpecialization());
|
||||
|
||||
if (needSave)
|
||||
{
|
||||
|
||||
@@ -2503,7 +2503,7 @@ namespace Game.Entities
|
||||
|
||||
eff.SetBonuses.Add(itemSetSpell);
|
||||
// spell cast only if fit form requirement, in other case will cast at form change
|
||||
if (itemSetSpell.ChrSpecID == 0 || itemSetSpell.ChrSpecID == player.GetPrimarySpecialization())
|
||||
if (itemSetSpell.ChrSpecID == 0 || (ChrSpecialization)itemSetSpell.ChrSpecID == player.GetPrimarySpecialization())
|
||||
player.ApplyEquipSpell(spellInfo, null, true);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -241,7 +241,7 @@ namespace Game.Entities
|
||||
|
||||
uint spec = player.GetLootSpecId();
|
||||
if (spec == 0)
|
||||
spec = player.GetPrimarySpecialization();
|
||||
spec = (uint)player.GetPrimarySpecialization();
|
||||
if (spec == 0)
|
||||
spec = player.GetDefaultSpecId();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user