From 8e1e305e8d308e0e78882ec0b398c9dd439b08ae Mon Sep 17 00:00:00 2001 From: Kitzunu <24550914+Kitzunu@users.noreply.github.com> Date: Fri, 17 Dec 2021 18:07:18 +0100 Subject: [PATCH] feat(Core/Creature): Log temporary auras on creatures (#9670) * cherry-pick commit (https://github.com/TrinityCore/TrinityCore/commit/54f94567649c78d146f4087cc874e4d0cbcff28b) Co-authored-by: Giacomo Pozzoni --- src/server/game/Globals/ObjectMgr.cpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/server/game/Globals/ObjectMgr.cpp b/src/server/game/Globals/ObjectMgr.cpp index a7cf4a781..35919b232 100644 --- a/src/server/game/Globals/ObjectMgr.cpp +++ b/src/server/game/Globals/ObjectMgr.cpp @@ -761,6 +761,13 @@ void ObjectMgr::LoadCreatureTemplateAddons() LOG_ERROR("sql.sql", "Creature (Entry: %u) has wrong spell %u defined in `auras` field in `creature_template_addon`.", entry, uint32(atol(*itr))); continue; } + + if (AdditionalSpellInfo->GetDuration() > 0) + { + LOG_DEBUG/*ERROR*/("sql.sql", "Creature (Entry: %u) has temporary aura (spell %u) in `auras` field in `creature_template_addon`.", entry, uint32(atol(*itr))); + continue; + } + creatureAddon.auras[i++] = uint32(atol(*itr)); } @@ -1191,6 +1198,13 @@ void ObjectMgr::LoadCreatureAddons() LOG_ERROR("sql.sql", "Creature (GUID: %u) has wrong spell %u defined in `auras` field in `creature_addon`.", guid, uint32(atol(*itr))); continue; } + + if (AdditionalSpellInfo->GetDuration() > 0) + { + LOG_DEBUG/*ERROR*/("sql.sql", "Creature (Entry: %u) has temporary aura (spell %u) in `auras` field in `creature_template_addon`.", guid, uint32(atol(*itr))); + continue; + } + creatureAddon.auras[i++] = uint32(atol(*itr)); }