mirror of
https://github.com/mangosfour/server.git
synced 2025-12-14 16:37:01 +00:00
[10182] Allow stacking some tracking bufs, and prevent stacking some other.
For example item 25548 buff expected to be allowed stacking but spell 19885 not allowed.
This commit is contained in:
parent
6c8967ae5f
commit
6e3f51b1b6
4 changed files with 28 additions and 17 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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*/)
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#ifndef __REVISION_NR_H__
|
||||
#define __REVISION_NR_H__
|
||||
#define REVISION_NR "10181"
|
||||
#define REVISION_NR "10182"
|
||||
#endif // __REVISION_NR_H__
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue