mirror of
https://github.com/goatcorp/Dalamud.git
synced 2025-12-29 11:59:21 +01:00
Don't throw on ActorTable error
This commit is contained in:
parent
799f5ef634
commit
e75841deb9
4 changed files with 22 additions and 6 deletions
|
|
@ -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.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue