*Do not let food/drink auras stack.
--HG-- branch : trunk
This commit is contained in:
@@ -194,6 +194,12 @@ enum ItemQualities
|
|||||||
|
|
||||||
#define MAX_ITEM_QUALITY 7
|
#define MAX_ITEM_QUALITY 7
|
||||||
|
|
||||||
|
enum SpellCategory
|
||||||
|
{
|
||||||
|
SPELL_CATEGORY_FOOD = 11,
|
||||||
|
SPELL_CATEGORY_DRINK = 59,
|
||||||
|
};
|
||||||
|
|
||||||
// ***********************************
|
// ***********************************
|
||||||
// Spell Attributes definitions
|
// Spell Attributes definitions
|
||||||
// ***********************************
|
// ***********************************
|
||||||
|
|||||||
@@ -1165,6 +1165,13 @@ bool SpellMgr::IsNoStackSpellDueToSpell(uint32 spellId_1, uint32 spellId_2, bool
|
|||||||
// generic spells
|
// generic spells
|
||||||
if(!spellInfo_1->SpellFamilyName)
|
if(!spellInfo_1->SpellFamilyName)
|
||||||
{
|
{
|
||||||
|
if(spellInfo_1->Category && spellInfo_1->Category == spellInfo_2->Category)
|
||||||
|
{
|
||||||
|
if(spellInfo_1->Category == SPELL_CATEGORY_FOOD ||
|
||||||
|
spellInfo_1->Category == SPELL_CATEGORY_DRINK)
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
if(!spellInfo_1->SpellIconID
|
if(!spellInfo_1->SpellIconID
|
||||||
|| spellInfo_1->SpellIconID != spellInfo_2->SpellIconID)
|
|| spellInfo_1->SpellIconID != spellInfo_2->SpellIconID)
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
Reference in New Issue
Block a user