From fb229a0a128dd36b3e531be7bd00d260649ce379 Mon Sep 17 00:00:00 2001 From: Haselnussbomber Date: Mon, 1 Dec 2025 12:07:34 +0100 Subject: [PATCH] Fix PlayerState.Level being synced --- Dalamud/Game/Player/PlayerState.cs | 2 +- Dalamud/Plugin/Services/IPlayerState.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Dalamud/Game/Player/PlayerState.cs b/Dalamud/Game/Player/PlayerState.cs index 917c946db..bd19b5bfb 100644 --- a/Dalamud/Game/Player/PlayerState.cs +++ b/Dalamud/Game/Player/PlayerState.cs @@ -77,7 +77,7 @@ internal unsafe class PlayerState : IServiceType, IPlayerState public RowRef ClassJob => this.IsLoaded ? LuminaUtils.CreateRef(CSPlayerState.Instance()->CurrentClassJobId) : default; /// - public short Level => this.IsLoaded ? CSPlayerState.Instance()->CurrentLevel : default; + public short Level => this.IsLoaded && this.ClassJob.IsValid ? this.GetClassJobLevel(this.ClassJob.Value) : this.EffectiveLevel; /// public bool IsLevelSynced => this.IsLoaded && CSPlayerState.Instance()->IsLevelSynced; diff --git a/Dalamud/Plugin/Services/IPlayerState.cs b/Dalamud/Plugin/Services/IPlayerState.cs index 1416dfb77..21d88010b 100644 --- a/Dalamud/Plugin/Services/IPlayerState.cs +++ b/Dalamud/Plugin/Services/IPlayerState.cs @@ -79,7 +79,7 @@ public interface IPlayerState : IDalamudService bool IsLevelSynced { get; } /// - /// Gets the effective level of the local character. + /// Gets the effective level of the local character, taking level sync into account. /// short EffectiveLevel { get; }