vanilla-wow-addons – Blame information for rev 1
?pathlinks?
Rev | Author | Line No. | Line |
---|---|---|---|
1 | office | 1 | --[[ |
2 | DynamicData |
||
3 | |||
4 | By sarf |
||
5 | |||
6 | This mod allows you to access dynamic data in WoW without being forced to rely on strange Blizzard functions |
||
7 | |||
8 | Thanks goes to the UltimateUI team, the nice (but strange) people at #ultimateuitesters and Blizzard. |
||
9 | |||
10 | UltimateUIUI URL: |
||
11 | http://www.ultimateuiui.org/forums/viewtopic.php?t=NOT_YET_ANNOUNCED |
||
12 | |||
13 | ]] |
||
14 | |||
15 | function DynamicDataScriptFrame_OnLoad() |
||
16 | |||
17 | -- variable events |
||
18 | this:RegisterEvent("VARIABLES_LOADED"); |
||
19 | |||
20 | DynamicData.util.OnLoad(); |
||
21 | end |
||
22 | |||
23 | function DynamicDataScriptFrame_OnEvent(event) |
||
24 | -- item events |
||
25 | if ( event == "BAG_UPDATE" ) then |
||
26 | DynamicData.item.updateItems(arg1); |
||
27 | end |
||
28 | if ( event == "BAG_UPDATE_COOLDOWN" ) then |
||
29 | DynamicData.item.updateItemCooldowns(); |
||
30 | end |
||
31 | if ( event == "ITEM_LOCK_CHANGED" ) then |
||
32 | DynamicData.item.updateItemLocks(); |
||
33 | end |
||
34 | if ( event == "UNIT_INVENTORY_CHANGED" ) then |
||
35 | if ( arg1 == "player" ) then |
||
36 | DynamicData.item.updateItems(-1); |
||
37 | end |
||
38 | end |
||
39 | if ( event == "UPDATE_INVENTORY_ALERTS" ) then |
||
40 | DynamicData.item.updateItemAlerts(); |
||
41 | end |
||
42 | -- variable events |
||
43 | if ( event == "VARIABLES_LOADED" ) then |
||
44 | DynamicData.util.variablesLoaded(); |
||
45 | end |
||
46 | end |
||
47 | |||
48 | |||
49 | |||
50 | function DynamicDataScriptFrame_OnUpdate(elapsed) |
||
51 | DynamicData.util.notifyWhateverHandlers(DynamicData.util.onUpdateHandlers, elapsed); |
||
52 | end |