diff Core.lua @ 59:ee701ce45354 v22

Couple minor bug fixes, added french localization.
author yellowfive
date Sun, 07 Jun 2015 14:28:59 -0700
parents 01b63b8ed811
children cf2b6b9a8337
line wrap: on
line diff
--- a/Core.lua	Fri Jun 05 11:34:53 2015 -0700
+++ b/Core.lua	Sun Jun 07 14:28:59 2015 -0700
@@ -528,8 +528,8 @@
 	return false
 end
 
--- helper to determine if an item in the player's bag is soulbound
-function Amr:IsSoulbound(bagId, slotId)
+-- helper to determine if we can equip an item (it is already soulbound or account bound)
+function Amr:CanEquip(bagId, slotId)
 	local tt = self:GetScanningTooltip()
 	tt:ClearLines()
 	if bagId then
@@ -537,7 +537,9 @@
 	else
 		tt:SetInventoryItem("player", slotId)
 	end
-	return self:IsTextInTooltip(tt, ITEM_SOULBOUND)
+	if self:IsTextInTooltip(tt, ITEM_SOULBOUND) then return true end
+	if self:IsTextInTooltip(tt, ITEM_BNETACCOUNTBOUND) then return true end
+	if self:IsTextInTooltip(tt, ITEM_ACCOUNTBOUND) then return true end
 end
 
 -- helper to determine if an item has a unique constraint