Further improve ChrRace DBC handling

Port From (https://github.com/TrinityCore/TrinityCore/commit/406c7219ad6454a3f3855c9e0732245dcc34b2dc)
This commit is contained in:
hondacrx
2022-02-22 14:08:30 -05:00
parent 7b0eb70fe7
commit 0600993129
2 changed files with 11 additions and 1 deletions
+4 -1
View File
@@ -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;