Example #1
0
        public void Load(SerializableNode serializable, Database database)
        {
            Message      = serializable.Message;
            Character    = database.GetCharacterId(serializable.Character);
            Enemy        = database.GetFleetId(serializable.Enemy);
            Loot         = database.GetLootId(serializable.Loot);
            RequiredView = (RequiredViewMode)serializable.RequiredView;

            Actions = serializable.Actions?.Select(action =>
            {
                var requirement = new Requirement(action.Requirement ?? new SerializableRequirement(), database);
                return(new QuestAction
                {
                    ButtonText = action.ButtonText,
                    Requirement = requirement,
                    TargetNode = new NumericValue <int>(action.TargetNode, 1, 1000)
                });
            }).ToArray();
        }