TrinityCore icon indicating copy to clipboard operation
TrinityCore copied to clipboard

heroic / non heroic item stacking spell

Open sinakal opened this issue 14 years ago • 7 comments

hi,

i have found some "annoying" bug

  1. pick a hunter
  2. add Deathbringer will Normal version and Heroic version
  3. equip deathbringer N at character equipment
  4. hit training dummy
  5. when the deathbringer proc, quickly use feign death and change the normal version with the heroic version
  6. continue hit training dummy
  7. buff from heroic comes

what you see?

the 2 buff are stacking and that should never happen

i make some rules at spell_group and spell_group_stacking_rules

INSERT INTO spell_group (id, spell_id) VALUES (1200, 71519); INSERT INTO spell_group (id, spell_id) VALUES (1200, 71562);

INSERT INTO spell_group_stack_rules (group_id, stack_rule) VALUES (1200, 3);

but the proc still stack

is there anything error with the table?

sinakal avatar Oct 18 '12 09:10 sinakal

try:

diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp
index 415a2ab..cbefa6a 100644
--- a/src/server/game/Entities/Unit/Unit.cpp
+++ b/src/server/game/Entities/Unit/Unit.cpp
@@ -5565,7 +5565,7 @@ bool Unit::HandleDummyAuraProc(Unit* victim, uint32 damage, AuraEffect* triggere
                 }
                 case 71519: // Deathbringer's Will Normal
                 {
-                    if (GetTypeId() != TYPEID_PLAYER)
+                    if (GetTypeId() != TYPEID_PLAYER || HasAura(71562))
                         return false;

                     std::vector<uint32> RandomSpells;
@@ -5611,7 +5611,7 @@ bool Unit::HandleDummyAuraProc(Unit* victim, uint32 damage, AuraEffect* triggere
                 }
                 case 71562: // Deathbringer's Will Heroic
                 {
-                    if (GetTypeId() != TYPEID_PLAYER)
+                    if (GetTypeId() != TYPEID_PLAYER || HasAura(71519))
                         return false;

                     std::vector<uint32> RandomSpells;

Vincent-Michael avatar Oct 18 '12 10:10 Vincent-Michael

Try using SPELL_GROUP_STACK_RULE_EXCLUSIVE_FROM_SAME_CASTER or even SPELL_GROUP_STACK_RULE_EXCLUSIVE. You see to have used SPELL_GROUP_STACK_RULE_EXCLUSIVE_SAME_EFFECT.

Warpten avatar Oct 18 '12 11:10 Warpten

@Vincent-Michael

I'll try it.. but how about the other buff like dislodged foreign object, death choice, all ruby sanctum trinket etc?

updated: it's not working :(

@Warpten

i tried to change the values to SPELL_GROUP_STACK_RULE_EXCLUSIVE_FROM_SAME_CASTE and SPELL_GROUP_STACK_RULE_EXCLUSIVE but nothing changed

sinakal avatar Oct 18 '12 16:10 sinakal

sorry my bad, i've just realized that i put the wrong spellID at the group...

already fixed.. thanks for helping me out

sinakal avatar Oct 21 '12 03:10 sinakal

@Vincent-Michael Horrible hackfix... Do not do that ever again. My eyes... Oh god.

@kriz170 You should post the fix to contribute TrinityCore ;-)

Appled avatar Oct 22 '12 14:10 Appled

@Appled

try this

INSERT INTO spell_group (id, spell_id) VALUES
('1209','67703'),
('1209','67708'),
('1209','67772'),
('1209','67773'),
('1210','71484'),
('1210','71485'),
('1210','71486'),
('1210','71491'),
('1210','71492'),
('1210','71556'),
('1210','71558'),
('1210','71559'),
('1210','71560'),
('1210','71561'),
('1211','56505'),
('1211','56548'),
('1211','57407'),
('1211','60936'),
('1211','60939'),
('1211','71601'),
('1211','71644'),
('1212','75456'),
('1212','75458'),
('1213','75466'),
('1213','75473'),
('1214','75477'),
('1214','75480'),
('1215','75493'),
('1215','75494'),
('1216','55350'),
('1216','57864'),
('1216','71605'),
('1216','71636'),
('1217','71401'),
('1217','71541'),
('1218','71570'),
('1218','71572');

INSERT INTO spell_group_stack_rules (group_id,stack_rule) VALUES
('1209','3'), 
('1210','3'),
('1211','3'),
('1212','3'),
('1213','3'),
('1214','3'),
('1215','3'),
('1216','3'),
('1217','3'),
('1218','3');

-- 1209 paragon
-- 1210 Deathbringer will
-- 1211 Dislodged Foreign Object
-- 1212 until 1215 all Ruby Sanctum Trinket (healing, Spell power, Tanking, Attack power)
-- 1216 Phylatery Of nameless lich
-- 1217 Whispering Fanged Skull
-- 1218 Muradin spyglass


thanks to @nelegalno for teaching me spoiler :)

sinakal avatar Oct 22 '12 17:10 sinakal

You have to use:

SQL</b> INSERT INTO spell_group (id, spell_id) VALUES ... rest of the code here ... -- 1218 Muradin spyglass <b>

in order to get:

INSERT INTO spell_group (id, spell_id) VALUES
... rest of the code here ...
-- 1218 Muradin spyglass

nelegalno avatar Oct 22 '12 18:10 nelegalno