# HG changeset patch # User James D. Callahan III # Date 1335800950 18000 # Node ID 1b4111ac80c69c4ea12c4bc613792f1e3528fa4c # Parent 17900d196389a66ec87ead821794deb720675a6b Return the instance type (NONE included) in CurrentLocationData() diff -r 17900d196389 -r 1b4111ac80c6 Main.lua --- a/Main.lua Mon Apr 30 01:16:30 2012 -0500 +++ b/Main.lua Mon Apr 30 10:49:10 2012 -0500 @@ -102,7 +102,8 @@ if _G.DungeonUsesTerrainMap() then map_level = map_level - 1 end - return _G.GetRealZoneText(), ("%.2f"):format(x * 100), ("%.2f"):format(y * 100), map_level or 0 + local _, instance_type = _G.IsInInstance() + return _G.GetRealZoneText(), ("%.2f"):format(x * 100), ("%.2f"):format(y * 100), map_level or 0, instance_type:upper() end @@ -201,14 +202,14 @@ if unit_type ~= private.UNIT_TYPES.NPC or not unit_idnum then return end - local zone_name, x, y, map_level = CurrentLocationData() + local zone_name, x, y, map_level, instance_type = CurrentLocationData() local npc_data = NPCEntry(unit_idnum).stats[("level_%d"):format(_G.UnitLevel("target"))] npc_data.locations = npc_data.locations or {} if not npc_data.locations[zone_name] then npc_data.locations[zone_name] = {} end - npc_data.locations[zone_name][("%s:%s:%s"):format(map_level, x, y)] = true + npc_data.locations[zone_name][("%s:%s:%s:%s"):format(instance_type, map_level, x, y)] = true end @@ -478,9 +479,10 @@ return end - local zone_name, x, y, map_level = CurrentLocationData() + local zone_name, x, y, map_level, instance_type = CurrentLocationData() if bit.band(spell_flags, AF.OBJECT) == AF.OBJECT then + action_data.instance_type = instance_type action_data.map_level = map_level action_data.name = target_name action_data.type = AF.OBJECT