add support for checking client conditions

This commit is contained in:
NotAdam 2020-05-26 23:13:39 +10:00
parent e6512d5f48
commit c6d46f9aea
7 changed files with 587 additions and 3 deletions

View file

@ -92,6 +92,11 @@ namespace Dalamud.Game.ClientState
/// </summary>
public KeyState KeyState;
/// <summary>
/// Provides access to client conditions/player state. Allows you to check if a player is in a duty, mounted, etc.
/// </summary>
public Condition Condition;
/// <summary>
/// Set up client state access.
/// </summary>
@ -114,6 +119,8 @@ namespace Dalamud.Game.ClientState
this.KeyState = new KeyState(Address, scanner.Module.BaseAddress);
this.Condition = new Condition( Address );
Log.Verbose("SetupTerritoryType address {SetupTerritoryType}", Address.SetupTerritoryType);
this.setupTerritoryTypeHook = new Hook<SetupTerritoryTypeDelegate>(Address.SetupTerritoryType,