aboutsummaryrefslogtreecommitdiff
path: root/src/server/game/Spells/SpellMgr.h
diff options
context:
space:
mode:
authorLiberate <tbaart@gmail.com>2011-10-18 23:27:39 +0200
committerLiberate <tbaart@gmail.com>2011-10-18 23:27:39 +0200
commit89bae3b51c5208931bb3b409f8092e07c55b80e3 (patch)
tree9930536057d02cb16abe5bedb931c5cb0624c1f9 /src/server/game/Spells/SpellMgr.h
parentfd45c111b05e4f9b34db11330d7876b093e801fb (diff)
Core/Spells: Add a new stack rule for spellgroups: SPELL_GROUP_STACK_RULE_EXCLUSIVE_SAME_EFFECT
This stack rule makes the effects of the spells in the spellgroup non-stackable, but the spells/auras itself are stackable. a spell should be in only 1 group with this stack rule. Fixes #2243
Diffstat (limited to 'src/server/game/Spells/SpellMgr.h')
-rwxr-xr-xsrc/server/game/Spells/SpellMgr.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/server/game/Spells/SpellMgr.h b/src/server/game/Spells/SpellMgr.h
index d701ab2882c..88d14e8d2ff 100755
--- a/src/server/game/Spells/SpellMgr.h
+++ b/src/server/game/Spells/SpellMgr.h
@@ -322,6 +322,7 @@ typedef UNORDERED_MAP<uint32, SpellBonusEntry> SpellBonusMap;
enum SpellGroup
{
+ SPELL_GROUP_NONE = 0,
SPELL_GROUP_ELIXIR_BATTLE = 1,
SPELL_GROUP_ELIXIR_GUARDIAN = 2,
SPELL_GROUP_ELIXIR_UNSTABLE = 3,
@@ -344,8 +345,9 @@ enum SpellGroupStackRule
SPELL_GROUP_STACK_RULE_DEFAULT = 0,
SPELL_GROUP_STACK_RULE_EXCLUSIVE = 1,
SPELL_GROUP_STACK_RULE_EXCLUSIVE_FROM_SAME_CASTER = 2,
+ SPELL_GROUP_STACK_RULE_EXCLUSIVE_SAME_EFFECT = 3,
};
-#define SPELL_GROUP_STACK_RULE_MAX 3
+#define SPELL_GROUP_STACK_RULE_MAX 4
typedef std::map<SpellGroup, SpellGroupStackRule> SpellGroupStackMap;
@@ -596,6 +598,7 @@ class SpellMgr
void GetSetOfSpellsInSpellGroup(SpellGroup group_id, std::set<uint32>& foundSpells, std::set<SpellGroup>& usedGroups) const;
// Spell Group Stack Rules table
+ bool AddSameEffectStackRuleSpellGroups(SpellInfo const* spellInfo, int32 amount, std::map<SpellGroup, int32>& groups) const;
SpellGroupStackRule CheckSpellGroupStackRules(SpellInfo const* spellInfo1, SpellInfo const* spellInfo2) const;
// Spell proc event table