view db_fix.lua @ 50:6c58e7b2b828

Added tag v2.04 for changeset dd8b63be6737
author "Aaron Bregger <killermonkey99@gmail.com>"
date Tue, 04 Jan 2011 19:39:23 -0600
parents c6a4525f7ba7
children bc43986f7fb0
line wrap: on
line source
--[[--))--))--))--))--))--))--))--))--))--))--))--))--))--))--))--))--))--))--))

    RecipeProfit by -[@project-author@]-
    
    Rev:     @project-revision@
    Updated: @file-date-iso@
    
--))--))--))--))--))--))--))--))--))--))--))--))--))--))--))--))--))--))--))--))
    
    URL:
        http://www.wrathguides.com/
    
	License:
        This file is a part of "RecipeProfit for GatherMate."
        
		This program is free software; you can redistribute it and/or
		modify it under the terms of the GNU General Public License
		as published by the Free Software Foundation, either version 3
		of the License, or (at your option) any later version.

		This program is distributed in the hope that it will be useful,
		but WITHOUT ANY WARRANTY; without even the implied warranty of
		MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
		GNU General Public License for more details.

        You should have received a copy of the GNU General Public License
        along with Foobar.  If not, see <http://www.gnu.org/licenses/>.

	Note:
		This program's source code is specifically designed to work with
		World of Warcraft's interpreted AddOn system.
        
		You have an implicit license to use this program with these facilities
		since that is it's designated purpose as per:
		http://www.fsf.org/licensing/licenses/gpl-faq.html#InterpreterIncompat
    
--]]--))--))--))--))--))--))--))--))--))--))--))--))--))--))--))--))--))--))--))


RECIPEPROFIT_location_cache = {

}

--[[
    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.
]--]
do
    for _, note in pairs(RECIPEPROFIT_alliance) do
        fix_coords(note, RECIPEPROFIT_location_cache)
    end

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