ItemRack Classic

ItemRack Classic

7M Downloads

Swaping off-hand midcombat doesen't work

OhNardo opened this issue ยท 6 comments

commented

It greys out and freezes for some reason.

lel

commented

You cannot use addons to change equipment during combat in classic, for that you have to use a macro.

commented

The latest version doesn't check the swappable flag at all, so you may be using an older one. Not sure if you need the latest from github or if that version was released on addon sites.

And yes, the API needed to pickup and/or swap items is combat locked by Blizzard.

commented

It's used here:

ItemRack/ItemRack/ItemRack.lua

Lines 1187 to 1189 in 9869e26

function ItemRack.EquipItemByID(id,slot)
if not id then return end
if not ItemRack.SlotInfo[slot].swappable and (UnitAffectingCombat("player") or ItemRack.IsPlayerReallyDead()) then

commented

A quick fix to have it swap when out of combat (better than nothing) is to remove the swappable=true option from line 90 in ItemRack.lua

This prevents it from getting stuck in the grey/locked state

New line is:
[17] = { name="SecondaryHandSlot", real="Off hand", INVTYPE_WEAPON=1, INVTYPE_WEAPONOFFHAND=1, INVTYPE_SHIELD=1, INVTYPE_HOLDABLE=1, other=16 },

Also, for my understanding, does one of the API functions simply not work while in combat?

commented

The greyed out bug for my off hand / shield is becoming problematic while raiding. Is there any way this change can be implemented to at least improve on the current situation? Thank you!

commented

I removed it in 3.19, please retest.