public override void Execute() { base.Execute(); if (this.savePrefType == "SET_PREF") { AutoStoryTriggerUtils.SaveTriggerValue(this.savePrefName, this.saveValue); } else if (this.savePrefType == "CLEAR_PREF") { AutoStoryTriggerUtils.ClearTriggerValue(this.savePrefName); } this.parent.ChildComplete(this); }
public void AddAutoTriggerTasksToQueue() { Dictionary <string, StoryTriggerVO> .ValueCollection all = Service.StaticDataController.GetAll <StoryTriggerVO>(); foreach (StoryTriggerVO current in all) { bool flag = current.TriggerType.Equals("Auto"); bool flag2 = current.TriggerType.Equals("AutoLoad"); if (flag || flag2) { AbstractRUFTask rUFTaskForAutoTrigger = AutoStoryTriggerUtils.GetRUFTaskForAutoTrigger(current); if (rUFTaskForAutoTrigger != null) { this.AddTaskToAppropriateQueue(rUFTaskForAutoTrigger); } } } }
public EatResponse OnEvent(EventId id, object cookie) { if (id == EventId.PlanetRelocate) { string text = (string)cookie; if (this.isFirstRelocation) { if (!string.IsNullOrEmpty(this.saveVarName)) { AutoStoryTriggerUtils.SaveTriggerValue(this.saveVarName, text); } this.parent.SatisfyTrigger(this); } else if (text.Equals(this.planetVO.Uid)) { this.parent.SatisfyTrigger(this); } } return(EatResponse.NotEaten); }