View Single Post
12-04-15, 02:11 PM   #1
Resike
A Pyroguard Emberseer
AddOn Author - Click to view addons
Join Date: Mar 2010
Posts: 1,290
SecureHandlerState

I would like to create a state handler for the vehicle state when the player is in vehicle and has a vehicle UI.

I have tried:

Lua Code:
  1. RegisterStateDriver(self.frame.state, "vehicleupdate", "[target=player, nohelp, noharm] invehicle; none")

However there are some issues with this one since there are some flight masters which incorrectly returns invehicle, even when you are not in one. (Like the dragons in Dragon Soul and in some other instances.)

I have also tried this one, which works better, however it also returns invehicle when the user has no vehicle ui.

Lua Code:
  1. RegisterStateDriver(self.frame.state, "vehicleupdate", "[target=vehicle, exists] invehicle; none")

If someone could help me merge the two methods somehow, or if someone has a proper state driver for this i would be greatful.
  Reply With Quote