diff --git a/Common/Data/Excel/AvatarConfigExcel.cs b/Common/Data/Excel/AvatarConfigExcel.cs index 52b57de4..5d5a737f 100644 --- a/Common/Data/Excel/AvatarConfigExcel.cs +++ b/Common/Data/Excel/AvatarConfigExcel.cs @@ -15,6 +15,7 @@ public class AvatarConfigExcel : ExcelResource [JsonIgnore] public List SkillTree = []; public int AvatarID { get; set; } = 0; + public int AdventurePlayerID { get; set; } public HashName AvatarName { get; set; } = new(); public int ExpGroup { get; set; } = 0; public int MaxPromotion { get; set; } = 0; diff --git a/GameServer/Game/Battle/SceneSkillManager.cs b/GameServer/Game/Battle/SceneSkillManager.cs index 046a7368..4ef99523 100644 --- a/GameServer/Game/Battle/SceneSkillManager.cs +++ b/GameServer/Game/Battle/SceneSkillManager.cs @@ -63,7 +63,8 @@ public class SceneSkillManager(PlayerInstance player) : BasePlayerManager(player return GameData.AdventureAbilityConfigListData.GetValueOrDefault(monster.MonsterData.ID); if (entity is AvatarSceneInfo avatar) - return GameData.AdventureAbilityConfigListData.GetValueOrDefault(avatar.AvatarInfo.GetAvatarId()); + if (GameData.AvatarConfigData.TryGetValue(avatar.AvatarInfo.GetAvatarId(), out var excel)) + return GameData.AdventureAbilityConfigListData.GetValueOrDefault(excel.AdventurePlayerID); return null; }