Esempio n. 1
0
 protected void HUDTick(object sender, EventArgs e)
 {
     try
     {
         WorldObject worldObject = lib.MyCore.WorldFilter[lib.MyHost.Actions.CurrentSelection];
         if (worldObject == null)
         {
             this.TargetHud.Visible = false;
         }
         else if (worldObject.ObjectClass == ObjectClass.Player)
         {
             if (LastID.Equals(0) || !LastID.Equals(lib.MyHost.Actions.CurrentSelection))
             {
                 LastID = lib.MyHost.Actions.CurrentSelection;
                 this.LastRequestUpdateTime = DateTime.MinValue;
             }
             if (DateTime.Now.Subtract(this.LastRequestUpdateTime).TotalSeconds >= 0.5)
             {
                 this.LastRequestUpdateTime = DateTime.Now;
                 lib.MyHost.Actions.RequestId(lib.MyHost.Actions.CurrentSelection);
             }
             this.TargetHud.Visible = true;
             if (!this.CurrentProfile.ShowDebuffIcons && this.TargetSurface != null)
             {
                 this.TargetSurface.Invalidate();
             }
         }
     }
     catch (Exception ex) { Repo.RecordException(ex); }
 }