void armory_t::fuzzy_stats( std::string& encoding_str, const std::string& description_str ) { if ( description_str.empty() ) return; std::string buffer = description_str; armory_t::format( buffer ); if ( is_proc_description( buffer ) ) return; std::vector<std::string> splits; util_t::string_split( splits, buffer, "_." ); stat_search( encoding_str, splits, STAT_MAX, "all stats" ); stat_search( encoding_str, splits, STAT_MAX, "to all stats" ); stat_search( encoding_str, splits, STAT_STRENGTH, "strength" ); stat_search( encoding_str, splits, STAT_AGILITY, "agility" ); stat_search( encoding_str, splits, STAT_STAMINA, "stamina" ); stat_search( encoding_str, splits, STAT_INTELLECT, "intellect" ); stat_search( encoding_str, splits, STAT_SPIRIT, "spirit" ); stat_search( encoding_str, splits, STAT_SPELL_POWER, "spell power" ); stat_search( encoding_str, splits, STAT_MP5, "mana regen" ); stat_search( encoding_str, splits, STAT_MP5, "mana every 5" ); stat_search( encoding_str, splits, STAT_MP5, "mana per 5" ); stat_search( encoding_str, splits, STAT_MP5, "mana restored per 5" ); stat_search( encoding_str, splits, STAT_MP5, "mana 5" ); stat_search( encoding_str, splits, STAT_ATTACK_POWER, "attack power" ); stat_search( encoding_str, splits, STAT_EXPERTISE_RATING, "expertise rating" ); stat_search( encoding_str, splits, STAT_ARMOR_PENETRATION_RATING, "armor penetration rating" ); stat_search( encoding_str, splits, STAT_HASTE_RATING, "haste rating" ); stat_search( encoding_str, splits, STAT_HIT_RATING, "ranged hit rating" ); stat_search( encoding_str, splits, STAT_HIT_RATING, "hit rating" ); stat_search( encoding_str, splits, STAT_CRIT_RATING, "ranged critical strike" ); stat_search( encoding_str, splits, STAT_CRIT_RATING, "critical strike rating" ); stat_search( encoding_str, splits, STAT_CRIT_RATING, "crit rating" ); stat_search( encoding_str, splits, STAT_BONUS_ARMOR, "armor !penetration" ); stat_search( encoding_str, splits, STAT_DEFENSE_RATING, "defense rating" ); stat_search( encoding_str, splits, STAT_DODGE_RATING, "dodge rating" ); stat_search( encoding_str, splits, STAT_PARRY_RATING, "parry rating" ); stat_search( encoding_str, splits, STAT_BLOCK_RATING, "block rating" ); stat_search( encoding_str, splits, STAT_BLOCK_VALUE, "block value of your shield" ); }
void armory_t::fuzzy_stats( std::string& encoding_str, const std::string& description_str ) { if ( description_str.empty() ) return; std::string buffer = description_str; util_t::format_name( buffer ); if ( is_proc_description( buffer ) ) return; std::vector<std::string> splits; util_t::string_split( splits, buffer, "_." ); stat_search( encoding_str, splits, STAT_MAX, "all stats" ); stat_search( encoding_str, splits, STAT_MAX, "to all stats" ); stat_search( encoding_str, splits, STAT_STRENGTH, "strength" ); stat_search( encoding_str, splits, STAT_AIM, "aim" ); stat_search( encoding_str, splits, STAT_CUNNING, "cunning" ); stat_search( encoding_str, splits, STAT_WILLPOWER, "willpower" ); stat_search( encoding_str, splits, STAT_ENDURANCE, "endurance" ); stat_search( encoding_str, splits, STAT_PRESENCE, "presence" ); stat_search( encoding_str, splits, STAT_EXPERTISE_RATING, "expertise rating" ); stat_search( encoding_str, splits, STAT_ALACRITY_RATING, "alacrity rating" ); stat_search( encoding_str, splits, STAT_ACCURACY_RATING, "ranged accuracy rating" ); stat_search( encoding_str, splits, STAT_ACCURACY_RATING, "accuracy rating" ); stat_search( encoding_str, splits, STAT_CRIT_RATING, "ranged critical strike" ); stat_search( encoding_str, splits, STAT_CRIT_RATING, "critical strike rating" ); stat_search( encoding_str, splits, STAT_CRIT_RATING, "crit rating" ); stat_search( encoding_str, splits, STAT_BONUS_ARMOR, "armor !penetration" ); stat_search( encoding_str, splits, STAT_DEFENSE_RATING, "defense rating" ); stat_search( encoding_str, splits, STAT_SHIELD_RATING, "shield rating" ); stat_search( encoding_str, splits, STAT_ABSORB_RATING, "absorb rating" ); }