mirror of
https://github.com/mangosfour/server.git
synced 2025-12-13 22:37:03 +00:00
[7915] Implement more stricted checks and limitations at loading creature addon data.
Signed-off-by: VladimirMangos <vladimir@getmangos.com>
This commit is contained in:
parent
c7c480f6ba
commit
27057843ac
3 changed files with 44 additions and 3 deletions
|
|
@ -723,6 +723,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))
|
||||
|
|
@ -741,6 +750,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())
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue