From bdac9e6e8f73de8001a20617c05fa0bc178262b0 Mon Sep 17 00:00:00 2001 From: DiSlord Date: Mon, 12 Jan 2009 21:22:08 +0300 Subject: [PATCH] [7073] Better detect hunter aspect/tracker spells (also fix it) Signed-off-by: DiSlord --- src/game/SpellAuras.h | 3 +-- src/game/SpellMgr.cpp | 21 +++++++-------------- src/shared/revision_nr.h | 2 +- 3 files changed, 9 insertions(+), 17 deletions(-) diff --git a/src/game/SpellAuras.h b/src/game/SpellAuras.h index b3c7c395d..66ca5bc77 100644 --- a/src/game/SpellAuras.h +++ b/src/game/SpellAuras.h @@ -300,8 +300,6 @@ class MANGOS_DLL_SPEC Aura void _AddAura(); void _RemoveAura(); - void TriggerSpell(); - bool IsUpdated() { return m_updated; } void SetUpdated(bool val) { m_updated = val; } void SetRemoveMode(AuraRemoveMode mode) { m_removeMode = mode; } @@ -315,6 +313,7 @@ class MANGOS_DLL_SPEC Aura void setDiminishGroup(DiminishingGroup group) { m_AuraDRGroup = group; } DiminishingGroup getDiminishGroup() const { return m_AuraDRGroup; } + void TriggerSpell(); void PeriodicTick(); void PeriodicDummyTick(); diff --git a/src/game/SpellMgr.cpp b/src/game/SpellMgr.cpp index c358f7ff4..0a136f4fd 100644 --- a/src/game/SpellMgr.cpp +++ b/src/game/SpellMgr.cpp @@ -169,6 +169,13 @@ SpellSpecific GetSpellSpecific(uint32 spellId) if (spellInfo->Dispel == DISPEL_POISON) return SPELL_STING; + // only hunter aspects have this (but not all aspects in hunter family) + if( spellInfo->SpellFamilyFlags & 0x0044000000380000LL || spellInfo->SpellFamilyFlags2 & 0x00003010) + return SPELL_ASPECT; + + if( spellInfo->SpellFamilyFlags2 & 0x00000002 ) + return SPELL_TRACKER; + break; } case SPELLFAMILY_PALADIN: @@ -213,20 +220,6 @@ SpellSpecific GetSpellSpecific(uint32 spellId) return SPELL_WARLOCK_ARMOR; } - // only hunter aspects have this (but not all aspects in hunter family) - if( spellInfo->activeIconID == 122 && (GetSpellSchoolMask(spellInfo) & SPELL_SCHOOL_MASK_NATURE) && - (spellInfo->Attributes & 0x50000) != 0 && (spellInfo->Attributes & 0x9000010) == 0) - { - return SPELL_ASPECT; - } - - for(int i = 0; i < 3; i++) - if( spellInfo->Effect[i] == SPELL_EFFECT_APPLY_AURA && ( - spellInfo->EffectApplyAuraName[i] == SPELL_AURA_TRACK_CREATURES || - spellInfo->EffectApplyAuraName[i] == SPELL_AURA_TRACK_RESOURCES || - spellInfo->EffectApplyAuraName[i] == SPELL_AURA_TRACK_STEALTHED ) ) - return SPELL_TRACKER; - // elixirs can have different families, but potion most ofc. if(SpellSpecific sp = spellmgr.GetSpellElixirSpecific(spellInfo->Id)) return sp; diff --git a/src/shared/revision_nr.h b/src/shared/revision_nr.h index db52acd82..39084ca21 100644 --- a/src/shared/revision_nr.h +++ b/src/shared/revision_nr.h @@ -1,4 +1,4 @@ #ifndef __REVISION_NR_H__ #define __REVISION_NR_H__ - #define REVISION_NR "7072" + #define REVISION_NR "7073" #endif // __REVISION_NR_H__