mirror of
https://github.com/mangosfour/server.git
synced 2025-12-12 01:37:00 +00:00
[11817] Improve db error log output for *_addon auras
This clearifies that a problem is caused by already applied auras and not double aura in *_addon table. The double spell entry as well as the invalid spell are filtered on load. Signed-off-by: Schmoozerd <schmoozerd@scriptdev2.com>
This commit is contained in:
parent
5880014d93
commit
9c70637333
2 changed files with 4 additions and 11 deletions
|
|
@ -1959,22 +1959,15 @@ bool Creature::LoadCreatureAddon(bool reload)
|
|||
{
|
||||
for (uint32 const* cAura = cainfo->auras; *cAura; ++cAura)
|
||||
{
|
||||
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);
|
||||
continue;
|
||||
}
|
||||
|
||||
if (HasAura(*cAura))
|
||||
{
|
||||
if (!reload)
|
||||
sLog.outErrorDb("Creature (GUIDLow: %u Entry: %u) has duplicate spell %u in `auras` field.", GetGUIDLow(), GetEntry(), *cAura);
|
||||
sLog.outErrorDb("Creature (GUIDLow: %u Entry: %u) has spell %u in `auras` field, but aura is already applied.", GetGUIDLow(), GetEntry(), *cAura);
|
||||
|
||||
continue;
|
||||
}
|
||||
|
||||
CastSpell(this, AdditionalSpellInfo, true);
|
||||
CastSpell(this, *cAura, true);
|
||||
}
|
||||
}
|
||||
return true;
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#ifndef __REVISION_NR_H__
|
||||
#define __REVISION_NR_H__
|
||||
#define REVISION_NR "11816"
|
||||
#define REVISION_NR "11817"
|
||||
#endif // __REVISION_NR_H__
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue