annotate db_fix.lua @ 48:705cacb00cd3 v2.03

Added tag v2.01a release for changeset c6a4525f7ba7
author "Aaron Bregger <killermonkey99@gmail.com>"
date Tue, 04 Jan 2011 19:36:57 -0600
parents c6a4525f7ba7
children bc43986f7fb0
rev   line source
killermonkey99@47 1 --[[--))--))--))--))--))--))--))--))--))--))--))--))--))--))--))--))--))--))--))
killermonkey99@47 2
killermonkey99@47 3 RecipeProfit by -[@project-author@]-
killermonkey99@47 4
killermonkey99@47 5 Rev: @project-revision@
killermonkey99@47 6 Updated: @file-date-iso@
killermonkey99@47 7
killermonkey99@47 8 --))--))--))--))--))--))--))--))--))--))--))--))--))--))--))--))--))--))--))--))
killermonkey99@47 9
killermonkey99@47 10 URL:
killermonkey99@47 11 http://www.wrathguides.com/
killermonkey99@47 12
killermonkey99@47 13 License:
killermonkey99@47 14 This file is a part of "RecipeProfit for GatherMate."
killermonkey99@47 15
killermonkey99@47 16 This program is free software; you can redistribute it and/or
killermonkey99@47 17 modify it under the terms of the GNU General Public License
killermonkey99@47 18 as published by the Free Software Foundation, either version 3
killermonkey99@47 19 of the License, or (at your option) any later version.
killermonkey99@47 20
killermonkey99@47 21 This program is distributed in the hope that it will be useful,
killermonkey99@47 22 but WITHOUT ANY WARRANTY; without even the implied warranty of
killermonkey99@47 23 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
killermonkey99@47 24 GNU General Public License for more details.
killermonkey99@47 25
killermonkey99@47 26 You should have received a copy of the GNU General Public License
killermonkey99@47 27 along with Foobar. If not, see <http://www.gnu.org/licenses/>.
killermonkey99@47 28
killermonkey99@47 29 Note:
killermonkey99@47 30 This program's source code is specifically designed to work with
killermonkey99@47 31 World of Warcraft's interpreted AddOn system.
killermonkey99@47 32
killermonkey99@47 33 You have an implicit license to use this program with these facilities
killermonkey99@47 34 since that is it's designated purpose as per:
killermonkey99@47 35 http://www.fsf.org/licensing/licenses/gpl-faq.html#InterpreterIncompat
killermonkey99@47 36
killermonkey99@47 37 --]]--))--))--))--))--))--))--))--))--))--))--))--))--))--))--))--))--))--))--))
killermonkey99@47 38
killermonkey99@47 39
killermonkey99@47 40 RECIPEPROFIT_location_cache = {
killermonkey99@47 41
killermonkey99@47 42 }
killermonkey99@47 43
killermonkey99@47 44 --[[
killermonkey99@47 45 Replaces the X and Y coordinates in the coordinate cached database.
killermonkey99@47 46 ]--]
killermonkey99@47 47 local function fix_coords(note, cdb)
killermonkey99@47 48 for name, coord in pairs(cdb) do
killermonkey99@47 49 if(note.vendor == name) then
killermonkey99@47 50 note.x = coord.x * 100
killermonkey99@47 51 note.y = coord.y * 100
killermonkey99@47 52 end
killermonkey99@47 53 end
killermonkey99@47 54 end
killermonkey99@47 55
killermonkey99@47 56 --[--[
killermonkey99@47 57 Overwrites RECIPEPROFIT_alliance and RECIPEPROFIT_horde dbs.
killermonkey99@47 58 ]--]
killermonkey99@47 59 do
killermonkey99@47 60 for _, note in pairs(RECIPEPROFIT_alliance) do
killermonkey99@47 61 fix_coords(note, RECIPEPROFIT_location_cache)
killermonkey99@47 62 end
killermonkey99@47 63
killermonkey99@47 64 for _, note in pairs(RECIPEPROFIT_horde) do
killermonkey99@47 65 fix_coords(note, RECIPEPROFIT_location_cache)
killermonkey99@47 66 end
killermonkey99@47 67 end
killermonkey99@47 68 ]]