mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-18 00:18:43 +01:00
*Some update of aura stacking check.
--HG-- branch : trunk
This commit is contained in:
@@ -295,7 +295,7 @@ enum ItemQualities
|
||||
#define SPELL_ATTR_EX2_UNK28 0x10000000 // 28
|
||||
#define SPELL_ATTR_EX2_CANT_CRIT 0x20000000 // 29 Spell can't crit
|
||||
#define SPELL_ATTR_EX2_UNK30 0x40000000 // 30
|
||||
#define SPELL_ATTR_EX2_UNK31 0x80000000 // 31
|
||||
#define SPELL_ATTR_EX2_FOOD 0x80000000 // 31 food, well-fed, and a few others
|
||||
|
||||
#define SPELL_ATTR_EX3_UNK0 0x00000001 // 0
|
||||
#define SPELL_ATTR_EX3_UNK1 0x00000002 // 1
|
||||
|
||||
@@ -137,12 +137,10 @@ SpellSpecific GetSpellSpecific(uint32 spellId)
|
||||
{
|
||||
case SPELLFAMILY_GENERIC:
|
||||
{
|
||||
// needed to make some strange drinks unstackable (brewfest and normal drink)
|
||||
if (spellInfo->Attributes & SPELL_ATTR_CASTABLE_WHILE_SITTING
|
||||
&& spellInfo->Attributes & SPELL_ATTR_CANT_USED_IN_COMBAT)
|
||||
for(int i = 0; i < 3; i++)
|
||||
if( spellInfo->EffectApplyAuraName[i]==)
|
||||
return SPELL_DRINK;
|
||||
// this may be a hack
|
||||
if((spellInfo->AttributesEx2 & SPELL_ATTR_EX2_FOOD)
|
||||
&& !spellInfo->Category)
|
||||
return SPELL_WELL_FED;
|
||||
break;
|
||||
}
|
||||
case SPELLFAMILY_MAGE:
|
||||
@@ -257,7 +255,6 @@ bool IsSingleFromSpellSpecificPerCaster(uint32 spellSpec1,uint32 spellSpec2)
|
||||
case SPELL_POSITIVE_SHOUT:
|
||||
case SPELL_JUDGEMENT:
|
||||
case SPELL_WARLOCK_CORRUPTION:
|
||||
case SPELL_DRINK:
|
||||
return spellSpec1==spellSpec2;
|
||||
default:
|
||||
return false;
|
||||
@@ -273,6 +270,7 @@ bool IsSingleFromSpellSpecificPerTarget(uint32 spellSpec1,uint32 spellSpec2)
|
||||
case SPELL_MAGE_ARMOR:
|
||||
case SPELL_ELEMENTAL_SHIELD:
|
||||
case SPELL_MAGE_POLYMORPH:
|
||||
case SPELL_WELL_FED:
|
||||
return spellSpec1==spellSpec2;
|
||||
case SPELL_BATTLE_ELIXIR:
|
||||
return spellSpec2==SPELL_BATTLE_ELIXIR
|
||||
@@ -1168,8 +1166,7 @@ bool SpellMgr::IsNoStackSpellDueToSpell(uint32 spellId_1, uint32 spellId_2, bool
|
||||
if(!spellInfo_1->SpellFamilyName)
|
||||
{
|
||||
if(!spellInfo_1->SpellIconID
|
||||
|| (spellInfo_1->SpellIconID != spellInfo_2->SpellIconID
|
||||
&& spellInfo_1->SpellVisual != spellInfo_2->SpellVisual)) //needed for 44098 and 19709 to make it unstackable
|
||||
|| spellInfo_1->SpellIconID != spellInfo_2->SpellIconID)
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -1187,11 +1184,12 @@ bool SpellMgr::IsNoStackSpellDueToSpell(uint32 spellId_1, uint32 spellId_2, bool
|
||||
return false;
|
||||
}
|
||||
|
||||
if( !sameCaster)
|
||||
if(!sameCaster)
|
||||
{
|
||||
for(uint32 i = 0; i < 3; ++i)
|
||||
{
|
||||
if (spellInfo_1->Effect[i] != SPELL_EFFECT_APPLY_AREA_AURA_PARTY) // not area auras (shaman totem)
|
||||
// a better check may be effect == SPELL_EFFECT_APPLY_AURA
|
||||
if (spellInfo_1->Effect[i] == SPELL_EFFECT_APPLY_AURA
|
||||
|| spellInfo_1->Effect[i] == SPELL_EFFECT_PERSISTENT_AREA_AURA)
|
||||
// not area auras (shaman totem)
|
||||
switch(spellInfo_1->EffectApplyAuraName[i])
|
||||
{
|
||||
// DOT or HOT from different casters will stack
|
||||
@@ -1205,12 +1203,14 @@ bool SpellMgr::IsNoStackSpellDueToSpell(uint32 spellId_1, uint32 spellId_2, bool
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//not sure if this is correct. maybe some talent buff have same icons?
|
||||
//maybe some creature spells have same visual and same icon but should stack?
|
||||
//spells with the same icon (check needed when spell has different effects in other ranks example:Mark of the wild)
|
||||
if(spellInfo_1->SpellIconID
|
||||
&& spellInfo_1->SpellIconID == spellInfo_2->SpellIconID)
|
||||
return true; // maybe change this to IsRankSpellDueToSpell?
|
||||
//if(spellInfo_1->SpellIconID
|
||||
// && spellInfo_1->SpellIconID == spellInfo_2->SpellIconID)
|
||||
// return true; // maybe change this to IsRankSpellDueToSpell?
|
||||
|
||||
//if spells have exactly the same effect they cannot stack
|
||||
for(uint32 i = 0; i < 3; ++i)
|
||||
|
||||
@@ -264,7 +264,7 @@ enum SpellSpecific
|
||||
SPELL_GUARDIAN_ELIXIR = 15,
|
||||
SPELL_FLASK_ELIXIR = 16,
|
||||
SPELL_WARLOCK_CORRUPTION= 17,
|
||||
SPELL_DRINK= 18
|
||||
SPELL_WELL_FED = 18,
|
||||
};
|
||||
|
||||
SpellSpecific GetSpellSpecific(uint32 spellId);
|
||||
|
||||
Reference in New Issue
Block a user