public static void AutoTarget_Expire(Timer t) { if (t.HasTag("Session")) { AutoTargetSession tag = (AutoTargetSession) t.GetTag("Session"); m_AutoTarget.Remove(tag); } }
private static void TimeRefresh_OnTick(Timer t) { int tag = (int) t.GetTag("Frames"); double num2 = tag; double d = 0.0; double num4 = 6.2831853071795862 / num2; double num5 = ScreenWidth / 2; double num6 = ScreenHeight / 2; double num7 = num6 * 0.75; int xMouse = m_xMouse; int yMouse = m_yMouse; Cursor.Hourglass = true; m_SetTicks = false; double dTicks = Engine.dTicks; while (--tag >= 0) { m_xMouse = (int) (num5 + (num7 * Math.Cos(d))); m_yMouse = (int) (num6 - (num7 * Math.Sin(d))); d += num4; Renderer.Draw(); } m_SetTicks = false; double num11 = Engine.dTicks; Cursor.Hourglass = false; AddTextMessage(string.Format("Time Refresh: {0} frames in {1:F2} seconds: {2:F2} FPS", num2, (num11 - dTicks) * 0.001, num2 / ((num11 - dTicks) * 0.001))); m_xMouse = xMouse; m_yMouse = yMouse; }
public static void DelayedPackets_OnTick(Timer t) { Packet[] tag = (Packet[]) t.GetTag("Packets"); for (int i = 0; i < tag.Length; i++) { Network.Send(tag[i]); } }
private static void PopupDelay_OnTick(Timer t) { GObjectProperties.Display(t.GetTag("object")); t.Stop(); m_PopupDelay = null; }
internal static void Update_OnTick(Timer t) { ShardProfile tag = (ShardProfile) t.GetTag("shard"); Profiles.Save(); GMenuItem item = tag.Menu; if (item == null) { Engine.UpdateSmartLoginMenu(); } else { for (int i = 0; i < tag.Characters.Length; i++) { GMenuItem item2 = tag.Characters[i].Menu; if (item2 == null) { item.Add(tag.Characters[i].Menu = item2 = new GPlayCharacterMenu(tag.Characters[i])); } else { item2.Text = tag.Characters[i].Name; } } Gump[] gumpArray = item.Children.ToArray(); for (int j = 0; j < gumpArray.Length; j++) { GPlayCharacterMenu child = gumpArray[j] as GPlayCharacterMenu; if ((child != null) && !tag.Contains(child.Character)) { item.Remove(child); } } } }