[7689] Batter EventAI loading checks and fix one from possible crash cases.

Signed-off-by: VladimirMangos <vladimir@getmangos.com>
This commit is contained in:
NoFantasy 2009-04-19 23:02:17 +04:00 committed by VladimirMangos
parent f4adf83cd7
commit ee9ea143d1
5 changed files with 40 additions and 15 deletions

View file

@ -141,6 +141,12 @@ void WaypointManager::Load()
}
}
if (be.emote)
{
if (!sEmotesStore.LookupEntry(be.emote))
sLog.outErrorDb("Waypoint path %u (Point %u) are using emote %u, but emote does not exist.",id, point, be.emote);
}
// save memory by not storing empty behaviors
if(!be.isEmpty())
{