feat: add territorytype to client state

This commit is contained in:
goat 2020-03-25 01:39:46 +09:00
parent 00b263f08e
commit be3a07f1d4
3 changed files with 9 additions and 3 deletions

View file

@ -32,7 +32,6 @@ namespace Dalamud.Game.ClientState
/// <summary>
/// The local player character, if one is present.
/// </summary>
//public PlayerCharacter LocalPlayer { get; private set; }
public PlayerCharacter LocalPlayer {
get {
var actor = this.Actors[0];
@ -43,7 +42,8 @@ namespace Dalamud.Game.ClientState
return null;
}
}
//public PlayerCharacter LocalPlayer => null;
public ushort TerritoryType => (ushort) Marshal.ReadInt16(Address.TerritoryType);
/// <summary>
/// The content ID of the local character.
@ -73,6 +73,8 @@ namespace Dalamud.Game.ClientState
this.JobGauges = new JobGauges(Address);
Log.Verbose("TerritoryType address {TerritoryType}", Address.TerritoryType);
dalamud.Framework.OnUpdateEvent += FrameworkOnOnUpdateEvent;
}