Core/DataStores: Added an extra safeguard for loading db2 hotfix locale tables - invalid row will no longer cause crashes

This commit is contained in:
Shauren
2015-03-06 18:52:58 +01:00
parent e49462fc1e
commit 854917a31a
8 changed files with 134 additions and 156 deletions

View File

@@ -1135,8 +1135,7 @@ bool SmartAIMgr::IsEventValid(SmartScriptHolder& e)
return false;
}
PhaseGroupEntry const* phase = sPhaseGroupStore.LookupEntry(phaseGroup);
if (!phase)
if (sDB2Manager.GetPhasesForGroup(phaseGroup).empty())
{
TC_LOG_ERROR("sql.sql", "SmartScript: SMART_ACTION_SET_INGAME_PHASE_GROUP uses invalid phase group id %u for creature " SI64FMTD ", skipped", phaseGroup, e.entryOrGuid);
return false;