# HG changeset patch # User James D. Callahan III # Date 1340912196 18000 # Node ID 2bfdce67c71ea93338b6315e2049ec1a88bd2d5e # Parent 9f23fb15adc5f8dc3723450472f754738a2ca65f Removed the special case kludge for Fishing location field name. diff -r 9f23fb15adc5 -r 2bfdce67c71e Main.lua --- a/Main.lua Thu Jun 28 14:30:20 2012 -0500 +++ b/Main.lua Thu Jun 28 14:36:36 2012 -0500 @@ -254,22 +254,21 @@ end -- do-block -local function UpdateDBEntryLocation(entry_type, identifier, location_label) +local function UpdateDBEntryLocation(entry_type, identifier) if not identifier then return end local zone_name, area_id, x, y, map_level, difficulty_token = CurrentLocationData() local entry = DBEntry(entry_type, identifier) - local location_field = location_label or "locations" entry[difficulty_token] = entry[difficulty_token] or {} - entry[difficulty_token][location_field] = entry[difficulty_token][location_field] or {} + entry[difficulty_token].locations = entry[difficulty_token].locations or {} local zone_token = ("%s:%d"):format(zone_name, area_id) - local zone_data = entry[difficulty_token][location_field][zone_token] + local zone_data = entry[difficulty_token].locations[zone_token] if not zone_data then zone_data = {} - entry[difficulty_token][location_field][zone_token] = zone_data + entry[difficulty_token].locations[zone_token] = zone_data end local location_token = ("%s:%s:%s"):format(map_level, x, y) zone_data[location_token] = zone_data[location_token] or true @@ -1238,7 +1237,7 @@ action_data.identifier = identifier elseif bit.band(spell_flags, AF.ZONE) == AF.ZONE then local identifier = ("%s:%s"):format(spell_label, _G["GameTooltipTextLeft1"]:GetText() or "NONE") -- Possible fishing pool name. - action_data.zone_data = UpdateDBEntryLocation("zones", identifier, (spell_label == "FISHING") and "fishing_locations" or nil) + action_data.zone_data = UpdateDBEntryLocation("zones", identifier) action_data.type = AF.ZONE action_data.identifier = identifier action_data.spell_label = spell_label