Don't throw on ActorTable error

This commit is contained in:
goat 2019-11-08 20:50:14 +09:00
parent 799f5ef634
commit e75841deb9
4 changed files with 22 additions and 6 deletions

View file

@ -33,7 +33,17 @@ namespace Dalamud.Game.ClientState
/// The local player character, if one is present.
/// </summary>
//public PlayerCharacter LocalPlayer { get; private set; }
public PlayerCharacter LocalPlayer => (PlayerCharacter) this.Actors[0];
public PlayerCharacter LocalPlayer {
get {
var actor = this.Actors[0];
if (actor is PlayerCharacter pc)
return pc;
return null;
}
}
//public PlayerCharacter LocalPlayer => null;
/// <summary>
/// The content ID of the local character.