From 22847535b62dd260985b610d715bbc173d8fea94 Mon Sep 17 00:00:00 2001 From: Bunny67 Date: Tue, 10 Jul 2018 23:14:05 +0300 Subject: [PATCH] update --- !Compatibility/api/wowAPI.lua | 210 +----------------- .../libs/LibBabble-ItemBagFamily-3.0.lua | 199 ++++++++++++++++- 2 files changed, 205 insertions(+), 204 deletions(-) diff --git a/!Compatibility/api/wowAPI.lua b/!Compatibility/api/wowAPI.lua index 97bfda3..c3b65bb 100644 --- a/!Compatibility/api/wowAPI.lua +++ b/!Compatibility/api/wowAPI.lua @@ -26,7 +26,7 @@ local DURABILITY_TEMPLATE = gsub(DURABILITY_TEMPLATE, "%%d / %%d", "(%%d+) / (%% --Libs local LBC = LibStub("LibBabble-Class-3.0"):GetLookupTable() local LBZ = LibStub("LibBabble-Zone-3.0"):GetLookupTable() -local LBIF = LibStub("LibBabble-ItemFamily-3.0"):GetLookupTable() +local LBIBF = LibStub("LibBabble-ItemBagFamily-3.0"):GetLookupTable() CLASS_SORT_ORDER = { "WARRIOR", @@ -266,209 +266,15 @@ function GetMapNameByID(id) return mapByID[tonumber(id)] end -local t = { - [6218] = 16, - [6339] = 16, - [6342] = 16, - [6344] = 16, - [6346] = 16, - [6347] = 16, - [6348] = 16, - [6349] = 16, - [6375] = 16, - [6377] = 16, - [10938] = 16, - [10939] = 16, - [10940] = 16, - [10978] = 16, - [10998] = 16, - [11038] = 16, - [11039] = 16, - [11081] = 16, - [11082] = 16, - [11083] = 16, - [11084] = 16, - [11098] = 16, - [11101] = 16, - [11130] = 16, - [11134] = 16, - [11135] = 16, - [11137] = 16, - [11138] = 16, - [11139] = 16, - [11145] = 16, - [11150] = 16, - [11151] = 16, - [11152] = 16, - [11163] = 16, - [11164] = 16, - [11165] = 16, - [11166] = 16, - [11167] = 16, - [11168] = 16, - [11174] = 16, - [11175] = 16, - [11176] = 16, - [11177] = 16, - [11178] = 16, - [11202] = 16, - [11203] = 16, - [11204] = 16, - [11205] = 16, - [11206] = 16, - [11207] = 16, - [11208] = 16, - [11224] = 16, - [11225] = 16, - [11226] = 16, - [11813] = 16, - [14343] = 16, - [14344] = 16, - [16202] = 16, - [16203] = 16, - [16204] = 16, - [16207] = 16, - [16214] = 16, - [16215] = 16, - [16216] = 16, - [16217] = 16, - [16218] = 16, - [16219] = 16, - [16220] = 16, - [16221] = 16, - [16222] = 16, - [16223] = 16, - [16224] = 16, - [16242] = 16, - [16243] = 16, - [16244] = 16, - [16245] = 16, - [16246] = 16, - [16247] = 16, - [16248] = 16, - [16249] = 16, - [16250] = 16, - [16251] = 16, - [16252] = 16, - [16253] = 16, - [16254] = 16, - [16255] = 16, - [17725] = 16, - [18259] = 16, - [18260] = 16, - [19444] = 16, - [19445] = 16, - [19446] = 16, - [19447] = 16, - [19448] = 16, - [19449] = 16, - [20634] = 16, - [20725] = 16, - [20726] = 16, - [20727] = 16, - [20728] = 16, - [20729] = 16, - [20730] = 16, - [20731] = 16, - [20732] = 16, - [20733] = 16, - [20735] = 16, - [20736] = 16, - [20752] = 16, - [20753] = 16, - [20754] = 16, - [20755] = 16, - [20756] = 16, - [20757] = 16, - [20758] = 16, - [22392] = 16, - [765] = 8, - [785] = 8, - [1401] = 8, - [2447] = 8, - [2449] = 8, - [2450] = 8, - [2452] = 8, - [2453] = 8, - [3355] = 8, - [3356] = 8, - [3357] = 8, - [3358] = 8, - [3369] = 8, - [3818] = 8, - [3819] = 8, - [3820] = 8, - [3821] = 8, - [4625] = 8, - [5056] = 8, - [5168] = 8, - [8153] = 8, - [8831] = 8, - [8836] = 8, - [8838] = 8, - [8839] = 8, - [8845] = 8, - [8846] = 8, - [11022] = 8, - [11040] = 8, - [11514] = 8, - [11951] = 8, - [11952] = 8, - [13463] = 8, - [13464] = 8, - [13465] = 8, - [13466] = 8, - [13467] = 8, - [13468] = 8, - [16205] = 8, - [16208] = 8, - [17034] = 8, - [17035] = 8, - [17036] = 8, - [17037] = 8, - [17038] = 8, - [17760] = 8, - [18297] = 8, - [19726] = 8, - [19727] = 8, - [22094] = 8, - [6265] = 4, - [2516] = 2, - [2519] = 2, - [3033] = 2, - [3465] = 2, - [4960] = 2, - [5568] = 2, - [8067] = 2, - [8068] = 2, - [8069] = 2, - [10512] = 2, - [10513] = 2, - [11284] = 2, - [11363] = 2, - [11630] = 2, - [13377] = 2, - [15997] = 2, - [19317] = 2, - [2512] = 1, - [2515] = 1, - [3030] = 1, - [3464] = 1, - [9399] = 1, - [11285] = 1, - [12654] = 1, - [18042] = 1, - [19316] = 1, -} - local bagTypes = { - [LBIF["Quiver"]] = 1, - [LBIF["Ammo Pouch"]] = 2, - [LBIF["Soul Bag"]] = 4, - [LBIF["Herb Bag"]] = 8, - [LBIF["Enchanting Bag"]] = 16, + [LBIBF["Quiver"]] = 1, + [LBIBF["Ammo Pouch"]] = 2, + [LBIBF["Soul Bag"]] = 4, + [LBIBF["Herb Bag"]] = 8, + [LBIBF["Enchanting Bag"]] = 16, } +local LBIBF2 = LibStub("LibBabble-ItemBagFamily-3.0").ItemFamily function GetItemFamily(id) if not id then return end if type(id) == "table" or type(id) == "function" then return end @@ -477,7 +283,7 @@ function GetItemFamily(id) id = match(id, "item:(%d+)") end - return t[id] or 0 + return LBIBF2[id] or 0 end function GetBagFamily(id) diff --git a/!Compatibility/libs/LibBabble-ItemBagFamily-3.0.lua b/!Compatibility/libs/LibBabble-ItemBagFamily-3.0.lua index df9a798..bba13c3 100644 --- a/!Compatibility/libs/LibBabble-ItemBagFamily-3.0.lua +++ b/!Compatibility/libs/LibBabble-ItemBagFamily-3.0.lua @@ -1,4 +1,4 @@ -local MAJOR_VERSION = "LibBabble-ItemFamily-3.0" +local MAJOR_VERSION = "LibBabble-ItemBagFamily-3.0" local MINOR_VERSION = 90000 + tonumber(string.match("$Revision: 50 $", "%d+")) if not LibStub then error(MAJOR_VERSION .. " requires LibStub.") end @@ -67,4 +67,199 @@ elseif GAME_LOCALE == "ruRU" then } else error(string.format("%s: Locale %q not supported", MAJOR_VERSION, GAME_LOCALE)) -end \ No newline at end of file +end + +lib.ItemFamily = { + [6218] = 16, + [6339] = 16, + [6342] = 16, + [6344] = 16, + [6346] = 16, + [6347] = 16, + [6348] = 16, + [6349] = 16, + [6375] = 16, + [6377] = 16, + [10938] = 16, + [10939] = 16, + [10940] = 16, + [10978] = 16, + [10998] = 16, + [11038] = 16, + [11039] = 16, + [11081] = 16, + [11082] = 16, + [11083] = 16, + [11084] = 16, + [11098] = 16, + [11101] = 16, + [11130] = 16, + [11134] = 16, + [11135] = 16, + [11137] = 16, + [11138] = 16, + [11139] = 16, + [11145] = 16, + [11150] = 16, + [11151] = 16, + [11152] = 16, + [11163] = 16, + [11164] = 16, + [11165] = 16, + [11166] = 16, + [11167] = 16, + [11168] = 16, + [11174] = 16, + [11175] = 16, + [11176] = 16, + [11177] = 16, + [11178] = 16, + [11202] = 16, + [11203] = 16, + [11204] = 16, + [11205] = 16, + [11206] = 16, + [11207] = 16, + [11208] = 16, + [11224] = 16, + [11225] = 16, + [11226] = 16, + [11813] = 16, + [14343] = 16, + [14344] = 16, + [16202] = 16, + [16203] = 16, + [16204] = 16, + [16207] = 16, + [16214] = 16, + [16215] = 16, + [16216] = 16, + [16217] = 16, + [16218] = 16, + [16219] = 16, + [16220] = 16, + [16221] = 16, + [16222] = 16, + [16223] = 16, + [16224] = 16, + [16242] = 16, + [16243] = 16, + [16244] = 16, + [16245] = 16, + [16246] = 16, + [16247] = 16, + [16248] = 16, + [16249] = 16, + [16250] = 16, + [16251] = 16, + [16252] = 16, + [16253] = 16, + [16254] = 16, + [16255] = 16, + [17725] = 16, + [18259] = 16, + [18260] = 16, + [19444] = 16, + [19445] = 16, + [19446] = 16, + [19447] = 16, + [19448] = 16, + [19449] = 16, + [20634] = 16, + [20725] = 16, + [20726] = 16, + [20727] = 16, + [20728] = 16, + [20729] = 16, + [20730] = 16, + [20731] = 16, + [20732] = 16, + [20733] = 16, + [20735] = 16, + [20736] = 16, + [20752] = 16, + [20753] = 16, + [20754] = 16, + [20755] = 16, + [20756] = 16, + [20757] = 16, + [20758] = 16, + [22392] = 16, + [765] = 8, + [785] = 8, + [1401] = 8, + [2447] = 8, + [2449] = 8, + [2450] = 8, + [2452] = 8, + [2453] = 8, + [3355] = 8, + [3356] = 8, + [3357] = 8, + [3358] = 8, + [3369] = 8, + [3818] = 8, + [3819] = 8, + [3820] = 8, + [3821] = 8, + [4625] = 8, + [5056] = 8, + [5168] = 8, + [8153] = 8, + [8831] = 8, + [8836] = 8, + [8838] = 8, + [8839] = 8, + [8845] = 8, + [8846] = 8, + [11022] = 8, + [11040] = 8, + [11514] = 8, + [11951] = 8, + [11952] = 8, + [13463] = 8, + [13464] = 8, + [13465] = 8, + [13466] = 8, + [13467] = 8, + [13468] = 8, + [16205] = 8, + [16208] = 8, + [17034] = 8, + [17035] = 8, + [17036] = 8, + [17037] = 8, + [17038] = 8, + [17760] = 8, + [18297] = 8, + [19726] = 8, + [19727] = 8, + [22094] = 8, + [6265] = 4, + [2516] = 2, + [2519] = 2, + [3033] = 2, + [3465] = 2, + [4960] = 2, + [5568] = 2, + [8067] = 2, + [8068] = 2, + [8069] = 2, + [10512] = 2, + [10513] = 2, + [11284] = 2, + [11363] = 2, + [11630] = 2, + [13377] = 2, + [15997] = 2, + [19317] = 2, + [2512] = 1, + [2515] = 1, + [3030] = 1, + [3464] = 1, + [9399] = 1, + [11285] = 1, + [12654] = 1, + [18042] = 1, + [19316] = 1, +} \ No newline at end of file