Skip to content

Commit b4ed690

Browse files
committed
fix a bunch of constants that changed
1 parent dc93a6b commit b4ed690

1 file changed

Lines changed: 8 additions & 6 deletions

File tree

PersonalLootHelper-Core.lua

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -572,7 +572,7 @@ local lootedItems = {} -- array of items looted by player; keyed by name-r
572572
--[[ UTILITY FUNCTIONS ]]--
573573

574574
local function GetItemPrimaryAttribute(item)
575-
local stats = GetItemStats(item)
575+
local stats = C_Item.GetItemStats(item)
576576
if stats ~= nil then
577577
for stat, value in pairs(stats) do
578578
if _G[stat] == ITEM_MOD_STRENGTH_SHORT or _G[stat] == ITEM_MOD_INTELLECT_SHORT or _G[stat] == ITEM_MOD_AGILITY_SHORT then
@@ -1315,7 +1315,7 @@ local function UpdateLootedItemsDisplay()
13151315

13161316
-- BoE Label
13171317

1318-
if lootedItem[FULL_ITEM_INFO][FII_BIND_TYPE] == LE_ITEM_BIND_ON_EQUIP then
1318+
if lootedItem[FULL_ITEM_INFO][FII_BIND_TYPE] == Enum.ItemBind.OnEquip then
13191319
CreateLabel("BoE ", COLOR_BOE, labels[labelIndex], 'TOPRIGHT')
13201320
end
13211321

@@ -2057,7 +2057,7 @@ end
20572057
local function ShouldBeEvaluated(fullItemInfo)
20582058
return fullItemInfo[FII_IS_EQUIPPABLE]
20592059
and (fullItemInfo[FII_QUALITY] == Enum.ItemQuality.Rare or fullItemInfo[FII_QUALITY] == Enum.ItemQuality.Epic)
2060-
and (fullItemInfo[FII_BIND_TYPE] == LE_ITEM_BIND_ON_ACQUIRE or (fullItemInfo[FII_BIND_TYPE] == LE_ITEM_BIND_ON_EQUIP and not PLH_PREFS[PLH_PREFS_NEVER_OFFER_BOE]))
2060+
and (fullItemInfo[FII_BIND_TYPE] == Enum.ItemBind.OnAcquire or (fullItemInfo[FII_BIND_TYPE] == Enum.ItemBind.OnEquip and not PLH_PREFS[PLH_PREFS_NEVER_OFFER_BOE]))
20612061
-- and (not fullItemInfo[FII_IS_AZERITE_ITEM])
20622062
end
20632063

@@ -2153,7 +2153,7 @@ local function PerformNotify(fullItemInfo, looterName)
21532153
end
21542154
end
21552155
end
2156-
elseif not IsPLHUser(looterName) and fullItemInfo[FII_BIND_TYPE] ~= LE_ITEM_BIND_ON_EQUIP and not IsAnUpgradeForCharacter(fullItemInfo, looterName, 0, true) then
2156+
elseif not IsPLHUser(looterName) and fullItemInfo[FII_BIND_TYPE] ~= Enum.ItemBind.OnEquip and not IsAnUpgradeForCharacter(fullItemInfo, looterName, 0, true) then
21572157
if shouldAddLootedItem(fullItemInfo) then
21582158
AddLootedItem(fullItemInfo, looterName)
21592159
UpdateLootedItemsDisplay()
@@ -2166,6 +2166,7 @@ end
21662166

21672167
-- Event handler for CHAT_MSG_LOOT event
21682168
local function LootReceivedEvent(self, event, ...)
2169+
PLH_SendDebugMessage('LootReceivedEvent')
21692170
local LOOT_ITEM_SELF_PATTERN = _G.LOOT_ITEM_SELF:gsub('%%s', '(.+)') -- You receive loot: (.+)
21702171
local LOOT_ITEM_PATTERN = _G.LOOT_ITEM:gsub('%%s', '(.+)') -- (.+) receives loot: (.+)
21712172
--[[
@@ -2215,6 +2216,7 @@ local function LootReceivedEvent(self, event, ...)
22152216
end
22162217

22172218
if lootedItem then
2219+
PLH_SendDebugMessage('Looted Item: ' .. lootedItem)
22182220
local fullItemInfo = GetFullItemInfo(lootedItem)
22192221
PerformNotify(fullItemInfo, PLH_GetFullName(looter))
22202222
end
@@ -2843,10 +2845,10 @@ function PLH_TestInv()
28432845
local fii
28442846

28452847
for bag = 0, NUM_BAG_SLOTS do
2846-
for slot = 1, GetContainerNumSlots(bag) do
2848+
for slot = 1, C_Container.GetContainerNumSlots(bag) do
28472849
-- itemID = GetContainerItemID(bag, slot)
28482850
-- item = select(7, GetContainerItemInfo(bag, slot))
2849-
item = GetContainerItemLink(bag, slot)
2851+
item = C_Container.GetContainerItemLink(bag, slot)
28502852
if IsEquippableItem(item) then
28512853
print(item)
28522854
fii = GetFullItemInfo(item)

0 commit comments

Comments
 (0)