vanilla-wow-addons – Blame information for rev 1
?pathlinks?
Rev | Author | Line No. | Line |
---|---|---|---|
1 | office | 1 | -- outfit debugging functions |
2 | FishingBuddy.Commands["outfit"] = {}; |
||
3 | FishingBuddy.Commands["outfit"].func = |
||
4 | function(what) |
||
5 | if ( what ) then |
||
6 | if ( what == FishingBuddy.RESET ) then |
||
7 | FishingBuddy.SetWasWearing(nil); |
||
8 | elseif ( what == "dump" ) then |
||
9 | FishingBuddy.Debug("Outfit"); |
||
10 | FishingBuddy.Dump(FishingBuddy.GetOutfit()); |
||
11 | FishingBuddy.Debug("Was Wearing"); |
||
12 | FishingBuddy.Dump(FishingBuddy.GetWasWearing()); |
||
13 | end |
||
14 | end |
||
15 | return true; |
||
16 | end; |
||
17 | |||
18 | -- test the extravaganze school marking functions |
||
19 | -- need to expand this for 1.9 if we can tell automatically |
||
20 | FishingBuddy.Commands["mark"] = {}; |
||
21 | FishingBuddy.Commands["mark"].func = |
||
22 | function(what) |
||
23 | if ( what == "reset" ) then |
||
24 | FishingBuddy_Info["Schools"] = nil; |
||
25 | elseif ( what == "debug" ) then |
||
26 | local hour,_ = GetGameTime(); |
||
27 | local day = date("%w"); |
||
28 | FishingBuddy.Extravaganza.Debug(day, hour, GetRealZoneText()); |
||
29 | elseif ( what == "dump" ) then |
||
30 | FishingBuddy.Extravaganza.Dump(); |
||
31 | else |
||
32 | FishingBuddy.Extravaganza.MarkSchool(); |
||
33 | end |
||
34 | return true; |
||
35 | end; |
||
36 | |||
37 | -- random debugging code, likely out of date |
||
38 | FishingBuddy.Commands["debug"] = {}; |
||
39 | FishingBuddy.Commands["debug"].func = |
||
40 | function(what) |
||
41 | if ( what ) then |
||
42 | if ( what == "on" ) then |
||
43 | FishingBuddy_Debugging = 1; |
||
44 | elseif ( what == "reset" ) then |
||
45 | FishingBuddy_Info["Testing"] = nil; |
||
46 | elseif ( what == "test" ) then |
||
47 | local STVInfo = { scale = 0.18128603034401, xoffset = 0.39145470225916, yoffset = 0.79412224886668 }; |
||
48 | local xscale = 10448.3; |
||
49 | local yscale = 7072.7; |
||
50 | local playerX, playerY = GetPlayerMapPosition("player"); |
||
51 | local x = playerX * STVInfo.scale + STVInfo.xoffset; |
||
52 | local y = playerY * STVInfo.scale + STVInfo.yoffset; |
||
53 | FishingBuddy.Print("PlayerMap: %f, %f", x, y); |
||
54 | for idx=1,10 do |
||
55 | playerY = playerY + 0.01; |
||
56 | local dx = playerX * STVInfo.scale + STVInfo.xoffset; |
||
57 | local dy = playerY * STVInfo.scale + STVInfo.yoffset; |
||
58 | local dist = math.sqrt((dx*xscale*dx*xscale)+(dy*yscale*dy*yscale)); |
||
59 | FishingBuddy.Print("PlayerMap: %f, %f - %f", dx, dy, dist); |
||
60 | end |
||
61 | else |
||
62 | local func = getglobal("FishingBuddy_Localize_"..what); |
||
63 | if ( func ) then |
||
64 | func(); |
||
65 | else |
||
66 | FishingBuddy_Debugging = 0; |
||
67 | end |
||
68 | end |
||
69 | end |
||
70 | return true; |
||
71 | end; |