- fix equip locs for non-english clients

This commit is contained in:
Parnic
2008-05-01 14:34:17 +00:00
parent 6490ddaa44
commit 833c45ef31

View File

@ -3,7 +3,8 @@ local AceOO = AceLibrary("AceOO-2.0")
local SliceAndDice = AceOO.Class(IceUnitBar)
local NetherbladeItemIdList = {29044, 29045, 29046, 29047, 29048}
local NetherbladeEquipLocList = {"HeadSlot", "ShoulderSlot", "ChestSlot", "LegsSlot", "HandsSlot"}
-- Parnic - bah, have to abandon the more robust string representation of each slot because of loc issues...
local NetherbladeEquipLocList = {1, 3, 5, 7, 10} --"HeadSlot", "ShoulderSlot", "ChestSlot", "LegsSlot", "HandsSlot"}
local baseTime = 9
local gapPerComboPoint = 3
@ -249,7 +250,7 @@ function SliceAndDice.prototype:HasNetherbladeBonus()
-- run through all the possible equip locations of a netherblade piece
for i=1,#NetherbladeEquipLocList do
-- pull the link string for the item in this equip loc
linkStr = GetInventoryItemLink(self.unit, GetInventorySlotInfo(NetherbladeEquipLocList[i]))
linkStr = GetInventoryItemLink(self.unit, NetherbladeEquipLocList[i])
-- get the item id out of that link string
itemId = self:GetItemIdFromItemLink(linkStr)
@ -269,9 +270,11 @@ end
function SliceAndDice.prototype:GetItemIdFromItemLink(linkStr)
local itemId
if linkStr then
_, itemId, _, _, _, _, _, _, _ = strsplit(":", linkStr)
end
return itemId
return itemId or 0
end
function SliceAndDice.prototype:IsItemIdInList(itemId, list)