aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormegamage <none@none>2008-11-28 16:16:52 -0600
committermegamage <none@none>2008-11-28 16:16:52 -0600
commitdd77520fd8ec3c134b32c44e4b6b3f2ee1425cd4 (patch)
treeab5343500b2c5ce520b2c6824e8f79b1fe46354c
parent615e0f777353d01421bcd54d5b91da90ecb49a18 (diff)
*Do not let food/drink auras stack.
--HG-- branch : trunk
-rw-r--r--src/game/SharedDefines.h6
-rw-r--r--src/game/SpellMgr.cpp7
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;