Skip to content

Commit

Permalink
Fixes blinking target on minimap
Browse files Browse the repository at this point in the history
  • Loading branch information
Masteroshi430 committed Feb 20, 2019
1 parent 83e9033 commit eb5210b
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions HuntersVengeancePlugin.cs
@@ -1,6 +1,6 @@
//css_reference C:\v9.0.dll;
// https://github.com/User5981/Resu
// Hunter's Vengeance Plugin for TurboHUD Version 19/02/2019 07:11
// Hunter's Vengeance Plugin for TurboHUD Version 20/02/2019 08:17

using System;
using System.Collections.Generic;
Expand Down Expand Up @@ -98,7 +98,7 @@ public void PaintWorld(WorldLayer layer)
if (TargetForAll)
{
if (Hud.Game.IsInTown) return;
goto TargetOnMinimap;
else goto TargetOnMinimap;
}
else return;
}
Expand All @@ -110,7 +110,7 @@ public void PaintWorld(WorldLayer layer)
OutlineBrush.DrawWorldEllipse(50, -1, Hud.Game.Me.FloorCoordinate);

var Smonster = Hud.Game.SelectedMonster2 ?? Hud.Game.SelectedMonster1;
if ((Smonster == null)) return;
if ((Smonster == null)) goto MiniMapCircle;

var monsters = Hud.Game.AliveMonsters.Where(monster => monster.Attackable && monster == Smonster);
foreach (var monster in monsters)
Expand All @@ -127,18 +127,20 @@ public void PaintWorld(WorldLayer layer)
float visibleY;
float MidX = (float)midX;
float MidY = (float)midY;

if (monsterScreenCoordinate.X > MidX) {visibleX = monsterScreenCoordinate.X - 60f;} else {visibleX = monsterScreenCoordinate.X + 50f;}
if (monsterScreenCoordinate.Y > MidY) {visibleY = monsterScreenCoordinate.Y - 150f;} else {visibleY = monsterScreenCoordinate.Y + 50f;}

var layout = TextFont.GetTextLayout(percentDamageBonus);
TextFont.DrawText(layout, visibleX, visibleY);

}
goto MiniMapCircle;

MiniMapCircle:
if (Hud.Game.IsInTown) return;
ZeiMiniMapDecorator.Paint(layer, null, Hud.Game.Me.FloorCoordinate, null);
goto TargetOnMinimap;

TargetOnMinimap:
var cursorScreenCoord = Hud.Window.CreateScreenCoordinate(Hud.Window.CursorX, Hud.Window.CursorY);
Expand Down

0 comments on commit eb5210b

Please sign in to comment.