vanilla-wow-addons – Blame information for rev 1
?pathlinks?
Rev | Author | Line No. | Line |
---|---|---|---|
1 | office | 1 | To be able to get data from TC, just call (in order of speed): |
2 | TheoryCraft_GetSpellDataByFrame(tooltip) |
||
3 | TheoryCraft_GetSpellDataByName(spellname, spellrank) |
||
4 | TheoryCraft_GetSpellDataByDescription(description) (extremely slow if no data for that spell is already generated) |
||
5 | |||
6 | If there is data for the spell, it will be returned. If not it'll generate it |
||
7 | (if possible), and save it so that future accesses are quick (until the table needs to be reset, eg on |
||
8 | equipping more spell damage gear). The following is an example to get the minimum damage done by a spell: |
||
9 | |||
10 | local spelldata = TheoryCraft_GetSpellDataByName("Immolate", 5) |
||
11 | Print(spelldata.mindamage) |
||
12 | |||
13 | All values are returned unrounded. |
||
14 | |||
15 | Please Note that TheoryCraft_GetSpellDataByDescription is extremely slow at generating data if it's not already |
||
16 | present in the array, as it has to set tooltips for every single spell in your spellbook and compare them |
||
17 | to the description given. I do not expect this function to be used much. |
||
18 | |||
19 | The following are accessible (or nil, depending on the spell) |
||
20 | |||
21 | description |
||
22 | mindamage |
||
23 | maxdamage |
||
24 | critdmgchance |
||
25 | critdmgmin |
||
26 | critdmgmax |
||
27 | critdmgminminusignite |
||
28 | critdmgmaxminusignite |
||
29 | averagedamnocrit |
||
30 | averagedam |
||
31 | manacost (true mana cost, includes regen) |
||
32 | basemanacost |
||
33 | dpm |
||
34 | withdotdpm |
||
35 | dps |
||
36 | withdotdps |
||
37 | maxoomdam |
||
38 | maxevocoomdam |
||
39 | sealunbuffed |
||
40 | sealbuffed |
||
41 | nextagidam |
||
42 | nextcritdam |
||
43 | nexthitdam |
||
44 | nextpendam |
||
45 | nextagidps (hunter's autoshoot only) |
||
46 | nextcritdps (hunter's autoshoot only) |
||
47 | nexthitdps (hunter's autoshoot only) |
||
48 | nextagidamequive |
||
49 | nextcritdamequive |
||
50 | nexthitdamequive |
||
51 | nextpendamequive |
||
52 | nextagidpsequive (hunter's autoshoot only) |
||
53 | nextcritdpsequive (hunter's autoshoot only) |
||
54 | nexthitdpsequive (hunter's autoshoot only) |
||
55 | rotationdps |
||
56 | regendam |
||
57 | icregendam |
||
58 | damcoef |
||
59 | damcoef2 (dot coef) |
||
60 | plusdam |
||
61 | finaldam |
||
62 | dameff |
||
63 | penetration |
||
64 | dpsafterresists |
||
65 | lifetapdps |
||
66 | lifetapdpm |
||
67 | showonbutton (if a tooltip is generated due to mouseover, but it is not supposed to be shown on buttons, this |
||
68 | will be false) |
||
69 | |||
70 | And all of the above with dam/dmg replaced by heal, eg minheal, maxheal, hpm |
||
71 | |||
72 | When any of the above values change, or action bars change, TC will reset the table |
||
73 | TheoryCraft_UpdatedButtons to blank. So if you want to know whenever it gets changed, simply set a unique key in the |
||
74 | table to true, and every OnUpdate check that it's still true. When it isn't, a spell's data has changed. |
||
75 | |||
76 | You shouldn't need to regenerate the data, but if so call TheoryCraft_GenerateAll(). |
||
77 | |||
78 | Other global functions include :- |
||
79 | |||
80 | TheoryCraft_UpdateTalents(genall) |
||
81 | TheoryCraft_UpdateGear(target, genall) If target ~= "player", will do nothing |
||
82 | TheoryCraft_UpdateBuffs(target, genall) |
||
83 | TheoryCraft_LoadStats() |
||
84 | |||
85 | If genall is true on any of the above, then TheoryCraft_LoadStats() and TheoryCraft_GenerateAll() will not be called |
||
86 | even if they need to be. Normally these will only be called if an array changes, however you may wish to call |
||
87 | UpdateGear, and UpdateBuffs without wanting each to call GenerateAll(), so in that case you would pass genall as |
||
88 | true in both cases. If genall is false they'll call LoadStats as well, and call GenerateAll() automatically if |
||
89 | either the stats array or the buffs/gear array changes. |
||
90 | |||
91 | Finally there is a global function called TheoryCraft_AddToCustom(linkid). Just pass this one an item link and it'll |
||
92 | add it to the custom outfit. |
||
93 | |||
94 | If you need anymore help/info or any modifications just contact me on curse :). |
||
95 | |||
96 | - Aelian |