diff --git a/QuestPathGenerator/QuestSourceGenerator.cs b/QuestPathGenerator/QuestSourceGenerator.cs index 66f060ec9..de026fc0e 100644 --- a/QuestPathGenerator/QuestSourceGenerator.cs +++ b/QuestPathGenerator/QuestSourceGenerator.cs @@ -346,6 +346,8 @@ public class QuestSourceGenerator : ISourceGenerator .AsSyntaxNodeOrToken(), AssignmentList(nameof(QuestStep.KillEnemyDataIds), step.KillEnemyDataIds) .AsSyntaxNodeOrToken(), + AssignmentList(nameof(QuestStep.ComplexCombatData), step.ComplexCombatData) + .AsSyntaxNodeOrToken(), Assignment(nameof(QuestStep.JumpDestination), step.JumpDestination, emptyStep.JumpDestination) .AsSyntaxNodeOrToken(), diff --git a/QuestPathGenerator/RoslynShortcuts.cs b/QuestPathGenerator/RoslynShortcuts.cs index 545cb27a2..72a15a39c 100644 --- a/QuestPathGenerator/RoslynShortcuts.cs +++ b/QuestPathGenerator/RoslynShortcuts.cs @@ -162,7 +162,24 @@ public static class RoslynShortcuts else throw new Exception($"Unsupported ExcelRef type {excelRef.Type}"); } - else if (value is null) + else if (value is ComplexCombatData complexCombatData) + { + return ObjectCreationExpression( + IdentifierName(nameof(ComplexCombatData))) + .WithInitializer( + InitializerExpression( + SyntaxKind.ObjectInitializerExpression, + SeparatedList( + SyntaxNodeList( + Assignment(nameof(ComplexCombatData.DataId), complexCombatData.DataId, default(uint)) + .AsSyntaxNodeOrToken(), + Assignment(nameof(ComplexCombatData.RewardItemId), complexCombatData.RewardItemId, null) + .AsSyntaxNodeOrToken(), + Assignment(nameof(ComplexCombatData.RewardItemCount), complexCombatData.RewardItemCount, null) + .AsSyntaxNodeOrToken(), + AssignmentList(nameof(ComplexCombatData.CompletionQuestVariablesFlags), complexCombatData.CompletionQuestVariablesFlags) + .AsSyntaxNodeOrToken())))); + }else if (value is null) return LiteralExpression(SyntaxKind.NullLiteralExpression); else throw new Exception($"Unsupported data type {value.GetType()} = {value}");