diff options
| author | megamage <none@none> | 2009-05-31 15:58:58 -0500 |
|---|---|---|
| committer | megamage <none@none> | 2009-05-31 15:58:58 -0500 |
| commit | 452770cff04c8799d9f443d4db26484351b139d5 (patch) | |
| tree | d272a1715a3cf3a2194519b8272310d27fe1db17 /src/game/ObjectMgr.cpp | |
| parent | 4b3be64c79285757eef8c9a6fe671369eeb7860d (diff) | |
[7915] Implement more stricted checks and limitations at loading creature addon data. Author: NoFantasy
--HG--
branch : trunk
Diffstat (limited to 'src/game/ObjectMgr.cpp')
| -rw-r--r-- | src/game/ObjectMgr.cpp | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/game/ObjectMgr.cpp b/src/game/ObjectMgr.cpp index 1b661bc41ba..cd43135d68a 100644 --- a/src/game/ObjectMgr.cpp +++ b/src/game/ObjectMgr.cpp @@ -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()) |
