public QuestStarterEnderParameter(IDatabaseProvider databaseProvider,
                                   ITableEditorPickerService tableEditorPickerService,
                                   IQuestEntryProviderService questEntryProviderService,
                                   bool isStarter)
 {
     this.databaseProvider          = databaseProvider;
     this.tableEditorPickerService  = tableEditorPickerService;
     this.questEntryProviderService = questEntryProviderService;
     this.isStarter = isStarter;
 }
        public override ISolutionItem CreateSolutionItem()
        {
            IQuestEntryProviderService service = Container.Resolve <IQuestEntryProviderService>();
            uint?entry = service.GetEntryFromService();

            if (!entry.HasValue)
            {
                return(null);
            }
            return(new SmartScriptSolutionItem((int)entry.Value, SmartScriptType.Quest, Container));
        }
Exemple #3
0
        public SmartFactory(IParameterFactory parameterFactory,
                            ISmartDataManager smartDataManager,
                            IDatabaseProvider databaseProvider,
                            IConditionDataManager conditionDataManager,
                            ITableEditorPickerService tableEditorPickerService,
                            IItemFromListProvider itemFromListProvider,
                            ICurrentCoreVersion currentCoreVersion,
                            IQuestEntryProviderService questEntryProviderService,
                            IContainerProvider containerProvider)
        {
            this.parameterFactory     = parameterFactory;
            this.smartDataManager     = smartDataManager;
            this.conditionDataManager = conditionDataManager;
            this.currentCoreVersion   = currentCoreVersion;

            if (!parameterFactory.IsRegisteredLong("StoredTargetParameter"))
            {
                parameterFactory.Register("GossipMenuOptionParameter", new GossipMenuOptionParameter(databaseProvider, tableEditorPickerService, itemFromListProvider));
                parameterFactory.Register("CreatureTextParameter", new CreatureTextParameter(databaseProvider, tableEditorPickerService, itemFromListProvider));
                parameterFactory.Register("QuestStarterParameter", new QuestStarterEnderParameter(databaseProvider, tableEditorPickerService, questEntryProviderService, true));
                parameterFactory.Register("QuestEnderParameter", new QuestStarterEnderParameter(databaseProvider, tableEditorPickerService, questEntryProviderService, false));
                parameterFactory.Register("CreatureSpawnKeyParameter", new CreatureSpawnKeyParameter(databaseProvider));
                parameterFactory.Register("GameobjectSpawnKeyParameter", new GameObjectSpawnKeyParameter(databaseProvider));
                parameterFactory.Register("StoredTargetParameter", containerProvider.Resolve <VariableContextualParameter>(
                                              (typeof(GlobalVariableType), GlobalVariableType.StoredTarget), (typeof(string), "storedTarget")));
                parameterFactory.Register("DataVariableParameter", containerProvider.Resolve <VariableContextualParameter>(
                                              (typeof(GlobalVariableType), GlobalVariableType.DataVariable), (typeof(string), "data")));
                parameterFactory.Register("TimedEventParameter", containerProvider.Resolve <VariableContextualParameter>(
                                              (typeof(GlobalVariableType), GlobalVariableType.TimedEvent), (typeof(string), "timedEvent")));
                parameterFactory.Register("DoActionParameter", containerProvider.Resolve <VariableContextualParameter>(
                                              (typeof(GlobalVariableType), GlobalVariableType.Action), (typeof(string), "action")));
                parameterFactory.Register("DoFunctionParameter", containerProvider.Resolve <VariableContextualParameter>(
                                              (typeof(GlobalVariableType), GlobalVariableType.Function), (typeof(string), "function")));
                parameterFactory.Register("StoredPointParameter", containerProvider.Resolve <VariableContextualParameter>(
                                              (typeof(GlobalVariableType), GlobalVariableType.StoredPoint), (typeof(string), "storedPoint")));
                parameterFactory.Register("DatabasePointParameter", containerProvider.Resolve <VariableContextualParameter>(
                                              (typeof(GlobalVariableType), GlobalVariableType.DatabasePoint), (typeof(string), "databasePoint")));
            }
        }