1
0
Bifurcation 0
Ce dépôt a été archivé le 2020-03-15. Vous pouvez voir ses fichiers ou le cloner, mais pas ouvrir de ticket ou de demandes d'ajout, ni soumettre de changements.
questhelperredux/QuestHelper/collect_patterns.lua
Nathanial.C.Jones 965e8589c9 Everything SEEMS to work, less of course the db. Something I did before screwed everything up.
I implemented a QuestHelper_GetTime function for the next time Blizzard decides to fiddle with the time functions. It returns debugprofilestop() / 1000, to exactly match the precision of GetTime().

I also re-removed references to Cartographer from the rollback.
2012-01-01 03:01:18 +00:00

22 lignes
660 o
Lua

local GetTime = QuestHelper_GetTime
QuestHelper_File["collect_patterns.lua"] = "4.0.1.$svnversion$"
QuestHelper_Loadtime["collect_patterns.lua"] = GetTime()
local patterns = {}
function MakePattern(label, newpat)
if not newpat then newpat = ".*" end
if not patterns[label] then patterns[label] = "^" .. string.gsub(_G[label], "%%s", newpat) .. "$" end
end
function MakeNumberSnag(label)
if not patterns[label] then patterns[label] = string.gsub(_G[label], "%%d", "([0-9,.]+)") end
end
function QH_Collect_Patterns_Init(QHCData, API)
API.Patterns = patterns
API.Patterns_Register = MakePattern
API.Patterns_RegisterNumber = MakeNumberSnag
end