PDA

View Full Version : Buffs Being Blocked That Shouldn't Be


trevius
06-26-2008, 06:08 PM
I am not exactly sure when this bug was introduced, but I didn't start hearing about it until the 1115 or 1118 code was put on the server.

Basically, I have had multiple reports that certain buffs that should stack are now unable to stack. The only ones I actually got enough info on was the Spell "Unfailling Reverence" (shaman charisma buff) blocking "Spirit of Bih`Li" and "Clarity/Clarity II", but I imagine there are probably more. I confirmed that these are indeed being blocked.

The only recent changes that I see in the change logs that I think could potentially have something to do with the problem are these:

Scorpious2k (Congdar): Eliminated array index error/zone crash in spells
Scorpious2k (greggg230): Merchant price faction/charisma fix

I imagine that the merchant price one probably isn't the issue, but since this was a charisma spell that was blocking in this case, I figured it was worth noting.

This isn't anything too major, and as far as I have seen, it seems to be mostly certain shaman spells that are blocking other spells that they shouldn't. I don't think I have heard of other class buffs blocking incorrectly.

cavedude
06-26-2008, 06:19 PM
CHA spells have always caused problems stacking, this is nothing new.

trevius
06-26-2008, 06:28 PM
Ahh ok. Weird that I didn't hear anything about it until the past week or so and suddenly I have seen at least 3 or 4 reports of it. If it is only cha buffs, then it isn't a big issue. I will keep an eye out for any other stacking issues. Thanks for the quick response, CD!

ChaosSlayer
06-26-2008, 06:38 PM
the thign is that CHA present in MANY spells to serve a form of a delimier.

for exmaple if you have

spell 1:
Slot 1: CHA 0
Slot 2: STR 100

spell 2:
Slot 1: CHA 0
Slot 2: CHA 0
Slot 3: STR 100

these 2 spells will stack.

what is important that server code must never treat 0 cha towards any stacking comparecens, the moment it does- 50% spells in DB will STOP WORKING

I urge devs to CAREFULY look over thsi and make sure than CHA 0 is NEVER been compared towards stacking with each other

AndMetal
08-29-2008, 07:45 PM
This came up on the Storm Haven forums (http://stormhavenserver.com/forums/viewtopic.php?f=14&t=373), so I figured I'd mention what I have come up with so far, since this is still an issue.

After doing some digging (thanks to #mlog (http://www.eqemulator.net/wiki/wikka.php?wakka=ServerLogSys) SPELLS__STACKING on), it appears this is failing in the function Mob::CheckStackConflict (http://eqemulator.cvs.sourceforge.net/eqemulator/EQEmuCVS/Source/zone/spells.cpp?revision=1.58&view=markup#l_1992):

1992 if(sp2_value < sp1_value) {
1993 mlog(SPELLS__STACKING, "Spell %s (value %d) is not as good as %s (value %d). Rejecting %s.",
1994 sp2.name, sp2_value, sp1.name, sp1_value, sp2.name);
1995 return -1; // can't stack
1996 }


And I believe it is because there should be a check, not only for the first spell, but also the 2nd spell to see if the slot is blank. If that's the case, we can just change this (http://eqemulator.cvs.sourceforge.net/eqemulator/EQEmuCVS/Source/zone/spells.cpp?revision=1.58&view=markup#l_1913)

1913 if(IsBlankSpellEffect(spellid1, i))
1914 continue;

to this:
if(IsBlankSpellEffect(spellid1, i) || IsBlankSpellEffect(spellid2, i))
continue;


I'll try compiling this here in a few and see if it works.

AndMetal
08-29-2008, 08:01 PM
I'll try compiling this here in a few and see if it works.

Compiled fine and seems to work as intended. As a test, I was using Unfailing Reverence (http://lucy.allakhazam.com/spell.html?id=1597) & JourneymanBoots (http://lucy.allakhazam.com/spell.html?id=874). If I would cast the Charisma buff first, the jboots would be blocked, but not the other way around. Now, after the fix, I can cast both spells fine, including recasting them when they're already active.

Hopefully someone can move this to Code Submissions to be updated into the main source :-)

trevius
09-01-2008, 04:57 AM
Did some testing on this and it seems to do exactly what it says. The CHA stacking issue is definitely fixed and I don't see any other stacking issues caused by this, though my testing wasn't very extensive. I mostly just tested a few spells that I know shouldn't stack like Symbol and Temperance and they still didn't (as they should). So, this looks like a nice fix. Thanks AndMetal! You are becoming quite the coder lately lol.