BuffStackTest (MQ2Main/MQ2Utilities.cpp)

A forum for reporting bugs NOT related to custom plugins.

Moderator: MacroQuest Developers

demonstar55
a snow griffon
a snow griffon
Posts: 314
Joined: Fri Nov 28, 2008 6:31 am

BuffStackTest (MQ2Main/MQ2Utilities.cpp)

Post by demonstar55 » Thu Mar 20, 2014 12:29 am

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

SwiftyMUSE
Developer
Developer
Posts: 1205
Joined: Tue Sep 23, 2003 10:52 pm

Re: BuffStackTest (MQ2Main/MQ2Utilities.cpp)

Post by SwiftyMUSE » Thu Mar 20, 2014 12:59 am

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?
PayPal: Donate to SwiftyMUSE
Bitcoin: 1LuQ6YcEAWxF3fm9yWMiro4K582je7364V
Krono: PM me

dont_know_at_all wrote:Gee, if only there was a way to correctly report a crash...

demonstar55
a snow griffon
a snow griffon
Posts: 314
Joined: Fri Nov 28, 2008 6:31 am

Re: BuffStackTest (MQ2Main/MQ2Utilities.cpp)

Post by demonstar55 » Thu Mar 20, 2014 1:05 am

All of them. Currently they cause problems when they shouldn't.

Edit: basically line 5925 needs to become ugly :P

PeteSampras
a snow griffon
a snow griffon
Posts: 322
Joined: Sat Dec 15, 2007 8:56 pm

Re: BuffStackTest (MQ2Main/MQ2Utilities.cpp)

Post by PeteSampras » Thu Mar 20, 2014 7:40 am

.
Last edited by PeteSampras on Thu Mar 27, 2014 12:19 am, edited 1 time in total.

User avatar
Cr4zyb4rd
Plugins Czar
Posts: 1449
Joined: Tue Jul 20, 2004 11:46 am

Re: BuffStackTest (MQ2Main/MQ2Utilities.cpp)

Post by Cr4zyb4rd » Thu Mar 20, 2014 11:09 am

The only thing that needs added to that section is a mouse-drag and a ctrl-x. You're doing it wrong.

SwiftyMUSE
Developer
Developer
Posts: 1205
Joined: Tue Sep 23, 2003 10:52 pm

Re: BuffStackTest (MQ2Main/MQ2Utilities.cpp)

Post by SwiftyMUSE » Thu Mar 20, 2014 11:24 am

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.
PayPal: Donate to SwiftyMUSE
Bitcoin: 1LuQ6YcEAWxF3fm9yWMiro4K582je7364V
Krono: PM me

dont_know_at_all wrote:Gee, if only there was a way to correctly report a crash...

demonstar55
a snow griffon
a snow griffon
Posts: 314
Joined: Fri Nov 28, 2008 6:31 am

Re: BuffStackTest (MQ2Main/MQ2Utilities.cpp)

Post by demonstar55 » Thu Mar 20, 2014 11:33 am

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.

PeteSampras
a snow griffon
a snow griffon
Posts: 322
Joined: Sat Dec 15, 2007 8:56 pm

Re: BuffStackTest (MQ2Main/MQ2Utilities.cpp)

Post by PeteSampras » Thu Mar 20, 2014 12:27 pm

.
Last edited by PeteSampras on Thu Mar 27, 2014 12:19 am, edited 1 time in total.

SwiftyMUSE
Developer
Developer
Posts: 1205
Joined: Tue Sep 23, 2003 10:52 pm

Re: BuffStackTest (MQ2Main/MQ2Utilities.cpp)

Post by SwiftyMUSE » Thu Mar 20, 2014 1:11 pm

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.
PayPal: Donate to SwiftyMUSE
Bitcoin: 1LuQ6YcEAWxF3fm9yWMiro4K582je7364V
Krono: PM me

dont_know_at_all wrote:Gee, if only there was a way to correctly report a crash...

demonstar55
a snow griffon
a snow griffon
Posts: 314
Joined: Fri Nov 28, 2008 6:31 am

Re: BuffStackTest (MQ2Main/MQ2Utilities.cpp)

Post by demonstar55 » Thu Mar 20, 2014 1:15 pm

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.

PeteSampras
a snow griffon
a snow griffon
Posts: 322
Joined: Sat Dec 15, 2007 8:56 pm

Re: BuffStackTest (MQ2Main/MQ2Utilities.cpp)

Post by PeteSampras » Thu Mar 20, 2014 6:31 pm

.
Last edited by PeteSampras on Thu Mar 27, 2014 12:19 am, edited 2 times in total.

PeteSampras
a snow griffon
a snow griffon
Posts: 322
Joined: Sat Dec 15, 2007 8:56 pm

Re: BuffStackTest (MQ2Main/MQ2Utilities.cpp)

Post by PeteSampras » Thu Mar 20, 2014 6:50 pm

.
Last edited by PeteSampras on Thu Mar 27, 2014 12:19 am, edited 1 time in total.

demonstar55
a snow griffon
a snow griffon
Posts: 314
Joined: Fri Nov 28, 2008 6:31 am

Re: BuffStackTest (MQ2Main/MQ2Utilities.cpp)

Post by demonstar55 » Thu Mar 20, 2014 8:17 pm

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)

SwiftyMUSE
Developer
Developer
Posts: 1205
Joined: Tue Sep 23, 2003 10:52 pm

Re: BuffStackTest (MQ2Main/MQ2Utilities.cpp)

Post by SwiftyMUSE » Fri Mar 21, 2014 12:19 am

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.
PayPal: Donate to SwiftyMUSE
Bitcoin: 1LuQ6YcEAWxF3fm9yWMiro4K582je7364V
Krono: PM me

dont_know_at_all wrote:Gee, if only there was a way to correctly report a crash...

SwiftyMUSE
Developer
Developer
Posts: 1205
Joined: Tue Sep 23, 2003 10:52 pm

Re: BuffStackTest (MQ2Main/MQ2Utilities.cpp)

Post by SwiftyMUSE » Fri Mar 21, 2014 12:20 am

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.
PayPal: Donate to SwiftyMUSE
Bitcoin: 1LuQ6YcEAWxF3fm9yWMiro4K582je7364V
Krono: PM me

dont_know_at_all wrote:Gee, if only there was a way to correctly report a crash...