annotate location_cache.lua @ 41:7a46209da946

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