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...).
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.
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...
/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!
This will perform the same action as in the previous example except it will be triggered when the casting of Cyclone begins.
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.
- Fixed a few bugs related to channeled spells and having more than one of the same de/buff on at once.
- 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.
- Fixed bug with sending player control events.
- Added a few extra slash commands.
- Disabled more debugging code.
- Removed some testing/debugging code.
- Cleaned up more of LPC-1.0's code.
- Added a global version of the function PlayerHasControl().
- Cleaned up LPC-1.0's code.
- Created LibPlayerControl-1.0 library for API and events related to players losing control of their character.
- Removed chatframe warnings/messages.
- Added experimental Itemrack functions.
- 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).