mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-23 02:25:38 +01:00
Core/Unit: prematurely abort GetFactionTemplateEntry instead of retur…
…ning a null pointer Factions should never be invalid for players/spawned creatures anyways
This commit is contained in:
@@ -7490,6 +7490,8 @@ FactionTemplateEntry const* Unit::GetFactionTemplateEntry() const
|
||||
TC_LOG_ERROR("entities.unit", "Creature (template id: %u) has invalid faction (faction template id) #%u", creature->GetCreatureTemplate()->Entry, getFaction());
|
||||
else
|
||||
TC_LOG_ERROR("entities.unit", "Unit (name=%s, type=%u) has invalid faction (faction template id) #%u", GetName().c_str(), uint32(GetTypeId()), getFaction());
|
||||
|
||||
ABORT();
|
||||
}
|
||||
return entry;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user