Example #1
0
 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);
 }
Example #2
0
 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);
             }
         }
     }
 }
Example #3
0
 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);
 }