Exemplo n.º 1
0
 private void ErrorEnum_OnNewError(ErrorEnumArgs e)
 {
     if (e.Message.StartsWith("Target not"))
     {
         if (Access.Info.Combat.IsMovingBack)
         {
             return;
         }
         if (!Access.Info.Target.InSightWithTarget)
         {
             return;
         }
         // LosTimer is used within info.target.combatdistance
         Access.Info.Target.InSightWithTarget = false;
         Access.Info.Target.ResetToNormalAt   = Environment.TickCount + 3000;
     }
     else if (e.Message.StartsWith("You must be standing") ||
              e.Message.StartsWith("You need to be standing up to loot"))
     {
         Functions.DoString("SitOrStand()");
     }
     else if (e.Message.StartsWith("You cannot attack that target") || e.Message.StartsWith("Invalid target"))
     {
         var target = ObjectManager.Target;
         if (target == null)
         {
             return;
         }
         if (target.Health != 0)
         {
             Access.Info.Combat.AddToBlacklist(target.Guid);
         }
     }
     else if (e.Message.StartsWith("You are facing the") || e.Message.StartsWith("Target needs to be"))
     {
         var tar = ObjectManager.Target;
         if (tar == null)
         {
             return;
         }
         if (Access.Info.Combat.IsMoving)
         {
             return;
         }
         Access.Info.Target.FixFacing = true;
         Wait.Remove("FixFacingTimer");
     }
     else if (e.Message.StartsWith("Target too close"))
     {
         if (!Access.Info.Combat.IsMoving)
         {
             Access.Info.PathBackup.SetToCloseForRanged();
         }
     }
     else if (e.Message.StartsWith("You can't carry any") ||
              e.Message.StartsWith("Requires Skinning"))
     {
         Access.Info.Loot.BlacklistCurrentLoot = true;
     }
 }
Exemplo n.º 2
0
 private static void OnNewErrorEvent(ErrorEnumArgs e)
 {
     if (e.Message.StartsWith("You have learned "))
     {
         ObjectManager.UpdateSpells();
     }
 }