// Token: 0x060003C2 RID: 962 RVA: 0x0001D7C8 File Offset: 0x0001B9C8 private void OnMouseKeyDown(object sender, MouseEventArgs e) { try { if (e.MouseKey == MouseKey.Left) { Rectangle9 rec = this.panel; foreach (Notification notification in this.notifications) { if (rec.Contains(e.ScreenPosition)) { if (notification.OnClick()) { e.Process = false; } break; } rec += new Vector2(0f, -(rec.Height + 20f)); } } } catch (Exception exception) { Logger.Error(exception, null); } }
private void InputManagerOnMouseKeyUp(object sender, MouseEventArgs e) { try { if (e.MouseKey != MouseKey.Left || this.clickSleeper.IsSleeping) { return; } var cd = Game.RawGameTime - this.roshanKillTime; if (cd > GameData.RoshanMaxRespawnTime) { return; } var position = new Rectangle9( new Vector2(this.textPosition.Value.X - this.textSize.Value, this.textPosition.Value.Y), new Vector2(this.textSize.Value * 2)); if (!position.Contains(e.ScreenPosition)) { return; } var time = (GameData.RoshanMaxRespawnTime - cd) + Game.GameTime; var start = TimeSpan.FromSeconds(time - (GameData.RoshanMaxRespawnTime - GameData.RoshanMinRespawnTime)).ToString("mss"); var end = TimeSpan.FromSeconds(time).ToString("mss"); Game.ExecuteCommand("say_team \"" + start + " " + end + " rosh\""); this.clickSleeper.Sleep(30); } catch (Exception ex) { Logger.Error(ex); } }
private void InputOnMouseKeyDown(MouseEventArgs e) { try { if (e.MouseKey != MouseKey.Left) { return; } var startPosition = this.position.Value; var itemPanel = new Rectangle9( startPosition, new Vector2(this.heroSize.X + ((this.itemSize.X + 1) * 7), this.heroSize.Y * this.units.Count)); if (!itemPanel.Contains(e.Position)) { return; } foreach (var unit in this.units) { if (!unit.IsValid) { continue; } var borderPosition = new Rectangle9( startPosition.X + this.heroSize.X + 1, startPosition.Y, this.itemSize.X, this.itemSize.Y); foreach (var ability in unit.Abilities.OrderBy(x => x.Id == AbilityId.item_tpscroll)) { if (ability.Id == AbilityId.item_tpscroll) { continue; } if (!ability.IsItem || !ability.IsUsable) { continue; } var itemPosition = borderPosition - 4; if (itemPosition.Contains(e.Position)) { ability.BaseAbility.Announce(); return; } borderPosition += new Vector2(this.itemSize.X + 1, 0); } startPosition += new Vector2(0, this.size + 1); } } catch (Exception ex) { Logger.Error(ex); } }