From 7c017740bfc4eeb865f738bc914ec83da466d455 Mon Sep 17 00:00:00 2001 From: Kevin Lyles Date: Thu, 19 Nov 2009 02:25:46 -0600 Subject: [PATCH] Fixed MP5 parsing (and most likely HP5 as well) for certain items (gems especially) --- Regexps.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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 -- 1.7.9.5