Core/Spells: Validate spell_proc.AttributesMask on startup
Port From (https://github.com/TrinityCore/TrinityCore/commit/415aaae7f2fa3a5e09a51b0355120bf4138cde41)
This commit is contained in:
@@ -1431,6 +1431,11 @@ namespace Game.Entities
|
||||
if (!found)
|
||||
Log.outError(LogFilter.Sql, $"The `spell_proc` table entry for spellId {spellInfo.Id} has Attribute PROC_ATTR_REQ_SPELLMOD, but spell has no spell mods. Proc will not be triggered");
|
||||
}
|
||||
if ((procEntry.AttributesMask & ~ProcAttributes.AllAllowed) != 0)
|
||||
{
|
||||
Log.outError(LogFilter.Sql, $"The `spell_proc` table entry for spellId {spellInfo.Id} has `AttributesMask` value specifying invalid attributes 0x{procEntry.AttributesMask & ~ProcAttributes.AllAllowed:X2}.");
|
||||
procEntry.AttributesMask &= ProcAttributes.AllAllowed;
|
||||
}
|
||||
|
||||
mSpellProcMap.Add((spellInfo.Id, spellInfo.Difficulty), procEntry);
|
||||
++count;
|
||||
|
||||
Reference in New Issue
Block a user