public override void PaintTopInGame(ClipState clipState) { if (clipState != ClipState.AfterClip) { return; } if ((Hud.Game.SpecialArea != SpecialArea.Rift) && (Hud.Game.SpecialArea != SpecialArea.GreaterRift)) { return; } if (Hud.Game.RiftPercentage < DisplayLimit) { return; } if (Hud.Game.RiftPercentage >= 100) { return; } var text = Hud.Game.RiftPercentage.ToString("F1", CultureInfo.InvariantCulture) + "%"; var title = "Rift Completition"; var w = Hud.Window.Size.Height * 0.1f; var h = Hud.Window.Size.Height * 0.04f; LabelDecorator.Paint(Hud.Window.Size.Width * 0.5f - w / 2, Hud.Window.Size.Height * 0.18f - h / 2, w, h, text, title); }
private void DrawMeta(IPlayer player) { var size = Hud.Window.Size.Width * SkillRatio; var xUpper = currentX; var yUpper = player.PortraitUiElement.Rectangle.Y + currY - player.PortraitUiElement.Rectangle.Width * 0.1f; var xLower = currentX; var yLower = player.PortraitUiElement.Rectangle.Y + currY + size + player.PortraitUiElement.Rectangle.Width * 0.1f; var width = Hud.Window.Size.Width * ItemRatio; var height = Hud.Window.Size.Width * ItemRatio * 0.8f; foreach (MetaElement element in UpperMeta) { LabelDecorator.Paint(xUpper, yUpper, size, size, element.Text(player), element.Title, element.Hint); xUpper += size; } foreach (MetaElement element in LowerMeta) { LabelDecorator.Paint(xLower, yLower, size, size, element.Text(player), element.Title, element.Hint); xLower += size; } currentX += Math.Max(LowerMeta.Count, UpperMeta.Count) * size + gap; }
public void PaintTopInGame(ClipState clipState) { if (clipState != ClipState.AfterClip) { return; } if (Hud.Game.RiftPercentage < DisplayLimit) { return; } if (Hud.Game.RiftPercentage >= 100) { return; } var text = Hud.Game.RiftPercentage.ToString("F1", CultureInfo.InvariantCulture) + "%"; var title = "进度即将打满"; var w = Hud.Window.Size.Height * 0.1f; var h = Hud.Window.Size.Height * 0.04f; LabelDecorator.Paint(Hud.Window.Size.Width * 0.5f - w / 2, Hud.Window.Size.Height * 0.18f - h / 2, w, h, text, title); }
public void PaintWorld(WorldLayer layer) { var inRift = Hud.Game.SpecialArea == SpecialArea.Rift || Hud.Game.SpecialArea == SpecialArea.GreaterRift; double MRiftProgression = 0; int density = 0; var monsters = Hud.Game.AliveMonsters.Where(x => x.IsOnScreen); foreach (var monster in monsters) { double MonsterRiftProgression = 0; if (monster.IsOnScreen) { int count = Hud.Game.AliveMonsters.Count(m => (monster.FloorCoordinate.XYZDistanceTo(m.FloorCoordinate) - m.RadiusBottom) <= Distance); var monsters2 = Hud.Game.AliveMonsters.Where(mm => (monster.FloorCoordinate.XYZDistanceTo(mm.FloorCoordinate) - mm.RadiusBottom) <= MaxRadius && mm.SummonerAcdDynamicId == 0 && mm.IsElite || (monster.FloorCoordinate.XYZDistanceTo(mm.FloorCoordinate) - mm.RadiusBottom) <= MaxRadius && !mm.IsElite); if (inRift) { foreach (var monster2 in monsters2) { MonsterRiftProgression += monster2.SnoMonster.RiftProgression * 100.0d / this.Hud.Game.MaxQuestProgress; } } if (count >= density && MonsterRiftProgression >= MRiftProgression) { MCoordinate = monster.FloorCoordinate; Mcount = count; density = count; MRiftProgression = MonsterRiftProgression; } } } foreach (var monster in monsters) { if (monster.IsOnScreen && Mcount >= DisplayLimit) { if (ShowLabel) { if (!inRift) { LabelDecorator.Paint(layer, monster, MCoordinate, Distance + "yards Density:" + Mcount); } else { if (ShowProgression) { LabelDecorator.Paint(layer, monster, MCoordinate, Distance + "yards Density:" + Mcount + "(" + MaxRadius + "yards Progression:" + MRiftProgression.ToString("f2") + ")"); } else { LabelDecorator.Paint(layer, monster, MCoordinate, Distance + "yards Density:" + Mcount); } } } if (ShowCircle) { CircleDecorator.Paint(layer, monster, MCoordinate, null); } if (ShowMark) { MarkDecorator.Paint(layer, monster, MCoordinate, null); } } return; } }
public void PaintWorld(WorldLayer layer) { if ((Hud.Game.MapMode == MapMode.WaypointMap) || (Hud.Game.MapMode == MapMode.ActMap) || (Hud.Game.MapMode == MapMode.Map)) { return; } var inRift = Hud.Game.SpecialArea == SpecialArea.Rift || Hud.Game.SpecialArea == SpecialArea.GreaterRift; double MRiftProgression = 0; int density = 0; var monsters = Hud.Game.AliveMonsters.Where(x => x.IsOnScreen); CircleDecorator = new WorldDecoratorCollection( new GroundCircleDecorator(Hud) { Brush = Hud.Render.CreateBrush(255, 0, 255, 255, 1.5f), Radius = MaxRadius, RadiusTransformator = new StandardPingRadiusTransformator(Hud, ping), } ); foreach (var monster in monsters) { double MonsterRiftProgression = 0; if (monster.IsOnScreen) { int count = Hud.Game.AliveMonsters.Count(m => (monster.FloorCoordinate.XYZDistanceTo(m.FloorCoordinate) - m.RadiusBottom) <= Distance); var monsters2 = Hud.Game.AliveMonsters.Where(mm => (monster.FloorCoordinate.XYZDistanceTo(mm.FloorCoordinate) - mm.RadiusBottom) <= MaxRadius && mm.SummonerAcdDynamicId == 0 && mm.IsElite || (monster.FloorCoordinate.XYZDistanceTo(mm.FloorCoordinate) - mm.RadiusBottom) <= MaxRadius && !mm.IsElite); if (inRift) { foreach (var monster2 in monsters2) { MonsterRiftProgression += monster2.SnoMonster.RiftProgression * 100.0d / this.Hud.Game.MaxQuestProgress; } } if (count >= density && MonsterRiftProgression >= MRiftProgression) { MCoordinate = monster.FloorCoordinate; Mcount = count; density = count; MRiftProgression = MonsterRiftProgression; } } } foreach (var monster in monsters) { if (monster.IsOnScreen && Mcount >= DisplayLimit) { if (ShowLabel) { if (!inRift) { LabelDecorator.Paint(layer, monster, MCoordinate, Distance + "码密度:" + Mcount); } else { if (ShowProgression) { LabelDecorator.Paint(layer, monster, MCoordinate, Distance + "码密度:" + Mcount + "(" + MaxRadius + "码进度:" + MRiftProgression.ToString("f2") + ")"); } else { LabelDecorator.Paint(layer, monster, MCoordinate, Distance + "码密度:" + Mcount); } } } if (ShowCircle) { CircleDecorator.Paint(layer, monster, MCoordinate, null); } if (ShowMark) { MarkDecorator.Paint(layer, monster, MCoordinate, null); } } return; } }