1
0
Bifurcation 0

New assertion to diagnose issue 323. This assertion checks to see if GetItemType is going to return nil or not. If the assertion fails, nil is being returned and the item link is bad.

Cette révision appartient à :
Nathanial.C.Jones 2011-02-12 12:53:17 +00:00
Parent ccd091e3a5
révision 5a8061d1ef
1 fichiers modifiés avec 3 ajouts et 1 suppressions

Voir le fichier

@ -27,9 +27,11 @@ end
local function GetItemType(link, vague)
QuestHelper:Assert(link, "Item did not have a link! Say WHAT?")
return tonumber(string.match(link,
local result = tonumber(string.match(link,
(vague and "" or "^") .. "|cff%x%x%x%x%x%x|Hitem:(%d+):[%d:-]+|h%[[^%]]*%]|h|r".. (vague and "" or "$")
))
QuestHelper:Assert(result, "Item does not have a type ('" .. link .. "')")
return result
end
local function GetQuestType(link)