# HG changeset patch # User James D. Callahan III # Date 1409070013 18000 # Node ID 5bc69e705add3e8c83d4b6b842a3eba2e73d89f6 # Parent 601d3e517460c1e907529d7c3f29128cdeb45d5f Globals cleanup. diff -r 601d3e517460 -r 5bc69e705add Main.lua --- a/Main.lua Tue Aug 26 10:46:59 2014 -0500 +++ b/Main.lua Tue Aug 26 11:20:13 2014 -0500 @@ -10,6 +10,7 @@ local math = _G.math local table = _G.table +local next = _G.next local select = _G.select local unpack = _G.unpack @@ -465,7 +466,7 @@ } - function MatchUnitTypes(unit_type_name) + local function MatchUnitTypes(unit_type_name) if not unit_type_name then return UNIT_TYPES.UNKNOWN end @@ -487,7 +488,7 @@ -- We might want to use some of this new information later, but leaving the returns alone for now local unit_type_name, unk_id1, server_id, instance_id, unk_id2, unit_idnum, spawn_id = (":"):split(guid) - unit_type = MatchUnitTypes(unit_type_name) + local unit_type = MatchUnitTypes(unit_type_name) if unit_type ~= UNIT_TYPES.PLAYER and unit_type ~= UNIT_TYPES.PET and unit_type ~= UNIT_TYPES.ITEM then local id_mapping = NPC_ID_MAPPING[unit_idnum]