InternalUimTracker LoadTexts(InternalUimTracker champ) { champ.Text = new Render.Text(0, 0, "", 14, SharpDX.Color.Orange); champ.Text.TextUpdate = delegate { if (champ.RecallInfo.Start != 0) { float time = Environment.TickCount + champ.RecallInfo.Duration - champ.RecallInfo.Start; if (time > 0.0f && (champ.RecallInfo.Status == Packet.S2C.Teleport.Status.Start)) { return("Recalling"); } } if (champ.Timer.InvisibleTime != 0) { return(champ.Timer.InvisibleTime.ToString()); } return(""); }; champ.Text.PositionUpdate = delegate { return(Drawing.WorldToMinimap(champ.LastPosition)); }; champ.Text.VisibleCondition = sender => { bool recall = false; if (champ.RecallInfo.Start != 0) { float time = Environment.TickCount + champ.RecallInfo.Duration - champ.RecallInfo.Start; if (time > 0.0f && (champ.RecallInfo.Status == Packet.S2C.Teleport.Status.Start)) { recall = true; } } return(Tracker.Trackers.GetActive() && UimTracker.GetActive() && recall || champ.Timer.InvisibleTime != 0); }; champ.Text.OutLined = true; champ.Text.Centered = true; champ.Text.Add(4); return(champ); }
public Uim() { if (!IsActive()) return; foreach (Obj_AI_Hero hero in ObjectManager.Get<Obj_AI_Hero>()) { if (hero.IsEnemy) { InternalUimTracker champ = new InternalUimTracker(hero); champ.RecallInfo = new Packet.S2C.Teleport.Struct(hero.NetworkId, Packet.S2C.Teleport.Status.Unknown, Packet.S2C.Teleport.Type.Unknown, 0, 0); champ = LoadTexts(champ); _enemies.Add(hero, champ); } } new System.Threading.Thread(LoadSprites).Start(); Obj_AI_Base.OnTeleport += Obj_AI_Base_OnTeleport; Game.OnUpdate += Game_OnGameUpdate; }
public Uim() { if (!IsActive()) { return; } foreach (Obj_AI_Hero hero in ObjectManager.Get <Obj_AI_Hero>()) { if (hero.IsEnemy) { InternalUimTracker champ = new InternalUimTracker(hero); champ.RecallInfo = new Packet.S2C.Teleport.Struct(hero.NetworkId, Packet.S2C.Teleport.Status.Unknown, Packet.S2C.Teleport.Type.Unknown, 0, 0); champ = LoadTexts(champ); _enemies.Add(hero, champ); } } new System.Threading.Thread(LoadSprites).Start(); Obj_AI_Base.OnTeleport += Obj_AI_Base_OnTeleport; Game.OnUpdate += Game_OnGameUpdate; }
InternalUimTracker LoadTexts(InternalUimTracker champ) { champ.Text = new Render.Text(0, 0, "", 14, SharpDX.Color.Orange); champ.Text.TextUpdate = delegate { if (champ.RecallInfo.Start != 0) { float time = Environment.TickCount + champ.RecallInfo.Duration - champ.RecallInfo.Start; if (time > 0.0f && (champ.RecallInfo.Status == Packet.S2C.Teleport.Status.Start)) { return "Recalling"; } } if (champ.Timer.InvisibleTime != 0) { return champ.Timer.InvisibleTime.ToString(); } return ""; }; champ.Text.PositionUpdate = delegate { return Drawing.WorldToMinimap(champ.LastPosition); }; champ.Text.VisibleCondition = sender => { bool recall = false; if (champ.RecallInfo.Start != 0) { float time = Environment.TickCount + champ.RecallInfo.Duration - champ.RecallInfo.Start; if (time > 0.0f && (champ.RecallInfo.Status == Packet.S2C.Teleport.Status.Start)) { recall = true; } } return IsActive() && recall || champ.Timer.InvisibleTime != 0; }; champ.Text.OutLined = true; champ.Text.Centered = true; champ.Text.Add(4); return champ; }
private void Init() { foreach (Obj_AI_Hero hero in ObjectManager.Get<Obj_AI_Hero>()) { if (hero.IsEnemy) { InternalUimTracker champ = new InternalUimTracker(hero); champ.RecallInfo = new Packet.S2C.Teleport.Struct(hero.NetworkId, Packet.S2C.Teleport.Status.Unknown, Packet.S2C.Teleport.Type.Unknown, 0, 0); champ = LoadTexts(champ); _enemies.Add(hero, champ); } } new System.Threading.Thread(LoadSprites).Start(); }