Exemple #1
0
 protected override Composite CreateBehavior()
 {
     return(new PrioritySelector(
                new Decorator(ret => CheckDurability() || CheckMinBagSlots(),
                              new Sequence(
                                  new Action(ret => Logger.Log("Town-run request received, will town-run at next possible moment.")),
                                  //new Action(ret => Trinity.ForceVendorRunASAP = true),
                                  new Action(ret => TrinityApi.SetField("Trinity", "ForceVendorRunASAP", true)),
                                  new Action(ret => _isDone = true)
                                  )
                              ),
                new Sequence(
                    new Action(ret => Logger.Log("Skipping TrinityTownRun")),
                    new Action(ret => _isDone = true)
                    )
                ));
 }
Exemple #2
0
 private async Task <bool> TownRun()
 {
     if (CheckDurability() || CheckMinBagSlots())
     {
         Logger.Log("Town-run request received, will town-run at next possible moment.");
         if (!TrinityApi.SetField("Trinity.Trinity", "ForceVendorRunASAP", true))
         {
             Logger.Verbose("Unable to set field ForceVendorRunASAP!");
         }
         _isDone = true;
     }
     else
     {
         Logger.Log("Skipping TownRun");
         _isDone = true;
     }
     return(true);
 }