diff --git a/src/game/SharedDefines.h b/src/game/SharedDefines.h index 3e25e4bb5..5421afb9f 100644 --- a/src/game/SharedDefines.h +++ b/src/game/SharedDefines.h @@ -424,13 +424,13 @@ const uint32 ItemQualityColors[MAX_ITEM_QUALITY] = { #define SPELL_ATTR_EX6_UNK3 0x00000008 // 3 #define SPELL_ATTR_EX6_UNK4 0x00000010 // 4 #define SPELL_ATTR_EX6_UNK5 0x00000020 // 5 -#define SPELL_ATTR_EX6_UNK6 0x00000040 // 6 +#define SPELL_ATTR_EX6_UNK6 0x00000040 // 6 for auras SPELL_AURA_TRACK_CREATURES, SPELL_AURA_TRACK_RESOURCES and SPELL_AURA_TRACK_STEALTHED select non-stacking tracking spells #define SPELL_ATTR_EX6_UNK7 0x00000080 // 7 #define SPELL_ATTR_EX6_UNK8 0x00000100 // 8 #define SPELL_ATTR_EX6_UNK9 0x00000200 // 9 #define SPELL_ATTR_EX6_UNK10 0x00000400 // 10 #define SPELL_ATTR_EX6_NOT_IN_RAID_INSTANCE 0x00000800 // 11 not usable in raid instance -#define SPELL_ATTR_EX6_UNK12 0x00001000 // 12 +#define SPELL_ATTR_EX6_UNK12 0x00001000 // 12 for auras SPELL_AURA_TRACK_CREATURES, SPELL_AURA_TRACK_RESOURCES and SPELL_AURA_TRACK_STEALTHED select non-stacking tracking spells #define SPELL_ATTR_EX6_UNK13 0x00002000 // 13 #define SPELL_ATTR_EX6_UNK14 0x00004000 // 14 #define SPELL_ATTR_EX6_UNK15 0x00008000 // 15 not set in 3.0.3 diff --git a/src/game/SpellAuras.cpp b/src/game/SpellAuras.cpp index 136700477..069ea89a5 100644 --- a/src/game/SpellAuras.cpp +++ b/src/game/SpellAuras.cpp @@ -3260,22 +3260,30 @@ void Aura::HandleFarSight(bool apply, bool /*Real*/) void Aura::HandleAuraTrackCreatures(bool apply, bool /*Real*/) { - if(GetTarget()->GetTypeId()!=TYPEID_PLAYER) + if (GetTarget()->GetTypeId()!=TYPEID_PLAYER) return; - if(apply) + if (apply) GetTarget()->RemoveNoStackAurasDueToAuraHolder(GetHolder()); - GetTarget()->SetUInt32Value(PLAYER_TRACK_CREATURES, apply ? ((uint32)1)<<(m_modifier.m_miscvalue-1) : 0 ); + + if (apply) + GetTarget()->SetFlag(PLAYER_TRACK_CREATURES, uint32(1) << (m_modifier.m_miscvalue-1)); + else + GetTarget()->RemoveFlag(PLAYER_TRACK_CREATURES, uint32(1) << (m_modifier.m_miscvalue-1)); } void Aura::HandleAuraTrackResources(bool apply, bool /*Real*/) { - if(GetTarget()->GetTypeId()!=TYPEID_PLAYER) + if (GetTarget()->GetTypeId()!=TYPEID_PLAYER) return; - if(apply) + if (apply) GetTarget()->RemoveNoStackAurasDueToAuraHolder(GetHolder()); - GetTarget()->SetUInt32Value(PLAYER_TRACK_RESOURCES, apply ? ((uint32)1)<<(m_modifier.m_miscvalue-1): 0 ); + + if (apply) + GetTarget()->SetFlag(PLAYER_TRACK_CREATURES, uint32(1) << (m_modifier.m_miscvalue-1)); + else + GetTarget()->RemoveFlag(PLAYER_TRACK_CREATURES, uint32(1) << (m_modifier.m_miscvalue-1)); } void Aura::HandleAuraTrackStealthed(bool apply, bool /*Real*/) diff --git a/src/game/SpellMgr.cpp b/src/game/SpellMgr.cpp index a65fe2077..1d0dfccdd 100644 --- a/src/game/SpellMgr.cpp +++ b/src/game/SpellMgr.cpp @@ -344,7 +344,7 @@ SpellSpecific GetSpellSpecific(uint32 spellId) case SPELLFAMILY_GENERIC: { // Food / Drinks (mostly) - if(spellInfo->AuraInterruptFlags & AURA_INTERRUPT_FLAG_NOT_SEATED) + if (spellInfo->AuraInterruptFlags & AURA_INTERRUPT_FLAG_NOT_SEATED) { bool food = false; bool drink = false; @@ -367,11 +367,11 @@ SpellSpecific GetSpellSpecific(uint32 spellId) } } - if(food && drink) + if (food && drink) return SPELL_FOOD_AND_DRINK; - else if(food) + else if (food) return SPELL_FOOD; - else if(drink) + else if (drink) return SPELL_DRINK; } else @@ -431,7 +431,7 @@ SpellSpecific GetSpellSpecific(uint32 spellId) if (spellInfo->Dispel == DISPEL_POISON) return SPELL_STING; - // only hunter aspects have this (but not all aspects in hunter family) + // only hunter aspects have this if( spellInfo->SpellFamilyFlags & UI64LIT(0x0044000000380000) || spellInfo->SpellFamilyFlags2 & 0x00001010) return SPELL_ASPECT; @@ -475,12 +475,15 @@ SpellSpecific GetSpellSpecific(uint32 spellId) break; } - // Tracking spells - if(IsSpellHaveAura(spellInfo, SPELL_AURA_TRACK_CREATURES) || IsSpellHaveAura(spellInfo, SPELL_AURA_TRACK_RESOURCES)) + // Tracking spells (exclude Well Fed, some other always allowed cases) + if ((IsSpellHaveAura(spellInfo, SPELL_AURA_TRACK_CREATURES) || + IsSpellHaveAura(spellInfo, SPELL_AURA_TRACK_RESOURCES) || + IsSpellHaveAura(spellInfo, SPELL_AURA_TRACK_STEALTHED)) && + (spellInfo->AttributesEx6 & (SPELL_ATTR_EX6_UNK12|SPELL_ATTR_EX6_UNK6))) return SPELL_TRACKER; // elixirs can have different families, but potion most ofc. - if(SpellSpecific sp = sSpellMgr.GetSpellElixirSpecific(spellInfo->Id)) + if (SpellSpecific sp = sSpellMgr.GetSpellElixirSpecific(spellInfo->Id)) return sp; return SPELL_NORMAL; diff --git a/src/shared/revision_nr.h b/src/shared/revision_nr.h index a64ba6537..2a9d43889 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 "10181" + #define REVISION_NR "10182" #endif // __REVISION_NR_H__