fix: trailblazer couldnt use skill correctly

This commit is contained in:
StopWuyu
2024-12-07 17:05:40 +08:00
parent a627ecfe96
commit 70a83ede70

View File

@@ -1,4 +1,5 @@
using EggLink.DanhengServer.Data.Config;
using EggLink.DanhengServer.Data;
using EggLink.DanhengServer.Data.Config;
using EggLink.DanhengServer.GameServer.Game.Battle.Skill;
using EggLink.DanhengServer.GameServer.Server.Packet.Send.Scene;
using EggLink.DanhengServer.Kcp;
@@ -38,7 +39,10 @@ public class HandlerSceneCastSkillCsReq : Handler
if (req.SkillIndex > 0)
{
// Cast skill effects
if (caster.AvatarInfo.Excel != null && caster.AvatarInfo.Excel!.MazeSkill != null)
var excel = caster.AvatarInfo.PathId > 0
? GameData.AvatarConfigData[caster.AvatarInfo.PathId]
: caster.AvatarInfo.Excel;
if (excel != null && excel.MazeSkill != null)
{
mazeSkill = MazeSkillManager.GetSkill(caster.AvatarInfo.GetAvatarId(), (int)req.SkillIndex,
req);