view location_cache.lua @ 19:9cf83b54cb2d

Added tag v1.01 for changeset 6cdb9377585b
author Aaron@Aaron-PC
date Thu, 19 Aug 2010 17:25:08 -0500
parents 6cdb9377585b
children bdd440ac55be
line wrap: on
line source
--[[--))--))--))--))--))--))--))--))--))--))--))--))--))--))--))--))--))--))--))

    RecipeProfit by -[@project-author@]-
    
    Rev:     @project-revision@
    Updated: @file-date-iso@
    
--))--))--))--))--))--))--))--))--))--))--))--))--))--))--))--))--))--))--))--))
    
    http://www.wrathguides.com/
    
--]]--))--))--))--))--))--))--))--))--))--))--))--))--))--))--))--))--))--))--))

--[[
    This file contains location fix overrides for data. 
]]
RECIPEPROFIT_location_cache = {
    ["Aaron Hollman"] = {
        ["y"] = 0.7215260863304138,
        ["x"] = 0.6404642462730408,
    },
    ["Madame Ruby"] = {
        ["y"] = 0.7101468443870544,
        ["x"] = 0.6331429481506348,
    },
    ["Endora Moorehead"] = {
        ["y"] = 0.5554489493370056,
        ["x"] = 0.386496365070343,
    },
    ["Larana Drome"] = {
        ["y"] = 0.3669505119323731,
        ["x"] = 0.41370689868927,
    },
    ["Wind Trader Lathrai"] = {
        ["y"] = 0.3077846765518189,
        ["x"] = 0.7226132750511169,
    },
    ["Eiin"] = {
        ["y"] = 0.6892650127410889,
        ["x"] = 0.6627683639526367,
    },
    ["Bryan Landers"] = {
        ["y"] = 0.245055764913559,
        ["x"] = 0.3892331123352051,
    },
    ["Fyldan"] = {
        ["y"] = 0.215785413980484,
        ["x"] = 0.4854764640331268,
    },
    ["Ulthir"] = {
        ["y"] = 0.2445829063653946,
        ["x"] = 0.5585364103317261,
    },
}

--[[
    Replaces the X and Y coordinates in the coordinate cached database.
]]
local function fix_coords(note, cdb)
    for name, coord in pairs(cdb) do
        if(note.vendor == name) then
            note.x = coord.x * 100
            note.y = coord.y * 100
        end
    end
end

--[[
    Overwrites RECIPEPROFIT_alliance and RECIPEPROFIT_horde dbs.
]]
for _, note in pairs(RECIPEPROFIT_alliance, RECIPEPROFIT_location_cache) do
    fix_coords(note)
end

for _, note in pairs(RECIPEPROFIT_horde, RECIPEPROFIT_location_cache) do
    fix_coords(note)
end