// Token: 0x060000C1 RID: 193 RVA: 0x00007934 File Offset: 0x00005B34 public void Draw(O9K.Core.Managers.Renderer.IRenderer renderer, Rectangle9 position, float cooldownSize) { if (!this.Ability.IsUsable) { return; } try { renderer.DrawTexture(this.Ability.Name, position, 0f, 1f); if (this.Ability.IsCasting || this.Ability.IsChanneling) { renderer.DrawRectangle(position - 3f, System.Drawing.Color.LightGreen, 3f); } else { renderer.DrawRectangle(position - 1f, System.Drawing.Color.Black, 1f); } if (this.displayLevel) { uint level = this.Ability.Level; if (level == 0u) { renderer.DrawTexture("ability_0lvl_bg", position, 0f, 1f); return; } string text = level.ToString("N0"); Vector2 vector = renderer.MeasureText(text, position.Width * 0.45f, "Calibri"); Rectangle9 rec = position.SinkToBottomLeft(vector.X, vector.Y * 0.8f); renderer.DrawTexture("ability_lvl_bg", rec, 0f, 1f); renderer.DrawText(rec, text, System.Drawing.Color.White, RendererFontFlags.VerticalCenter, position.Width * 0.45f, "Calibri"); } if (this.displayCharges) { string text2 = this.Ability.BaseItem.CurrentCharges.ToString("N0"); Vector2 vector2 = renderer.MeasureText(text2, position.Width * 0.45f, "Calibri"); Rectangle9 rec2 = position.SinkToBottomRight(vector2.X * 1.1f, vector2.Y * 0.8f); renderer.DrawTexture("ability_lvl_bg", rec2, 0f, 1f); renderer.DrawText(rec2, text2, System.Drawing.Color.White, RendererFontFlags.VerticalCenter, position.Width * 0.45f, "Calibri"); } if (!this.Ability.IsChanneling) { float remainingCooldown = this.Ability.RemainingCooldown; if (remainingCooldown > 0f) { renderer.DrawTexture("ability_cd_bg", position, 0f, 1f); renderer.DrawText(position * 2f, Math.Ceiling((double)remainingCooldown).ToString("N0"), System.Drawing.Color.White, RendererFontFlags.Center | RendererFontFlags.VerticalCenter, cooldownSize, "Calibri"); } else if (this.Ability.ManaCost > this.Ability.Owner.Mana) { renderer.DrawTexture("ability_mana_bg", position, 0f, 1f); renderer.DrawText(position * 2f, Math.Ceiling((double)((this.Ability.ManaCost - this.Ability.Owner.Mana) / this.Ability.Owner.ManaRegeneration)).ToString("N0"), System.Drawing.Color.White, RendererFontFlags.Center | RendererFontFlags.VerticalCenter, cooldownSize, "Calibri"); } } } catch (Exception exception) { Logger.Error(exception, null); } }
// Token: 0x06000025 RID: 37 RVA: 0x00004E94 File Offset: 0x00003094 private void OnDraw(O9K.Core.Managers.Renderer.IRenderer renderer) { try { foreach (Unit9 unit in this.units) { if (unit.IsValid && unit.IsVisible && unit.IsAlive) { Vector2 healthBarPosition = unit.HealthBarPosition; if (!healthBarPosition.IsZero) { Vector2 healthBarSize = unit.HealthBarSize; Vector2 location = healthBarPosition + new Vector2(0f, healthBarSize.Y + 1f) + this.position; Vector2 vector = new Vector2(healthBarSize.X, healthBarSize.Y * 0.53f) + this.size; Rectangle9 rec = new Rectangle9(location, vector.X, vector.Y) + 1.5f; Rectangle9 rec2 = new Rectangle9(location, vector.X * unit.ManaPercentageBase, vector.Y); renderer.DrawFilledRectangle(rec, System.Drawing.Color.Black); renderer.DrawFilledRectangle(rec2, System.Drawing.Color.FromArgb(25, 54, 255)); if (this.showAmount) { renderer.DrawText(rec + 5f, unit.Mana.ToString("####"), System.Drawing.Color.White, RendererFontFlags.Center | RendererFontFlags.VerticalCenter, this.manaTextSize, "Calibri"); } } } } } catch (InvalidOperationException) { } catch (Exception exception) { Logger.Error(exception, null); } }
// Token: 0x060000E2 RID: 226 RVA: 0x00009050 File Offset: 0x00007250 public void DrawFowTime(O9K.Core.Managers.Renderer.IRenderer renderer, RectangleF position) { if (this.hero.IsVisible || !this.hero.IsAlive) { return; } if (this.hero.Team == Team.Radiant) { position.Width *= 0.88f; } int num = (int)(Game.RawGameTime - (this.hero.IsAlive ? this.hero.LastVisibleTime : this.hero.BaseHero.RespawnTime)); renderer.DrawText(position, num.ToString(), System.Drawing.Color.White, RendererFontFlags.Right, 16f * O9K.Core.Helpers.Hud.Info.ScreenRatio, "Calibri"); }
// Token: 0x0600020C RID: 524 RVA: 0x0000FF98 File Offset: 0x0000E198 private void OnDraw(O9K.Core.Managers.Renderer.IRenderer renderer) { try { foreach (CreepWave creepWave in this.creepWaves) { if (creepWave.IsSpawned && !creepWave.IsVisible) { Vector3 predictedPosition = creepWave.PredictedPosition; string text = creepWave.Creeps.Count.ToString(); if (this.showOnMinimap) { float num = 19f * O9K.Core.Helpers.Hud.Info.ScreenRatio; Rectangle9 rec = this.minimap.WorldToMinimap(predictedPosition, num); renderer.DrawText(rec + new Size2F(num, 0f), text, System.Drawing.Color.OrangeRed, RendererFontFlags.Left, num, "Calibri"); } if (this.showOnMap) { float num2 = 32f * O9K.Core.Helpers.Hud.Info.ScreenRatio; Rectangle9 rec2 = this.minimap.WorldToScreen(predictedPosition, num2); if (!rec2.IsZero) { renderer.DrawText(rec2 + new Size2F(num2, 0f), text, System.Drawing.Color.OrangeRed, RendererFontFlags.Left, num2, "Calibri"); } } } } } catch (InvalidOperationException) { } catch (Exception exception) { Logger.Error(exception, null); } }
// Token: 0x06000083 RID: 131 RVA: 0x0000698C File Offset: 0x00004B8C private void OnDraw(O9K.Core.Managers.Renderer.IRenderer renderer) { try { foreach (ModifierUnit modifierUnit in this.units) { if (modifierUnit.IsValid(this.showAlly)) { Vector2 healthBarPosition = modifierUnit.HealthBarPosition; if (!healthBarPosition.IsZero) { Rectangle9 rec = new Rectangle9(healthBarPosition.X, healthBarPosition.Y + 55f, this.size, this.size) + this.position; foreach (DrawableModifier drawableModifier in modifierUnit.Modifiers) { renderer.DrawTexture(drawableModifier.TextureName, rec, 0f, 1f); if (!drawableModifier.IsAura) { float remainingTime = drawableModifier.RemainingTime; if (this.showTime) { Rectangle9 rec2 = rec * 1.5f; renderer.DrawTexture("modifier_bg", rec2, 0f, 1f); renderer.DrawText(rec2, (remainingTime < 10f) ? remainingTime.ToString("N1") : remainingTime.ToString("N0"), System.Drawing.Color.White, RendererFontFlags.Center | RendererFontFlags.VerticalCenter, this.textSize, "Calibri"); } int num = (int)(100f - remainingTime / drawableModifier.Duration * 100f); Rectangle9 rec3 = rec * 1.17f; renderer.DrawTexture(drawableModifier.IsDebuff ? "outline_red" : "outline_green", rec3, 0f, 1f); renderer.DrawTexture("outline_black" + num, rec3, 0f, 1f); } else { renderer.DrawTexture(drawableModifier.IsDebuff ? "outline_red" : "outline_green", rec * 1.17f, 0f, 1f); } rec += new Vector2(0f, (float)(this.size + 5)); } } } } } catch (InvalidOperationException) { } catch (Exception exception) { Logger.Error(exception, null); } }
// Token: 0x060002C2 RID: 706 RVA: 0x0001A404 File Offset: 0x00018604 public override void DrawOnMap(O9K.Core.Managers.Renderer.IRenderer renderer, IMinimap minimap) { Rectangle9 rec = minimap.WorldToScreen(base.Position, 30f * O9K.Core.Helpers.Hud.Info.ScreenRatio); if (rec.IsZero) { return; } int num = (int)((Game.RawGameTime - this.AddedTime) / this.Duration * 100f); renderer.DrawTexture("outline_red", rec * 1.2f, 0f, 1f); renderer.DrawTexture("outline_black" + num, rec * 1.25f, 0f, 1f); renderer.DrawTexture(base.AbilityTexture, rec, 0f, 1f); rec.Y += 30f * O9K.Core.Helpers.Hud.Info.ScreenRatio; rec *= 2f; renderer.DrawText(rec, TimeSpan.FromSeconds((double)(this.Duration - (Game.RawGameTime - this.AddedTime))).ToString("m\\:ss"), System.Drawing.Color.White, RendererFontFlags.Center | RendererFontFlags.VerticalCenter, 18f * O9K.Core.Helpers.Hud.Info.ScreenRatio, "Calibri"); }
// Token: 0x06000221 RID: 545 RVA: 0x00011268 File Offset: 0x0000F468 private void OnDraw(O9K.Core.Managers.Renderer.IRenderer renderer) { try { foreach (KeyValuePair <Vector3, float> keyValuePair in this.stacks) { if (keyValuePair.Value > 1f) { float num = 16f * O9K.Core.Helpers.Hud.Info.ScreenRatio; Rectangle9 rec = this.minimap.WorldToMinimap(keyValuePair.Key, num); renderer.DrawText(rec + new Size2F(num, 0f), keyValuePair.Value.ToString(), System.Drawing.Color.Orange, RendererFontFlags.Left, num, "Calibri"); } } } catch (InvalidOperationException) { } catch (Exception exception) { Logger.Error(exception, null); } }
// Token: 0x060000E5 RID: 229 RVA: 0x000093EC File Offset: 0x000075EC public bool DrawUltimate(O9K.Core.Managers.Renderer.IRenderer renderer, RectangleF position, Rectangle9 cdPosition, bool cdTime) { Ability9 ability = this.ultimate; if (ability == null || !ability.IsValid) { return(false); } float remainingCooldown = this.ultimate.RemainingCooldown; if (remainingCooldown > 0f) { renderer.DrawTexture("ult_cd", position, 0f, 1f); if (!cdPosition.IsZero) { if (!this.hero.IsAlive) { return(false); } int num = (int)(100f - remainingCooldown / this.ultimate.Cooldown * 100f); Rectangle9 rec = cdPosition * 1.1f; renderer.DrawTexture(this.ultimate.Name + "_rounded", cdPosition, 0f, 1f); renderer.DrawTexture("outline_black100", rec, 0f, 1f); renderer.DrawTexture("outline_green_pct" + num, rec, 0f, 1f); if (cdTime) { renderer.DrawTexture("top_ult_cd_bg", cdPosition, 0f, 1f); renderer.DrawText(cdPosition, remainingCooldown.ToString("N0"), System.Drawing.Color.White, RendererFontFlags.Center | RendererFontFlags.VerticalCenter, 20f * O9K.Core.Helpers.Hud.Info.ScreenRatio, "Calibri"); } return(true); } } else if (this.ultimate.ManaCost > this.hero.Mana) { renderer.DrawTexture("ult_mp", position, 0f, 1f); if (!cdPosition.IsZero) { if (!this.hero.IsAlive) { return(false); } int num2 = (int)(this.hero.Mana / this.ultimate.ManaCost * 100f); Rectangle9 rec2 = cdPosition * 1.1f; renderer.DrawTexture(this.ultimate.Name + "_rounded", cdPosition, 0f, 1f); renderer.DrawTexture("outline_black100", rec2, 0f, 1f); renderer.DrawTexture("outline_blue_pct" + num2, rec2, 0f, 1f); if (cdTime) { string text = Math.Ceiling((double)((this.ultimate.ManaCost - this.hero.Mana) / this.hero.ManaRegeneration)).ToString("N0"); renderer.DrawTexture("top_ult_cd_bg", cdPosition, 0f, 1f); renderer.DrawText(cdPosition, text, System.Drawing.Color.White, RendererFontFlags.Center | RendererFontFlags.VerticalCenter, 20f, "Calibri"); } return(true); } } else if (this.ultimate.IsUsable && this.ultimate.Level > 0u) { renderer.DrawTexture("ult_rdy", position, 0f, 1f); } return(false); }
// Token: 0x0600011E RID: 286 RVA: 0x0000AFB4 File Offset: 0x000091B4 private void OnDraw(O9K.Core.Managers.Renderer.IRenderer renderer) { try { Vector2 vector = this.position.Value; foreach (Unit9 unit in this.units) { if (unit.IsValid) { renderer.DrawTexture(unit.Name, vector, this.heroSize, 0f, 1f); Rectangle9 rec = new Rectangle9(vector.X + this.heroSize.X + 1f, vector.Y, this.itemSize.X, this.itemSize.Y); for (int i = 0; i < 6; i++) { renderer.DrawTexture("inventory_item_bg", rec + new Vector2((this.itemSize.X + 1f) * (float)i, 0f), 0f, 1f); } foreach (Ability9 ability in from x in unit.Abilities orderby x.Id == AbilityId.item_tpscroll select x) { if (ability.Id == AbilityId.item_tpscroll) { Rectangle9 rec2 = new Rectangle9(vector + new Vector2(this.heroSize.X * 0.7f, this.heroSize.Y * 0.35f), this.itemSize.X * 0.55f, this.itemSize.X * 0.55f); renderer.DrawTexture("outline", rec2 + 1f, 0f, 1f); renderer.DrawTexture(ability.Name + "_rounded", rec2, 0f, 1f); if (this.showCooldown) { float remainingCooldown = ability.RemainingCooldown; if (remainingCooldown > 0f) { renderer.DrawTexture("inventory_tp_cd_bg", rec2, 0f, 1f); renderer.DrawText(rec2, Math.Ceiling((double)remainingCooldown).ToString("N0"), System.Drawing.Color.White, RendererFontFlags.Center | RendererFontFlags.VerticalCenter, this.size * 0.35f, "Calibri"); } } } else if (ability.IsItem && ability.IsUsable) { Rectangle9 rec3 = rec - 4f; renderer.DrawTexture(ability.Name, rec3, 0f, 1f); if (this.showCharges && ability.IsDisplayingCharges) { string text = ability.BaseItem.CurrentCharges.ToString("N0"); Vector2 vector2 = renderer.MeasureText(text, this.size * 0.35f, "Calibri"); Rectangle9 rec4 = rec3.SinkToBottomRight(vector2.X * 1.1f, vector2.Y * 0.8f); renderer.DrawFilledRectangle(rec4, System.Drawing.Color.Black); renderer.DrawText(rec4, text, System.Drawing.Color.White, RendererFontFlags.Left, this.size * 0.35f, "Calibri"); } if (this.showCooldown) { float remainingCooldown2 = ability.RemainingCooldown; if (remainingCooldown2 > 0f) { renderer.DrawTexture("inventory_item_cd_bg", rec3, 0f, 1f); renderer.DrawText(rec3, Math.Ceiling((double)remainingCooldown2).ToString("N0"), System.Drawing.Color.White, RendererFontFlags.Center | RendererFontFlags.VerticalCenter, this.size * 0.7f, "Calibri"); } } rec += new Vector2(this.itemSize.X + 1f, 0f); } } vector += new Vector2(0f, (float)(this.size + 1)); } } } catch (InvalidOperationException) { } catch (Exception exception) { Logger.Error(exception, null); } }