mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-15 01:59:09 +00:00
fix(Core/Spells): implement SPELL_GROUP_SPECIAL_FLAG_SAME_SPELL_CHECK group stack flag (#7709)
- Closes #6664
This commit is contained in:
@@ -0,0 +1,3 @@
|
||||
INSERT INTO `version_db_world` (`sql_rev`) VALUES ('1630695496578966300');
|
||||
|
||||
UPDATE `spell_group` SET `special_flag`=0x1000 WHERE `spell_id`=6343;
|
||||
@@ -671,14 +671,24 @@ SpellGroupStackFlags SpellMgr::CheckSpellGroupStackRules(SpellInfo const* spellI
|
||||
{
|
||||
uint32 spellid_1 = spellInfo1->GetFirstRankSpell()->Id;
|
||||
uint32 spellid_2 = spellInfo2->GetFirstRankSpell()->Id;
|
||||
// xinef: dunno why i added this
|
||||
if (spellid_1 == spellid_2 && remove && !areaAura)
|
||||
return SPELL_GROUP_STACK_FLAG_NONE;
|
||||
|
||||
uint32 groupId = GetSpellGroup(spellid_1);
|
||||
|
||||
SpellGroupSpecialFlags flag1 = GetSpellGroupSpecialFlags(spellid_1);
|
||||
|
||||
// xinef: dunno why i added this
|
||||
if (spellid_1 == spellid_2 && remove && !areaAura)
|
||||
{
|
||||
if (flag1 & SPELL_GROUP_SPECIAL_FLAG_SAME_SPELL_CHECK)
|
||||
{
|
||||
return SPELL_GROUP_STACK_FLAG_EXCLUSIVE;
|
||||
}
|
||||
|
||||
return SPELL_GROUP_STACK_FLAG_NONE;
|
||||
}
|
||||
|
||||
if (groupId > 0 && groupId == GetSpellGroup(spellid_2))
|
||||
{
|
||||
SpellGroupSpecialFlags flag1 = GetSpellGroupSpecialFlags(spellid_1);
|
||||
SpellGroupSpecialFlags flag2 = GetSpellGroupSpecialFlags(spellid_2);
|
||||
SpellGroupStackFlags additionFlag = SPELL_GROUP_STACK_FLAG_NONE;
|
||||
// xinef: first flags are used for elixir stacking rules
|
||||
|
||||
@@ -312,20 +312,21 @@ typedef std::unordered_map<uint32, SpellBonusEntry> SpellBonusMap;
|
||||
|
||||
enum SpellGroupSpecialFlags
|
||||
{
|
||||
SPELL_GROUP_SPECIAL_FLAG_NONE = 0x000,
|
||||
SPELL_GROUP_SPECIAL_FLAG_ELIXIR_BATTLE = 0x001,
|
||||
SPELL_GROUP_SPECIAL_FLAG_ELIXIR_GUARDIAN = 0x002,
|
||||
SPELL_GROUP_SPECIAL_FLAG_ELIXIR_UNSTABLE = 0x004,
|
||||
SPELL_GROUP_SPECIAL_FLAG_ELIXIR_SHATTRATH = 0x008,
|
||||
SPELL_GROUP_SPECIAL_FLAG_STACK_EXCLUSIVE_MAX = 0x00F,
|
||||
SPELL_GROUP_SPECIAL_FLAG_FORCED_STRONGEST = 0x010, // xinef: specially helpful flag if some spells have different auras, but only one should be present
|
||||
SPELL_GROUP_SPECIAL_FLAG_SKIP_STRONGER_CHECK = 0x020,
|
||||
SPELL_GROUP_SPECIAL_FLAG_BASE_AMOUNT_CHECK = 0x040,
|
||||
SPELL_GROUP_SPECIAL_FLAG_PRIORITY1 = 0x100,
|
||||
SPELL_GROUP_SPECIAL_FLAG_PRIORITY2 = 0x200,
|
||||
SPELL_GROUP_SPECIAL_FLAG_PRIORITY3 = 0x400,
|
||||
SPELL_GROUP_SPECIAL_FLAG_PRIORITY4 = 0x800,
|
||||
SPELL_GROUP_SPECIAL_FLAG_MAX = 0x1000,
|
||||
SPELL_GROUP_SPECIAL_FLAG_NONE = 0x000,
|
||||
SPELL_GROUP_SPECIAL_FLAG_ELIXIR_BATTLE = 0x001,
|
||||
SPELL_GROUP_SPECIAL_FLAG_ELIXIR_GUARDIAN = 0x002,
|
||||
SPELL_GROUP_SPECIAL_FLAG_ELIXIR_UNSTABLE = 0x004,
|
||||
SPELL_GROUP_SPECIAL_FLAG_ELIXIR_SHATTRATH = 0x008,
|
||||
SPELL_GROUP_SPECIAL_FLAG_STACK_EXCLUSIVE_MAX = 0x00F,
|
||||
SPELL_GROUP_SPECIAL_FLAG_FORCED_STRONGEST = 0x010, // xinef: specially helpful flag if some spells have different auras, but only one should be present
|
||||
SPELL_GROUP_SPECIAL_FLAG_SKIP_STRONGER_CHECK = 0x020,
|
||||
SPELL_GROUP_SPECIAL_FLAG_BASE_AMOUNT_CHECK = 0x040,
|
||||
SPELL_GROUP_SPECIAL_FLAG_PRIORITY1 = 0x100,
|
||||
SPELL_GROUP_SPECIAL_FLAG_PRIORITY2 = 0x200,
|
||||
SPELL_GROUP_SPECIAL_FLAG_PRIORITY3 = 0x400,
|
||||
SPELL_GROUP_SPECIAL_FLAG_PRIORITY4 = 0x800,
|
||||
SPELL_GROUP_SPECIAL_FLAG_SAME_SPELL_CHECK = 0x1000,
|
||||
SPELL_GROUP_SPECIAL_FLAG_MAX = 0x2000
|
||||
};
|
||||
|
||||
enum SpellGroupStackFlags
|
||||
|
||||
Reference in New Issue
Block a user