Core/Misc: Reduce number of player spec hardcoded checks
Port From (https://github.com/TrinityCore/TrinityCore/commit/054723241eaf1abe7d45a96460e84b9ff113ffb2)
This commit is contained in:
@@ -216,7 +216,7 @@ namespace Game.DataStorage
|
||||
//ASSERT(chrSpec.OrderIndex < MAX_SPECIALIZATIONS);
|
||||
|
||||
uint storageIndex = chrSpec.ClassID;
|
||||
if (chrSpec.Flags.HasAnyFlag(ChrSpecializationFlag.PetOverrideSpec))
|
||||
if (chrSpec.GetFlags().HasFlag(ChrSpecializationFlag.PetOverrideSpec))
|
||||
{
|
||||
//ASSERT(!chrSpec.ClassID);
|
||||
storageIndex = (int)Class.Max;
|
||||
|
||||
@@ -301,12 +301,15 @@ namespace Game.DataStorage
|
||||
public byte OrderIndex;
|
||||
public sbyte PetTalentType;
|
||||
public sbyte Role;
|
||||
public ChrSpecializationFlag Flags;
|
||||
public uint Flags;
|
||||
public int SpellIconFileID;
|
||||
public sbyte PrimaryStatPriority;
|
||||
public int AnimReplacements;
|
||||
public uint[] MasterySpellID = new uint[PlayerConst.MaxMasterySpells];
|
||||
|
||||
public ChrSpecializationFlag GetFlags() { return (ChrSpecializationFlag)Flags; }
|
||||
public ChrSpecializationRole GetRole() { return (ChrSpecializationRole)Role; }
|
||||
|
||||
public bool IsPetSpecialization()
|
||||
{
|
||||
return ClassID == 0;
|
||||
|
||||
Reference in New Issue
Block a user