Core/Players: Fixed custom playercreateinfo_item using 0 in race/class columns (should apply to all races/classes)

This commit is contained in:
Shauren
2026-03-22 00:26:23 +01:00
parent e7b57e2bb2
commit 1984bd4564

View File

@@ -4008,14 +4008,14 @@ void ObjectMgr::LoadPlayerInfo()
Field* fields = result->Fetch();
uint32 current_race = fields[0].GetUInt8();
if (!sChrRacesStore.HasRecord(current_race))
if (current_race && !sChrRacesStore.HasRecord(current_race))
{
TC_LOG_ERROR("sql.sql", "Wrong race {} in `playercreateinfo_item` table, ignoring.", current_race);
continue;
}
uint32 current_class = fields[1].GetUInt8();
if (!sChrClassesStore.HasRecord(current_class))
if (current_class && !sChrClassesStore.HasRecord(current_class))
{
TC_LOG_ERROR("sql.sql", "Wrong class {} in `playercreateinfo_item` table, ignoring.", current_class);
continue;