diff 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
line wrap: on
line diff
--- a/db_fix.lua	Tue Jan 04 19:39:23 2011 -0600
+++ b/db_fix.lua	Thu Jan 06 17:04:05 2011 -0600
@@ -38,31 +38,59 @@
 
 
 RECIPEPROFIT_location_cache = {
-
+    ["Jutak"] = {
+        ["y"] = 0.7408881187438965,
+        ["x"] = 0.4155560731887817,
+        ["map"] = 673,
+    },
+    ["Blixrez Goodstitch"] = {
+        ["y"] = 0.7414151430130005,
+        ["x"] = 0.4281085133552551,
+        ["map"] = 673,
+    },
+    ["Mazk Snipeshot"] = {
+        ["y"] = 0.7023801207542419,
+        ["x"] = 0.4324219226837158,
+        ["map"] = 673,
+    },
+    ["Glyx Brewright"] = {
+        ["y"] = 0.7498214840888977,
+        ["x"] = 0.4265729784965515,
+        ["map"] = 673,
+    },
+    ["Xizk Goodstitch"] = {
+        ["y"] = 0.730360746383667,
+        ["x"] = 0.4357856512069702,
+        ["map"] = 673,
+    },
+    ["Nina Lightbrew"] = {
+        ["y"] = 0.1597689986228943,
+        ["x"] = 0.6244959235191345,
+        ["map"] = 19,
+    },
 }
 
---[[
-    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
+RECIPEPROFIT_blacklist = {
+    "13435", -- [1]
+    "23064", -- [2]
+    "23010", -- [3]
+    "13433", -- [4]
+    "15165", -- [5]
+    "8137", -- [6]
+    "8139", -- [7]
+    "11278", -- [8]
+    "2381", -- [9]
+    "9179",
+}
+
+do
+    for k, v in pairs(RECIPEPROFIT_database) do
+        if(RECIPEPROFIT_location_cache[v.vendor]) then
+            v.x = RECIPEPROFIT_location_cache[v.vendor].x * 100
+            v.y = RECIPEPROFIT_location_cache[v.vendor].y * 100
+            v.realmap = RECIPEPROFIT_location_cache[v.vendor].map
         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
-]]