comparison Modules/ArkInventoryRules.lua @ 74:71de6e86a1a4 release 2010-07-29

Fixed a bug where tradeskill that don't produce items, like Inscription Research, cause IA to crash. Added some API enhancements. Added ArkInventory as an optional dependency so it will be loaded before IA.
author Asa Ayers <Asa.Ayers@Gmail.com>
date Thu, 29 Jul 2010 22:33:50 -0700
parents 4ae431c98059
children 2112f71c4237
comparison
equal deleted inserted replaced
73:cd00b87fad31 74:71de6e86a1a4
1 if not ArkInventoryRules then 1
2 return
3 end
4 2
5 local ItemAuditor = select(2, ...) 3 local ItemAuditor = select(2, ...)
6 local ArkInventory = ItemAuditor:NewModule("ArkInventory") 4 local ArkInventory = ItemAuditor:NewModule("ArkInventory")
7 5
8 function ArkInventory:OnEnable( ) 6 function ArkInventory:OnEnable( )
9 ItemAuditor:Print('Registering with ArkInventory') 7 if ArkInventoryRules then
10 ArkInventoryRules.Register(self, "itemauditor", ArkInventory.Execute) 8 ItemAuditor:Print('Registering with ArkInventory')
9 ArkInventoryRules.Register(self, "itemauditor", ArkInventory.Execute)
10 end
11 end 11 end
12 12
13 function ArkInventory.Execute( ... ) 13 function ArkInventory.Execute( ... )
14 14
15 -- always check for the hyperlink and that it's an actual item, not a spell (pet/mount) 15 -- always check for the hyperlink and that it's an actual item, not a spell (pet/mount)