Core/Entities: Phasing rewrite

* Optimized phase visibility checking
* Handle all phase flags

Closes #16758
Closes #21119
This commit is contained in:
Shauren
2018-01-28 11:37:20 +01:00
parent 1e62b53c66
commit 91be2332e2
80 changed files with 1802 additions and 885 deletions

View File

@@ -1374,7 +1374,7 @@ bool SmartAIMgr::IsEventValid(SmartScriptHolder& e)
return false;
}
if (sDB2Manager.GetPhasesForGroup(phaseGroup).empty())
if (!sDB2Manager.GetPhasesForGroup(phaseGroup))
{
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;