Skip to content
This repository
Browse code

UnitAura细化为UnitBuff

添加圣骑的永恒之火
  • Loading branch information...
commit 2e7758adf128b235d9df5be9d44d30ab8d533385 1 parent 1fc6b2e
Paojy authored November 07, 2012

Showing 1 changed file with 43 additions and 40 deletions. Show diff stats Hide diff stats

  1. 83  embeds/indicators.lua
83  embeds/indicators.lua
@@ -10,10 +10,10 @@ local timersize = 10
10 10
 -- Effect: +5% Strength, Agility, and Intellect
11 11
 oUF.Tags.Methods['mlight:SAI'] = function(u) 
12 12
 	if not (
13  
-	UnitAura(u, GetSpellInfo(1126)) or -- druid
14  
-	UnitAura(u, GetSpellInfo(20217)) or -- paladin
15  
-	UnitAura(u, GetSpellInfo(115921)) or -- monk
16  
-	UnitAura(u, GetSpellInfo(90363)) -- hunter
  13
+	UnitBuff(u, GetSpellInfo(1126)) or -- druid
  14
+	UnitBuff(u, GetSpellInfo(20217)) or -- paladin
  15
+	UnitBuff(u, GetSpellInfo(115921)) or -- monk
  16
+	UnitBuff(u, GetSpellInfo(90363)) -- hunter
17 17
 	) then return "|cffCD00CD"..x.."|r" end 
18 18
 end
19 19
 oUF.Tags.Events['mlight:SAI'] = "UNIT_AURA"
@@ -21,10 +21,10 @@ oUF.Tags.Events['mlight:SAI'] = "UNIT_AURA"
21 21
 -- Effect: +10% Stamina
22 22
 oUF.Tags.Methods['mlight:Stamina'] = function(u) 
23 23
 	if not (
24  
-	UnitAura(u, GetSpellInfo(21562)) or -- priest
25  
-	UnitAura(u, GetSpellInfo(103127)) or -- warlock
26  
-	UnitAura(u, GetSpellInfo(469)) or -- warrior
27  
-	UnitAura(u, GetSpellInfo(90364)) -- hunter
  24
+	UnitBuff(u, GetSpellInfo(21562)) or -- priest
  25
+	UnitBuff(u, GetSpellInfo(103127)) or -- warlock
  26
+	UnitBuff(u, GetSpellInfo(469)) or -- warrior
  27
+	UnitBuff(u, GetSpellInfo(90364)) -- hunter
28 28
 	) then return "|cffFFFFFF"..x.."|r" end 
29 29
 end
30 30
 oUF.Tags.Events['mlight:Stamina'] = "UNIT_AURA"
@@ -32,9 +32,9 @@ oUF.Tags.Events['mlight:Stamina'] = "UNIT_AURA"
32 32
 -- Effect: +10% melee and ranged attack power
33 33
 oUF.Tags.Methods['mlight:AP'] = function(u) 
34 34
 	if not (
35  
-	UnitAura(u, GetSpellInfo(57330)) or -- death knight
36  
-	UnitAura(u, GetSpellInfo(6673)) or -- warrior
37  
-	UnitAura(u, GetSpellInfo(19506)) -- hunter
  35
+	UnitBuff(u, GetSpellInfo(57330)) or -- death knight
  36
+	UnitBuff(u, GetSpellInfo(6673)) or -- warrior
  37
+	UnitBuff(u, GetSpellInfo(19506)) -- hunter
38 38
 	) then return "|cff8B4513"..x.."|r" end 
39 39
 end
40 40
 oUF.Tags.Events['mlight:AP'] = "UNIT_AURA"
@@ -42,10 +42,10 @@ oUF.Tags.Events['mlight:AP'] = "UNIT_AURA"
42 42
 -- Effect: +10% spell power
43 43
 oUF.Tags.Methods['mlight:SP'] = function(u) 
44 44
 	if not (
45  
-	UnitAura(u, GetSpellInfo(1459)) or UnitAura(u, GetSpellInfo(61316)) or -- mage
46  
-	UnitAura(u, GetSpellInfo(77747)) or -- shaman
47  
-	UnitAura(u, GetSpellInfo(109773)) or -- warlock
48  
-	UnitAura(u, GetSpellInfo(126309)) -- hunter
  45
+	UnitBuff(u, GetSpellInfo(1459)) or UnitBuff(u, GetSpellInfo(61316)) or -- mage
  46
+	UnitBuff(u, GetSpellInfo(77747)) or -- shaman
  47
+	UnitBuff(u, GetSpellInfo(109773)) or -- warlock
  48
+	UnitBuff(u, GetSpellInfo(126309)) -- hunter
49 49
 	) then return "|cff00FFFF"..x.."|r" end 
50 50
 end
51 51
 oUF.Tags.Events['mlight:SP'] = "UNIT_AURA"
@@ -53,10 +53,10 @@ oUF.Tags.Events['mlight:SP'] = "UNIT_AURA"
53 53
 -- Effect: +10% melee and ranged haste
54 54
 oUF.Tags.Methods['mlight:Haste'] = function(u) 
55 55
 	if not (
56  
-	UnitAura(u, GetSpellInfo(55610)) or -- death knight
57  
-	UnitAura(u, GetSpellInfo(113742)) or -- rogue
58  
-	UnitAura(u, GetSpellInfo(30809)) or -- shaman
59  
-	UnitAura(u, GetSpellInfo(128432)) or UnitAura(u, GetSpellInfo(128433)) -- hunter (pet)
  56
+	UnitBuff(u, GetSpellInfo(55610)) or -- death knight
  57
+	UnitBuff(u, GetSpellInfo(113742)) or -- rogue
  58
+	UnitBuff(u, GetSpellInfo(30809)) or -- shaman
  59
+	UnitBuff(u, GetSpellInfo(128432)) or UnitBuff(u, GetSpellInfo(128433)) -- hunter (pet)
60 60
 	) then return "|cffEEB422"..x.."|r" end
61 61
 end
62 62
 oUF.Tags.Events['mlight:Haste'] = "UNIT_AURA"
@@ -64,9 +64,9 @@ oUF.Tags.Events['mlight:Haste'] = "UNIT_AURA"
64 64
 -- Effect: +5% spell haste
65 65
 oUF.Tags.Methods['mlight:SpellHaste'] = function(u) 
66 66
 	if not (
67  
-	UnitAura(u, GetSpellInfo(24907)) or -- druid
68  
-	UnitAura(u, GetSpellInfo(15473)) or -- priest
69  
-	UnitAura(u, GetSpellInfo(51470)) -- shaman
  67
+	UnitBuff(u, GetSpellInfo(24907)) or -- druid
  68
+	UnitBuff(u, GetSpellInfo(15473)) or -- priest
  69
+	UnitBuff(u, GetSpellInfo(51470)) -- shaman
70 70
 	) then return "|cffFF1493"..x.."|r" end
71 71
 end
72 72
 oUF.Tags.Events['mlight:SpellHaste'] = "UNIT_AURA"
@@ -74,11 +74,11 @@ oUF.Tags.Events['mlight:SpellHaste'] = "UNIT_AURA"
74 74
 -- Effect: +5% ranged, melee, and spell critical chance
75 75
 oUF.Tags.Methods['mlight:Crit'] = function(u) 
76 76
 	if not (
77  
-	UnitAura(u, GetSpellInfo(17007)) or -- druid
78  
-	UnitAura(u, GetSpellInfo(1459)) or UnitAura(u, GetSpellInfo(61316)) or -- mage
79  
-	UnitAura(u, GetSpellInfo(116781)) or -- monk
80  
-	UnitAura(u, GetSpellInfo(126373)) or UnitAura(u, GetSpellInfo(126309)) or -- hunter
81  
-	UnitAura(u, GetSpellInfo(97229)) or UnitAura(u, GetSpellInfo(90309)) -- hunter (pet)
  77
+	UnitBuff(u, GetSpellInfo(17007)) or -- druid
  78
+	UnitBuff(u, GetSpellInfo(1459)) or UnitBuff(u, GetSpellInfo(61316)) or -- mage
  79
+	UnitBuff(u, GetSpellInfo(116781)) or -- monk
  80
+	UnitBuff(u, GetSpellInfo(126373)) or UnitBuff(u, GetSpellInfo(126309)) or -- hunter
  81
+	UnitBuff(u, GetSpellInfo(97229)) or UnitBuff(u, GetSpellInfo(90309)) -- hunter (pet)
82 82
 	) then return "|cffEEEE00"..x.."|r" end
83 83
 end
84 84
 oUF.Tags.Events['mlight:Crit'] = "UNIT_AURA"
@@ -86,10 +86,10 @@ oUF.Tags.Events['mlight:Crit'] = "UNIT_AURA"
86 86
 -- Effect: +3000 mastery
87 87
 oUF.Tags.Methods['mlight:Mastery'] = function(u) 
88 88
 	if not (
89  
-	UnitAura(u, GetSpellInfo(19740)) or -- paladin
90  
-	UnitAura(u, GetSpellInfo(116956)) or -- shaman
91  
-	UnitAura(u, GetSpellInfo(128997)) or -- hunter
92  
-	UnitAura(u, GetSpellInfo(93435)) -- hunter (pet)
  89
+	UnitBuff(u, GetSpellInfo(19740)) or -- paladin
  90
+	UnitBuff(u, GetSpellInfo(116956)) or -- shaman
  91
+	UnitBuff(u, GetSpellInfo(128997)) or -- hunter
  92
+	UnitBuff(u, GetSpellInfo(93435)) -- hunter (pet)
93 93
 	) then return "|cffD3D3D3"..x.."|r" end
94 94
 end
95 95
 oUF.Tags.Events['mlight:Mastery'] = "UNIT_AURA"
@@ -99,7 +99,7 @@ oUF.Tags.Events['mlight:Mastery'] = "UNIT_AURA"
99 99
 -- Priest 牧师
100 100
 local pomCount = {"i","h","g","f","Z"}
101 101
 oUF.Tags.Methods['freebgrid:pom'] = function(u) -- 愈合祷言
102  
-    local name, _,_, c, _,_,_, fromwho = UnitAura(u, GetSpellInfo(41635)) 
  102
+    local name, _,_, c, _,_,_, fromwho = UnitBuff(u, GetSpellInfo(41635)) 
103 103
     if fromwho == "player" then
104 104
         if c and c ~= 0 then return "|cff66FFFF"..pomCount[c].."|r" end 
105 105
     else
@@ -109,7 +109,7 @@ end
109 109
 oUF.Tags.Events['freebgrid:pom'] = "UNIT_AURA"
110 110
 
111 111
 oUF.Tags.Methods['freebgrid:rnw'] = function(u) -- 恢复
112  
-    local name, _,_,_,_,_, expirationTime, fromwho = UnitAura(u, GetSpellInfo(139))
  112
+    local name, _,_,_,_,_, expirationTime, fromwho = UnitBuff(u, GetSpellInfo(139))
113 113
     if(fromwho == "player") then
114 114
         local spellTimer = expirationTime - GetTime()
115 115
         if spellTimer > 4 then
@@ -124,7 +124,7 @@ end
124 124
 oUF.Tags.Events['freebgrid:rnw'] = "UNIT_AURA"
125 125
 
126 126
 oUF.Tags.Methods['freebgrid:pws'] = function(u) -- 盾
127  
-local name, _,_,_,_,_, expirationTime, fromwho = UnitAura(u, GetSpellInfo(17))
  127
+local name, _,_,_,_,_, expirationTime, fromwho = UnitBuff(u, GetSpellInfo(17))
128 128
     if(fromwho == "player") then
129 129
         local spellTimer = (expirationTime-GetTime())
130 130
 		local TimeLeft = ns.FormatValue(spellTimer)
@@ -140,7 +140,7 @@ oUF.Tags.Events['freebgrid:ws'] = "UNIT_AURA"
140 140
 
141 141
 -- Druid 德鲁伊
142 142
 oUF.Tags.Methods['freebgrid:lb'] = function(u) -- 生命绽放
143  
-    local name, _,_, c,_,_, expirationTime, fromwho = UnitAura(u, GetSpellInfo(33763))
  143
+    local name, _,_, c,_,_, expirationTime, fromwho = UnitBuff(u, GetSpellInfo(33763))
144 144
     if(fromwho == "player") then
145 145
 		local spellTimer = (expirationTime-GetTime())
146 146
 		local TimeLeft = ns.FormatValue(spellTimer)
@@ -156,7 +156,7 @@ end
156 156
 oUF.Tags.Events['freebgrid:lb'] = "UNIT_AURA"
157 157
 
158 158
 oUF.Tags.Methods['freebgrid:rejuv'] = function(u) -- 回春
159  
-    local name, _,_,_,_,_, expirationTime, fromwho = UnitAura(u, GetSpellInfo(774))
  159
+    local name, _,_,_,_,_, expirationTime, fromwho = UnitBuff(u, GetSpellInfo(774))
160 160
     if(fromwho == "player") then
161 161
         local spellTimer = (expirationTime-GetTime())
162 162
 		local TimeLeft = ns.FormatValue(spellTimer)
@@ -168,7 +168,7 @@ end
168 168
 oUF.Tags.Events['freebgrid:rejuv'] = "UNIT_AURA"
169 169
 
170 170
 oUF.Tags.Methods['freebgrid:regrow'] = function(u) -- 愈合
171  
-	local name, _,_,_,_,_, expirationTime, fromwho = UnitAura(u, GetSpellInfo(8936))
  171
+	local name, _,_,_,_,_, expirationTime, fromwho = UnitBuff(u, GetSpellInfo(8936))
172 172
     if(fromwho == "player") then
173 173
         local spellTimer = (expirationTime-GetTime())
174 174
 		local TimeLeft = ns.FormatValue(spellTimer)
@@ -183,7 +183,7 @@ oUF.Tags.Events['freebgrid:regrow'] = "UNIT_AURA"
183 183
 
184 184
 -- Shaman 萨满
185 185
 oUF.Tags.Methods['freebgrid:ripTime'] = function(u) --激流
186  
-    local name, _,_,_,_,_, expirationTime, fromwho = UnitAura(u, GetSpellInfo(61295))
  186
+    local name, _,_,_,_,_, expirationTime, fromwho = UnitBuff(u, GetSpellInfo(61295))
187 187
     if(fromwho == "player") then
188 188
         local spellTimer = (expirationTime-GetTime())
189 189
 		local TimeLeft = ns.FormatValue(spellTimer)
@@ -201,12 +201,15 @@ end
201 201
 oUF.Tags.Events['freebgrid:earth'] = 'UNIT_AURA'
202 202
 
203 203
 -- Paladin 骑士
204  
-oUF.Tags.Methods['freebgrid:beacon'] = function(u) if UnitAura(u, GetSpellInfo(53563)) then return "|cffFFB90FO|r" end end --道标
  204
+oUF.Tags.Methods['freebgrid:beacon'] = function(u) if UnitBuff(u, GetSpellInfo(53563)) then return "|cffFFB90FO|r" end end --道标
205 205
 oUF.Tags.Events['freebgrid:beacon'] = "UNIT_AURA"
206 206
 
207 207
 oUF.Tags.Methods['freebgrid:forbearance'] = function(u) if UnitDebuff(u, GetSpellInfo(25771)) then return "|cffFF9900"..x.."|r" end end
208 208
 oUF.Tags.Events['freebgrid:forbearance'] = "UNIT_AURA" -- 自律
209 209
 
  210
+oUF.Tags.Methods['freebgrid:eternalflame'] = function(u) if UnitBuff(u, GetSpellInfo(114163)) then return "|cffFFD700"..x.."|r" end end
  211
+oUF.Tags.Events['freebgrid:eternalflame'] = "UNIT_AURA" -- 永恒之火
  212
+
210 213
 -- Monk 武僧
211 214
 oUF.Tags.Methods['freebgrid:zs'] = function(u) -- 禅意珠
212 215
     local name, _,_,_,_,_, expirationTime, fromwho = UnitAura(u, GetSpellInfo(124081))
@@ -252,7 +255,7 @@ classIndicators={
252 255
     },
253 256
     ["PALADIN"] = {
254 257
         ["TL"] = "",
255  
-        ["BR"] = "[mlight:SAI]",--mlight:Mastery]
  258
+        ["BR"] = "[freebgrid:eternalflame][mlight:SAI]",--mlight:Mastery]
256 259
         ["BL"] = "",
257 260
         ["TR"] = "[freebgrid:beacon]",
258 261
         ["Cen"] = "[freebgrid:forbearance]",

0 notes on commit 2e7758a

Please sign in to comment.
Something went wrong with that request. Please try again.