Mercurial > wow > cyborg-mmo7
comparison WowObjects.lua @ 17:e4dec2d465f5
Removed the Load methods in WowObjects, they were never called (and likely broken).
author | madcatzinc@35b17cf1-18cd-47ff-9ca3-31d6b526ef09 |
---|---|
date | Thu, 25 Apr 2013 01:30:05 +0000 |
parents | a6f4c8f86130 |
children | cccc7661a2e6 |
comparison
equal
deleted
inserted
replaced
16:a6f4c8f86130 | 17:e4dec2d465f5 |
---|---|
50 local buttonFrame,parentFrame,name = CyborgMMO_CallbackFactory.Instance().AddCallback(CyborgMMO_WowObject.DoNothing) | 50 local buttonFrame,parentFrame,name = CyborgMMO_CallbackFactory.Instance().AddCallback(CyborgMMO_WowObject.DoNothing) |
51 SetOverrideBindingClick(parentFrame, true, key, name, "LeftButton") | 51 SetOverrideBindingClick(parentFrame, true, key, name, "LeftButton") |
52 end, | 52 end, |
53 | 53 |
54 DoNothing = function() | 54 DoNothing = function() |
55 end, | |
56 | |
57 Load = function(object) | |
58 if type == "item" then | |
59 object = CyborgMMO_WowItem.Load(object) | |
60 elseif type == "macro" then | |
61 object = CyborgMMO_WowMacro.Load(object) | |
62 elseif type == "spell" then | |
63 object = CyborgMMO_WowSpell.Load(object) | |
64 elseif type == "petaction" then | |
65 object = CyborgMMO_WowSpell.Load(object) | |
66 -- elseif type == "merchant" then | |
67 -- object = SlotMerchant.new(detail, subdetail) | |
68 elseif type == "companion" then | |
69 object = CyborgMMO_WowCompanion.Load(object) | |
70 elseif type == "equipmentset" then | |
71 object = CyborgMMO_WowEquipmentSet.Load(object) | |
72 else | |
73 object = CyborgMMO_WowObject.new(type, nil, nil) | |
74 end | |
75 return object | |
76 end, | 55 end, |
77 | 56 |
78 -- Static Methods -- | 57 -- Static Methods -- |
79 Create = function(objectType, detail, subdetail) | 58 Create = function(objectType, detail, subdetail) |
80 local object | 59 local object |
265 SetOverrideBinding(CyborgMMO_CallbackFactory.Instance().Frame, true, self.Key, self.Type.." "..self.Name) | 244 SetOverrideBinding(CyborgMMO_CallbackFactory.Instance().Frame, true, self.Key, self.Type.." "..self.Name) |
266 end | 245 end |
267 | 246 |
268 return self | 247 return self |
269 end, | 248 end, |
270 | |
271 Load = function(object) | |
272 local o = WowSpell.new(object.Type, object.Detail, object.Subdetail) | |
273 o.Name = object.Name | |
274 o.Texture = object.Texture | |
275 return o | |
276 end, | |
277 } | 249 } |
278 | 250 |
279 -- WowMacro Class -- | 251 -- WowMacro Class -- |
280 CyborgMMO_WowMacro = { | 252 CyborgMMO_WowMacro = { |
281 new = function(index) | 253 new = function(index) |
342 SetOverrideBindingClick(parentFrame, true, key, name, "LeftButton") | 314 SetOverrideBindingClick(parentFrame, true, key, name, "LeftButton") |
343 -- SetOverrideBinding(hiddenModeChanger, true, key, "MACRO "..self.Index) | 315 -- SetOverrideBinding(hiddenModeChanger, true, key, "MACRO "..self.Index) |
344 end | 316 end |
345 | 317 |
346 return self | 318 return self |
347 end, | |
348 | |
349 Load = function(object) | |
350 local o = WowCompanion.new(object.index, object.SubType) | |
351 return o | |
352 end, | 319 end, |
353 } | 320 } |
354 | 321 |
355 -- WowMerchant Class -- | 322 -- WowMerchant Class -- |
356 CyborgMMO_WowMerchant = { | 323 CyborgMMO_WowMerchant = { |