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 DynamicDataItemScriptFrame_OnLoad() |
||
16 | -- item events |
||
17 | this:RegisterEvent("BAG_UPDATE"); |
||
18 | this:RegisterEvent("BAG_UPDATE_COOLDOWN"); |
||
19 | this:RegisterEvent("ITEM_LOCK_CHANGED"); |
||
20 | this:RegisterEvent("UNIT_INVENTORY_CHANGED"); |
||
21 | this:RegisterEvent("UPDATE_INVENTORY_ALERTS"); |
||
22 | |||
23 | DynamicData.item.OnLoad(); |
||
24 | end |
||
25 | |||
26 | function DynamicDataItemScriptFrame_OnEvent(event) |
||
27 | -- item events |
||
28 | if ( event == "BAG_UPDATE" ) then |
||
29 | DynamicData.item.updateItems(arg1); |
||
30 | end |
||
31 | if ( event == "BAG_UPDATE_COOLDOWN" ) then |
||
32 | DynamicData.item.updateItemCooldowns(); |
||
33 | end |
||
34 | if ( event == "ITEM_LOCK_CHANGED" ) then |
||
35 | DynamicData.item.updateItemLocks(); |
||
36 | end |
||
37 | if ( event == "UNIT_INVENTORY_CHANGED" ) then |
||
38 | if ( arg1 == "player" ) then |
||
39 | DynamicData.item.updateItems(-1); |
||
40 | end |
||
41 | end |
||
42 | if ( event == "UPDATE_INVENTORY_ALERTS" ) then |
||
43 | DynamicData.item.updateItemAlerts(); |
||
44 | end |
||
45 | end |
||
46 | |||
47 |