*Do not let food/drink auras stack.

--HG--
branch : trunk
This commit is contained in:
megamage
2008-11-28 16:16:52 -06:00
parent 615e0f7773
commit dd77520fd8
2 changed files with 13 additions and 0 deletions

View File

@@ -194,6 +194,12 @@ enum ItemQualities
#define MAX_ITEM_QUALITY 7
enum SpellCategory
{
SPELL_CATEGORY_FOOD = 11,
SPELL_CATEGORY_DRINK = 59,
};
// ***********************************
// Spell Attributes definitions
// ***********************************

View File

@@ -1165,6 +1165,13 @@ bool SpellMgr::IsNoStackSpellDueToSpell(uint32 spellId_1, uint32 spellId_2, bool
// generic spells
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
|| spellInfo_1->SpellIconID != spellInfo_2->SpellIconID)
return false;