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:
1 parent
ffe4d8f357
commit
7763d40846
1 file changed
+2
@@ -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