Irrelevant buffs from set bonuses

Topics: Rawr.Base.Buffs
Developer
Oct 23, 2009 at 1:07 AM

I note that with lots of set bonus buffs using special effects large numbers are showing up in the model buffs section. There is nothing obvious to filter on in the stats object as the special effect typically contains a relevant stat. However the set bonus is for a completely different class. Is there a method whereby we could modify the buff check code to filter out buffs for set bonuses where the set bonus belongs to a class that is not relevant for the current model.

I'm aware that all the set bonus options are greyed out and so this is a cosmetic issue however it is a niggle.

Coordinator
Oct 23, 2009 at 1:27 AM

I definitely see the point. Joth, I think you setup the buff categories; can you add a Set Bonuses one?

Side note, I'd like to start removing a bunch of the BC buffs and set bonuses.

Developer
Oct 23, 2009 at 1:39 AM

defaultBuffs.Add(new Buff()
{
Name = "Malorne Harness 2 Piece Bonus",
Group = "Set Bonuses",
ConflictingBuffs = new List<string>(new string[] { }),
Stats = { BloodlustProc = 0.8f },
SetName = "Malorne Harness",
SetThreshold = 2
});

The Buff Group is already being used, and most models (that are attempting to filter it) are dropping off specific ones by name or stating that specific ones are the only ones that are ok (which tends to be the shorter list).

If you aren't already, override IsBuffRelevant like this (set your own info as needed):

public override bool IsBuffRelevant(Buff buff) {
string name = buff.Name;
// Force some buffs to active
if (name.Contains("Potion of Wild Magic")
|| name.Contains("Insane Strength Potion")
) {
return true;
}
// Force some buffs to go away
else if (name.Contains("Malorne")
|| name.Contains("Duskweaver")
|| name.Contains("Primalstrike")
|| name.Contains("Clefthoof")
|| name.Contains("Dreamwalker")
|| name.Contains("DK DPS 4T10")
|| name.Contains("Skyshatter")
) {
return false;
}
bool haswantedStats = HasWantedStats(buff.Stats);
bool hassurvStats = HasSurvivabilityStats(buff.Stats);
bool hasbadstats = HasIgnoreStats(buff.Stats);
bool retVal = haswantedStats || (hassurvStats && !hasbadstats);
return retVal;
}

Developer
Oct 23, 2009 at 1:59 AM

Although all this being said, we would be better served to add a new variable to the Buff class storing Class limitations. Use the CharacterClass enum and add a "any" flag for any other buffs or allow it to be null/not set if there's not a limit set. I would also like to look at setting Buff id's so we can compare via those instead of strings (for performance).

Developer
Oct 23, 2009 at 2:18 AM

I've got a modification to the Buff class that I think can resolve this issue, someone needs to put it into the main IsBuffRelevant.

defaultBuffs.Add(new Buff()
{
Name = "Malorne Harness 2 Piece Bonus",
Group = "Set Bonuses",
ConflictingBuffs = new List<string>(new string[] { }),
Stats = { BloodlustProc = 0.8f },
SetName = "Malorne Harness",
SetThreshold = 2,
AllowedClasses = new List<CharacterClass>() { CharacterClass.Druid },
});
To set the class restriction use the above line of code in the Buff. If AllowedClasses is not set during Buff creation, it returns a list of all classes (meaning any). This way if there's a set that can be used by both Warriors and Druids, you just set the list to those two.

Developer
Oct 23, 2009 at 4:21 AM
Edited Oct 23, 2009 at 4:22 AM

My brother is interfering with my ability to submit right now but I have updated the Set Bonuses list to sort things (they got a little random over time in that list) and added Class restrictions to all the Set Bonuses. Now to add the check in IsBuffRelevant and they will all filter at least by class (sorry to Healadin stuff showing up in ProtPaladin or similar circumstances).

I've also noted all the stuff that is for TBC, would you like me to comment each of those sections out Astry?

Edit: By stuff I mean Set Bonuses from TBC (Professions, Tiers 4,5,6)