Core/Races: Really fix bug in racemasks.

This commit is contained in:
hondacrx
2021-01-25 13:06:53 -05:00
parent 3201b804fa
commit b25c1487b2
14 changed files with 63 additions and 52 deletions
+1 -1
View File
@@ -2969,7 +2969,7 @@ namespace Game.Spells
}
case SpellProcsPerMinuteModType.Race:
{
if (caster.GetRaceMask().HasAnyFlag(mod.Param))
if (SharedConst.GetMaskForRace(caster.GetRace()).HasAnyFlag((int)mod.Param))
ppm *= 1.0f + mod.Coeff;
break;
}
+2 -2
View File
@@ -2100,7 +2100,7 @@ namespace Game.Entities
}
}
if (spellArea.raceMask != 0 && (spellArea.raceMask & (ulong)RaceMask.AllPlayable) == 0)
if (spellArea.raceMask != 0 && (spellArea.raceMask & SharedConst.RaceMaskAllPlayable) == 0)
{
Log.outError(LogFilter.Sql, "Spell {0} listed in `spell_area` have wrong race mask ({1}) requirement", spell, spellArea.raceMask);
continue;
@@ -3781,7 +3781,7 @@ namespace Game.Entities
return false;
if (raceMask != 0) // not in expected race
if (player == null || !Convert.ToBoolean(raceMask & (ulong)player.GetRaceMask()))
if (player == null || !Convert.ToBoolean(raceMask & (ulong)SharedConst.GetMaskForRace(player.GetRace())))
return false;
if (areaId != 0) // not in expected zone