changeset 33:1c0af1810e06

Removed the "petaction" and "merchant" objects. They are not (no longer?) supported by regular action bars, and so shouldn't be necessary on button bindings.
author madcatzinc@35b17cf1-18cd-47ff-9ca3-31d6b526ef09
date Thu, 25 Apr 2013 01:31:26 +0000
parents fc5f52d60d16
children 6ce173840e68
files WowObjects.lua
diffstat 1 files changed, 3 insertions(+), 46 deletions(-) [+]
line wrap: on
line diff
--- a/WowObjects.lua	Thu Apr 25 01:31:21 2013 +0000
+++ b/WowObjects.lua	Thu Apr 25 01:31:26 2013 +0000
@@ -149,14 +149,13 @@
 local WowSpell_methods = setmetatable({}, {__index=WowObject_methods})
 local WowSpell_mt = {__index=WowSpell_methods}
 
-local function WowSpell(type, spellbookID, spellbook)
-	local self = WowObject(type, spellbookID, spellbook)
+local function WowSpell(spellbookID, spellbook)
+	local self = WowObject("spell", spellbookID, spellbook)
 
 	self.SpellbookID = spellbookID
 	self.Spellbook = spellbook
 	self.Name,self.Rank = GetSpellBookItemName(spellbookID, spellbook)
 	self.Texture = GetSpellBookItemTexture(spellbookID, spellbook)
-	self.Type = type
 
 	setmetatable(self, WowSpell_mt)
 
@@ -258,44 +257,6 @@
 
 ------------------------------------------------------------------------------
 
-local WowMerchant_methods = setmetatable({}, {__index=WowObject_methods})
-local WowMerchant_mt = {__index=WowMerchant_methods}
-
-local function WowMerchant(index)
-	local self = WowObject("merchant", index, nil)
-
-	self.Name,
-	self.Texture,
-	self.Price,
-	self.Quantity,
-	self.NumAvailable,
-	self.IsUsable,
-	self.ExtendedCost = GetMerchantItemInfo(index)
-	self.Index = index
-
-	setmetatable(self, WowMerchant_mt)
-
-	return self
-end
-
-function WowMerchant_methods:DoAction()
-	CyborgMMO_DPrint("Use Item")
-end
-
-function WowMerchant_methods:Pickup()
-	self:PlaySound()
-	ClearCursor()
---	SetCursor(self.Texture)
-	return PickupMerchantItem(self.Index)
-end
-
-function WowMerchant_methods:SetBinding(key)
-	self.Key = key
-	SetOverrideBinding(CyborgMMO_CallbackFactory.Frame, true, key, "MERCHANT "..self.Index)
-end
-
-------------------------------------------------------------------------------
-
 local WowEquipmentSet_methods = setmetatable({}, {__index=WowObject_methods})
 local WowEquipmentSet_mt = {__index=WowEquipmentSet_methods}
 
@@ -383,11 +344,7 @@
 	elseif type == "macro" then
 		object = WowMacro(...)
 	elseif type == "spell" then
-		object = WowSpell(type, ...)
-	elseif type == "petaction" then
-		object = WowSpell(type, ...)
-	elseif type == "merchant" then
-		object = WowMerchant(...)
+		object = WowSpell(...)
 	elseif type == "companion" then
 		object = WowCompanion(...)
 	elseif type == "equipmentset" then