Core/Misc: Fixed some wrong racemask comparisons.
This commit is contained in:
@@ -1920,7 +1920,7 @@ namespace Game.DataStorage
|
||||
var bounds = _skillRaceClassInfoBySkill.LookupByKey(skill);
|
||||
foreach (var record in bounds)
|
||||
{
|
||||
if (record.RaceMask != 0 && !Convert.ToBoolean(record.RaceMask & (1 << ((byte)race - 1))))
|
||||
if (record.RaceMask != 0 && !Convert.ToBoolean(record.RaceMask & SharedConst.GetMaskForRace(race)))
|
||||
continue;
|
||||
if (record.ClassMask != 0 && !Convert.ToBoolean(record.ClassMask & (1 << ((byte)class_ - 1))))
|
||||
continue;
|
||||
|
||||
@@ -5630,12 +5630,12 @@ namespace Game
|
||||
if (items.Empty())
|
||||
continue;
|
||||
|
||||
for (uint raceIndex = (int)Race.Human; raceIndex < (int)Race.Max; ++raceIndex)
|
||||
for (var raceIndex = Race.Human; raceIndex < Race.Max; ++raceIndex)
|
||||
{
|
||||
if (!characterLoadout.RaceMask.HasAnyFlag(raceIndex))
|
||||
if (!characterLoadout.RaceMask.HasAnyFlag(SharedConst.GetMaskForRace(raceIndex)))
|
||||
continue;
|
||||
|
||||
PlayerInfo playerInfo = _playerInfo[raceIndex][characterLoadout.ChrClassID];
|
||||
PlayerInfo playerInfo = _playerInfo[(int)raceIndex][characterLoadout.ChrClassID];
|
||||
if (playerInfo != null)
|
||||
{
|
||||
foreach (ItemTemplate itemTemplate in items)
|
||||
|
||||
Reference in New Issue
Block a user