mirror of
https://github.com/mangosfour/server.git
synced 2025-12-19 13:37:01 +00:00
[11376] Allow fallback to creature_template_addon of base entry
Use creature_template_addon from base entry when addon for difficulty_entry_N does not exist. It is easier to create data for the exceptions rather than the general. Signed-off-by: NoFantasy <nofantasy@nf.no>
This commit is contained in:
parent
c6dee6c2d6
commit
5895cb38e3
2 changed files with 10 additions and 2 deletions
|
|
@ -1914,7 +1914,15 @@ CreatureDataAddon const* Creature::GetCreatureAddon() const
|
||||||
return addon;
|
return addon;
|
||||||
|
|
||||||
// dependent from difficulty mode entry
|
// dependent from difficulty mode entry
|
||||||
return ObjectMgr::GetCreatureTemplateAddon(GetCreatureInfo()->Entry);
|
if (GetEntry() != GetCreatureInfo()->Entry)
|
||||||
|
{
|
||||||
|
// If CreatureTemplateAddon for difficulty_entry_N exist, it's there for a reason
|
||||||
|
if (CreatureDataAddon const* addon = ObjectMgr::GetCreatureTemplateAddon(GetCreatureInfo()->Entry))
|
||||||
|
return addon;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Return CreatureTemplateAddon when nothing else exist
|
||||||
|
return ObjectMgr::GetCreatureTemplateAddon(GetEntry());
|
||||||
}
|
}
|
||||||
|
|
||||||
//creature_addon table
|
//creature_addon table
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
#ifndef __REVISION_NR_H__
|
#ifndef __REVISION_NR_H__
|
||||||
#define __REVISION_NR_H__
|
#define __REVISION_NR_H__
|
||||||
#define REVISION_NR "11375"
|
#define REVISION_NR "11376"
|
||||||
#endif // __REVISION_NR_H__
|
#endif // __REVISION_NR_H__
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue