diff options
-rw-r--r-- | src/game/SharedDefines.h | 6 | ||||
-rw-r--r-- | src/game/SpellMgr.cpp | 7 |
2 files changed, 13 insertions, 0 deletions
diff --git a/src/game/SharedDefines.h b/src/game/SharedDefines.h index b165d8d1bdc..6f7cf4a6b9a 100644 --- a/src/game/SharedDefines.h +++ b/src/game/SharedDefines.h @@ -194,6 +194,12 @@ enum ItemQualities #define MAX_ITEM_QUALITY 7 +enum SpellCategory +{ + SPELL_CATEGORY_FOOD = 11, + SPELL_CATEGORY_DRINK = 59, +}; + // *********************************** // Spell Attributes definitions // *********************************** diff --git a/src/game/SpellMgr.cpp b/src/game/SpellMgr.cpp index 3ef75606803..1b6bd482468 100644 --- a/src/game/SpellMgr.cpp +++ b/src/game/SpellMgr.cpp @@ -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; |