mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-22 10:05:32 +01:00
*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
|
||||
|
||||
enum SpellCategory
|
||||
{
|
||||
SPELL_CATEGORY_FOOD = 11,
|
||||
SPELL_CATEGORY_DRINK = 59,
|
||||
};
|
||||
|
||||
// ***********************************
|
||||
// Spell Attributes definitions
|
||||
// ***********************************
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user