Adding a condition to the Buff class

Topics: Rawr.Base.Buffs
May 3, 2009 at 5:48 PM
Changeset 33665

I'm attempting to use Rawr while leveling my characters, particularly to choose whether the quest green I've just recieved is better than the blue I've been wearing since Outland.  I would also like to use it as a gauge of whether I'm putting out as much hurt as I should be, so I'm clicking the Food & Elixirs/Flasks boxes in the optimizer.  Of course, the optimizer usually recommends Fish Feast and the raid flasks Endless Rage, Frostwyrm etc, so I've been commenting out those lines in the Buff class and rebuilding the solution.

I would like to wrap those lines in the class with a conditional to check the character's level and make those buffs available only to Level 80s.  What variable is available to the Buff class that would let me do this?

Thank you for your time and an excellent tool.
May 3, 2009 at 9:58 PM
Remember, that Rawr isn't accurate at all for pre-80. It's intended only for level capped characters. You can, of course, still use Rawr before that, such as comparing quest rewards like you said. Implementing special features to aid lower levels isn't something we intend to do, however. Regardless, if you don't want it to optimize food/elixir/flasks, just uncheck that box in the optimizer for that. Food/Elixirs/Flasks that you have selected will be used still. And there's a Buffs chart, where you can compare different food/elixirs/flasks, if you have some subset of them available.

Let me know if this doesn't answer your question.
May 4, 2009 at 8:07 PM
Thanks for the quick response (where do you guys find the time to play the game?).

As to the Rawr group modifying the code, I have been modifying the code, commenting out some buffs, and would never expect to have this become part of the project.  When I comment out the raid buffs, it means the exe is not applicable to my raiding toon, so I have to compile 2 different versions of Rawr.  If I could access a variable in the Buff class I could put a conditional around the buffs I'm currently commenting out.  But I don't know which variable would be appropriate and whether it is available to the Buff class.

If you could tell me the name of the variable that holds the characters level, then I would be out of your hair (for a few days, anyways).

Thank you for your time.
May 4, 2009 at 9:03 PM
Well, there's a Level property on the Character object, but Buffs wouldn't have that, and I don't think that property even gets populated or is stored anywhere. So, basically, what you're looking for doesn't exist, I don't think. Sorry.
May 4, 2009 at 11:19 PM
Yeah, I was looking at the Character class and saw that the Level property was just set to 80.  For me to parse the XML & populate it would be more trouble than my current practice of commenting and compiling 2 versions.

On another note, while I was studying the code I got interested in the XMLDocument that the Character class parses in order to populate the properties.  Would you be so kind as to point me to the schema of that XML document?  I tried looking at it's contents while debugging but wasn't able to find anything concrete.

Thanks again.
May 5, 2009 at 12:32 AM
That's a question for Blizzard; that's the character xml from the armory. We don't have a schema for it, beyond just looking at the xml data.