Page 1 of 5

BuffStackTest (MQ2Main/MQ2Utilities.cpp)

Posted: Thu Mar 20, 2014 12:29 am
by demonstar55
With .Stacks checking songs, this has become more of a noticeable problem, but all of the "limit" type spell effects shouldn't cause any stacking conflicts, currently only one of them is excluded. (Specific example of problems, Pyromancy and Aura of the Poet)

Here are all the effects grabbed from EQEmu source since that was the easiest for me :P

Code: Select all

284:#define SE_LimitMaxLevel				134 // implemented
285:#define SE_LimitResist					135 // implemented
286:#define SE_LimitTarget					136 // implemented
287:#define SE_LimitEffect					137 // implemented
288:#define SE_LimitSpellType				138 // implemented
289:#define SE_LimitSpell					139 // implemented
290:#define SE_LimitMinDur					140 // implemented
291:#define SE_LimitInstant					141 // implemented
292:#define SE_LimitMinLevel				142 // implemented
293:#define SE_LimitCastTimeMin				143 // implemented
294:#define SE_LimitCastTimeMax				144	// implemented (*not used in any known live spell)
498:#define SE_LimitManaMin					348	// implemented
535:#define SE_LimitSpellGroup				385	// implemented - Limits to spell group(ie type 3 reuse reduction augs that are class specific and thus all share s SG)
541:#define SE_LimitManaMax					391	// implemented 
553://#define SE_LimitSpellClass			403 // *not implemented - unclear what this refers too (not 'right click' spell bar)
554://#define SE_LimitSpellSubclass			404 // *not implemented - unclear what this refers too (not 'right click' spell bar)
561:#define SE_LimitClass					411 // implemented - Limits to spells of a certain class (Note: The class value in dbase is +1 in relation to item class value)
562:#define SE_LimitRace					412 // implemented - Limits to spells cast by a certain race (Note: not used in any known live spells)
564:#define SE_LimitCastingSkill			414 // implemented - Limit a focus to include spells cast using a specific skill.
572:#define SE_LimitUseMin					422 // implemented - limit a focus to require a min amount of numhits value (used with above)
573:#define SE_LimitUseType					423 // implemented	- limit a focus to require a certain numhits type 
578:#define SE_LimitToSkill					428 // implemented - limits what skills will effect a skill proc

Re: BuffStackTest (MQ2Main/MQ2Utilities.cpp)

Posted: Thu Mar 20, 2014 12:59 am
by SwiftyMUSE
demonstar55 wrote:With .Stacks checking songs, this has become more of a noticeable problem, but all of the "limit" type spell effects shouldn't cause any stacking conflicts, currently only one of them is excluded. (Specific example of problems, Pyromancy and Aura of the Poet)
I don't see any of the Limit: spell effects being excluded. Which one do you believe is being excluded?

Re: BuffStackTest (MQ2Main/MQ2Utilities.cpp)

Posted: Thu Mar 20, 2014 1:05 am
by demonstar55
All of them. Currently they cause problems when they shouldn't.

Edit: basically line 5925 needs to become ugly :P

Re: BuffStackTest (MQ2Main/MQ2Utilities.cpp)

Posted: Thu Mar 20, 2014 7:40 am
by PeteSampras
.

Re: BuffStackTest (MQ2Main/MQ2Utilities.cpp)

Posted: Thu Mar 20, 2014 11:09 am
by Cr4zyb4rd
The only thing that needs added to that section is a mouse-drag and a ctrl-x. You're doing it wrong.

Re: BuffStackTest (MQ2Main/MQ2Utilities.cpp)

Posted: Thu Mar 20, 2014 11:24 am
by SwiftyMUSE
I am looking at this however I still don't have a specific test case (two spells, give me spell ids since the ones you listed have multiple and don't all have the same attributes).

I am still confused as to what specific attribute from the list given is actually excluded in the code as the OP stated. In a further post, the OP stated ALL of them implying that what was initially posted is incorrect.

Re: BuffStackTest (MQ2Main/MQ2Utilities.cpp)

Posted: Thu Mar 20, 2014 11:33 am
by demonstar55
Looks like I made an error in my original post and they're most likely cause of the problem would be any of the aura of the poet effects and any pyromancy slot 8 causing issues. Basically the code on the line I pointed out earlier should read if attributes equal and abribute not blank effect do these other checks.

I would probably add a helper function to minimize uglyness :P also that code is currently very silly, we know the atribs are the same but we still make sure they're equal further down the if statement.

Re: BuffStackTest (MQ2Main/MQ2Utilities.cpp)

Posted: Thu Mar 20, 2014 12:27 pm
by PeteSampras
.

Re: BuffStackTest (MQ2Main/MQ2Utilities.cpp)

Posted: Thu Mar 20, 2014 1:11 pm
by SwiftyMUSE
I just did a test with a Ranger. With NO BUFFS, I cast Jolting Swings and it succeeded. I then cast Crackling Blades and it failed to hold.

Those spells are 85: Add Proc in slot 1.

I will go through Pete's list, but I'm not sure changes are required. If there are any spells that anyone can specifically check (first see if they both BUFF) and then give me the results of .Stacks I will have more to look at.

Re: BuffStackTest (MQ2Main/MQ2Utilities.cpp)

Posted: Thu Mar 20, 2014 1:15 pm
by demonstar55
I'm saying its returning false for cases it should return true. As in I can cast pyromancy and it will take hold, but the macro uses the .Stacks function to check if it will stack, which returns false, so the wizard will never cast Pyromancy despite him being able to cast and have it stack.

EDIT: 339 shouldn't cause problems (it does), at least when it's compared to a song.

Re: BuffStackTest (MQ2Main/MQ2Utilities.cpp)

Posted: Thu Mar 20, 2014 6:31 pm
by PeteSampras
.

Re: BuffStackTest (MQ2Main/MQ2Utilities.cpp)

Posted: Thu Mar 20, 2014 6:50 pm
by PeteSampras
.

Re: BuffStackTest (MQ2Main/MQ2Utilities.cpp)

Posted: Thu Mar 20, 2014 8:17 pm
by demonstar55
http://pastebin.com/G7b5BTYf

That fixes the issues related to the "limits" SPAs. It doesn't not fix the issue with 339 (trigger on cast) since that requires more logic to correctly fix. In order to correctly fix 339 would require figuring out if both spells are beneficial and one being a song and one being a normal buff, then they will stack, otherwise they don't. (Pyromancy and Cryomancy don't stack, but Pyromancy and Arcane Arietta do)

Re: BuffStackTest (MQ2Main/MQ2Utilities.cpp)

Posted: Fri Mar 21, 2014 12:19 am
by SwiftyMUSE
Please don't change the code just because you don't like the current formatting.

Also please give me specific examples of what does not work. This includes the specific SPELLID as many of the spells have many versions.

Re: BuffStackTest (MQ2Main/MQ2Utilities.cpp)

Posted: Fri Mar 21, 2014 12:20 am
by SwiftyMUSE
PeteSampras wrote:Wrote a macro to check Attrib of songs and discs.
Not really necessary as I have a database of all the spells... but thanks anyway.