Thread Tools Display Modes
02/25/16, 05:54 AM   #1
Wandamey
Guest
Posts: n/a
[outdated] IsWeaponSheathed()

IsWeaponSheathed() or events to avoid a constant check
Is this possible to return this with the API? So far, aside from trying to guess depending on situations, it's hard to get the current status of weapons, if they are sheathed or ready.

I've seen the question come back several times and I don't remember anyone finding a satisfying solution to get this value when it changes.

If not, i'd like to see it added, if possible.
Got killed too often because my cloak triggers too slow after I've looted things and forgot to unsheath but I can imagine a lot more possibilities to use this.


Edit and changed the title, I was more speaking of events SHEATH/UNSHEATH actually.

Thanks for considering it.

Last edited by Wandamey : 02/25/16 at 06:08 AM.
 
02/25/16, 06:08 AM   #2
sirinsidiator
 
sirinsidiator's Avatar
AddOn Author - Click to view addons
Join Date: Apr 2014
Posts: 1,578
A matching event would also be nice.
EVENT_WEAPON_STATE_CHANGED(WeaponStateChangeReason reason)

WeaponStateChangeReason would then be one of these:
WEAPON_STATE_CHANGE_REASON_WEAPON_CHANGE - when they get drawn after equipping a different weapon
WEAPON_STATE_CHANGE_REASON_WEAPON_SWAP - when they get drawn by using weapon swap
WEAPON_STATE_CHANGE_REASON_PLAYER_DRAWN - when they are simply drawn by the player
WEAPON_STATE_CHANGE_REASON_PLAYER_SHEATHED - when they are simply sheathed by the player
WEAPON_STATE_CHANGE_REASON_OTHER_PLAYER_ABILITY - when they get drawn in response to another players ability cast
 
02/25/16, 06:10 AM   #3
Wandamey
Guest
Posts: n/a
oups I didn't edit fast enough :s

thanks for translating my gibberish again

edit : it sheathes on interaction with objects too, chests skyshards etc... annoying in delves

+ WEAPON_STATE_CHANGE_REASON_INTERACTION

Last edited by Wandamey : 02/25/16 at 06:30 AM.
 
03/01/16, 03:57 PM   #4
Terrillyn
AddOn Author - Click to view addons
Join Date: Jan 2016
Posts: 24
Thumbs up

IsWeaponSheathed() definitely and an event.

Is this possible to return this with the API? So far, aside from trying to guess depending on situations, it's hard to get the current status of weapons, if they are sheathed or ready.
AFAIK there isn't I looked through the source quite extensively myself and couldn't find anything relating.
 

ESOUI » Developer Discussions » Wish List » [outdated] IsWeaponSheathed()


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