[7915] Implement more stricted checks and limitations at loading creature addon data. Author: NoFantasy

--HG--
branch : trunk
This commit is contained in:
megamage committed 2009-05-31 15:58:58 -05:00
1 parent 4b3be64c79
commit 452770cff0
2 files changed
+43 -2

No files matched your search

+18
View File
@@ -802,6 +802,15 @@ void ObjectMgr::LoadCreatureAddons()
if(!addon)
continue;
if (addon->mount)
{
if (!sCreatureDisplayInfoStore.LookupEntry(addon->mount))
sLog.outErrorDb("Creature (Entry %u) have invalid displayInfoId for mount (%u) defined in `creature_template_addon`.",addon->guidOrEntry, addon->mount);
}
if (!sEmotesStore.LookupEntry(addon->emote))
sLog.outErrorDb("Creature (Entry %u) have invalid emote (%u) defined in `creature_template_addon`.",addon->guidOrEntry, addon->emote);
ConvertCreatureAddonAuras(const_cast<CreatureDataAddon*>(addon), "creature_template_addon", "Entry");
if(!sCreatureStorage.LookupEntry<CreatureInfo>(addon->guidOrEntry))
@@ -820,6 +829,15 @@ void ObjectMgr::LoadCreatureAddons()
if(!addon)
continue;
if (addon->mount)
{
if (!sCreatureDisplayInfoStore.LookupEntry(addon->mount))
sLog.outErrorDb("Creature (GUID %u) have invalid displayInfoId for mount (%u) defined in `creature_addon`.",addon->guidOrEntry, addon->mount);
}
if (!sEmotesStore.LookupEntry(addon->emote))
sLog.outErrorDb("Creature (GUID %u) have invalid emote (%u) defined in `creature_addon`.",addon->guidOrEntry, addon->emote);
ConvertCreatureAddonAuras(const_cast<CreatureDataAddon*>(addon), "creature_addon", "GUIDLow");
if(mCreatureDataMap.find(addon->guidOrEntry)==mCreatureDataMap.end())