What is the point of HasRelevantStats

Topics: Rawr.Base
Oct 10, 2009 at 5:03 PM

I am looking at HasRelevantStats in CalculationsElemental.cs in the Rawr.Elemental directory. From what I see so far I cannot see a reason this function will return a false value. When I look at Stats.cs in Rawr.Base I see that each of the stats values has a default, a set range and get/set methods for them. What conditions are necessary for this function to return TRUE and FALSE?

Oct 10, 2009 at 6:08 PM

Stats is the container object for stat data of 'something', from an item, to a character, to whatever. An item with 10int, 15crit, 20spellpower would have a Stats object with all values 0, except for Intellect=10, CritRating=15, and SpellPower=15.

HasRelevantStats() is called with the Stats object of a wide variety of things, including Items, Enchants, and Buffs. It typically sums up all the stats on the passed object that the model considers relevant, and if that sum is greater than 0, returns true. Otherwise, it returns false. So in the Elemental model, if an item with 10agi and 10spirit was passed in, it would return false, since neither of those are considered relevant. But if an item with 10agi and 10int was passed in, it would return true, since it has at least one relevant stat. You can get more complex in how you determine whether a Stats has relevance, but that's the basic design, and is what Elemental uses.

The result of HasRelevantStats() is used to determine whether to hide or show whatever the Stats object came from. ie, we don't show irrelevant items, buffs, or enchants (and of course don't bother doing any calculations for them).

Oct 10, 2009 at 6:48 PM

Ok. that makes sense i will put this into the note for the function. I am documenting the functions so I can help remember what they do.


Oct 10, 2009 at 6:53 PM

Where in the code are the values given that mark a stats importance? I figure that an elemental shaman needs to focus on:

  • stamina
  • intellect
  • hit rating
  • spell power
  • critical strike rating
  • haste rating


Oct 10, 2009 at 6:57 PM

You are describing Stat Weights which Rawr does not IN ANY WAY use, EVER. Instead we use those stats you describe (and the rest listed in GetRelevantStats) and determine how they actually affect your abiltiies, then use those abilities in a Rotation to determine actual averaged DPS.

Oct 10, 2009 at 7:03 PM

GetCharacterCalculations() is where it takes the total stats for the character, and then uses them to determine the character's performance. That's probably what you're looking for.