public
Description: WoW Addon - Prospecting and Disenchanting Aide
Homepage: http://www.tekkub.net
Clone URL: git://github.com/tekkub/panda.git
Click here to lend your support to: panda and make a donation at www.pledgie.com !
Move common util functions into the addon's table
tekkub (author)
Sun Jan 13 07:31:51 -0800 2008
commit  7da28388a606f7baa65357560adc63bdd444c69c
tree    669b414d39e541f9c0e97c285139a5026f93b935
parent  6f1bbc23ef2feef8d5c114eb955d91bb55a3be10
...
1
2
3
4
5
6
7
8
9
10
11
12
13
14
 
15
16
17
...
1
2
 
 
 
 
 
 
 
 
 
 
 
 
3
4
5
6
0
@@ -1,17 +1,6 @@
0
 
0
 local Panda = Panda
0
-
0
-
0
-local function GS(cash)
0
- if not cash then return end
0
- cash = cash/100
0
- local s = floor(cash%100)
0
- local g = floor(cash/100)
0
- if g > 0 then return string.format("|cffffd700%d.|cffc7c7cf%02d", g, s)
0
- else return string.format("|cffc7c7cf%d", s) end
0
-end
0
-
0
-
0
+local GS = Panda.GS
0
 local GetItemInfo = GetItemInfo
0
 
0
 
...
32
33
34
35
 
36
37
38
...
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
...
32
33
34
 
35
36
37
38
...
50
51
52
 
 
 
 
 
 
 
 
 
 
53
54
55
0
@@ -32,7 +32,7 @@ local notDEable = {
0
   ["29378"] = true,
0
 }
0
 
0
-
0
+local GS = Panda.GS
0
 local function IsBound(bag, slot)
0
   tip:SetBagItem(bag, slot)
0
   for i=1,30 do
0
@@ -50,16 +50,6 @@ function Panda:DEable(link)
0
 end
0
 
0
 
0
-local function GS(cash)
0
- if not cash then return end
0
- cash = cash/100
0
- local s = floor(cash%100)
0
- local g = floor(cash/100)
0
- if g > 0 then return string.format("|cffffd700%d.|cffc7c7cf%02d", g, s)
0
- else return string.format("|cffc7c7cf%d", s) end
0
-end
0
-
0
-
0
 local function GSC(cash)
0
   if not cash then return end
0
   local g, s, c = floor(cash/10000), floor((cash/100)%100), cash%100
...
30
31
32
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
...
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
0
@@ -30,3 +30,22 @@ function Panda:Enable()
0
   self:RegisterEvent("ADDON_LOADED")
0
 end
0
 
0
+
0
+function Panda:HideTooltip() GameTooltip:Hide() end
0
+function Panda:ShowTooltip()
0
+ if not self.link then return end
0
+
0
+ GameTooltip:SetOwner(self, "ANCHOR_NONE")
0
+ GameTooltip:SetPoint("TOPLEFT", self, "TOPRIGHT")
0
+ GameTooltip:SetHyperlink(self.link)
0
+end
0
+
0
+
0
+function Panda.GS(cash)
0
+ if not cash then return end
0
+ cash = cash/100
0
+ local s = floor(cash%100)
0
+ local g = floor(cash/100)
0
+ if g > 0 then return string.format("|cffffd700%d.|cffc7c7cf%02d", g, s)
0
+ else return string.format("|cffc7c7cf%d", s) end
0
+end
...
1
 
 
 
 
 
 
 
2
3
4
...
12
13
14
15
16
17
18
...
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
...
116
117
118
119
120
...
1
2
3
4
5
6
7
8
9
10
11
...
19
20
21
 
22
23
24
...
27
28
29
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
30
31
32
...
102
103
104
 
 
0
@@ -1,4 +1,11 @@
0
 
0
+------------------------------
0
+-- Are you local? --
0
+------------------------------
0
+
0
+local HideTooltip, ShowTooltip, GS = Panda.HideTooltip, Panda.ShowTooltip, Panda.GS
0
+local frame
0
+local ores = {2770, 2771, 2772, 3858, 10620, 23424, 23425}
0
 local deitems = {
0
   {10940, 11083, 11137, 11176, 16204, 22445}, -- Dust
0
   {10938, 10998, 11134, 11174, 16202, 22447}, -- Lesser Essence
0
@@ -12,7 +19,6 @@ local prositems = {
0
   {23077, 21929, 23112, 23079, 23117, 23107}, -- BC Greens
0
   {23436, 23439, 23440, 23437, 23438, 23441} -- BC Blues
0
 }
0
-local ores = {2770, 2771, 2772, 3858, 10620, 23424, 23425}
0
 
0
 
0
 -- Query server, we need these items!
0
@@ -21,26 +27,6 @@ for i,t in pairs(prositems) do for _,id in pairs(t) do GameTooltip:SetHyperlink(
0
 for _,id in pairs(ores) do GameTooltip:SetHyperlink("item:"..id) end
0
 
0
 
0
-local function HideTooltip(self) GameTooltip:Hide() end
0
-local function ShowTooltip(self)
0
- if not self.link then return end
0
-
0
- GameTooltip:SetOwner(frame, "ANCHOR_NONE")
0
- GameTooltip:SetPoint("TOPLEFT", frame, "TOPRIGHT", 10, 60)
0
- GameTooltip:SetHyperlink(self.link)
0
-
0
-end
0
-
0
-local function GS(cash)
0
- if not cash then return end
0
- cash = cash/100
0
- local s = floor(cash%100)
0
- local g = floor(cash/100)
0
- if g > 0 then return string.format("|cffffd700%d.|cffc7c7cf%02d", g, s)
0
- else return string.format("|cffc7c7cf%d", s) end
0
-end
0
-
0
-
0
 function Panda:CreateDisenchantingPricePanel()
0
   local function SetupFrame(f, id)
0
     local name, link, _, _, _, _, _, _, _, texture = GetItemInfo(id)
0
@@ -116,5 +102,3 @@ function Panda:CreateDisenchantingPricePanel()
0
 
0
   return frame
0
 end
0
-
0
-

Comments

    No one has commented yet.