This commit is contained in:
NoM0Re
2025-04-04 09:55:04 +02:00
parent 6cdfcac1b1
commit a595ef2a4a
15 changed files with 45 additions and 139 deletions
+5 -27
View File
@@ -4383,39 +4383,17 @@ do
end
end
WeakAuras.CheckForItemEquipped = function(itemId, specificSlot)
WeakAuras.CheckForItemEquipped = function(itemName, specificSlot)
if not specificSlot then
if type(itemId) == "number" then
return IsEquippedItem(itemId or '')
else
for slot in pairs(Private.item_slot_types) do
if WeakAuras.CheckForItemEquipped(itemId, slot) then
return true
end
end
end
return IsEquippedItem(itemName)
end
local equippedItemID = GetInventoryItemID("player", specificSlot)
return itemId and equippedItemID and (
(type(itemId) == "number" and itemId == equippedItemID)
or itemId == GetItemInfo(equippedItemID)
return itemName and equippedItemID and (
(type(itemName) == "number" and itemName == equippedItemID)
or itemName == GetItemInfo(equippedItemID)
)
end
Private.ExecEnv.IsEquippedItemForLoad = function(item, exact)
if not item then
return
end
if exact then
return WeakAuras.CheckForItemEquipped(item)
else
item = GetItemInfo(item)
if item then
return WeakAuras.CheckForItemEquipped(item)
end
end
end
WeakAuras.GetCritChance = function()
-- Based on what the wow paper doll does
local spellCrit = 0