ItemRackStun

Blizzard has made in-combat weapon swapping a protected action, so this addon is no longer able to function properly.

ItemRackStun is a LoD plugin for Gello'sItemRack addon that adds stun/disarm (or anything that causes you lose control of your character or weapon) detection, allowing weapon/gear changes to be postponed until those effects fade (instead of ItemRack trying a few times and then giving up; waiting until combat fades; etc...).

Example:

1) You use a macro which tells ItemRack to equip a sword/shield.
2) Another player disarms you either before or during your weapon swap.
3a) Without ItemRackStun: Normally, ItemRack would just keep trying to equip the weapon even though you can't swap weapons while disarmed. Eventually ItemRack would give up, sometimes disabling your ability to swap weapons until combat fades.
3b) With ItemRackStun: ItemRack detects that you've been disarmed and queues the weapon swap to be completed after disarm fades.

CanCastOptionParse:
I've added a new options parser for insecure actions (talking, dismounting, changing equipment, etc...) that checks a spell's casting status in addition to the player's control status.

The new options are:

spell(or &)=* -> The spell that is going to be checked. (If this is not specified then all other options will be ignored.)

gcd=* -> The maximum amount of time left on the spells cooldown in order to be considered ready. (Default: 0)

ignore:control/equip/form/reagent -> Specifies if the parser should ignore any spell form/equipment/reagent requirements or if the player is unable to act.

cast=*: Can be either start/stop/done/fail and will cause the command to be passed along to a handle which will be triggered when the provided spell (spell=* or the next sent spell) cast has either started, stopped, finished or failed.

no*: If any (or rather most) of the above options are prefixed with 'no' then the opposite will be checked/preformed.

To reiterate: This is only usable with INSECURE ACTIONS. You cannot use this to cast spells, change targets, etc...

Slash Commands:

/dismount & /itemrack: Now use CanCastOptionParse, so you can preform actions based on spell conditions.

/scopt: New command for performing any insecure action.

ex. /scopt [spell=Cyclone] /raid Casting Cyclone on %t!

This will announce "Casting Cyclone on <target>!" in raid chat if cyclone is castable.

Alternatively, you could do:

ex. /scopt [cast=start] /raid Casting Cyclone on %t!
/cast Cyclone

This will perform the same action as in the previous example except it will be triggered when the casting of Cyclone begins.

History:

Blizzard's default API does not give any information whether a player is disarmed or completely unable to act (the closest is HasFullControl() which only returns false for Fear effects). So, I've created a library that watches for effects (gathered from WoW's DBC files) that cause the player to be stunned/feared/charmed/confused/disarmed and offers new functions and events regarding the players control state.

I'll be adding features as I (or anyone with any suggestions) comes up with them.

There are no options (and I can't really think of any to add), but if you have any you'd like to see please feel free to comment on them.

r35-Release
- Removed unneeded debugging output code.

r34-Release
- Fixed a few bugs related to channeled spells and having more than one of the same de/buff on at once.

r32-Release
- Added new insecure command option parser for player state and spell cast info.
- Removed the new slash commands as they were made obselte witht he new option parser.

r27-Release
- Fixed bug with sending player control events.
- Added a few extra slash commands.

r26-Release
- Disabled more debugging code.

r25-Release
- Removed some testing/debugging code.
- Cleaned up more of LPC-1.0's code.
- Added a global version of the function PlayerHasControl().

r18-Release
- I finally took the time/effort to parse the spell DBC files within the WoW client and compiled a complete list of all stun/disarm effects.
- The chat warning will only be printed out once per effect (to make it less spammy).

You just use itemrack as normal. If you try to switch weapons (or anything) while stunned or disarmed, this addon causes ItemRack to wait for the debuff to fade before doing anything.

For example:

On my Warrior I use a macro that uses itemrack to equip my sword+shield.

Sometimes I would press the macro while a rogue simultaneously dismantles me. ItemRack doesn't check for debuffs normally so it would just keep trying to equip the weapon before giving up after a few tries. And for me, the addon would sometimes lock up and only respond once I left combat (or died in this case).

This addon makes ItemRack check for stun/disarm/etc debuffs and makes it wait for those effects to fade before attempting to swap weapons.

Originally posted by Draake This is not a stand alone addon, but a plugin for the ItemRack addon.

Currently, ItemRack (or anything, really; including blizzards own macros) doesn't deal very well when you get stunned/disarmed halfway through a swap, or when you try to start a swap while stunned/disarmed. This plugin hooks into ItemRack and post pones the swap until the debuffs fade.

Sorry if this is a bit stupid but I really don't know how the addon works. How do I get it to change weapons? And how do I choose which weapon it changes to? Also, does it change back to the weapon I had equipped before when the disarm effect is over?

Currently, ItemRack (or anything, really; including blizzards own macros) doesn't deal very well when you get stunned/disarmed halfway through a swap, or when you try to start a swap while stunned/disarmed. This plugin hooks into ItemRack and post pones the swap until the debuffs fade.

Sorry if this is a bit stupid but I really don't know how the addon works. How do I get it to change weapons? And how do I choose which weapon it changes to? Also, does it change back to the weapon I had equipped before when the disarm effect is over?