vanilla-wow-addons – Blame information for rev 1

Subversion Repositories:
Rev:
Rev Author Line No. Line
1 office 1 AdWSSettings = {DamageBonus = 1.3, ACPreset= "No Reduction", AClass=0, ACReduction=0, cAP=0};
2 AdWSWarrior = {Build = "arms", Crit = 2.2, OffHand = 0.5, THSpec = 1, Sspec = "on"};
3 AdWSRogue = {Lethality = 2.3, ImpEvi = 1.15, OffHand = 0.75, Aggression = 1.06, Opportunity = 1.20};
4  
5  
6 local AdWS_Hook = {
7 AuctionFrame_LoadUI = AuctionFrame_LoadUI,
8  
9 SetItemRef = SetItemRef,
10 ContainerFrameItemButton_OnEnter = ContainerFrameItemButton_OnEnter,
11 ContainerFrame_Update = ContainerFrame_Update,
12 AuctionFrameItem_OnEnter = nil,
13  
14 SetInventoryItem = GameTooltip.SetInventoryItem,
15 SetLootItem = GameTooltip.SetLootItem,
16  
17 SetMerchantItem = GameTooltip.SetMerchantItem,
18  
19 SetMerchantCompareItem1 = ShoppingTooltip1.SetMerchantCompareItem,
20 SetAuctionCompareItem1 = ShoppingTooltip1.SetAuctionCompareItem,
21  
22 SetMerchantCompareItem2 = ShoppingTooltip2.SetMerchantCompareItem,
23 SetAuctionCompareItem2 = ShoppingTooltip2.SetAuctionCompareItem,
24 };
25  
26 --===================================================================================================================--
27  
28 function AdWS_OnLoad()
29 SlashCmdList[ "ADWS" ] = AdWS_SlashHandler;
30 SLASH_ADWS1 = "/adws";
31 ChatFrame1:AddMessage( "Advanced Weapon Stats loaded. Type /adws for more information." );
32 end
33  
34 --===================================================================================================================--
35  
36 function AdWS_GetCmd(msg)
37 if msg then
38 local a,b,c=strfind(msg, "(%S+)"); --contiguous string of non-space characters
39 if a then return c, strsub(msg, b+2); else return ""; end
40 end
41 end
42  
43 function AdWS_GetArgument(msg)
44 if msg then
45 local a,b=strfind(msg, "=");
46 if a then return strsub(msg,1,a-1), strsub(msg, b+1); else return ""; end
47 end
48 end
49  
50 --============================================================================================
51  
52 function AdWS_SlashHandler(msg)
53 local Cmd, SubCmd = AdWS_GetCmd(msg); --call to above function
54  
55 if (Cmd == "settings") then AdWS_DisplaySettings();
56  
57 elseif (Cmd == "help") then AdWS_DisplayHelp();
58  
59 elseif (Cmd == "damagebonus") then
60 if (SubCmd == "") then
61 ChatFrame1:AddMessage("[Help] Damage Bonus");
62 ChatFrame1:AddMessage( "Usage: /adws damagebonus 1.25 - which means 125 % Damage Bonus (ie. Enrage)" );
63 else
64 AdWSSettings.DamageBonus = SubCmd;
65 ChatFrame1:AddMessage("Custom Damage bonus multiplier set to "..SubCmd);
66 end;
67  
68 elseif (Cmd == "warrioroffhand") then
69 if (SubCmd == "") then
70 ChatFrame1:AddMessage("[Help] Warrior OffHand handicap");
71 ChatFrame1:AddMessage("0.500 - Default");
72 ChatFrame1:AddMessage("0.525 - DW Spec 1/5 (5 %)");
73 ChatFrame1:AddMessage("0.550 - DW Spec 2/5 (10 %)");
74 ChatFrame1:AddMessage("0.575 - DW Spec 3/5 (15 %)");
75 ChatFrame1:AddMessage("0.600 - DW Spec 4/5 (20 %)");
76 ChatFrame1:AddMessage("0.625 - DW Spec 5/5 (25 %)");
77 ChatFrame1:AddMessage( "Usage: /adws warrioroffhand 0.575" );
78 else
79 AdWSWarrior.OffHand = SubCmd;
80 ChatFrame1:AddMessage("Warrior OffHand handicap set to "..SubCmd);
81 end;
82  
83 elseif (Cmd == "cap") then
84 if (SubCmd == "") then
85 ChatFrame1:AddMessage("[Help] Custom Attack Power Bonus");
86 ChatFrame1:AddMessage("25 - Elixir of Giants (Rogue)");
87 ChatFrame1:AddMessage("50 - Elixir of Giants (Warrior)");
88 ChatFrame1:AddMessage("40 - Juju Might");
89 ChatFrame1:AddMessage("140 - Onyxia Buff");
90 ChatFrame1:AddMessage("x - Your own Buff ;)");
91 ChatFrame1:AddMessage( "Usage: /adws cap 140" );
92 else
93 AdWSSettings.cAP = SubCmd;
94 ChatFrame1:AddMessage("Custom +Attack Power bonus set to "..SubCmd);
95 end;
96  
97 elseif (Cmd == "rogueoffhand") then
98 if (SubCmd == "") then
99 ChatFrame1:AddMessage("[Help] Rogue OffHand handicap");
100 ChatFrame1:AddMessage("0.50 - Default");
101 ChatFrame1:AddMessage("0.55 - DW Spec 1/5 (10 %)");
102 ChatFrame1:AddMessage("0.60 - DW Spec 2/5 (20 %)");
103 ChatFrame1:AddMessage("0.65 - DW Spec 3/5 (30 %)");
104 ChatFrame1:AddMessage("0.70 - DW Spec 4/5 (40 %)");
105 ChatFrame1:AddMessage("0.75 - DW Spec 5/5 (50 %)");
106 ChatFrame1:AddMessage( "Usage: /adws rogueoffhand 0.60" );
107 else
108 AdWSRogue.OffHand = SubCmd;
109 ChatFrame1:AddMessage("Rogue OffHand handicap set to "..SubCmd);
110 end;
111  
112 elseif (Cmd == "lethality") then
113 if (SubCmd == "") then
114 ChatFrame1:AddMessage("[Help] Rogue Lethality");
115 ChatFrame1:AddMessage("2.00 - Default (200 %)");
116 ChatFrame1:AddMessage("2.06 - Lethality 1/5 (206 %)");
117 ChatFrame1:AddMessage("2.12 - Lethality 2/5 (212 %)");
118 ChatFrame1:AddMessage("2.18 - Lethality 3/5 (218 %)");
119 ChatFrame1:AddMessage("2.24 - Lethality 4/5 (224 %)");
120 ChatFrame1:AddMessage("2.30 - Lethality 5/5 (230 %)");
121 ChatFrame1:AddMessage( "Usage: /adws lethality 2.30" );
122 else
123 AdWSRogue.Lethality = SubCmd;
124 ChatFrame1:AddMessage("Rogue Lethality bonus set to "..SubCmd);
125 end;
126  
127 elseif (Cmd == "impevi") then
128 if (SubCmd == "") then
129 ChatFrame1:AddMessage("[Help] Rogue Improved Eviscerate");
130 ChatFrame1:AddMessage("1.00 - Default");
131 ChatFrame1:AddMessage("1.05 - Improved Eviscerate 1/3 (5 %)");
132 ChatFrame1:AddMessage("1.10 - Improved Eviscerate 2/3 (10 %)");
133 ChatFrame1:AddMessage("1.15 - Improved Eviscerate 3/3 (15 %)");
134 ChatFrame1:AddMessage( "Usage: /adws impevi 1.15" );
135 else
136 AdWSRogue.ImpEvi = SubCmd;
137 ChatFrame1:AddMessage("Rogue Improved Eviscerate bonus set to "..SubCmd);
138 end;
139  
140 elseif (Cmd == "aggression") then
141 if (SubCmd == "") then
142 ChatFrame1:AddMessage("[Help] Rogue Improved Eviscerate");
143 ChatFrame1:AddMessage("1.00 - Default");
144 ChatFrame1:AddMessage("1.02 - Aggression 1/3 (2 %)");
145 ChatFrame1:AddMessage("1.04 - Aggression 2/3 (4 %)");
146 ChatFrame1:AddMessage("1.06 - Aggression 3/3 (6 %)");
147 ChatFrame1:AddMessage( "Usage: /adws aggression 1.06" );
148 else
149 AdWSRogue.Aggression = SubCmd;
150 ChatFrame1:AddMessage("Rogue Aggression bonus set to "..SubCmd);
151 end;
152  
153 elseif (Cmd == "opportunity") then
154 if (SubCmd == "") then
155 ChatFrame1:AddMessage("[Help] Rogue Opportunity");
156 ChatFrame1:AddMessage("1.00 - Default");
157 ChatFrame1:AddMessage("1.02 - Opportunity 1/5 (4 %)");
158 ChatFrame1:AddMessage("1.04 - Opportunity 2/5 (8 %)");
159 ChatFrame1:AddMessage("1.06 - Opportunity 3/5 (12 %)");
160 ChatFrame1:AddMessage("1.06 - Opportunity 4/5 (16 %)");
161 ChatFrame1:AddMessage("1.06 - Opportunity 5/5 (20 %)");
162 ChatFrame1:AddMessage( "Usage: /adws opportunity 1.20" );
163 else
164 AdWSRogue.Opportunity = SubCmd;
165 ChatFrame1:AddMessage("Rogue Opportunity bonus set to "..SubCmd);
166 end;
167  
168 elseif (Cmd == "warriorcrit") then
169 if (SubCmd == "impale") then
170 AdWSWarrior.Crit = 2.2;
171 ChatFrame1:AddMessage("Warrior Critical Strike bonus set to 2.2 (220 %)");
172 elseif (SubCmd == "noimpale") then
173 AdWSWarrior.Crit = 2.0;
174 ChatFrame1:AddMessage("Warrior Critical Strike bonus set to 2.0 (200 %)");
175 else
176 ChatFrame1:AddMessage("[Help] Warrior Critical Strike");
177 ChatFrame1:AddMessage( "Usage: /adws warriorcrit impale - 220 % Crit Bonus" );
178 ChatFrame1:AddMessage( "Usage: /adws warriorcrit noimpale - 200 % Crit Bonus" );
179 end;
180  
181 elseif (Cmd == "swordspec") then
182 if (SubCmd == "on") then
183 AdWSWarrior.Sspec = "on";
184 ChatFrame1:AddMessage("Sword Specialization proc stats ON");
185 elseif (SubCmd == "off") then
186 AdWSWarrior.Sspec = "off";
187 ChatFrame1:AddMessage("Sword Specialization proc stats OFF");
188 else
189 ChatFrame1:AddMessage("[Help] Warrior Sword Spec Proc");
190 ChatFrame1:AddMessage( "Usage: /adws swordspec on - Enable Sword Spec stats" );
191 ChatFrame1:AddMessage( "Usage: /adws swordspec off - Disable Sword Spec stats" );
192 end;
193  
194 elseif (Cmd == "2hspec") then
195 if (SubCmd == "") then
196 ChatFrame1:AddMessage("[Help] Warrior 2H Spec");
197 ChatFrame1:AddMessage("1.00 - Default");
198 ChatFrame1:AddMessage("1.01 - 2H Specialisation 1/5 (1 %)");
199 ChatFrame1:AddMessage("1.02 - 2H Specialisation 2/5 (2 %)");
200 ChatFrame1:AddMessage("1.03 - 2H Specialisation 3/5 (3 %)");
201 ChatFrame1:AddMessage("1.04 - 2H Specialisation 4/5 (4 %)");
202 ChatFrame1:AddMessage("1.05 - 2H Specialisation 5/5 (5 %)");
203 ChatFrame1:AddMessage( "Usage: /adws 2hspec 1.05" );
204 else
205 AdWSWarrior.THSpec = SubCmd;
206 ChatFrame1:AddMessage("Warrior 2H Specialisation bonus set to "..SubCmd);
207 end;
208  
209 elseif (Cmd == "warriorbuild") then
210 if (SubCmd == "fury") then
211 AdWSWarrior.Build = SubCmd;
212 ChatFrame1:AddMessage("Bloodthirst stats ON");
213 elseif (SubCmd == "arms") then
214 AdWSWarrior.Build = SubCmd;
215 ChatFrame1:AddMessage("Mortal Strike stats ON");
216 else
217 ChatFrame1:AddMessage("[Help] Warrior Build");
218 ChatFrame1:AddMessage( "Usage: /adws warriorbuild arms - Show Mortal Strike" );
219 ChatFrame1:AddMessage( "Usage: /adws warriorcrit fury - Show Bloodthirst" );
220 end;
221  
222 elseif (Cmd == "ac") then
223 if (SubCmd == "mager14") then
224 AdWSSettings.AClass = 706;
225 AdWSSettings.ACReduction = 0.114;
226 AdWSSettings.ACPreset= "Mage Rank 14";
227 ChatFrame1:AddMessage("AC Reduction set to: Mage Rank14 Preset");
228 elseif (SubCmd == "mager14b") then
229 AdWSSettings.AClass = 1266;
230 AdWSSettings.ACReduction = 0.187;
231 AdWSSettings.ACPreset= "Mage Rank 14 B";
232 ChatFrame1:AddMessage("AC Reduction set to: Mage Rank14 Buffed Preset");
233 elseif (SubCmd == "tankt2prot") then
234 AdWSSettings.AClass = 9044;
235 AdWSSettings.ACReduction = 0.622;
236 AdWSSettings.ACPreset= "Tank Tier2 Prot";
237 ChatFrame1:AddMessage("AC Reduction set to: Tank Tier2 Prot Preset");
238 elseif (SubCmd == "shamt1") then
239 AdWSSettings.AClass = 5401;
240 AdWSSettings.ACReduction = 0.495;
241 AdWSSettings.ACPreset= "Shaman Tier1";
242 ChatFrame1:AddMessage("AC Reduction set to: Shaman Tier1 Preset");
243  
244 elseif (SubCmd == "roguet2") then
245 AdWSSettings.AClass = 2170;
246 AdWSSettings.ACReduction = 0.2829;
247 AdWSSettings.ACPreset= "Rogue Tier2";
248 ChatFrame1:AddMessage("AC Reduction set to: Rogue Tier2 Preset");
249  
250 elseif (SubCmd == "huntert2") then
251 AdWSSettings.AClass = 4327;
252 AdWSSettings.ACReduction = 0.4403;
253 AdWSSettings.ACPreset= "Hunter Tier2";
254 ChatFrame1:AddMessage("AC Reduction set to: Hunter Tier2 Preset");
255  
256 elseif (SubCmd == "maget2") then
257 AdWSSettings.AClass = 787;
258 AdWSSettings.ACReduction = 0.1252;
259 AdWSSettings.ACPreset= "Mage Tier2";
260 ChatFrame1:AddMessage("AC Reduction set to: Mage Tier2 Unbuff Preset");
261  
262 elseif (SubCmd == "priestt2") then
263 AdWSSettings.AClass = 790;
264 AdWSSettings.ACReduction = 0.1256;
265 AdWSSettings.ACPreset= "Priest Tier2";
266 ChatFrame1:AddMessage("AC Reduction set to: Priest Tier2 Preset");
267  
268 elseif (SubCmd == "priestt2b") then
269 AdWSSettings.AClass = 2185;
270 AdWSSettings.ACReduction = 0.2843;
271 AdWSSettings.ACPreset= "Priest Tier2 B";
272 ChatFrame1:AddMessage("AC Reduction set to: Priest Tier2 Inner Fire Preset");
273  
274 elseif (SubCmd == "warrfury") then
275 AdWSSettings.AClass = 5017;
276 AdWSSettings.ACReduction = 0.477;
277 AdWSSettings.ACPreset= "Warrior Fury";
278 ChatFrame1:AddMessage("AC Reduction set to: Warrior Fury (BWL level) Preset");
279 elseif (SubCmd == "nored") then
280 AdWSSettings.AClass = 0;
281 AdWSSettings.ACReduction = 0;
282 AdWSSettings.ACPreset= "No Reduction";
283 ChatFrame1:AddMessage("AC Reduction set to: No Reduction Preset");
284 else
285 ChatFrame1:AddMessage( "[Help] Damage Reductions");
286 ChatFrame1:AddMessage( "Usage: /adws ac mager14 - Mage Rank 14" );
287 ChatFrame1:AddMessage( "Usage: /adws ac mager14b - Mage Rank 14 Buffed" );
288 ChatFrame1:AddMessage( "Usage: /adws ac shamt1 - Shaman Tier1 Set + Shield" );
289 ChatFrame1:AddMessage( "Usage: /adws ac tankt2prot - Tank Tier II Prot" );
290 ChatFrame1:AddMessage( "Usage: /adws ac warrfury - Warrior Fury (BWL level)" );
291  
292 ChatFrame1:AddMessage( "Usage: /adws ac roguet2 - Rogue Tier2 Set" );
293 ChatFrame1:AddMessage( "Usage: /adws ac huntert2 - Hunter Tier2 Set" );
294 ChatFrame1:AddMessage( "Usage: /adws ac maget2 - Mage Tier2 Set" );
295 ChatFrame1:AddMessage( "Usage: /adws ac priestt2 - Priest Tier2 Set" );
296 ChatFrame1:AddMessage( "Usage: /adws ac priestt2b - Priest Tier2 Set Buffed" );
297  
298 end;
299 else
300 AdWS_DisplayHelp();
301 end;
302 end;
303  
304 --============================================================================================
305  
306 function AdWS_DisplaySettings()
307 ChatFrame1:AddMessage( "..:: Advanced Weapon Stats Settings ::..",1.0, 0.85, 0.33);
308 ChatFrame1:AddMessage( "=== General Settings ===",1.0, 0.85, 0.33);
309  
310 ChatFrame1:AddMessage( "Damage bonus multiplier = "..AdWSSettings.DamageBonus,0.66,1,0.96 );
311 ChatFrame1:AddMessage( "Custom Attack Power bonus = "..AdWSSettings.cAP,0.66,1,0.96 );
312 ChatFrame1:AddMessage( "Armor Class reduction = "..AdWSSettings.ACPreset,0.66,1,0.96 );
313  
314 ChatFrame1:AddMessage( "=== Warrior Settings ===",1.0, 0.85, 0.33);
315  
316 if (AdWSWarrior.Build=="arms") then
317 ChatFrame1:AddMessage( "Show Mortal Strike stats",0.66,1,0.96 );
318 else
319 ChatFrame1:AddMessage( "Show Bloodthirst stats",0.66,1,0.96 );
320 end
321  
322 ChatFrame1:AddMessage( "Warrior Sword Spec proc display = "..AdWSWarrior.Sspec,0.66,1,0.96 );
323 ChatFrame1:AddMessage( "Warrior Critical Strike bonus = "..AdWSWarrior.Crit,0.66,1,0.96 );
324 ChatFrame1:AddMessage( "Warrior 2Hand Spec bonus = "..AdWSWarrior.THSpec,0.66,1,0.96 );
325 ChatFrame1:AddMessage( "Warrior OffHand Weapon handicap = "..AdWSWarrior.OffHand,0.66,1,0.96 );
326  
327 ChatFrame1:AddMessage( "=== Rogue Settings ===",1.0, 0.85, 0.33);
328 ChatFrame1:AddMessage( "Rogue Lethality bonus = "..AdWSRogue.Lethality,0.66,1,0.96 );
329 ChatFrame1:AddMessage( "Rogue Opportunity bonus = "..AdWSRogue.Opportunity,0.66,1,0.96 );
330 ChatFrame1:AddMessage( "Rogue Aggression bonus = "..AdWSRogue.Aggression,0.66,1,0.96 );
331 ChatFrame1:AddMessage( "Rogue Eviscerate bonus = "..AdWSRogue.ImpEvi,0.66,1,0.96 );
332 ChatFrame1:AddMessage( "Rogue OffHand Weapon handicap = "..AdWSRogue.OffHand,0.66,1,0.96 );
333 end
334  
335 --============================================================================================
336  
337 function AdWS_DisplayHelp()
338 ChatFrame1:AddMessage( "..:: Advanced Weapon Stats - Help ::..",1.0, 0.85, 0.33);
339 ChatFrame1:AddMessage( "=== General ===",1.0, 0.85, 0.33);
340  
341 ChatFrame1:AddMessage( "Show current settings",0.66,1,0.96 );
342 ChatFrame1:AddMessage( "Usage: /adws settings" );
343 ChatFrame1:AddMessage( "Set Custom Damage bonus ie. 1.25 = Enrage",0.66,1,0.96 );
344 ChatFrame1:AddMessage( "Usage: /adws damagebonus" );
345 ChatFrame1:AddMessage( "Set Custom Attack Power bonus",0.66,1,0.96 );
346 ChatFrame1:AddMessage( "Usage: /adws cap" );
347 ChatFrame1:AddMessage( "Set AC Reduction Level",0.66,1,0.96);
348 ChatFrame1:AddMessage( "Usage: /adws ac" );
349  
350 ChatFrame1:AddMessage( "=== Warrior ===",1.0, 0.85, 0.33);
351  
352 ChatFrame1:AddMessage( "Show Mortal Strike stats",0.66,1,0.96 );
353 ChatFrame1:AddMessage( "Usage: /adws warriorbuild" );
354 ChatFrame1:AddMessage( "Set Warrior Critical Strike bonus",0.66,1,0.96 );
355 ChatFrame1:AddMessage( "Usage: /adws warriorcrit" );
356 ChatFrame1:AddMessage( "Set Warrior 2Hand Spec bonus",0.66,1,0.96 );
357 ChatFrame1:AddMessage( "Usage: /adws 2hspec" );
358 ChatFrame1:AddMessage( "Set Warrior OffHand handicap",0.66,1,0.96 );
359 ChatFrame1:AddMessage( "Usage: /adws warrioroffhand" );
360 ChatFrame1:AddMessage( "Set Warrior Sword Spec proc display",0.66,1,0.96 );
361 ChatFrame1:AddMessage( "Usage: /adws swordspec" );
362  
363 ChatFrame1:AddMessage( "=== Rogue ===",1.0, 0.85, 0.33);
364  
365 ChatFrame1:AddMessage( "Set Rogue Lethality bonus",0.66,1,0.96 );
366 ChatFrame1:AddMessage( "Usage: /adws lethality" )
367 ChatFrame1:AddMessage( "Set Rogue Opportunity bonus",0.66,1,0.96 );
368 ChatFrame1:AddMessage( "Usage: /adws opportunity" )
369 ChatFrame1:AddMessage( "Set Rogue Aggression bonus",0.66,1,0.96 );
370 ChatFrame1:AddMessage( "Usage: /adws aggression" )
371 ChatFrame1:AddMessage( "Set Rogue Eviscerate bonus",0.66,1,0.96 );
372 ChatFrame1:AddMessage( "Usage: /adws impevi" )
373 ChatFrame1:AddMessage( "Set Rogue OffHand handicap",0.66,1,0.96 );
374 ChatFrame1:AddMessage( "Usage: /adws rogueoffhand" )
375 end
376  
377 --===================================================================================================================--
378  
379 function AuctionFrame_LoadUI ()
380 AdWS_Hook.AuctionFrame_LoadUI ();
381  
382 if (not AdWS_Hook.AuctionFrameItem_OnEnter) then
383 AdWS_Hook.AuctionFrameItem_OnEnter = AuctionFrameItem_OnEnter;
384 AuctionFrameItem_OnEnter = function (type, index)
385 AdWS_Hook.AuctionFrameItem_OnEnter (type, index);
386 AdWS_CheckTooltipInfo (GameTooltip);
387 end;
388 end
389 end
390  
391 function SetItemRef (link, text, button)
392 AdWS_Hook.SetItemRef (link, text, button);
393 AdWS_CheckTooltipInfo (ItemRefTooltip);
394 end
395  
396 function ContainerFrameItemButton_OnEnter ()
397 AdWS_Hook.ContainerFrameItemButton_OnEnter ();
398 AdWS_CheckTooltipInfo (GameTooltip);
399 end
400  
401 function ContainerFrame_Update (frame)
402 AdWS_Hook.ContainerFrame_Update (frame);
403 AdWS_CheckTooltipInfo (GameTooltip);
404 end
405  
406 function GameTooltip.SetInventoryItem (unit, slotID, name)
407 local hasItem, hasCooldown, repairCost = AdWS_Hook.SetInventoryItem (unit, slotID, name);
408 if (hasItem) and (name ~=17) then
409 AdWS_CheckTooltipInfo (GameTooltip);
410 end
411  
412 return hasItem, hasCooldown, repairCost;
413 end
414  
415 function GameTooltip.SetLootItem (this, slot)
416 AdWS_Hook.SetLootItem (this, slot);
417 AdWS_CheckTooltipInfo (GameTooltip);
418 end
419  
420 function GameTooltip.SetMerchantItem (unit, slotID)
421 AdWS_Hook.SetMerchantItem (unit, slotID);
422 AdWS_CheckTooltipInfo (GameTooltip);
423 end
424  
425 function ShoppingTooltip1.SetMerchantCompareItem (this, id, num)
426 local retval = AdWS_Hook.SetMerchantCompareItem1 (this, id, num);
427 AdWS_CheckTooltipInfo (ShoppingTooltip1);
428 return retval;
429 end
430  
431 function ShoppingTooltip1.SetAuctionCompareItem (this, _type, index, num)
432 local retval = AdWS_Hook.SetAuctionCompareItem1 (this, _type, index, num);
433 AdWS_CheckTooltipInfo (ShoppingTooltip1);
434 return retval;
435 end
436  
437 function ShoppingTooltip2.SetMerchantCompareItem (this, id, num)
438 local retval = AdWS_Hook.SetMerchantCompareItem2 (this, id, num);
439 AdWS_CheckTooltipInfo (ShoppingTooltip2);
440 return retval;
441 end
442  
443 function ShoppingTooltip2.SetAuctionCompareItem (this, _type, index, num)
444 local retval = AdWS_Hook.SetAuctionCompareItem2 (this, _type, index, num);
445 AdWS_CheckTooltipInfo (ShoppingTooltip2);
446 return retval;
447 end
448  
449 --=====================================================================================
450  
451 function AdWS_RemoveEquipEffect (AdWS, slotname)
452 AdWSTooltip:Hide();
453 AdWSTooltip:SetOwner(AdWSTooltip, "ANCHOR_NONE");
454  
455 if (AdWSTooltip:SetInventoryItem ("player", GetInventorySlotInfo(slotname)) == false) then return; end
456  
457 local index = 2;
458 local ltext = getglobal(AdWSTooltip:GetName().."TextLeft"..index):GetText();
459 while (ltext ~= nil) do
460 if (string.find (ltext, AdWS_Locale.ID_Strength)) then
461 local v;
462 _, _, v = string.find (ltext, "%+(%d+)");
463 if (v) then
464 if (AdWS.playerclass == AdWS_Locale.ID_Warrior) then
465 AdWS.power = AdWS.power - (v * 2);
466 elseif (AdWS.playerclass == AdWS_Locale.ID_Shaman) then
467 AdWS.power = AdWS.power - (v * 2);
468 elseif (AdWS.playerclass == AdWS_Locale.ID_Paladin) then
469 AdWS.power = AdWS.power - (v * 2);
470 elseif (AdWS.playerclass == AdWS_Locale.ID_Rogue) then
471 AdWS.power = AdWS.power - v;
472  
473 end
474 else
475 _, _, v = string.find (ltext, "%-(%d+)");
476 if (v) then
477 if (AdWS.playerclass == AdWS_Locale.ID_Warrior) then
478 AdWS.power = AdWS.power + (v * 2);
479 elseif (AdWS.playerclass == AdWS_Locale.ID_Shaman) then
480 AdWS.power = AdWS.power + (v * 2);
481 elseif (AdWS.playerclass == AdWS_Locale.ID_Paladin) then
482 AdWS.power = AdWS.power + (v * 2);
483 elseif (AdWS.playerclass == AdWS_Locale.ID_Rogue) then
484 AdWS.power = AdWS.power + v;
485 end
486 end
487 end
488 elseif (string.find (ltext, AdWS_Locale.ID_Agility)) then
489 local v;
490 _, _, v = string.find (ltext, "%+(%d+)");
491 if (v) then
492 if (AdWS.playerclass == AdWS_Locale.ID_Rogue) then
493 AdWS.power = AdWS.power - v;
494 end
495 else
496 _, _, v = string.find (ltext, "%-(%d+)");
497 if (v) then
498 if (AdWS.playerclass == AdWS_Locale.ID_Rogue) then
499 AdWS.power = AdWS.power + v;
500 end
501 end
502 end
503 elseif (string.find (ltext, AdWS_Locale.ID_Rockbiter)) then
504 local v;
505 _, _, v = string.find (ltext, "(%d+)");
506 if (v=="1") then AdWS.power = AdWS.power - 44;
507 elseif (v=="2") then AdWS.power = AdWS.power - 72;
508 elseif (v=="3") then AdWS.power = AdWS.power - 80;
509 end
510  
511 elseif (string.find (ltext, AdWS_Locale.ID_Attack_Power)) then
512 local v;
513 _, _, v = string.find (ltext, "+(%d+)");
514 AdWS.power = AdWS.power - v;
515  
516 end
517  
518 index = index + 1;
519 ltext = getglobal(AdWSTooltip:GetName().."TextLeft"..index):GetText();
520 end
521  
522 AdWSTooltip:ClearLines();
523 end
524  
525 --===========================================================================
526  
527 function AdWS_CheckTooltipInfo(frame)
528 if (frame:IsVisible()) then
529 local pclass = UnitClass("player");
530 local field = getglobal(frame:GetName().."TextLeft1");
531  
532 if (pclass ~= AdWS_Locale.ID_Warrior and pclass ~= AdWS_Locale.ID_Rogue and pclass ~= AdWS_Locale.ID_Shaman and pclass ~= AdWS_Locale.ID_Paladin) then
533 -- NOTE: trying to stay out of this if you don't need it...
534 return;
535 end
536  
537 if (field and field:IsVisible()) then
538 -- NOTE: trying to fix the quick roll in/out problem...
539 local fname = frame:GetName();
540  
541 if(field:GetText()) then
542 local index = 2;
543 local ltext = getglobal(fname.."TextLeft"..index):GetText();
544 while(ltext) do
545 if (string.find (ltext, AdWS_Locale.ID_Output_Normal)) then return; end
546 index = index + 1;
547 local glob = getglobal(fname.."TextLeft"..index);
548 if (glob) then
549 ltext = glob:GetText();
550 else
551 -- NOTE: getting here means there's a problem...
552 return;
553 end
554 end
555 return AdWS_AddTooltipInfo(frame);
556 end
557 end
558 end
559 end
560  
561 --=====================================================================
562  
563 function AdWS_AddTooltipInfo(frame)
564 local AdWS = {
565 power = 0, weapondamage =0, sharpened = 0, rockbiter=0, windfury=0,
566 };
567  
568 AdWS.playerclass = UnitClass("player");
569 if (AdWS.playerclass ~= AdWS_Locale.ID_Warrior and AdWS.playerclass ~= AdWS_Locale.ID_Rogue and AdWS.playerclass ~= AdWS_Locale.ID_Shaman and AdWS.playerclass ~= AdWS_Locale.ID_Paladin) then return; end
570  
571 local index = 2;
572 local ltext = getglobal(frame:GetName().."TextLeft"..index):GetText();
573 local rtext = getglobal(frame:GetName().."TextRight"..index):GetText();
574 while (ltext ~= nil) do
575 if (not AdWS.weapon and ltext == AdWS_Locale.ID_Two_Hand) then
576 if (AdWS.playerclass == AdWS_Locale.ID_Rogue) then return; end
577  
578 AdWS.weapon = ltext;
579 if (rtext == AdWS_Locale.ID_Mace or rtext == AdWS_Locale.ID_Axe or rtext == AdWS_Locale.ID_Polearm or rtext == AdWS_Locale.ID_Staff) then
580 elseif (rtext == AdWS_Locale.ID_Sword) then
581 AdWS.issword = true;
582 else
583 return;
584 end
585 elseif (not AdWS.weapon and (ltext == AdWS_Locale.ID_Main_Hand or ltext == AdWS_Locale.ID_One_Hand)) then
586 AdWS.weapon = ltext;
587 if (rtext == AdWS_Locale.ID_Mace or rtext == AdWS_Locale.ID_Axe or rtext == AdWS_Locale.ID_Fist_Weapon) then
588 elseif (rtext == AdWS_Locale.ID_Dagger) then
589 AdWS.isdagger = true;
590 elseif (rtext == AdWS_Locale.ID_Sword) then
591 AdWS.issword = true;
592 else
593 return;
594 end
595 elseif (not AdWS.damage and string.find (ltext, AdWS_Locale.ID_Damage)) then
596  
597 local low, high
598 _, _, low, high = string.find (ltext, "(%d+) %- (%d+)");
599 AdWS.damage = (low + high) / 2;
600 _, _, AdWS.speed = string.find(rtext, "(%d+%.%d+)");
601 if (not AdWS.speed) then
602 AdWS.speed = string.find(rtext, "(%d+%,%d+)");
603 AdWS.speed = string.gsub (AdWS.speed, "%,", "%.");
604 end
605  
606 --=================== additional spell damage (like nature damage , thunderfury)
607 elseif (string.find (ltext, AdWS_Locale.ID_Nature_Damage)) then
608 local slow, shigh
609 _, _, slow, shigh = string.find (ltext, "(%d+) %- (%d+) Nature Damage");
610 AdWS.damage = AdWS.damage + ((slow + shigh) / 2)
611  
612 elseif (string.find (ltext, AdWS_Locale.ID_Frost_Damage)) then
613 local slow, shigh
614 _, _, slow, shigh = string.find (ltext, "(%d+) %- (%d+) Frost Damage");
615 AdWS.damage = AdWS.damage + ((slow + shigh) / 2)
616  
617 elseif (string.find (ltext, AdWS_Locale.ID_Strength)) then
618 local v;
619 _, _, v = string.find (ltext, "%+(%d+)");
620 if (v) then
621 if (AdWS.playerclass == AdWS_Locale.ID_Warrior) then
622 AdWS.power = AdWS.power + v * 2;
623 elseif (AdWS.playerclass == AdWS_Locale.ID_Shaman) then
624 AdWS.power = AdWS.power + v * 2;
625 elseif (AdWS.playerclass == AdWS_Locale.ID_Paladin) then
626 AdWS.power = AdWS.power + v * 2;
627 elseif (AdWS.playerclass == AdWS_Locale.ID_Rogue) then
628 AdWS.power = AdWS.power + v;
629 end
630 else
631 _, _, v = string.find (ltext, "%-(%d+)");
632 if (v) then
633 if (AdWS.playerclass == AdWS_Locale.ID_Warrior) then
634 AdWS.power = AdWS.power - v * 2;
635 elseif (AdWS.playerclass == AdWS_Locale.ID_Shaman) then
636 AdWS.power = AdWS.power - v * 2;
637 elseif (AdWS.playerclass == AdWS_Locale.ID_Paladin) then
638 AdWS.power = AdWS.power - v * 2;
639 elseif (AdWS.playerclass == AdWS_Locale.ID_Rogue) then
640 AdWS.power = AdWS.power - v;
641 end
642 end
643 end
644  
645 elseif (string.find (ltext, AdWS_Locale.ID_Weapon_Damage)) then
646 local v;
647 _, _, v = string.find (ltext, "%+(%d+)");
648 if (v) then
649 AdWS.weapondamage = v;
650 end
651  
652 elseif (string.find (ltext, AdWS_Locale.ID_Sharpened)) then
653 local v;
654 _, _, v = string.find (ltext, "%+(%d+)");
655 if (v) then
656 AdWS.sharpened = v;
657 end
658 elseif (string.find (ltext, AdWS_Locale.ID_Agility)) then
659 local v;
660 _, _, v = string.find (ltext, "%+(%d+)");
661 if (v) then
662 if (AdWS.playerclass == AdWS_Locale.ID_Rogue) then
663 AdWS.power = AdWS.power + v;
664 end
665 else
666 _, _, v = string.find (ltext, "%-(%d+)");
667 if (v) then
668 if (AdWS.playerclass == AdWS_Locale.ID_Rogue) then
669 AdWS.power = AdWS.power - v;
670 end
671 end
672 end
673 elseif (string.find (ltext, AdWS_Locale.ID_Rockbiter)) then
674 AdWS.isrockbiter = true;
675 local v;
676 _, _, v = string.find (ltext, "(%d+)");
677 if (v=="1") then AdWS.power = AdWS.power + 44;
678 elseif (v=="2") then AdWS.power = AdWS.power + 72;
679 elseif (v=="3") then AdWS.power = AdWS.power + 80;
680 end
681  
682  
683 elseif (string.find (ltext, AdWS_Locale.ID_Attack_Power)) then
684 local v;
685 _, _, v = string.find (ltext, "+(%d+)");
686 AdWS.power = AdWS.power + v;
687  
688  
689 end
690  
691 index = index + 1;
692 ltext = getglobal(frame:GetName().."TextLeft"..index):GetText();
693 rtext = getglobal(frame:GetName().."TextRight"..index):GetText();
694 end
695  
696 if (AdWS.weapon) then
697 local base, posBuff, negBuff = UnitAttackPower("player");
698 AdWS.power = AdWS.power + base + posBuff + negBuff + AdWSSettings.cAP;
699  
700 AdWS_RemoveEquipEffect (AdWS, "MainHandSlot");
701  
702 if (AdWS.weapon == AdWS_Locale.ID_Two_Hand) then AdWS_RemoveEquipEffect (AdWS, "SecondaryHandSlot"); end
703  
704 --=========================================
705 --============== FORMULAS
706 --=========================================
707  
708 local normal = (AdWS.damage + AdWS.weapondamage + AdWS.sharpened) + (AdWS.power * AdWS.speed / 14);
709 local instant;
710  
711 local rockbiter = (AdWS.damage + AdWS.weapondamage + AdWS.sharpened) + ((AdWS.power + 504) * AdWS.speed / 14);
712 local windfury = (AdWS.damage + AdWS.weapondamage + AdWS.sharpened) + ((AdWS.power + 665) * AdWS.speed / 14);
713  
714 local flurryspeed = AdWS.speed/1.3;
715 local flurrydps = normal / flurryspeed;
716  
717 local roguespeed = AdWS.speed/1.56;
718 local roguedps = normal / roguespeed;
719  
720 local bloodthirst = AdWS.power * 0.45;
721 local dps = normal / AdWS.speed;
722 local ten_dmg = 10/AdWS.speed*14;
723 local ten_ap = 10/14*AdWS.speed;
724  
725 if (AdWS.issword) then spss = 100 * AdWS.speed / 5; else spss = 0; end;
726  
727 if (AdWS.isdagger) then
728 instant = (AdWS.damage + AdWS.weapondamage + AdWS.sharpened) + (AdWS.power * 1.7 / 14);
729 elseif (AdWS.weapon == AdWS_Locale.ID_Two_Hand) then
730 instant = (AdWS.damage + AdWS.weapondamage + AdWS.sharpened) + (AdWS.power * 3.3 / 14);
731 else
732 instant = (AdWS.damage + AdWS.weapondamage + AdWS.sharpened) + (AdWS.power * 2.4 / 14);
733 end
734  
735 local backstab = (AdWS.damage + AdWS.weapondamage + AdWS.sharpened) * 1.5 + (AdWS.power * 1.7 / 14) + 225;
736 local ambush = (AdWS.damage + AdWS.weapondamage + AdWS.sharpened) * 2.5 + (AdWS.power * 1.7 / 14) + 290;
737 local ghostlystrike = (AdWS.damage + AdWS.weapondamage + AdWS.sharpened) * 1.25 + (AdWS.power * 1.7 / 14);
738 local riposte = (AdWS.damage + AdWS.weapondamage + AdWS.sharpened) * 1.5 + (AdWS.power * 1.7 / 14);
739  
740 frame:AddLine(" " , 1,1,1);
741  
742 --=================== GENERAL STATS (dps, 10ap, 10dmg, sword spec)
743  
744 if (AdWS.playerclass == AdWS_Locale.ID_Warrior) or (AdWS.playerclass == AdWS_Locale.ID_Shaman) then
745 frame:AddDoubleLine (AdWS_Locale.ID_Output_DPS..string.format ("%.1f (%.1f)",dps, flurrydps), AdWS_Locale.ID_Output_FlurrySpeed..string.format ("%.2f", flurryspeed), 1.0, 0.85, 0.33, 1.0, 1.0, 1.0);
746 elseif (AdWS.playerclass == AdWS_Locale.ID_Rogue) and (AdWS.weapon ~= AdWS_Locale.ID_Two_Hand) then
747 frame:AddDoubleLine (AdWS_Locale.ID_Output_DPS..string.format ("%.1f (%.1f)",dps, roguedps), AdWS_Locale.ID_Output_RogueSpeed..string.format ("%.2f", roguespeed), 1.0, 0.85, 0.33, 1.0, 1.0, 1.0);
748 end;
749  
750 frame:AddDoubleLine (AdWS_Locale.ID_Output_TenDmg..string.format ("%.0f AP", ten_dmg), AdWS_Locale.ID_Output_TenAp..string.format ("%.2f DMG", ten_ap), 1.0, 1.0, 1.0, 1.0, 1.0, 1.0);
751  
752 if (AdWS.issword) and (AdWS.playerclass == AdWS_Locale.ID_Warrior) and (AdWSWarrior.Sspec == "on") then
753 frame:AddLine("Sword Spec - per "..spss.." secs" , 1,1,1);
754 end;
755  
756 frame:AddLine(" " , 1,1,1);
757  
758 --=========================================
759 --============== MAIN HAND STATS
760 --=========================================
761  
762 frame:AddDoubleLine("Main hand stats", "Hit / Crit / x"..AdWSSettings.DamageBonus, 0.46,0.91,0.99,0.46,0.91,0.99);
763  
764 AdWSWarrior.THSpec = tonumber (AdWSWarrior.THSpec);
765  
766 --======= WARRIOR
767  
768 if (AdWS.playerclass == AdWS_Locale.ID_Warrior) then
769 if (AdWS.weapon == AdWS_Locale.ID_Two_Hand) and (AdWSWarrior.THSpec > 1) then
770 frame:AddDoubleLine (AdWS_Locale.ID_Output_Normal, string.format ("%.0f / %.0f / %.0f", normal*AdWSWarrior.THSpec*(1-AdWSSettings.ACReduction), normal * AdWSWarrior.THSpec * 2*(1-AdWSSettings.ACReduction), normal * AdWSWarrior.THSpec * 2 * AdWSSettings.DamageBonus*(1-AdWSSettings.ACReduction)), 0.99, 0.99, 0.65, 1.0, 1.0, 1.0);
771 else
772 frame:AddDoubleLine (AdWS_Locale.ID_Output_Normal, string.format ("%.0f / %.0f / %.0f", normal*(1-AdWSSettings.ACReduction), normal * 2*(1-AdWSSettings.ACReduction), normal * 2 * AdWSSettings.DamageBonus*(1-AdWSSettings.ACReduction)), 0.99, 0.99, 0.65, 1.0, 1.0, 1.0);
773 end
774  
775 --======= OTHER CLASSES
776  
777 else
778 frame:AddDoubleLine (AdWS_Locale.ID_Output_Normal, string.format ("%.0f / %.0f / %.0f", normal*(1-AdWSSettings.ACReduction), normal * 2*(1-AdWSSettings.ACReduction), normal * 2 * AdWSSettings.DamageBonus*(1-AdWSSettings.ACReduction)), 0.99, 0.99, 0.65, 1.0, 1.0, 1.0);
779 end
780  
781 --=========================================
782 --============== WARRIOR PART DISPLAY
783 --=========================================
784  
785 if (AdWS.playerclass == AdWS_Locale.ID_Warrior) then
786  
787 if (AdWSWarrior.Build=="fury") then
788 frame:AddDoubleLine (AdWS_Locale.ID_Output_Bloodthirst, string.format ("%.0f / %.0f / %.0f", bloodthirst*(1-AdWSSettings.ACReduction), bloodthirst * AdWSWarrior.Crit*(1-AdWSSettings.ACReduction), bloodthirst * AdWSWarrior.Crit * AdWSSettings.DamageBonus*(1-AdWSSettings.ACReduction)), 0.99, 0.99, 0.65, 1.0, 1.0, 1.0);
789 end
790  
791 --======= 2H SPEC
792  
793 if (AdWS.weapon == AdWS_Locale.ID_Two_Hand) and (AdWSWarrior.THSpec > 1) then
794  
795 if (AdWSWarrior.Build=="arms") then
796 frame:AddDoubleLine (AdWS_Locale.ID_Output_MortalStrike, string.format ("%.0f / %.0f / %.0f", (instant + 160) * AdWSWarrior.THSpec * (1-AdWSSettings.ACReduction), (instant + 160) * AdWSWarrior.THSpec * AdWSWarrior.Crit * (1-AdWSSettings.ACReduction), (instant + 160) * AdWSWarrior.THSpec * AdWSWarrior.Crit * AdWSSettings.DamageBonus * (1-AdWSSettings.ACReduction)), 0.99, 0.99, 0.65, 1.0, 1.0, 1.0);
797 end
798 frame:AddDoubleLine (AdWS_Locale.ID_Output_Whirlwind, string.format ("%.0f / %.0f / %.0f", instant * AdWSWarrior.THSpec * (1-AdWSSettings.ACReduction), instant * AdWSWarrior.THSpec * AdWSWarrior.Crit * (1-AdWSSettings.ACReduction), instant * AdWSWarrior.THSpec * AdWSWarrior.Crit * AdWSSettings.DamageBonus * (1-AdWSSettings.ACReduction)), 0.99, 0.99, 0.65, 1.0, 1.0, 1.0);
799 frame:AddDoubleLine (AdWS_Locale.ID_Output_Overpower, string.format ("%.0f / %.0f / %.0f", (instant + 35) * AdWSWarrior.THSpec * (1-AdWSSettings.ACReduction), (instant + 35) * AdWSWarrior.THSpec * AdWSWarrior.Crit * (1-AdWSSettings.ACReduction), (instant + 35) * AdWSWarrior.THSpec * AdWSWarrior.Crit * AdWSSettings.DamageBonus * (1-AdWSSettings.ACReduction)), 0.99, 0.99, 0.65, 1.0, 1.0, 1.0);
800 frame:AddDoubleLine (AdWS_Locale.ID_Output_HeroicStrike, string.format ("%.0f / %.0f / %.0f", (normal + 157) * AdWSWarrior.THSpec * (1-AdWSSettings.ACReduction), (normal + 157) * AdWSWarrior.THSpec * AdWSWarrior.Crit * (1-AdWSSettings.ACReduction), (normal + 157) * AdWSWarrior.THSpec * AdWSWarrior.Crit * AdWSSettings.DamageBonus * (1-AdWSSettings.ACReduction)), 0.99, 0.99, 0.65, 1.0, 1.0, 1.0);
801  
802 --======= NO 2H SPEC
803 else
804 if (AdWSWarrior.Build=="arms") then
805 frame:AddDoubleLine (AdWS_Locale.ID_Output_MortalStrike, string.format ("%.0f / %.0f / %.0f", (instant + 160) * (1-AdWSSettings.ACReduction), (instant + 160) * AdWSWarrior.Crit * (1-AdWSSettings.ACReduction), (instant + 160) * AdWSWarrior.Crit * AdWSSettings.DamageBonus * (1-AdWSSettings.ACReduction)), 0.99, 0.99, 0.65, 1.0, 1.0, 1.0);
806 end
807 frame:AddDoubleLine (AdWS_Locale.ID_Output_Whirlwind, string.format ("%.0f / %.0f / %.0f", instant * (1-AdWSSettings.ACReduction), instant * AdWSWarrior.Crit * (1-AdWSSettings.ACReduction), instant * AdWSWarrior.Crit * AdWSSettings.DamageBonus * (1-AdWSSettings.ACReduction)), 0.99, 0.99, 0.65, 1.0, 1.0, 1.0);
808 frame:AddDoubleLine (AdWS_Locale.ID_Output_Overpower, string.format ("%.0f / %.0f / %.0f", (instant + 35) * (1-AdWSSettings.ACReduction), (instant + 35) * AdWSWarrior.Crit * (1-AdWSSettings.ACReduction), (instant + 35) * AdWSWarrior.Crit * AdWSSettings.DamageBonus * (1-AdWSSettings.ACReduction)), 0.99, 0.99, 0.65, 1.0, 1.0, 1.0);
809 frame:AddDoubleLine (AdWS_Locale.ID_Output_HeroicStrike, string.format ("%.0f / %.0f / %.0f", (normal + 157) * (1-AdWSSettings.ACReduction), (normal + 157) * AdWSWarrior.Crit * (1-AdWSSettings.ACReduction), (normal + 157) * AdWSWarrior.Crit * AdWSSettings.DamageBonus * (1-AdWSSettings.ACReduction)), 0.99, 0.99, 0.65, 1.0, 1.0, 1.0);
810 end
811  
812 if (AdWS.weapon == AdWS_Locale.ID_One_Hand) then
813 frame:AddDoubleLine (AdWS_Locale.ID_Output_OffHand, string.format ("%.0f / %.0f / %.0f", normal * (1-AdWSSettings.ACReduction)*AdWSWarrior.OffHand, normal * 2 * (1-AdWSSettings.ACReduction)*AdWSWarrior.OffHand, normal * 2 * AdWSSettings.DamageBonus * (1-AdWSSettings.ACReduction)*AdWSWarrior.OffHand), 0.99, 0.99, 0.65, 1.0, 1.0, 1.0);
814 elseif (AdWS.weapon == AdWS_Locale.ID_Off_Hand) then
815 frame:AddDoubleLine (AdWS_Locale.ID_Output_OffHand, string.format ("%.0f / %.0f / %.0f", normal * (1-AdWSSettings.ACReduction)*AdWSWarrior.OffHand, normal * 2 * (1-AdWSSettings.ACReduction)*AdWSWarrior.OffHand, normal * 2 * AdWSSettings.DamageBonus * (1-AdWSSettings.ACReduction)*AdWSWarrior.OffHand), 0.99, 0.99, 0.65, 1.0, 1.0, 1.0);
816 end
817  
818 end
819  
820 --=========================================
821 --============== ROGUE PART DISPLAY
822 --=========================================
823  
824 if (AdWS.playerclass == AdWS_Locale.ID_Rogue) then
825  
826 if (AdWS.weapon == AdWS_Locale.ID_One_Hand) or (AdWS.weapon == AdWS_Locale.ID_Main_Hand) then
827  
828 if (AdWS.isdagger) then
829 frame:AddDoubleLine (AdWS_Locale.ID_Output_Ambush, string.format ("%.0f / %.0f / %.0f", ambush * AdWSRogue.Opportunity * (1-AdWSSettings.ACReduction), ambush * AdWSRogue.Opportunity * 2 * (1-AdWSSettings.ACReduction), ambush * AdWSRogue.Opportunity * 2 * AdWSSettings.DamageBonus * (1-AdWSSettings.ACReduction)), 0.99, 0.99, 0.65, 1.0, 1.0, 1.0);
830 frame:AddDoubleLine (AdWS_Locale.ID_Output_Backstab, string.format ("%.0f / %.0f / %.0f", backstab * AdWSRogue.Opportunity * (1-AdWSSettings.ACReduction), backstab * AdWSRogue.Opportunity * AdWSRogue.Lethality * (1-AdWSSettings.ACReduction), backstab * AdWSRogue.Opportunity * AdWSRogue.Lethality * AdWSSettings.DamageBonus * (1-AdWSSettings.ACReduction)), 0.99, 0.99, 0.65, 1.0, 1.0, 1.0);
831 end
832  
833 frame:AddDoubleLine (AdWS_Locale.ID_Output_SinisterStrike, string.format ("%.0f / %.0f / %.0f", (instant + 68) * AdWSRogue.Aggression * (1-AdWSSettings.ACReduction), (instant + 68) * AdWSRogue.Aggression * AdWSRogue.Lethality * (1-AdWSSettings.ACReduction), (instant + 68) * AdWSRogue.Aggression * AdWSRogue.Lethality * AdWSSettings.DamageBonus * (1-AdWSSettings.ACReduction)), 0.99, 0.99, 0.65, 1.0, 1.0, 1.0);
834 frame:AddDoubleLine (AdWS_Locale.ID_Output_Eviscerate, string.format ("%.0f / %.0f / %.0f", 936 * AdWSRogue.ImpEvi * AdWSRogue.Aggression * (1-AdWSSettings.ACReduction), 936 * AdWSRogue.ImpEvi * AdWSRogue.Aggression * 2 * (1-AdWSSettings.ACReduction), 936 * AdWSRogue.ImpEvi * AdWSRogue.Aggression * 2 * AdWSSettings.DamageBonus * (1-AdWSSettings.ACReduction)), 0.99, 0.99, 0.65, 1.0, 1.0, 1.0);
835 frame:AddDoubleLine (AdWS_Locale.ID_Output_Ghostly_Strike, string.format ("%.0f / %.0f / %.0f", ghostlystrike * (1-AdWSSettings.ACReduction), ghostlystrike * AdWSRogue.Lethality * (1-AdWSSettings.ACReduction), ghostlystrike * AdWSRogue.Lethality * AdWSSettings.DamageBonus * (1-AdWSSettings.ACReduction)), 0.99, 0.99, 0.65, 1.0, 1.0, 1.0);
836 frame:AddDoubleLine (AdWS_Locale.ID_Output_Riposte, string.format ("%.0f / %.0f / %.0f", riposte * (1-AdWSSettings.ACReduction), riposte * 2 * (1-AdWSSettings.ACReduction), riposte * 2 * AdWSSettings.DamageBonus * (1-AdWSSettings.ACReduction)), 0.99, 0.99, 0.65, 1.0, 1.0, 1.0);
837 frame:AddDoubleLine (AdWS_Locale.ID_Output_Hemorrhage, string.format ("%.0f / %.0f / %.0f", normal * (1-AdWSSettings.ACReduction), normal * AdWSRogue.Lethality * (1-AdWSSettings.ACReduction), normal * AdWSRogue.Lethality * AdWSSettings.DamageBonus * (1-AdWSSettings.ACReduction)), 0.99, 0.99, 0.65, 1.0, 1.0, 1.0);
838 end
839  
840 if (AdWS.weapon == AdWS_Locale.ID_One_Hand) then
841 frame:AddDoubleLine (AdWS_Locale.ID_Output_OffHand, string.format ("%.0f / %.0f / %.0f", normal* (1-AdWSSettings.ACReduction)*AdWSRogue.OffHand, normal * 2* (1-AdWSSettings.ACReduction)*AdWSRogue.OffHand, normal * 2 * AdWSSettings.DamageBonus* (1-AdWSSettings.ACReduction)*AdWSRogue.OffHand), 0.99, 0.99, 0.65, 1.0, 1.0, 1.0);
842 elseif (AdWS.weapon == AdWS_Locale.ID_Off_Hand) then
843 frame:AddDoubleLine (AdWS_Locale.ID_Output_OffHand, string.format ("%.0f / %.0f / %.0f", normal* (1-AdWSSettings.ACReduction)*AdWSRogue.OffHand, normal * 2* (1-AdWSSettings.ACReduction)*AdWSRogue.OffHand, normal * 2 * AdWSSettings.DamageBonus* (1-AdWSSettings.ACReduction)*AdWSRogue.OffHand), 0.99, 0.99, 0.65, 1.0, 1.0, 1.0);
844 end
845  
846 end
847  
848 --=========================================
849 --============== SHAMAN PART DISPLAY
850 --=========================================
851  
852 if (AdWS.playerclass == AdWS_Locale.ID_Shaman) then
853 if (AdWS.iswindfury~=true) and (AdWS.isrockbiter~=true) then
854 frame:AddDoubleLine (AdWS_Locale.ID_Output_Windfury.."(4) x2:", string.format ("%.0f / %.0f / %.0f", windfury* (1-AdWSSettings.ACReduction) *2, windfury * 2* (1-AdWSSettings.ACReduction) *2, windfury * 2 * AdWSSettings.DamageBonus* (1-AdWSSettings.ACReduction) *2), 0.99, 0.99, 0.65, 1.0, 1.0, 1.0);
855 frame:AddDoubleLine (AdWS_Locale.ID_Output_Rockbiter.."(7):", string.format ("%.0f / %.0f / %.0f", rockbiter* (1-AdWSSettings.ACReduction), rockbiter * 2* (1-AdWSSettings.ACReduction), rockbiter * 2 * AdWSSettings.DamageBonus* (1-AdWSSettings.ACReduction)), 0.99, 0.99, 0.65, 1.0, 1.0, 1.0);
856 end
857 end
858  
859 --=========================================
860 --============== FOOTER - REDUCTION
861 --=========================================
862  
863 frame:AddLine(" ", 1,1,1);
864 frame:AddDoubleLine("Dmg Red:", AdWSSettings.ACPreset.." ("..AdWSSettings.AClass.." AC)", 1,1,1,0.66,1,0.96);
865  
866 frame:Show();
867 end
868 end