From 90e0332243b212350ed5a9ecaaac06782811c105 Mon Sep 17 00:00:00 2001 From: Yehonal Date: Sat, 2 Dec 2017 01:20:43 +0000 Subject: [PATCH] Add item entry information to auras for external usage --- src/game/Spells/Auras/SpellAuras.cpp | 2 +- src/game/Spells/Auras/SpellAuras.h | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/game/Spells/Auras/SpellAuras.cpp b/src/game/Spells/Auras/SpellAuras.cpp index d1736893f..c50ecc2bc 100644 --- a/src/game/Spells/Auras/SpellAuras.cpp +++ b/src/game/Spells/Auras/SpellAuras.cpp @@ -395,7 +395,7 @@ Aura* Aura::Create(SpellInfo const* spellproto, uint8 effMask, WorldObject* owne Aura::Aura(SpellInfo const* spellproto, WorldObject* owner, Unit* caster, Item* castItem, uint64 casterGUID) : m_spellInfo(spellproto), m_casterGuid(casterGUID ? casterGUID : caster->GetGUID()), -m_castItemGuid(castItem ? castItem->GetGUID() : 0), m_applyTime(time(NULL)), +m_castItemGuid(castItem ? castItem->GetGUID() : 0),m_castItemEntry(castItem ? castItem->GetEntry() : 0), m_applyTime(time(NULL)), m_owner(owner), m_timeCla(0), m_updateTargetMapInterval(0), m_casterLevel(caster ? caster->getLevel() : m_spellInfo->SpellLevel), m_procCharges(0), m_stackAmount(1), m_isRemoved(false), m_isSingleTarget(false), m_isUsingCharges(false) diff --git a/src/game/Spells/Auras/SpellAuras.h b/src/game/Spells/Auras/SpellAuras.h index 30f25dae9..1587f9fad 100644 --- a/src/game/Spells/Auras/SpellAuras.h +++ b/src/game/Spells/Auras/SpellAuras.h @@ -96,6 +96,7 @@ class Aura uint32 GetId() const{ return GetSpellInfo()->Id; } uint64 GetCastItemGUID() const { return m_castItemGuid; } + uint32 GetCastItemEntry() const { return m_castItemEntry; } uint64 GetCasterGUID() const { return m_casterGuid; } Unit* GetCaster() const; WorldObject* GetOwner() const { return m_owner; } @@ -235,6 +236,7 @@ class Aura SpellInfo const* const m_spellInfo; uint64 const m_casterGuid; uint64 const m_castItemGuid; // it is NOT safe to keep a pointer to the item because it may get deleted + uint32 const m_castItemEntry; // when deleted, we could retrieve some information from template instead time_t const m_applyTime; WorldObject* const m_owner; //