修改迷失销毁逻辑

This commit is contained in:
南沢响也
2025-03-03 17:47:07 +08:00
parent 6a3223a4ae
commit 39ba3121a5
6 changed files with 94 additions and 16 deletions

View File

@@ -14,6 +14,7 @@ using ECommons;
using ECommons.DalamudServices;
using ECommons.GameFunctions;
using ECommons.MathHelpers;
using Lumina.Excel.Sheets;
namespace DevoutPilgrimsVSDaivadipa;
@@ -29,6 +30,15 @@ public class Daivadipa
""";
public static string GetBNpcName(uint key)
{
var sheet = Svc.Data.GetExcelSheet<BNpcName>();
if (sheet == null) return $"Invalid sheet: ({key})";
var row = sheet.GetRow(key);
return row.Singular.ToString() ?? $"Invalid Rowid: ({key})";
}
[ScriptMethod(name: "迷失连线", eventType: EventTypeEnum.AddCombatant, eventCondition: ["DataId:regex:^758[67]$"])]
public void 迷失连线(Event @event, ScriptAccessory accessory)
{
@@ -47,10 +57,13 @@ public class Daivadipa
accessory.Method.SendDraw(DrawModeEnum.Imgui, DrawTypeEnum.Displacement, dp);
}
[ScriptMethod(name: "迷失连线销毁", eventType: EventTypeEnum.Death, eventCondition: ["DataId:regex:^758[67]$"], userControl: false)]
[ScriptMethod(name: "迷失连线销毁", eventType: EventTypeEnum.Death, userControl: false)]
public void 线(Event @event, ScriptAccessory accessory)
{
accessory.Method.RemoveDraw("线");
if (@event.TargetName() == GetBNpcName(6737) || @event.TargetName() == GetBNpcName(6738))
{
accessory.Method.RemoveDraw("迷失连线");
}
}
[ScriptMethod(name: "操焰仪 弹窗提示", eventType: EventTypeEnum.StartCasting, eventCondition: ["ActionId:regex:^2649[89]$"])]