Some changes to Actor Table handling

This commit is contained in:
goat 2019-11-03 21:17:47 +09:00
parent 6b5f8e6bed
commit 75ed54117c
8 changed files with 46 additions and 30 deletions

View file

@ -32,7 +32,7 @@ namespace Dalamud.Game.ClientState
/// <summary>
/// The local player character, if one is present.
/// </summary>
public PlayerCharacter LocalPlayer => (PlayerCharacter) this.Actors[0];
public PlayerCharacter LocalPlayer { get; private set; }
/// <summary>
/// The content ID of the local character.
@ -62,6 +62,13 @@ namespace Dalamud.Game.ClientState
this.Actors = new ActorTable(Address);
this.JobGauges = new JobGauges(Address);
dalamud.Framework.OnUpdateEvent += FrameworkOnOnUpdateEvent;
}
private void FrameworkOnOnUpdateEvent(Framework framework) {
LocalPlayer = (PlayerCharacter) this.Actors[0];
Log.Verbose("FRAMEWORK UPDATE");
}
}
}