vanilla-wow-addons – Blame information for rev 1

Subversion Repositories:
Rev:
Rev Author Line No. Line
1 office 1 -------------------------------------------------------------------------------
2  
3 DamageMeters_TABLE_MAX = 50;
4  
5 -- Hit types.
6 DM_HIT = 1;
7 DM_CRT = 2;
8 DM_DOT = 3;
9  
10 DamageMeters_Relation_SELF = 1;
11 DamageMeters_Relation_PET = 2;
12 DamageMeters_Relation_PARTY = 3;
13 DamageMeters_Relation_FRIENDLY = 4;
14 DamageMeters_Relation_MAX = 4;
15  
16 DM_TABLE_A = 1;
17 DM_TABLE_B = 2;
18 DMT_FIGHT = 3;
19 DMT_MAX = 3
20  
21 -- Damage type constants.
22 DM_DMGTYPE_ARCANE = 1;
23 DM_DMGTYPE_FIRE = 2;
24 DM_DMGTYPE_NATURE = 3;
25 DM_DMGTYPE_FROST = 4;
26 DM_DMGTYPE_SHADOW = 5;
27 DM_DMGTYPE_RESISTMAX = 5;
28 DM_DMGTYPE_HOLY = 6;
29 DM_DMGTYPE_PHYSICAL = 7;
30 DM_DMGTYPE_DEFAULT = 8;
31  
32 DM_MSGTYPE_DAMAGE = 1;
33 DM_MSGTYPE_DAMAGERECEIVED = 2;
34 DM_MSGTYPE_HEALING = 3;
35  
36 -- A debugging system: setting these flags to true (via the menu or otherwise) will
37 -- normally cause bits of code to not be run. Useful for tracking down memory "leaks".
38 DM_Bypass = {
39 ["Constant Update"] = false,
40 ["Update All"] = false,
41 ["Update Bars"] = false,
42 ["Update Tables"] = false,
43 ["Sort"] = false,
44 ["Determine Ranks"] = false,
45 ["Determine Ranks 1"] = false,
46 ["SetBarInfo All"] = false,
47 ["Event All"] = false,
48 ["Generate AddValues"] = false,
49 ["Generate Events"] = false,
50 ["UpdateTableEntry"] = false,
51 ["AddValue"] = false,
52 ["AddValue 1"] = false,
53 ["AddValue 2"] = false,
54 ["AddEvent"] = false,
55 ["AddEvent 1"] = false,
56 ["AddEvent 2"] = false,
57 ["BuildSpellHash"] = false,
58 ["CheckMsgInfoAndProcess"] = false,
59 ["CheckMsgInfoAndProcess 1"] = false,
60 };
61  
62  
63 -------------------------------------------------------------------------------
64 -- Functions
65  
66 function DM_clone(node)
67 if type(node) ~= "table" then return node end
68 local b = {}
69 table.foreach(node, function(k,v) b[k]=DM_clone(v) end)
70 return b
71 end
72  
73 function DM_GetFraction(num, dem)
74 return (dem ~= 0) and (num/dem) or 0;
75 end
76  
77 function DM_DUMP_TABLE(table)
78 DM_DUMP_RECURSIVE(table, "[root]", "");
79 end
80  
81 function DM_DUMP_RECURSIVE(node, name, indent)
82 if type(node) ~= "table" then
83 if type(node) == "boolean" then
84 DMPrint(indent..name.."="..(node and "true" or "false"))
85 elseif (node == nil) then
86 DMPrint(indent..name.."=nil");
87 else
88 DMPrint(indent..name.."="..node)
89 end
90 else
91 DMPrint(indent..name.."{", destination);
92 table.foreach(node, function(k,v) DM_DUMP_RECURSIVE(v, k, indent.."-") end)
93 DMPrint(indent.."} "..name);
94 end
95 end