public void PaintWorld(WorldLayer layer) { if (!Hud.Game.IsInTown) { return; } short NemesisCount = 0; var NemPlayer = ""; foreach (var player in Hud.Game.Players.OrderBy(p => p.PortraitIndex)) { if (player == null) { continue; } var Nemesis = player.Powers.GetBuff(318820); // Nemesis Bracers if (Nemesis != null && Nemesis.Active) { NemesisCount++; if (NemesisCount > 1) // more than one player { NemPlayer += ", "; } NemPlayer += player.BattleTagAbovePortrait; } } var NemStr = NemesisCount.ToString("0"); if (NemesisCount > 0) { NemStr += " -> " + NemPlayer; } w = NemStr.Length * 12; // 12 pixel per letter (FYI, I'm using Hangul, which is Korean language) if (w < 150) { w = 150; } h = 55; x = Hud.Window.Size.Width / 2 - 480; y = 20; NemesisPlayerDecorator.Paint(x, y, w, h, NemStr, "Nemesis bracers"); if (Hud.Render.GetUiElement("Root.NormalLayer.rift_dialog_mainPage").Visible) { var me = Hud.Game.Me; if (NemesisCount == 0) { var WarningMsg = "No Nemesis bracers!"; WarningMessageDecorator.Paint(layer, null, me.FloorCoordinate.Offset(0, 0, 15), WarningMsg); if (Hud.Sound.LastSpeak.TimerTest(4000)) { Hud.Sound.Speak(WarningMsg); Console.Beep(900, 200); } } else if (NemesisCount > 1) { var WarningMsg = "More than 1 Nemesis bracers -> " + NemesisCount.ToString("0"); NoticeMessageDecorator.Paint(layer, null, me.FloorCoordinate.Offset(0, 0, 15), WarningMsg); } } }
public void PaintWorld(WorldLayer layer) { if (!Hud.Game.IsInTown) { return; } var me = Hud.Game.Me; if (ScanPlayer) { ScanPlayer = false; string NemPlayer = string.Empty; NemesisCount = 0; foreach (var player in Hud.Game.Players.OrderBy(p => p.PortraitIndex)) { if (player == null) { continue; } var Nemesis = player.Powers.GetBuff(318820); // Nemesis Bracers if (Nemesis != null && Nemesis.Active) { NemesisCount++; if (NemesisCount > 1) // more than one player { NemPlayer += ", "; } NemPlayer += player.BattleTagAbovePortrait; } } NemStr = NemesisCount.ToString(); if (NemesisCount > 0) { NemStr += " -> " + NemPlayer; } w = NemStr.Length * 12; // 12 pixel per letter (FYI, I'm using Hangul, which is Korean language) if (w < 150) { w = 150; } h = 55; x = Hud.Window.Size.Width / 2 - 480; y = 20; } var tmp = (culture == "ko") ? "천벌 손목" : "Nemesis Bracers"; NemesisPlayerDecorator.Paint(x, y, w, h, NemStr, tmp); if (Hud.Render.GetUiElement("Root.NormalLayer.rift_dialog_mainPage").Visible || IsGRiftDialog) { if (NemesisCount == 0) { WarningMsg = (culture == "ko") ? "천벌 착용자 없음!" : "No one with Nemesis Bracers!"; WarningMessageDecorator.Paint(layer, null, me.FloorCoordinate.Offset(0, 0, 15), WarningMsg); if (Hud.Sound.LastSpeak.TimerTest(5000)) { Hud.Sound.Speak(WarningMsg); Console.Beep(900, 200); } } else if (NemesisCount > 1) { WarningMsg = (culture == "ko") ? "천벌 착용자 2명 이상 -> " : "More than one with Nemesis -> "; WarningMsg += NemesisCount.ToString("0"); NoticeMessageDecorator.Paint(layer, null, me.FloorCoordinate.Offset(0, 0, 15), WarningMsg); } } var obeliskPos = Hud.Game.Actors.Where(x => x.SnoActor.Sno == ActorSnoEnum._x1_openworld_lootrunobelisk_b && x.IsOnScreen); obeliskText = "" + keys; foreach (var actor in obeliskPos) { if (keys <= keysBad) { keysDecoratorBad.Paint(layer, actor, actor.FloorCoordinate, obeliskText); } else if (keys > keysBad && keys < keysOK) { keysDecoratorWarning.Paint(layer, actor, actor.FloorCoordinate, obeliskText); } else //if (keys >= keysOK) { keysDecoratorOk.Paint(layer, actor, actor.FloorCoordinate, obeliskText); } } }