Quantcast

Fixed MP5 parsing (and most likely HP5 as well) for certain items (gems especially)

Kevin Lyles [11-19-09 - 08:25]
Fixed MP5 parsing (and most likely HP5 as well) for certain items (gems especially)
Filename
Regexps.lua
diff --git a/Regexps.lua b/Regexps.lua
index 3c4d873..b6a07d1 100644
--- a/Regexps.lua
+++ b/Regexps.lua
@@ -14,6 +14,7 @@ Preprocess = {
 	{"^Use: .*%.  If you spend at least %d+ seconds eating you will become well fed and gain ([%a%d][%a%d, ]+) for .*%.", "%1"},
 	{"Cat, Bear, Dire Bear, and Moonkin forms", "Cat/Bear/Dire Bear/Moonkin forms"},
 	{"maximum health", "health"},
+	{"Mana every 5 seconds", "MP5"},
 }

 IgnoredLines = {
@@ -84,7 +85,8 @@ SingleStatLines = {
 		function(text, pattern)
 			return WeightsWatcher:singleStatValueOnly(text, pattern, "Feral AP")
 		end},
-	{"^%+?(%d+%%?) (%a[%a ]+)",
+	-- The 5 is to catch MP5 and HP5 values
+	{"^%+?(%d+%%?) (%a[%a ]+5?)",
 		function(text, pattern)
 			local start, _, value, name = string.find(text, pattern)
 			if start then