コード例 #1
0
ファイル: QuestProvider.cs プロジェクト: Price-H16/NosCore
        private async Task <bool> IsValidScriptAsync(ICharacterEntity character, QuestActionType type, int scriptId, int scriptStepId)
        {
            var script = _scripts.FirstOrDefault(s => (s.ScriptId == scriptId) && (s.ScriptStepId == scriptStepId));

            if (script == null)
            {
                return(false);
            }

            return(script.StepType switch
            {
                "q_complete" => await ValidateQuestAsync(character, script.Argument1 ?? 0).ConfigureAwait(false),
                "quest" => await AddQuestAsync(character, type, script.Argument1 ?? 0).ConfigureAwait(false),
                "time" => await TimeAsync(script.Argument1 ?? 0).ConfigureAwait(false),
                "targetoff" => await TargetOffPacketAsync(script.Argument1 ?? 0, character).ConfigureAwait(false),
                "web" => true,
                "talk" => true,
                "openwin" => true,
                "opendual" => true,

                "move" => false,   //todo handle
                "q_pay" => false,  //todo handle
                "target" => false, //todo handle
                "run" => true,     //todo handle
                _ => false,
            });
コード例 #2
0
 public WzQuestIntegerPairAction(QuestActionType type, Dictionary <int, int> data) : base(type)
 {
     Data = data;
 }
コード例 #3
0
 public WzQuestIntegerAction(QuestActionType type, int data) : base(type)
 {
     Data = data;
 }
コード例 #4
0
 public WzQuestAction(QuestActionType type)
 {
     Type = type;
 }
コード例 #5
0
 public PresenterAttribute(QuestActionType type)
 {
     Type = type;
 }