Thread Tools Display Modes
07/23/18, 09:17 AM   #1
SlippyCheeze
AddOn Author - Click to view addons
Join Date: Jul 2018
Posts: 53
Draw weapon while out of combat, if reticle sits on a hostile enemy

I keep finding myself in the annoying "git gud" position of forgetting to draw my staff before I attack a hostile, so my first light/ability combo only fires off the later since the click pulls out the staff but doesn't attack.

I've had a look around, but can't find anything that delivers what I would prefer, which is:

While out of combat, if my reticle sits on a hostile target for a reasonable time (thinking 0.5 to 1 second) then I will automatically draw my weapon, if it is not already out.

Is there an addon that does this already, which I have missed?
  Reply With Quote
07/23/18, 10:30 AM   #2
Baertram
Super Moderator
 
Baertram's Avatar
WoWInterface Super Mod
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 4,913
Nope, I'm not aware of an addon doing this.
And to be true: This maybe doable but would need to check mouse movement and reticle over functions that heavy (on each reticle name change) that you won't want an addon do this and slow your CPU down

Maybe just bind a key to draw weapon and press this constantly if you look at enemies
  Reply With Quote
07/23/18, 01:52 PM   #3
SlippyCheeze
AddOn Author - Click to view addons
Join Date: Jul 2018
Posts: 53
Originally Posted by Baertram View Post
Nope, I'm not aware of an addon doing this.
And to be true: This maybe doable but would need to check mouse movement and reticle over functions that heavy (on each reticle name change) that you won't want an addon do this and slow your CPU down

Maybe just bind a key to draw weapon and press this constantly if you look at enemies
Hrm. I figured it couldn't be that costly, because the existing reticle and/or the "combat reticle" and "rainbow reticle" mods changed color based on target. Thank you for the feedback, however. I'll have more of a think about it... and try out "git gud"
  Reply With Quote
07/26/18, 05:14 AM   #4
SDPhantom
 
SDPhantom's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 47
Here's a drycoded example of how I can see this working. Without access to unique mob IDs, this can run into problems of false triggering.

Lua Code:
  1. local TargetTimeout=5000;
  2.  
  3. local function OnTimeout()
  4.     if DoesUnitExist("reticleover") and GetUnitReaction("reticleover")==UNIT_REACTION_HOSTILE and ArePlayerWeaponsSheathed() then
  5.         TogglePlayerWield();
  6.     end
  7.     EVENT_MANAGER:UnregisterForUpdate("AutoDraw");
  8. end
  9.  
  10. EVENT_MANAGER:RegisterForEvent("AutoDraw",EVENT_RETICLE_TARGET_CHANGED,function()
  11.     EVENT_MANAGER[(DoesUnitExist("reticleover") and GetUnitReaction("reticleover")==UNIT_REACTION_HOSTILE) and "RegisterForUpdate" or "UnregisterForUpdate"](EVENT_MANAGER,"AutoDraw",TargetTimeout,OnTimeout);
  12. end);

Last edited by SDPhantom : 07/26/18 at 05:16 AM.
  Reply With Quote
07/30/18, 01:38 PM   #5
SlippyCheeze
AddOn Author - Click to view addons
Join Date: Jul 2018
Posts: 53
Originally Posted by SDPhantom View Post
Here's a drycoded example of how I can see this working. Without access to unique mob IDs, this can run into problems of false triggering.

Lua Code:
  1. local TargetTimeout=5000;
  2.  
  3. local function OnTimeout()
  4.     if DoesUnitExist("reticleover") and GetUnitReaction("reticleover")==UNIT_REACTION_HOSTILE and ArePlayerWeaponsSheathed() then
  5.         TogglePlayerWield();
  6.     end
  7.     EVENT_MANAGER:UnregisterForUpdate("AutoDraw");
  8. end
  9.  
  10. EVENT_MANAGER:RegisterForEvent("AutoDraw",EVENT_RETICLE_TARGET_CHANGED,function()
  11.     EVENT_MANAGER[(DoesUnitExist("reticleover") and GetUnitReaction("reticleover")==UNIT_REACTION_HOSTILE) and "RegisterForUpdate" or "UnregisterForUpdate"](EVENT_MANAGER,"AutoDraw",TargetTimeout,OnTimeout);
  12. end);
Sorry for not getting back to you sooner, thank you very much! I'll be honest, I don't really care too much about false positives in this, because drawing my weapon is never really much of an inconvenience (that I know of, anyway), compared to not drawing it when [s]I'm stupid[/s] I forget, so don't get that first light attack, and then screw up the flow of weaving for a few more.
  Reply With Quote
08/01/18, 05:55 AM   #6
Drummerx04
AddOn Author - Click to view addons
Join Date: Sep 2017
Posts: 54
A much easier option is to disable the auto-sheath feature so your character will never put away his/her weapon unless you specifically press the button to do so. (I think it's in settings->gameplay)

Maybe that doesn't answer the question, but it may be an acceptable alternative for you.
  Reply With Quote
08/04/18, 09:08 AM   #7
SDPhantom
 
SDPhantom's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2014
Posts: 47
Originally Posted by Drummerx04 View Post
A much easier option is to disable the auto-sheath feature so your character will never put away his/her weapon unless you specifically press the button to do so. (I think it's in settings->gameplay)
I'm guessing you have an addon for this. I'm not seeing the option anywhere in the default UI.
  Reply With Quote

ESOUI » AddOns » AddOn Search/Requests » Draw weapon while out of combat, if reticle sits on a hostile enemy

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off