-
Notifications
You must be signed in to change notification settings - Fork 0
/
waCasterStats.lua
511 lines (424 loc) · 21.2 KB
/
waCasterStats.lua
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
-- Do not remove this comment, it is part of this trigger: ClassicGlobal
function()
if not (WeakAuras.CCSNextGlobalUpdate) then
WeakAuras.CCSNextGlobalUpdate = time() + 1;
WeakAuras.CCSPreviousGlobalResult = "Waiting for Update!";
return WeakAuras.CCSPreviousGlobalResult;
end
if (time() > WeakAuras.CCSNextGlobalUpdate) then
WeakAuras.CCSNextGlobalUpdate = time() + 1;
else
return "";
end
local playerClass, _, classID = UnitClass("player");
local _, powerTypeString = UnitPowerType("player");
-- Holds various colors used by the scripts
tblColors = { }
tblColors["Red"] = "|cFFFF0000";
tblColors["Yellow"] = "|cFFFFFF00";
tblColors["Green"] = "|cFF00FF00";
tblColors["Blue"] = "|cFF00D1FF";
tblColors["Purple"] = "|cFFC942FD";
tblColors["Shadow"] = "|cFFaa00ff";
-- Holds player stats information
tblPlayerStats = { }
tblPlayerStats["ID"] = classID;
tblPlayerStats["Class"] = playerClass;
tblPlayerStats["Level"] = UnitLevel("player");
tblPlayerStats["Resource"] = powerTypeString;
tblPlayerStats["Stamina"] = UnitStat("player", 3);
tblPlayerStats["Intellect"] = UnitStat("player", 4);
tblPlayerStats["Spirit"] = UnitStat("player", 5);
if (tblPlayerStats["Resource"] == "MANA") then
-- Spell Damage
tblPlayerStats["FireDMG"] = GetSpellBonusDamage(3);
tblPlayerStats["NatureDMG"] = GetSpellBonusDamage(4);
tblPlayerStats["FrostDMG"] = GetSpellBonusDamage(5);
tblPlayerStats["ShadowDMG"] = GetSpellBonusDamage(6);
tblPlayerStats["ArcaneDMG"] = GetSpellBonusDamage(7);
-- Spell Hit
tblPlayerStats["FireHit"] = 99 + GetSpellHitModifier();
tblPlayerStats["NatureHit"] = 99 + GetSpellHitModifier();
tblPlayerStats["FrostHit"] = 99 + GetSpellHitModifier();
tblPlayerStats["ShadowHit"] = 99 + GetSpellHitModifier();
tblPlayerStats["ArcaneHit"] = 99 + GetSpellHitModifier();
-- Spell Crit
tblPlayerStats["FireCrit"] = GetSpellCritChance(3);
tblPlayerStats["NatureCrit"] = GetSpellCritChance(4);
tblPlayerStats["FrostCrit"] = GetSpellCritChance(5);
tblPlayerStats["ShadowCrit"] = GetSpellCritChance(6);
tblPlayerStats["ArcaneCrit"] = GetSpellCritChance(7);
-- Spell Crit
tblPlayerStats["FireHitColor"] = "";
tblPlayerStats["NatureHitColor"] = "";
tblPlayerStats["FrostHitColor"] = "";
tblPlayerStats["ShadowHitColor"] = "";
tblPlayerStats["ArcaneHitColor"] = "";
end
tblClassRegen = { }
tblClassRegen[1] = {0, 0}; -- 1 Warrior
tblClassRegen[2] = {15, 5}; -- 2 Paladin
tblClassRegen[3] = {15, 5}; -- 3 Hunter
tblClassRegen[4] = {0, 0}; -- 4 Rogue
tblClassRegen[5] = {13,4}; -- 5 Priest
tblClassRegen[6] = {0, 0}; -- 6 ??
tblClassRegen[7] = {15, 5}; -- 7 Shaman
tblClassRegen[8] = {13, 4}; -- 8 Mage
tblClassRegen[9] = {8, 4}; -- 9 Warlock
tblClassRegen[10] = {0, 0}; -- 10 ??
tblClassRegen[11] = {0, 0}; -- 11 Druid
tblSpellHitPvE = {
0,
4,
5,
16,
27,
38,
}
tblSpellIcons = { };
tblSpellIcons["Fire"] = "|TInterface\\Icons\\spell_fire_flamebolt:18|t";
tblSpellIcons["Frost"] = "|TInterface\\Icons\\spell_frost_frostbolt02:18|t";
tblSpellIcons["Arcane"] = "|TInterface\\Icons\\spell_nature_starfall:18|t";
tblSpellIcons["Shadow"] = "|TInterface\\Icons\\spell_shadow_shadowbolt:18|t";
-- -----------------------------------------------------------
-- Below this line is for coding, Don't mess with it
-- -----------------------------------------------------------
if (UnitLevel("target")) then
tblPlayerStats["TargetLevel"] = UnitLevel("target");
else
tblPlayerStats["TargetLevel"] = 0;
end
tblPlayerStats["LevelDifference"] = tblPlayerStats["TargetLevel"] - tblPlayerStats["Level"];
if (tblPlayerStats["TargetLevel"] == 0) then
tblPlayerStats["LevelDifference"] = 0;
end
-- Handler for bosses (Seen as -1 by the game)
if (tblPlayerStats["TargetLevel"] == -1) then
tblPlayerStats["TargetLevel"] = tblPlayerStats["Level"] + 3;
tblPlayerStats["LevelDifference"] = tblPlayerStats["TargetLevel"] - tblPlayerStats["Level"];
end
end
-- Do not remove this comment, it is part of this trigger: ClassicLevelStats
function()
if (not aura_env.config["CCHideLevelStats"]) then
if (tblPlayerStats and tblColors) then
local RetVal = "";
local tblTextOut = { };
if (tblPlayerStats["LevelDifference"] <= 0) then
tblPlayerStats["LevelDifferenceColor"] = tblColors["Green"]
elseif (tblPlayerStats["LevelDifference"] == 1) then
tblPlayerStats["LevelDifferenceColor"] = tblColors["Green"]
elseif (tblPlayerStats["LevelDifference"] == 2) then
tblPlayerStats["LevelDifferenceColor"] = tblColors["Yellow"]
elseif (tblPlayerStats["LevelDifference"] == 3) then
tblPlayerStats["LevelDifferenceColor"] = tblColors["Yellow"]
elseif (tblPlayerStats["LevelDifference"] == 4) then
tblPlayerStats["LevelDifferenceColor"] = tblColors["Red"]
elseif (tblPlayerStats["LevelDifference"] >= 5) then
tblPlayerStats["LevelDifferenceColor"] = tblColors["Red"]
end
RetVal = "C (" .. tblPlayerStats["Level"] .. ") ";
RetVal = RetVal .. "T (" .. tblPlayerStats["TargetLevel"] .. ") ";
RetVal = RetVal .. "D (" .. tblPlayerStats["LevelDifferenceColor"] .. tblPlayerStats["LevelDifference"] .. "|r)";
return RetVal;
end
end
end
-- Do not remove this comment, it is part of this trigger: ClassicDurability
function()
if (not aura_env.config["CCHideDurability"]) then
if (tblPlayerStats and tblColors) then
if not (WeakAuras.CCSNextDuraUpdate) then
WeakAuras.CCSNextDuraUpdate = time() + 15;
WeakAuras.CCSPreviousDuraResult = "Waiting for Update!";
return WeakAuras.CCSPreviousDuraResult;
end
if (time() > WeakAuras.CCSNextDuraUpdate) then
WeakAuras.CCSNextDuraUpdate = time() + 15;
else
return WeakAuras.CCSPreviousDuraResult;
end
local RetVal = "";
local MaxDura = 0;
local CurDura = 0;
for i=1,19 do
local current, maximum = GetInventoryItemDurability(i);
if ((current) and (maximum)) then
MaxDura = MaxDura + maximum;
CurDura = CurDura + current;
end
end
local MyDura = tonumber(format("%.2f", ((CurDura/MaxDura)*100)));
local DuraColor = "";
if (MyDura == 100) then
DuraColor = tblColors["Blue"];
elseif ((MyDura >= 50) and (MyDura <= 99)) then
DuraColor = tblColors["Green"];
elseif ((MyDura < 50) and (MyDura > 20)) then
DuraColor = tblColors["Yellow"];
elseif (MyDura <= 20) then
DuraColor = tblColors["Red"];
end
RetVal = "Durability: " .. DuraColor .. MyDura .. "|r %";
WeakAuras.CCSPreviousDuraResult = RetVal;
return RetVal;
end
end
end
-- Do not remove this comment, it is part of this trigger: ClassicRegen
function()
if (not aura_env.config["CCHideRegen"]) then
if (tblClassRegen and tblPlayerStats) then
local RetVal = "";
tblPlayerStats["Casting"] = 0;
tblPlayerStats["Modifiers"] = 0;
tblPlayerStats["NotCasting"] = (tblClassRegen[tblPlayerStats["ID"]][1] + (UnitStat("player", 5) / tblClassRegen[tblPlayerStats["ID"]][2]));
for i=1,40 do
if (UnitBuff("player",i)) then
local buffName = select(1, UnitBuff("player",i))
-- Mage: Mage Armor (Flat 30%)
if (buffName == "Mage Armor") then
tblPlayerStats["Modifiers"] = tblPlayerStats["Modifiers"] + .30;
end
end
end
-- Go into the individual talents
if (tblPlayerStats["Class"] == "Mage") then
-- Arcane Meditation 5/10/15%
tblPlayerStats["Modifiers"] = tblPlayerStats["Modifiers"] + ((select(5, GetTalentInfo(1, 12)) * 5) / 100);
end
tblPlayerStats["Casting"] = tblPlayerStats["NotCasting"] * tblPlayerStats["Modifiers"];
if (GetManaRegen() < 1) then
RetVal = "MPT: " .. tblColors["Red"] .. format("%.0f", tblPlayerStats["NotCasting"]) .. " (NC)|r " .. tblColors["Green"] .. format("%.0f", tblPlayerStats["Casting"]) .. " (C)|r";
else
RetVal = "MPT: " .. tblColors["Green"] .. format("%.0f", tblPlayerStats["NotCasting"]) .. " (NC)|r " .. tblColors["Red"] .. format("%.0f", tblPlayerStats["Casting"]) .. " (C)|r";
end
return RetVal;
end
end
end
-- Do not remove this comment, it is part of this trigger: ClassicResistances
function ()
if (not aura_env.config["CCHideResist"]) then
if (tblColors and tblPlayerStats) then
if not (WeakAuras.CCSNextResistUpdate) then
WeakAuras.CCSNextResistUpdate = time() + 5;
WeakAuras.CCSPreviousResistResult = "Waiting for Update!";
return WeakAuras.CCSPreviousResistResult;
end
if (time() > WeakAuras.CCSNextResistUpdate) then
WeakAuras.CCSNextResistUpdate = time() + 5;
else
return WeakAuras.CCSPreviousResistResult;
end
local RetVal = "";
tblPlayerStats["FireRES"] = tblColors["Red"] .. select(2, UnitResistance("player", 2)) .. "|r";
tblPlayerStats["NatureRES"] = tblColors["Green"] .. select(2, UnitResistance("player", 3)) .. "|r";
tblPlayerStats["FrostRES"] = tblColors["Blue"] .. select(2, UnitResistance("player", 4)) .. "|r";
tblPlayerStats["ShadowRES"] = tblColors["Shadow"] .. select(2, UnitResistance("player", 5)) .. "|r";
tblPlayerStats["ArcaneRES"] = tblColors["Purple"] .. select(2, UnitResistance("player", 6)) .. "|r";
RetVal = "Your Resistances:\n " .. tblPlayerStats["FireRES"] .. " " .. tblPlayerStats["NatureRES"] .. " " .. tblPlayerStats["FrostRES"] .. " " .. tblPlayerStats["ShadowRES"] .. " " .. tblPlayerStats["ArcaneRES"];
WeakAuras.CCSPreviousResistResult = RetVal;
return RetVal;
end
end
end
-- Do not remove this comment, it is part of this trigger: ClassicDebuffs
function()
if (not aura_env.config["CCHideDebuffs"]) then
if (tblColors and tblPlayerStats) then
local RetVal = "";
local tblTextOut = { };
local Debuffs=0
local colorDebuff = tblColors["Green"];
local dCOS = tblColors["Red"];
local dCOE = tblColors["Red"];
local dCOR = tblColors["Red"];
local dWC = tblColors["Red"];
local dSV = tblColors["Red"];
local dFF = tblColors["Red"];
for i=1,40 do
local D = UnitDebuff("target",i);
if D then
Debuffs = Debuffs + 1
if (D == "Curse of the Elements") then
dCOE = tblColors["Green"];
end
if (D == "Curse of Shadow") then
dCOS = tblColors["Green"];
end
if (D == "Winter's Chill") then
dWC = tblColors["Green"];
end
if (D == "Curse of Recklessness") then
dCOR = tblColors["Green"];
end
if (D == "Shadow Vulnerability") then
dSV = tblColors["Green"];
end
if (D == "Faerie Fire") then
dFF = tblColors["Green"];
end
end
end
if (Debuffs < 25) then
colorDebuff = tblColors["Green"]
elseif (Debuffs >= 25 and Debuffs <= 35) then
colorDebuff = tblColors["Yellow"]
elseif (Debuffs > 35) then
colorDebuff = tblColors["Red"]
end
RetVal = "Debuffs: " .. colorDebuff .. Debuffs .. "|r/40\n";
RetVal = RetVal .. dCOE .. " CoE|r " .. dCOS .. "CoS|r " .. dCOR .. "CoR|r " .. dWC .. "WC|r " .. dSV .. "SV|r " .. dFF .. "FF|r";
return RetVal;
end
end
end
-- Do not remove this comment, it is part of this trigger: ClassicMageStats
function ()
if not (WeakAuras.CCSNextUpdate) then
WeakAuras.CCSNextUpdate = time() + 2;
WeakAuras.CCSPreviousResult = "Waiting for Update!";
return WeakAuras.CCSPreviousResult;
end
if (time() > WeakAuras.CCSNextUpdate) then
WeakAuras.CCSNextUpdate = time() + 2;
else
return WeakAuras.CCSPreviousResult;
end
local HitRequired = 0;
local RetVal = "";
local tblTextOut = { };
if (tblPlayerStats["LevelDifference"] <= 0) then
HitRequired = tblSpellHitPvE[1]
elseif (tblPlayerStats["LevelDifference"] >= 1 and tblPlayerStats["LevelDifference"] <= 4) then
HitRequired = tblSpellHitPvE[tblPlayerStats["LevelDifference"] + 1]
elseif (tblPlayerStats["LevelDifference"] >= 5) then
HitRequired = tblSpellHitPvE[6]
end
tblTextOut[1] = tblColors["Blue"] .. tblPlayerStats["Class"] .. "|r Stats:";
-------------------------------------------------------
-- Spell Damage Calculations
tblTextOut[2] = "+Spell Damage:\n\n " .. tblSpellIcons["Arcane"] .. " " .. tblPlayerStats["ArcaneDMG"] .. tblSpellIcons["Fire"] .. " " .. tblPlayerStats["FireDMG"] .. tblSpellIcons["Frost"] .. " " .. tblPlayerStats["FrostDMG"];
-------------------------------------------------------
-- Crit Calculations
tblTextOut[3] = "Crit Chances:\n\n " .. tblSpellIcons["Arcane"] .. " " .. format("%.2f", tblPlayerStats["ArcaneCrit"]) .. "% " .. tblSpellIcons["Fire"] .. " " .. format("%.2f", tblPlayerStats["FireCrit"]) .. "% " .. tblSpellIcons["Frost"] .. " " .. format("%.2f", tblPlayerStats["FrostCrit"]) .. "|r% ";
-------------------------------------------------------
-- Hit Calculations
tblPlayerStats["FireHit"] = tblPlayerStats["FireHit"] - HitRequired;
tblPlayerStats["FrostHit"] = tblPlayerStats["FrostHit"] - HitRequired;
tblPlayerStats["ArcaneHit"] = tblPlayerStats["ArcaneHit"] - HitRequired;
-- From Talents
-- Elemental Precision 2/4/6% hit
if ((select(5, GetTalentInfo(3, 3))) > 0) then
tblPlayerStats["FireHit"] = (tblPlayerStats["FireHit"] + (select(5, GetTalentInfo(3, 3)) * 2));
tblPlayerStats["FrostHit"] = (tblPlayerStats["FrostHit"] + (select(5, GetTalentInfo(3, 3)) * 2));
end
-- Arcane Focus 2/4/6/8/10% Hit
if ((select(5, GetTalentInfo(1, 2))) > 0) then
tblPlayerStats["ArcaneHit"] = tblPlayerStats["ArcaneHit"] + (select(5, GetTalentInfo(3, 3)) * 2);
end
if (tblPlayerStats["FrostHit"] >= 99) then
tblPlayerStats["FrostHit"] = 99;
tblPlayerStats["FrostHitColor"] = tblColors["Green"];
elseif (tblPlayerStats["FrostHit"] < 99 and tblPlayerStats["FrostHit"] > 80) then
tblPlayerStats["FrostHitColor"] = tblColors["Yellow"];
elseif (tblPlayerStats["FrostHit"] <= 80) then
tblPlayerStats["FrostHitColor"] = tblColors["Red"];
end
if (tblPlayerStats["FireHit"] >= 99) then
tblPlayerStats["FireHit"] = 99;
tblPlayerStats["FireHitColor"] = tblColors["Green"];
elseif (tblPlayerStats["FireHit"] < 99 and tblPlayerStats["FireHit"] > 80) then
tblPlayerStats["FireHitColor"] = tblColors["Yellow"];
elseif (tblPlayerStats["FireHit"] <= 80) then
tblPlayerStats["FireHitColor"] = tblColors["Red"];
end
if (tblPlayerStats["ArcaneHit"] >= 99) then
tblPlayerStats["ArcaneHit"] = 99
tblPlayerStats["ArcaneHitColor"] = tblColors["Green"]
elseif (tblPlayerStats["ArcaneHit"] < 99 and tblPlayerStats["ArcaneHit"] > 80) then
tblPlayerStats["ArcaneHitColor"] = tblColors["Yellow"]
elseif (tblPlayerStats["ArcaneHit"] <= 80) then
tblPlayerStats["ArcaneHitColor"] = tblColors["Red"]
end
tblTextOut[4] = "Hit Chances:\n\n " .. tblSpellIcons["Arcane"] .. " " .. tblPlayerStats["ArcaneHitColor"] .. tblPlayerStats["ArcaneHit"] .. "|r% ";
tblTextOut[4] = tblTextOut[4] .. tblSpellIcons["Fire"] .. " " .. tblPlayerStats["FireHitColor"] .. tblPlayerStats["FireHit"] .. "|r% ";
tblTextOut[4] = tblTextOut[4] .. tblSpellIcons["Frost"] .. " " .. tblPlayerStats["FrostHitColor"] .. tblPlayerStats["FrostHit"] .. "|r% ";
for i=1,20 do
if (tblTextOut[i]) then
RetVal = RetVal .. tblTextOut[i] .. "\n";
end
end
WeakAuras.CCSPreviousResult = RetVal;
return RetVal;
end
-- Do not remove this comment, it is part of this trigger: ClassicWarlockStats
function ()
if not (WeakAuras.CCSNextUpdate) then
WeakAuras.CCSNextUpdate = time() + 2;
WeakAuras.CCSPreviousResult = "Waiting for Update!";
return WeakAuras.CCSPreviousResult;
end
if (time() > WeakAuras.CCSNextUpdate) then
WeakAuras.CCSNextUpdate = time() + 2;
else
return WeakAuras.CCSPreviousResult;
end
local HitRequired = 0;
local RetVal = "";
local tblTextOut = { };
if (tblPlayerStats["LevelDifference"] <= 0) then
HitRequired = tblSpellHitPvE[1]
elseif (tblPlayerStats["LevelDifference"] >= 1 and tblPlayerStats["LevelDifference"] <= 4) then
HitRequired = tblSpellHitPvE[tblPlayerStats["LevelDifference"] + 1]
elseif (tblPlayerStats["LevelDifference"] >= 5) then
HitRequired = tblSpellHitPvE[6]
end
tblTextOut[1] = tblColors["Purple"] .. tblPlayerStats["Class"] .. "|r Stats:";
-------------------------------------------------------
-- Spell Damage Calculations
tblTextOut[2] = "+Spell Damage:\n\n " .. tblSpellIcons["Fire"] .. " " .. tblPlayerStats["FireDMG"] .. tblSpellIcons["Shadow"] .. " " .. tblPlayerStats["ShadowDMG"];
-------------------------------------------------------
-- Crit Calculations
-- Suppression 2/4/6/8/10% Hit
-- Devastation 1/2/3/4/5% Crit
if ((select(5, GetTalentInfo(3, 7))) > 0) then
tblPlayerStats["ShadowCrit"] = tblPlayerStats["ShadowCrit"] + (select(5, GetTalentInfo(3, 7)));
tblPlayerStats["FireCrit"] = tblPlayerStats["FireCrit"] + (select(5, GetTalentInfo(3, 7)));
end
tblTextOut[3] = "Crit Chances:\n\n " .. tblSpellIcons["Fire"] .. " " .. format("%.2f", tblPlayerStats["FireCrit"]) .. "% " .. tblSpellIcons["Shadow"] .. " " .. format("%.2f", tblPlayerStats["ShadowCrit"]) .. "|r% ";
-------------------------------------------------------
-- Hit Calculations
tblPlayerStats["FireHit"] = tblPlayerStats["FireHit"] - HitRequired;
tblPlayerStats["ShadowHit"] = tblPlayerStats["ShadowHit"] - HitRequired;
if ((select(5, GetTalentInfo(1, 1))) > 0) then
tblPlayerStats["ShadowHit"] = (tblPlayerStats["ShadowHit"] + (select(5, GetTalentInfo(1, 1)) * 2));
end
if (tblPlayerStats["FireHit"] >= 99) then
tblPlayerStats["FireHit"] = 99;
tblPlayerStats["FireHitColor"] = tblColors["Green"];
elseif (tblPlayerStats["FireHit"] < 99 and tblPlayerStats["FireHit"] > 80) then
tblPlayerStats["FireHitColor"] = tblColors["Yellow"];
elseif (tblPlayerStats["FireHit"] <= 80) then
tblPlayerStats["FireHitColor"] = tblColors["Red"];
end
if (tblPlayerStats["ShadowHit"] >= 99) then
tblPlayerStats["ShadowHit"] = 99;
tblPlayerStats["ShadowHitColor"] = tblColors["Green"];
elseif (tblPlayerStats["ShadowHit"] < 99 and tblPlayerStats["ShadowHit"] > 80) then
tblPlayerStats["ShadowHitColor"] = tblColors["Yellow"];
elseif (tblPlayerStats["ShadowHit"] <= 80) then
tblPlayerStats["ShadowHitColor"] = tblColors["Red"];
end
tblTextOut[4] = "Hit Chances:\n\n ";
tblTextOut[4] = tblTextOut[4] .. tblSpellIcons["Fire"] .. " " .. tblPlayerStats["FireHitColor"] .. tblPlayerStats["FireHit"] .. "|r% ";
tblTextOut[4] = tblTextOut[4] .. tblSpellIcons["Shadow"] .. " " .. tblPlayerStats["ShadowHitColor"] .. tblPlayerStats["ShadowHit"] .. "|r% ";
for i=1,20 do
if (tblTextOut[i]) then
RetVal = RetVal .. tblTextOut[i] .. "\n";
end
end
WeakAuras.CCSPreviousResult = RetVal;
return RetVal;
end