comparison db_fix.lua @ 51:bc43986f7fb0

Added system of blacklisting bad vendors. Added a couple internal chat commands for debugging.
author "Aaron Bregger <killermonkey99@gmail.com>"
date Thu, 06 Jan 2011 17:04:05 -0600
parents c6a4525f7ba7
children
comparison
equal deleted inserted replaced
50:6c58e7b2b828 51:bc43986f7fb0
36 36
37 --]]--))--))--))--))--))--))--))--))--))--))--))--))--))--))--))--))--))--))--)) 37 --]]--))--))--))--))--))--))--))--))--))--))--))--))--))--))--))--))--))--))--))
38 38
39 39
40 RECIPEPROFIT_location_cache = { 40 RECIPEPROFIT_location_cache = {
41 41 ["Jutak"] = {
42 ["y"] = 0.7408881187438965,
43 ["x"] = 0.4155560731887817,
44 ["map"] = 673,
45 },
46 ["Blixrez Goodstitch"] = {
47 ["y"] = 0.7414151430130005,
48 ["x"] = 0.4281085133552551,
49 ["map"] = 673,
50 },
51 ["Mazk Snipeshot"] = {
52 ["y"] = 0.7023801207542419,
53 ["x"] = 0.4324219226837158,
54 ["map"] = 673,
55 },
56 ["Glyx Brewright"] = {
57 ["y"] = 0.7498214840888977,
58 ["x"] = 0.4265729784965515,
59 ["map"] = 673,
60 },
61 ["Xizk Goodstitch"] = {
62 ["y"] = 0.730360746383667,
63 ["x"] = 0.4357856512069702,
64 ["map"] = 673,
65 },
66 ["Nina Lightbrew"] = {
67 ["y"] = 0.1597689986228943,
68 ["x"] = 0.6244959235191345,
69 ["map"] = 19,
70 },
42 } 71 }
43 72
44 --[[ 73 RECIPEPROFIT_blacklist = {
45 Replaces the X and Y coordinates in the coordinate cached database. 74 "13435", -- [1]
46 ]--] 75 "23064", -- [2]
47 local function fix_coords(note, cdb) 76 "23010", -- [3]
48 for name, coord in pairs(cdb) do 77 "13433", -- [4]
49 if(note.vendor == name) then 78 "15165", -- [5]
50 note.x = coord.x * 100 79 "8137", -- [6]
51 note.y = coord.y * 100 80 "8139", -- [7]
81 "11278", -- [8]
82 "2381", -- [9]
83 "9179",
84 }
85
86 do
87 for k, v in pairs(RECIPEPROFIT_database) do
88 if(RECIPEPROFIT_location_cache[v.vendor]) then
89 v.x = RECIPEPROFIT_location_cache[v.vendor].x * 100
90 v.y = RECIPEPROFIT_location_cache[v.vendor].y * 100
91 v.realmap = RECIPEPROFIT_location_cache[v.vendor].map
52 end 92 end
53 end 93 end
54 end 94 end
55 95
56 --[--[
57 Overwrites RECIPEPROFIT_alliance and RECIPEPROFIT_horde dbs.
58 ]--]
59 do
60 for _, note in pairs(RECIPEPROFIT_alliance) do
61 fix_coords(note, RECIPEPROFIT_location_cache)
62 end
63 96
64 for _, note in pairs(RECIPEPROFIT_horde) do
65 fix_coords(note, RECIPEPROFIT_location_cache)
66 end
67 end
68 ]]