mirror of
https://github.com/brues-code/SuperCleveRoidMacros.git
synced 2026-09-16 03:38:00 +00:00
Compare commits
16 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 1770f7b6e1 | |||
| d060b04908 | |||
| 6ac69501f5 | |||
| 782c685fba | |||
| 97e898f14c | |||
| b84835a567 | |||
| 40cf2c8010 | |||
| a5a0b9c00a | |||
| 6e57ff01dc | |||
| 9cd79d682d | |||
| f54eda5ae3 | |||
| 653f8db3d7 | |||
| 86fb0254e6 | |||
| fc640abb07 | |||
| 3384765faa | |||
| ceaf7c2c43 |
+41
-69
@@ -273,24 +273,17 @@ local function BuildEquipmentCache()
|
||||
end
|
||||
end
|
||||
|
||||
-- Fallback: manual slot enumeration
|
||||
-- Fallback: manual slot enumeration via ClassicAPI (id + decorated name),
|
||||
-- no link string built. C_Item.GetItemName carries random-suffix decoration
|
||||
-- and falls back to the base name internally, so it replaces the old
|
||||
-- bracket-name / GetItemInfo two-step in a single call.
|
||||
for slot = 1, 19 do
|
||||
local link = GetInventoryItemLink("player", slot)
|
||||
if link then
|
||||
local _, _, id = string_find(link, "item:(%d+)")
|
||||
local _, _, nameInBrackets = string_find(link, "%[(.+)%]")
|
||||
|
||||
if id then
|
||||
_equippedItemIDs[slot] = tonumber(id)
|
||||
end
|
||||
if nameInBrackets then
|
||||
_equippedItemNames[slot] = string_lower(nameInBrackets)
|
||||
elseif id then
|
||||
-- Fallback: resolve via GetItemInfo
|
||||
local itemName = GetItemInfo(tonumber(id))
|
||||
if itemName then
|
||||
_equippedItemNames[slot] = string_lower(itemName)
|
||||
end
|
||||
local id = GetInventoryItemID("player", slot)
|
||||
if id then
|
||||
_equippedItemIDs[slot] = id
|
||||
local name = C_Item.GetItemName({ equipmentSlotIndex = slot })
|
||||
if name then
|
||||
_equippedItemNames[slot] = string_lower(name)
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -350,8 +343,7 @@ function CleveRoids.FindItemLocation(item)
|
||||
if numericItem then
|
||||
-- Check if it's an equipment slot (1-19)
|
||||
if numericItem >= 1 and numericItem <= 19 then
|
||||
local link = GetInventoryItemLink("player", numericItem)
|
||||
if link then
|
||||
if GetInventoryItemID("player", numericItem) then
|
||||
return { type = "inventory", inventoryID = numericItem }
|
||||
end
|
||||
return nil
|
||||
@@ -3466,11 +3458,8 @@ function CleveRoids.ValidateCooldown(args, ignoreGCD)
|
||||
-- If this is a numeric slot (1-19), resolve to the equipped item's name
|
||||
local slotNum = tonumber(name)
|
||||
if slotNum and slotNum >= 1 and slotNum <= 19 then
|
||||
local link = GetInventoryItemLink("player", slotNum)
|
||||
if link then
|
||||
local _, _, itemName = string.find(link, "%[(.+)%]")
|
||||
if itemName then name = itemName end
|
||||
end
|
||||
local itemName = C_Item.GetItemName({ equipmentSlotIndex = slotNum })
|
||||
if itemName then name = itemName end
|
||||
end
|
||||
args = {name = name}
|
||||
else
|
||||
@@ -3481,11 +3470,8 @@ function CleveRoids.ValidateCooldown(args, ignoreGCD)
|
||||
-- If this is a numeric slot (1-19), resolve to the equipped item's name
|
||||
local slotNum = tonumber(name)
|
||||
if slotNum and slotNum >= 1 and slotNum <= 19 then
|
||||
local link = GetInventoryItemLink("player", slotNum)
|
||||
if link then
|
||||
local _, _, itemName = string.find(link, "%[(.+)%]")
|
||||
if itemName then name = itemName end
|
||||
end
|
||||
local itemName = C_Item.GetItemName({ equipmentSlotIndex = slotNum })
|
||||
if itemName then name = itemName end
|
||||
end
|
||||
args.name = name
|
||||
else
|
||||
@@ -4869,13 +4855,11 @@ function CleveRoids.HasItem(item)
|
||||
if type(item) == "string" and item ~= "" then
|
||||
local itemLower = string.lower(item)
|
||||
|
||||
-- Check equipped slots for substring match
|
||||
for slot = 0, 19 do
|
||||
local link = GetInventoryItemLink("player", slot)
|
||||
if link then
|
||||
if string.find(string.lower(link), itemLower, 1, true) then
|
||||
return true
|
||||
end
|
||||
-- Check equipped slots for substring match (decorated name, no link build)
|
||||
for slot = 1, 19 do
|
||||
local name = C_Item.GetItemName({ equipmentSlotIndex = slot })
|
||||
if name and string.find(string.lower(name), itemLower, 1, true) then
|
||||
return true
|
||||
end
|
||||
end
|
||||
|
||||
@@ -4884,11 +4868,9 @@ function CleveRoids.HasItem(item)
|
||||
local size = GetContainerNumSlots(bag)
|
||||
if size and size > 0 then
|
||||
for slotIndex = 1, size do
|
||||
local link = GetContainerItemLink(bag, slotIndex)
|
||||
if link then
|
||||
if string.find(string.lower(link), itemLower, 1, true) then
|
||||
return true
|
||||
end
|
||||
local name = C_Item.GetItemName({ bagID = bag, slotIndex = slotIndex })
|
||||
if name and string.find(string.lower(name), itemLower, 1, true) then
|
||||
return true
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -4933,14 +4915,12 @@ function CleveRoids.GetItemCooldown(item)
|
||||
local itemLower = string.lower(item)
|
||||
local start, dur, en
|
||||
|
||||
-- Check equipped slots for substring match
|
||||
for slot = 0, 19 do
|
||||
local link = GetInventoryItemLink("player", slot)
|
||||
if link then
|
||||
if string.find(string.lower(link), itemLower, 1, true) then
|
||||
start, dur, en = GetInventoryItemCooldown("player", slot)
|
||||
return _norm(start, dur, en)
|
||||
end
|
||||
-- Check equipped slots for substring match (decorated name, no link build)
|
||||
for slot = 1, 19 do
|
||||
local name = C_Item.GetItemName({ equipmentSlotIndex = slot })
|
||||
if name and string.find(string.lower(name), itemLower, 1, true) then
|
||||
start, dur, en = GetInventoryItemCooldown("player", slot)
|
||||
return _norm(start, dur, en)
|
||||
end
|
||||
end
|
||||
|
||||
@@ -4949,12 +4929,10 @@ function CleveRoids.GetItemCooldown(item)
|
||||
local size = GetContainerNumSlots(bag)
|
||||
if size and size > 0 then
|
||||
for slotIndex = 1, size do
|
||||
local link = GetContainerItemLink(bag, slotIndex)
|
||||
if link then
|
||||
if string.find(string.lower(link), itemLower, 1, true) then
|
||||
start, dur, en = GetContainerItemCooldown(bag, slotIndex)
|
||||
return _norm(start, dur, en)
|
||||
end
|
||||
local name = C_Item.GetItemName({ bagID = bag, slotIndex = slotIndex })
|
||||
if name and string.find(string.lower(name), itemLower, 1, true) then
|
||||
start, dur, en = GetContainerItemCooldown(bag, slotIndex)
|
||||
return _norm(start, dur, en)
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -5887,13 +5865,10 @@ CleveRoids.Keywords = {
|
||||
local itemName = name
|
||||
local slotNum = tonumber(name)
|
||||
if slotNum and slotNum >= 1 and slotNum <= 19 then
|
||||
-- Resolve slot number to item name
|
||||
local link = GetInventoryItemLink("player", slotNum)
|
||||
if link then
|
||||
local _, _, extractedName = string.find(link, "%[(.+)%]")
|
||||
if extractedName then
|
||||
itemName = extractedName
|
||||
end
|
||||
-- Resolve slot number to item name (decorated, no link build)
|
||||
local extractedName = C_Item.GetItemName({ equipmentSlotIndex = slotNum })
|
||||
if extractedName then
|
||||
itemName = extractedName
|
||||
end
|
||||
end
|
||||
|
||||
@@ -5925,13 +5900,10 @@ CleveRoids.Keywords = {
|
||||
local itemName = name
|
||||
local slotNum = tonumber(name)
|
||||
if slotNum and slotNum >= 1 and slotNum <= 19 then
|
||||
-- Resolve slot number to item name
|
||||
local link = GetInventoryItemLink("player", slotNum)
|
||||
if link then
|
||||
local _, _, extractedName = string.find(link, "%[(.+)%]")
|
||||
if extractedName then
|
||||
itemName = extractedName
|
||||
end
|
||||
-- Resolve slot number to item name (decorated, no link build)
|
||||
local extractedName = C_Item.GetItemName({ equipmentSlotIndex = slotNum })
|
||||
if extractedName then
|
||||
itemName = extractedName
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
@@ -67,6 +67,10 @@ SLASH_UNSHIFT1 = "/unshift"
|
||||
|
||||
SlashCmdList.UNSHIFT = CleveRoids.DoUnshift
|
||||
|
||||
SLASH_CANCELFORM1 = "/cancelform"
|
||||
|
||||
SlashCmdList.CANCELFORM = CleveRoids.DoCancelForm
|
||||
|
||||
SLASH_UNQUEUE1 = "/unqueue"
|
||||
SlashCmdList.UNQUEUE = SpellStopCasting
|
||||
|
||||
|
||||
@@ -58,11 +58,7 @@ function CleveRoids.IndexSpells()
|
||||
bookType = CleveRoids.bookTypes[book]
|
||||
spells[bookType] = {}
|
||||
else
|
||||
local cost, reagent = CleveRoids.GetSpellCost(i, bookType)
|
||||
-- Fallback for known reagent spells if tooltip scan failed
|
||||
if (not reagent or reagent == "") and CleveRoids.ReagentBySpell then
|
||||
reagent = CleveRoids.ReagentBySpell[spellName]
|
||||
end
|
||||
local cost, reagent, reagentId = CleveRoids.GetSpellCost(i, bookType, spellId)
|
||||
if not spells[bookType][spellName] then
|
||||
spells[bookType][spellName] = {
|
||||
spellSlot = i,
|
||||
@@ -71,7 +67,7 @@ function CleveRoids.IndexSpells()
|
||||
bookType = bookType,
|
||||
texture = texture,
|
||||
cost = cost,
|
||||
reagent = reagent,
|
||||
reagentId = reagentId,
|
||||
}
|
||||
end
|
||||
if spellRank and not spells[bookType][spellName][spellRank] then
|
||||
@@ -83,7 +79,7 @@ function CleveRoids.IndexSpells()
|
||||
bookType = bookType,
|
||||
texture = texture,
|
||||
cost = cost,
|
||||
reagent = reagent
|
||||
reagentId = reagentId,
|
||||
}
|
||||
spells[bookType][spellName].highest = spells[bookType][spellName][spellRank]
|
||||
end
|
||||
@@ -94,6 +90,13 @@ function CleveRoids.IndexSpells()
|
||||
|
||||
if reagent then
|
||||
CleveRoids.countedItemTypes[reagent] = true
|
||||
elseif reagentId and Item then
|
||||
Item:CreateFromItemID(reagentId):ContinueOnItemLoad(function()
|
||||
local loadedName = C_Item.GetItemNameByID(reagentId)
|
||||
if loadedName and loadedName ~= "" then
|
||||
CleveRoids.countedItemTypes[loadedName] = true
|
||||
end
|
||||
end)
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -156,10 +159,9 @@ end
|
||||
function CleveRoids.IndexEquippedItems()
|
||||
local items = CleveRoids.Items or {}
|
||||
|
||||
for inventoryID = 0, 19 do
|
||||
local link = GetInventoryItemLink("player", inventoryID)
|
||||
if link then
|
||||
local _, _, itemID = string.find(link, "item:(%d+)")
|
||||
for inventoryID = 1, 19 do
|
||||
local itemID = GetInventoryItemID("player", inventoryID)
|
||||
if itemID then
|
||||
local name, link, _, _, itemType, itemSubType, _, _, texture = GetItemInfo(itemID)
|
||||
if name then
|
||||
local count = GetInventoryItemCount("player", inventoryID)
|
||||
@@ -199,10 +201,9 @@ function CleveRoids.IndexEquipSlot(inventoryID)
|
||||
if not inventoryID then return end
|
||||
|
||||
local items = CleveRoids.Items or {}
|
||||
local link = GetInventoryItemLink("player", inventoryID)
|
||||
local itemID = GetInventoryItemID("player", inventoryID)
|
||||
|
||||
if link then
|
||||
local _, _, itemID = string.find(link, "item:(%d+)")
|
||||
if itemID then
|
||||
local name, itemLink, _, _, itemType, itemSubType, _, _, texture = GetItemInfo(itemID)
|
||||
if name then
|
||||
local count = GetInventoryItemCount("player", inventoryID)
|
||||
@@ -265,21 +266,17 @@ function CleveRoids.IndexItems()
|
||||
|
||||
-- PERFORMANCE: Local function references
|
||||
local GetContainerNumSlots = GetContainerNumSlots
|
||||
local GetContainerItemLink = GetContainerItemLink
|
||||
local GetContainerItemInfo = GetContainerItemInfo
|
||||
local GetInventoryItemLink = GetInventoryItemLink
|
||||
local GetInventoryItemCount = GetInventoryItemCount
|
||||
|
||||
-- Scan bags (reverse order to prefer first stack)
|
||||
for bagID = 0, NUM_BAG_SLOTS do
|
||||
local numSlots = GetContainerNumSlots(bagID)
|
||||
for slot = numSlots, 1, -1 do
|
||||
local link = GetContainerItemLink(bagID, slot)
|
||||
if link then
|
||||
local _, _, itemID = string_find(link, "item:(%d+)")
|
||||
|
||||
-- PERFORMANCE: Try to extract name from link first to check for duplicates
|
||||
local _, _, linkName = string_find(link, "%[(.+)%]")
|
||||
local itemID = C_Container.GetContainerItemID(bagID, slot)
|
||||
if itemID then
|
||||
-- Decorated name for the duplicate fast-path (no link string built)
|
||||
local linkName = C_Item.GetItemName({ bagID = bagID, slotIndex = slot })
|
||||
local existing = linkName and items[linkName]
|
||||
|
||||
if existing then
|
||||
@@ -317,13 +314,11 @@ function CleveRoids.IndexItems()
|
||||
end
|
||||
|
||||
-- Scan equipped items
|
||||
for inventoryID = 0, 19 do
|
||||
local link = GetInventoryItemLink("player", inventoryID)
|
||||
if link then
|
||||
local _, _, itemID = string_find(link, "item:(%d+)")
|
||||
|
||||
-- PERFORMANCE: Try to extract name from link first
|
||||
local _, _, linkName = string_find(link, "%[(.+)%]")
|
||||
for inventoryID = 1, 19 do
|
||||
local itemID = GetInventoryItemID("player", inventoryID)
|
||||
if itemID then
|
||||
-- Decorated name for the duplicate fast-path (no link string built)
|
||||
local linkName = C_Item.GetItemName({ equipmentSlotIndex = inventoryID })
|
||||
local existing = linkName and items[linkName]
|
||||
|
||||
if existing then
|
||||
@@ -477,10 +472,8 @@ local function makeInventoryItem(inventoryID, link, Items)
|
||||
if not link then link = GetInventoryItemLink("player", inventoryID) end
|
||||
if not link then return end
|
||||
|
||||
local _, _, itemID = string_find(link, "item:(%d+)")
|
||||
itemID = itemID and tonumber(itemID) or nil
|
||||
|
||||
local name = itemID and GetItemInfo(itemID) or nil
|
||||
local itemID = GetInventoryItemID("player", inventoryID)
|
||||
local name = C_Item.GetItemName({ equipmentSlotIndex = inventoryID })
|
||||
local texture = GetInventoryItemTexture("player", inventoryID)
|
||||
local count = GetInventoryItemCount("player", inventoryID)
|
||||
|
||||
@@ -509,14 +502,12 @@ local function makeBagItem(bagID, slot, link, Items)
|
||||
end
|
||||
if not link then return end
|
||||
|
||||
local _, _, itemID = string_find(link, "item:(%d+)")
|
||||
itemID = itemID and tonumber(itemID) or nil
|
||||
local itemID = C_Container.GetContainerItemID(bagID, slot)
|
||||
|
||||
local name, _, _, _, _, _, _, _, texture = GetItemInfo(itemID)
|
||||
local name = C_Item.GetItemName({bagID = bagID, slotIndex = slot})
|
||||
local count = 0
|
||||
local tex, itemCount = GetContainerItemInfo(bagID, slot)
|
||||
local texture, itemCount = GetContainerItemInfo(bagID, slot)
|
||||
if itemCount then count = itemCount end
|
||||
if not texture then texture = tex end
|
||||
|
||||
local it = {
|
||||
bagID = bagID,
|
||||
@@ -574,9 +565,7 @@ function CleveRoids.GetItem(text)
|
||||
for inv = 1, 19 do
|
||||
local link = GetInventoryItemLink("player", inv)
|
||||
if link then
|
||||
local _, _, itemID = string_find(link, "item:(%d+)")
|
||||
itemID = itemID and tonumber(itemID) or nil
|
||||
|
||||
local itemID = GetInventoryItemID("player", inv)
|
||||
if qid and itemID and qid == itemID then
|
||||
return makeInventoryItem(inv, link, Items)
|
||||
elseif qname then
|
||||
@@ -595,9 +584,7 @@ function CleveRoids.GetItem(text)
|
||||
for slot = 1, slots do
|
||||
local link = GetContainerItemLink(bag, slot)
|
||||
if link then
|
||||
local _, _, itemID = string_find(link, "item:(%d+)")
|
||||
itemID = itemID and tonumber(itemID) or nil
|
||||
|
||||
local itemID = C_Container.GetContainerItemID(bag, slot)
|
||||
if qid and itemID and qid == itemID then
|
||||
return makeBagItem(bag, slot, link, Items)
|
||||
elseif qname then
|
||||
@@ -720,18 +707,16 @@ function CleveRoids.FindItemQuick(text)
|
||||
if cached then
|
||||
-- Validate: check if item is actually at the cached location
|
||||
if cached.inventoryID then
|
||||
local link = GetInventoryItemLink("player", cached.inventoryID)
|
||||
if link then
|
||||
local nm = GetNameFromLink(link)
|
||||
if qid then
|
||||
if GetInventoryItemID("player", cached.inventoryID) == qid then
|
||||
cached._validated = true
|
||||
return cached -- Cache is valid
|
||||
end
|
||||
else
|
||||
local nm = C_Item.GetItemName({ equipmentSlotIndex = cached.inventoryID })
|
||||
if nm and qname and string_lower(nm) == qname then
|
||||
cached._validated = true
|
||||
return cached -- Cache is valid
|
||||
elseif qid then
|
||||
local _, _, itemID = string_find(link, "item:(%d+)")
|
||||
if itemID and tonumber(itemID) == qid then
|
||||
cached._validated = true
|
||||
return cached -- Cache is valid
|
||||
end
|
||||
end
|
||||
end
|
||||
-- Cache is stale - item not at cached equipped slot, invalidate
|
||||
@@ -740,18 +725,16 @@ function CleveRoids.FindItemQuick(text)
|
||||
Items[string_lower(cached.name)] = nil
|
||||
end
|
||||
elseif cached.bagID and cached.slot then
|
||||
local link = GetContainerItemLink(cached.bagID, cached.slot)
|
||||
if link then
|
||||
local nm = GetNameFromLink(link)
|
||||
if qid then
|
||||
if C_Container.GetContainerItemID(cached.bagID, cached.slot) == qid then
|
||||
cached._validated = true
|
||||
return cached -- Cache is valid
|
||||
end
|
||||
else
|
||||
local nm = C_Item.GetItemName({ bagID = cached.bagID, slotIndex = cached.slot })
|
||||
if nm and qname and string_lower(nm) == qname then
|
||||
cached._validated = true
|
||||
return cached -- Cache is valid
|
||||
elseif qid then
|
||||
local _, _, itemID = string_find(link, "item:(%d+)")
|
||||
if itemID and tonumber(itemID) == qid then
|
||||
cached._validated = true
|
||||
return cached -- Cache is valid
|
||||
end
|
||||
end
|
||||
end
|
||||
-- Cache is stale - item not at cached bag slot, invalidate
|
||||
@@ -767,20 +750,17 @@ function CleveRoids.FindItemQuick(text)
|
||||
for inv = 1, 19 do
|
||||
local link = GetInventoryItemLink("player", inv)
|
||||
if link then
|
||||
local _, _, itemID = string_find(link, "item:(%d+)")
|
||||
if itemID then
|
||||
itemID = tonumber(itemID)
|
||||
-- ID match: fast path
|
||||
if qid and qid == itemID then
|
||||
local itemID = GetInventoryItemID("player", inv)
|
||||
-- ID match: fast path
|
||||
if qid and qid == itemID then
|
||||
return makeInventoryItem(inv, link, Items)
|
||||
end
|
||||
-- Name match: extract name from link (faster than GetItemInfo)
|
||||
if qname then
|
||||
local nm = GetNameFromLink(link)
|
||||
if nm and string_lower(nm) == qname then
|
||||
return makeInventoryItem(inv, link, Items)
|
||||
end
|
||||
-- Name match: extract name from link (faster than GetItemInfo)
|
||||
if qname then
|
||||
local nm = GetNameFromLink(link)
|
||||
if nm and string_lower(nm) == qname then
|
||||
return makeInventoryItem(inv, link, Items)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -791,20 +771,17 @@ function CleveRoids.FindItemQuick(text)
|
||||
for slot = 1, slots do
|
||||
local link = GetContainerItemLink(bag, slot)
|
||||
if link then
|
||||
local _, _, itemID = string_find(link, "item:(%d+)")
|
||||
if itemID then
|
||||
itemID = tonumber(itemID)
|
||||
-- ID match: fast path
|
||||
if qid and qid == itemID then
|
||||
local itemID = C_Container.GetContainerItemID(bag, slot)
|
||||
-- ID match: fast path
|
||||
if qid and qid == itemID then
|
||||
return makeBagItem(bag, slot, link, Items)
|
||||
end
|
||||
-- Name match: extract name from link (faster than GetItemInfo)
|
||||
if qname then
|
||||
local nm = GetNameFromLink(link)
|
||||
if nm and string_lower(nm) == qname then
|
||||
return makeBagItem(bag, slot, link, Items)
|
||||
end
|
||||
-- Name match: extract name from link (faster than GetItemInfo)
|
||||
if qname then
|
||||
local nm = GetNameFromLink(link)
|
||||
if nm and string_lower(nm) == qname then
|
||||
return makeBagItem(bag, slot, link, Items)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -818,25 +795,19 @@ end
|
||||
function CleveRoids.IsItemEquipped(text, inventoryId)
|
||||
if not text or not inventoryId then return false end
|
||||
|
||||
local link = GetInventoryItemLink("player", inventoryId)
|
||||
if not link then return false end
|
||||
|
||||
local _, _, currentID = string_find(link, "item:(%d+)")
|
||||
local currentID = GetInventoryItemID("player", inventoryId)
|
||||
if not currentID then return false end
|
||||
|
||||
-- Check by ID (fast path)
|
||||
local textId = tonumber(text)
|
||||
if textId and textId == tonumber(currentID) then
|
||||
if textId and textId == currentID then
|
||||
return true
|
||||
end
|
||||
|
||||
-- Check by name - extract from link instead of GetItemInfo for performance
|
||||
local currentName = GetNameFromLink(link)
|
||||
if currentName then
|
||||
local textLower = string_lower(text)
|
||||
if string_lower(currentName) == textLower then
|
||||
return true
|
||||
end
|
||||
-- Check by name (decorated, so suffixed gear still matches)
|
||||
local currentName = C_Item.GetItemName({ equipmentSlotIndex = inventoryId })
|
||||
if currentName and string_lower(currentName) == string_lower(text) then
|
||||
return true
|
||||
end
|
||||
|
||||
return false
|
||||
|
||||
+1
-6
@@ -6918,12 +6918,7 @@ function CleveRoids.ApplyEquipmentModifier(spellID, baseDuration)
|
||||
local modifiedDuration = modifier.modifier(baseDuration, itemID)
|
||||
|
||||
if modifiedDuration ~= baseDuration and CleveRoids.debug then
|
||||
local itemName = "Unknown"
|
||||
local itemLink = GetInventoryItemLink("player", modifier.slot)
|
||||
if itemLink then
|
||||
local _, _, _n = string.find(itemLink, "%[(.-)%]")
|
||||
itemName = _n or "Unknown"
|
||||
end
|
||||
local itemName = C_Item.GetItemName({ equipmentSlotIndex = modifier.slot }) or "Unknown"
|
||||
|
||||
DEFAULT_CHAT_FRAME:AddMessage(
|
||||
string.format("|cffff00ff[Equipment Modifier]|r %s (ID:%d): %ds -> %ds (item: %s [%d])",
|
||||
|
||||
Reference in New Issue
Block a user