Further improve ChrRace DBC handling
Port From (https://github.com/TrinityCore/TrinityCore/commit/406c7219ad6454a3f3855c9e0732245dcc34b2dc)
This commit is contained in:
@@ -1980,7 +1980,10 @@ namespace Game.Entities
|
||||
if (ssEntry != null && ssEntry.CreatureType > 0)
|
||||
return (CreatureType)ssEntry.CreatureType;
|
||||
else
|
||||
return CreatureType.Humanoid;
|
||||
{
|
||||
var raceEntry = CliDB.ChrRacesStorage.LookupByKey(GetRace());
|
||||
return raceEntry.CreatureType;
|
||||
}
|
||||
}
|
||||
else
|
||||
return ToCreature().GetCreatureTemplate().CreatureType;
|
||||
|
||||
@@ -356,6 +356,13 @@ namespace Game
|
||||
|
||||
if (!HasPermission(RBACPermissions.SkipCheckCharacterCreationRacemask))
|
||||
{
|
||||
if (raceEntry.GetFlags().HasFlag(ChrRacesFlag.NPCOnly))
|
||||
{
|
||||
Log.outError(LogFilter.Network, $"Race ({charCreate.CreateInfo.RaceId}) was not playable but requested while creating new char for account (ID: {GetAccountId()}): wrong DBC files or cheater?");
|
||||
SendCharCreate(ResponseCodes.CharCreateDisabled);
|
||||
return;
|
||||
}
|
||||
|
||||
ulong raceMaskDisabled = WorldConfig.GetUInt64Value(WorldCfg.CharacterCreatingDisabledRacemask);
|
||||
if (Convert.ToBoolean((ulong)SharedConst.GetMaskForRace(charCreate.CreateInfo.RaceId) & raceMaskDisabled))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user