mirror of
https://github.com/mangosfour/server.git
synced 2025-12-16 04:37:00 +00:00
[11343] Check creature*_addon.auras duplicates at loading.
This already checked at apply to creature but startup check more helpful for DB devs. Also remove use single field structure use for store addon.auras data
This commit is contained in:
parent
695ad4d54e
commit
6c8efb4458
4 changed files with 20 additions and 20 deletions
|
|
@ -1943,19 +1943,19 @@ bool Creature::LoadCreatureAddon(bool reload)
|
|||
|
||||
if(cainfo->auras)
|
||||
{
|
||||
for (CreatureDataAddonAura const* cAura = cainfo->auras; cAura->spell_id; ++cAura)
|
||||
for (uint32 const* cAura = cainfo->auras; *cAura; ++cAura)
|
||||
{
|
||||
SpellEntry const *AdditionalSpellInfo = sSpellStore.LookupEntry(cAura->spell_id);
|
||||
SpellEntry const *AdditionalSpellInfo = sSpellStore.LookupEntry(*cAura);
|
||||
if (!AdditionalSpellInfo)
|
||||
{
|
||||
sLog.outErrorDb("Creature (GUIDLow: %u Entry: %u ) has wrong spell %u defined in `auras` field.",GetGUIDLow(),GetEntry(),cAura->spell_id);
|
||||
sLog.outErrorDb("Creature (GUIDLow: %u Entry: %u ) has wrong spell %u defined in `auras` field.",GetGUIDLow(),GetEntry(), *cAura);
|
||||
continue;
|
||||
}
|
||||
|
||||
if (HasAura(cAura->spell_id))
|
||||
if (HasAura(*cAura))
|
||||
{
|
||||
if(!reload)
|
||||
sLog.outErrorDb("Creature (GUIDLow: %u Entry: %u) has duplicate spell %u in `auras` field.", GetGUIDLow(), GetEntry(), cAura->spell_id);
|
||||
if (!reload)
|
||||
sLog.outErrorDb("Creature (GUIDLow: %u Entry: %u) has duplicate spell %u in `auras` field.", GetGUIDLow(), GetEntry(), *cAura);
|
||||
|
||||
continue;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue