コード例 #1
0
        private void PaintActor(WorldLayer layer, IActor actor, WorldDecoratorCollection decorator)
        {
            if (GroundLabelsOnScreen)
            {
                decorator.ToggleDecorators <GroundLabelDecorator>(!actor.IsOnScreen);
            }

            if (DebugEnabled && Debug)
            {
                var text = string.Format("{0} : {1} {2}\n{3} {4} {5} {6}\n{7}",
                                         actor.SnoActor.Sno,
                                         actor.SnoActor.NameLocalized,
                                         actor.SnoActor.Kind,
                                         actor.GizmoType,
                                         actor.IsOperated ? "Operated" : "Not Operated",
                                         actor.IsClickable ? "Clickable" : "Not Clickable",
                                         actor.IsDisabled ? "Disabled" : "Not Disabled",
                                         actor.SnoActor.Code);
                DebugDecorators.Paint(layer, actor, actor.FloorCoordinate, text);
            }
            else
            {
                decorator.Paint(layer, actor, actor.FloorCoordinate, GroundSymbol);
            }
        }
コード例 #2
0
        private void PaintActor(WorldLayer layer, IActor actor, WorldDecoratorCollection decorator)
        {
            if (GroundLabelsOnScreen)
            {
                decorator.ToggleDecorators <GroundLabelDecorator>(!actor.IsOnScreen);
            }

            decorator.Paint(layer, actor, actor.FloorCoordinate, "\uD83D\uDEAA"); //🚪
        }
コード例 #3
0
        private void PaintActor(WorldLayer layer, IActor actor, WorldDecoratorCollection decorator)
        {
            if (GroundLabelsOutOfScreenOnly)
            {
                decorator.ToggleDecorators <GroundLabelDecorator>(!actor.IsOnScreen);
            }

            //decorator.Paint(layer, actor, actor.FloorCoordinate, actor.SnoActor.NameEnglish);// "\uD83D\uDEAA");
            decorator.Paint(layer, actor, actor.FloorCoordinate, "\uD83D\uDEAA");
        }
コード例 #4
0
ファイル: GLQ_DoorsPlugin.cs プロジェクト: cThana7os/hud
 private void PaintActor(WorldLayer layer, IActor actor, WorldDecoratorCollection decorator)
 {
     if (GroundLabelsOnScreen)
     {
         decorator.ToggleDecorators <GroundLabelDecorator>(!actor.IsOnScreen);
     }
     else
     {
         decorator.Paint(layer, actor, actor.FloorCoordinate, GroundSymbol);
     }
 }
コード例 #5
0
        public void PaintWorld(WorldLayer layer)
        {
            // 5% of Rift circle part
            CircleDecorator = new WorldDecoratorCollection(
                new MapShapeDecorator(Hud)
            {
                Brush        = Hud.Render.CreateBrush(255, 255, 0, 0, 2),
                ShapePainter = new CircleShapePainter(Hud),
                Radius       = CircleSize,
            }
                );

            if ((Hud.Game.Me.InGreaterRift || Hud.Game.SpecialArea == SpecialArea.Rift || Hud.Game.SpecialArea == SpecialArea.ChallengeRift) && Hud.Game.RiftPercentage < 100)
            {
                var monsters = Hud.Game.AliveMonsters.OrderByDescending(x => x.SnoMonster.RiftProgression);
                foreach (var monster in monsters)
                {
                    CircleSize = 10;
NewLoop:
                    var CircleSizeYardMonsters = monsters.Where(x => x.FloorCoordinate.XYDistanceTo(monster.FloorCoordinate) <= CircleSize);
                    float RiftPercentage = 0f;
                    foreach (var CircleSizeYardMonster in CircleSizeYardMonsters)
                    {
                        RiftPercentage = RiftPercentage + CircleSizeYardMonster.SnoMonster.RiftProgression;
                        if (CircleSizeYardMonster.Rarity == ActorRarity.Rare)
                        {
                            RiftPercentage = RiftPercentage + 28.6f;                                                   // 4.4% of 650 (4 progression orb drops per yellow)
                        }
                        else if (CircleSizeYardMonster.Rarity == ActorRarity.Champion)
                        {
                            RiftPercentage = RiftPercentage + 7.15f;                                                            // 1.1% of 650 (1 progression orb drop per blue)
                        }
                    }

                    float PercentOfRift = 32.5f; // 5% of 650
                    if (Hud.Game.RiftPercentage > 95)
                    {
                        PercentOfRift = (float)(((100 - Hud.Game.RiftPercentage) / 100) * 650);                               // if less than 5% rift completion left, use that percentage instead.
                    }
                    if (RiftPercentage >= PercentOfRift)
                    {
                        CircleDecorator.Paint(layer, null, monster.FloorCoordinate, null);
                        break;
                    }
                    else if (CircleSize < 56) // Within 55 yards max
                    {
                        CircleSize++;
                        goto NewLoop;
                    }
                }
            }
        }
コード例 #6
0
        public void PaintWorld(WorldLayer layer)
        {
            // Don't draw if not playing a Necromancer; don't draw if is in town
            //if (Hud.Game.Me.HeroClassDefinition.HeroClass != HeroClass.Necromancer || Hud.Game.IsInTown) return;
            var monsters = Hud.Game.AliveMonsters.Where(x => x.SnoMonster.Priority == MonsterPriority.boss);

            foreach (var monster in monsters)
            {
                // For Skeleton Melee, only when equipping the skill
                if (CommandSkeletonEnabled != null)
                {
                    // Iterate all the game actors, find out and count which are skeleton melees summoned by player
                    var CommandSkeletonActors = Hud.Game.Actors.Where(EachActor => CommandSkeletonActorSNOs.Contains(EachActor.SnoActor.Sno)); //&& // Find out which are skeleton melees actors
                    //EachActor.SummonerAcdDynamicId == Hud.Game.Me.SummonerId); // Then find out if they are summoned by the player
                    CommandSkeletonCount = CommandSkeletonActors.Count();                                                                      // And then count how many are found

                    // Paint circle decorator under each skeleton melee
                    foreach (var EachActor in CommandSkeletonActors)
                    {
                        var text = string.IsNullOrWhiteSpace(CommandSkeletonLabel) ? EachActor.SnoActor.NameLocalized : CommandSkeletonLabel;
                        CommandSkeletonDecorator.Paint(layer, EachActor, EachActor.FloorCoordinate, text);
                    }
                }
                else
                {
                    CommandSkeletonCount = 0;
                }
            }
            foreach (var monster in monsters)
            {
                // For Skeleton Mages, only when equipping the skill
                if (SkeletonMageEnabled != null)
                {
                    // Iterate all the game actors, find out and count which are skeleton mages summoned by player
                    var SkeletonMageActors = Hud.Game.Actors.Where(EachActor => SkeletonMageActorSNOs.Contains(EachActor.SnoActor.Sno)); //&& // Find out which are skeleton mages actors
                    //EachActor.SummonerAcdDynamicId == Hud.Game.Me.SummonerId); // Then find out if they are summoned by the player
                    SkeletonMageCount = SkeletonMageActors.Count();                                                                      // And then count how many are found

                    // Paint circle decorator under each skeleton melee
                    foreach (var EachActor in SkeletonMageActors)
                    {
                        var text = string.IsNullOrWhiteSpace(SkeletonMageLabel) ? EachActor.SnoActor.NameLocalized : SkeletonMageLabel;
                        SkeletonMageDecorator.Paint(layer, EachActor, EachActor.FloorCoordinate, text);
                    }
                }

                else
                {
                    SkeletonMageCount = 0;
                }
            }
        }
コード例 #7
0
 public void drawLabel(WorldLayer layer, IMonster monster)
 {
     if (ShowGroundLabel)
     {
         reflectdamagemonsterDecorator = new WorldDecoratorCollection(
             new GroundLabelDecorator(Hud)
         {
             TextFont = Hud.Render.CreateFont("tahoma", groundfontsize, a, r, g, b, true, false, false),
         });
         reflectdamagemonsterDecorator.Paint(layer, monster, monster.FloorCoordinate.Offset(0, 0, RFoffset), monsterGroupLabel);
     }
     if (ShowMiniMapLabel)
     {
         var   layout = Hud.Render.CreateFont("tahoma", mapfontsize, a, r, g, b, true, false, false).GetTextLayout(monsterGroupLabel);
         float mapX, mapY;
         Hud.Render.GetMinimapCoordinates(monster.FloorCoordinate.X, monster.FloorCoordinate.Y, out mapX, out mapY);
         Hud.Render.CreateFont("tahoma", mapfontsize, a, r, g, b, true, false, false).DrawText(layout, mapX - layout.Metrics.Width / 2, mapY - RadiusOffset);
     }
 }
コード例 #8
0
ファイル: TownPoIPlugin.cs プロジェクト: Arkahr/Arkahr
        public void PaintWorld(WorldLayer layer)
        {
            if (!Hud.Game.IsInTown)
            {
                return;
            }

            // Uber Bosses Map text toggle on/off
            if (UberEnabled)
            {
                var Uber = Hud.Game.Actors.Where(x => x.DisplayOnOverlay && x.SnoActor.Sno == 258064);
                foreach (var uber in Uber)
                {
                    UberMinimapDecorator.Paint(layer, uber, uber.FloorCoordinate, "UberBosses");
                }
            }

            // Enchanting Couldron toggle on/off
            if (EnchantingCouldronEnabled)
            {
                var EnchantingCouldron = Hud.Game.Actors.Where(x => x.DisplayOnOverlay && x.NormalizedXyDistanceToMe > 15 && x.SnoActor.Sno == 212511).ToList();

                if (EnchantingCouldron.Any())
                {
                    EnchantingCouldronDecorator.Paint(layer, EnchantingCouldron.First(), EnchantingCouldron.First().FloorCoordinate, "Enchant");
                }
            }

            // Followers Enabled toggle on/off
            if (FollowersEnabled)
            {
                var followers = Hud.Game.Actors.Where(x => x.DisplayOnOverlay && (x.SnoActor.Sno == 4062 || x.SnoActor.Sno == 4538 || x.SnoActor.Sno == 4644));
                if (followers.Any())
                {
                    var folower = followers.Last();
                    FollowerMinimapDecorator.Paint(layer, folower, folower.FloorCoordinate, "Followers");
                }
            }
        }
コード例 #9
0
        public void PaintWorld(WorldLayer layer)
        {
            // Talking Obelisk part
            string ObeliskMessage = "";
            int    TenSeconds     = ((int)(Hud.Game.CurrentRealTimeMilliseconds / 10000)) % 10;
            int    OtherPlayers   = Hud.Game.NumberOfPlayersInGame - 1;
            string OPSentence     = "";
            string GenderSentence = "";

            if (OtherPlayers == 1)
            {
                OPSentence = "The other player is in town...";
            }
            else
            {
                OPSentence = "The " + OtherPlayers + " other players are in town...";
            }
            if (Hud.Game.Me.HeroIsMale)
            {
                GenderSentence = "Hep! ... Young lad...";
            }
            else
            {
                GenderSentence = "Hep! ... Young lady...";
            }

            switch (TenSeconds)
            {
            case 0:
                ObeliskMessage = "Close me!";
                break;

            case 1:
                ObeliskMessage = OPSentence;
                break;

            case 2:
                ObeliskMessage = "Please!";
                break;

            case 3:
                ObeliskMessage = "It's " + DateTime.Now.ToShortTimeString() + " now...";
                break;

            case 4:
                ObeliskMessage = "Everybody is back!";
                break;

            case 5:
                ObeliskMessage = "You can close!";
                break;

            case 6:
                ObeliskMessage = "Psssst! ... " + Hud.Game.Me.Hero.Name + "!";
                break;

            case 7:
                ObeliskMessage = "There's a draught from the rift!";
                break;

            case 8:
                ObeliskMessage = "Close me, Nephalem!";
                break;

            case 9:
                ObeliskMessage = GenderSentence;
                break;
            }

            var Rift  = Hud.Game.Quests.FirstOrDefault(q => q.SnoQuest.Sno == 337492);
            var GRift = Hud.Game.Quests.FirstOrDefault(q => q.SnoQuest.Sno == 382695);

            GardianIsDead = false;

            if (Rift != null)
            {
                if (Rift.QuestStepId == 5 || Rift.QuestStepId == 10 || Rift.QuestStepId == 34 || Rift.QuestStepId == 46)
                {
                    GardianIsDead = true;
                }
            }
            else if (GRift != null)
            {
                if (GRift.QuestStepId == 5 || GRift.QuestStepId == 10 || GRift.QuestStepId == 34 || GRift.QuestStepId == 46)
                {
                    GardianIsDead = true;
                }
            }
            else
            {
                return;
            }


            if (PlayerInTownCount == Hud.Game.NumberOfPlayersInGame && Hud.Game.RiftPercentage == 100 && Hud.Game.IsInTown && GardianIsDead && Hud.Game.NumberOfPlayersInGame != 1)
            {
                var Obelisk = Hud.Game.Actors.FirstOrDefault(x => x.SnoActor.Sno == ActorSnoEnum._x1_openworld_lootrunportal); // 345935
                if (Obelisk != null)
                {
                    ObeliskClose.Paint(layer, Obelisk, Obelisk.FloorCoordinate, ObeliskMessage);
                }
            }

            // Current Greater rift level display part
            var PlayerInGreaterRift = Hud.Game.Players.FirstOrDefault(p => p.InGreaterRift);

            if (PlayerInGreaterRift != null && Hud.Render.GreaterRiftBarUiElement.Visible)
            {
                CurrentGRLevel = PlayerInGreaterRift.InGreaterRiftRank;
                var uiRect = Hud.Render.GreaterRiftBarUiElement.Rectangle;
                OnGoingGRLevelDecorator.Paint((int)(uiRect.Left), (int)(uiRect.Bottom / 1.060), 230, 38, HorizontalAlign.Left);
            }


            // 5% of Rift circle part
            CircleDecorator = new WorldDecoratorCollection(
                new MapShapeDecorator(Hud)
            {
                Brush        = Hud.Render.CreateBrush(255, 255, 0, 0, 2),
                ShapePainter = new CircleShapePainter(Hud),
                Radius       = CircleSize,
            }
                );

            if ((Hud.Game.Me.InGreaterRift || Hud.Game.SpecialArea == SpecialArea.Rift || Hud.Game.SpecialArea == SpecialArea.ChallengeRift) && Hud.Game.RiftPercentage < 100 && RedCircle)
            {
                var monsters = Hud.Game.AliveMonsters.OrderByDescending(x => x.SnoMonster.RiftProgression);
                foreach (var monster in monsters)
                {
                    CircleSize = 10;
NewLoop:
                    var CircleSizeYardMonsters = monsters.Where(x => x.FloorCoordinate.XYDistanceTo(monster.FloorCoordinate) <= CircleSize);
                    float RiftPercentage = 0f;
                    foreach (var CircleSizeYardMonster in CircleSizeYardMonsters)
                    {
                        RiftPercentage = RiftPercentage + CircleSizeYardMonster.SnoMonster.RiftProgression;
                        if (CircleSizeYardMonster.Rarity == ActorRarity.Rare)
                        {
                            RiftPercentage = RiftPercentage + 28.6f; // 4.4% of 650 (4 progression orb drops per yellow)
                        }
                        else if (CircleSizeYardMonster.Rarity == ActorRarity.Champion)
                        {
                            RiftPercentage = RiftPercentage + 7.15f; // 1.1% of 650 (1 progression orb drop per blue)
                        }
                    }

                    float PercentOfRift = 32.5f; // 5% of 650
                    if (Hud.Game.RiftPercentage > 95)
                    {
                        PercentOfRift = (float)(((100 - Hud.Game.RiftPercentage) / 100) * 650); // if less than 5% rift completion left, use that percentage instead.
                    }
                    if (RiftPercentage >= PercentOfRift)
                    {
                        CircleDecorator.Paint(layer, null, monster.FloorCoordinate, null);
                        break;
                    }
                    else if (CircleSize < 56) // Within 55 yards max
                    {
                        CircleSize++;
                        goto NewLoop;
                    }
                }
            }

            // Talked to Urshi part
            bool UrshiPanel = Hud.Render.GetUiElement("Root.NormalLayer.vendor_dialog_mainPage.riftReward_dialog.LayoutRoot.gemUpgradePane.items_list._content").Visible;

            if (UrshiPanel)
            {
                TalkedToUrshi = true;
            }
            if (Hud.Game.Me.IsInTown)
            {
                TalkedToUrshi = false;
            }
            if (Hud.Game.Me.InGreaterRift && Hud.Game.RiftPercentage == 100 && GardianIsDead && Hud.Game.Me.AnimationState == AcdAnimationState.CastingPortal && !TalkedToUrshi && Hud.Game.SpecialArea == SpecialArea.GreaterRift)
            {
                TalkToUrshiDecorator.Paint(layer, null, Hud.Game.Me.FloorCoordinate, "Talk to Urshi!");
            }


            // Countdown to boss fight part
            const int Magictime = 3750; // time in ms between 100% rift completion and the moment you can hit the boss

            if (Hud.Game.Me.InGreaterRift && Hud.Game.RiftPercentage == 100 && !GardianIsDead)
            {
                _Countdown.Start();
                float TimeLeft     = (float)(Magictime - _Countdown.ElapsedMilliseconds) / 1000;
                bool  BossOnScreen = Hud.Game.AliveMonsters.Where(x => x.IsOnScreen && x.Rarity == ActorRarity.Boss).Any();
                if (TimeLeft > 0 && TimeLeft < Magictime && BossOnScreen)
                {
                    BossCountdownDecorator.Paint(layer, null, Hud.Game.Me.FloorCoordinate, TimeLeft.ToString("F1", CultureInfo.InvariantCulture));
                }
            }

            if (_Countdown.ElapsedMilliseconds > Magictime)
            {
                _Countdown.Stop();
                if (GardianIsDead)
                {
                    _Countdown.Reset();
                }
            }



            // Monster pack part
            if (PackLeaderLifePercentage)
            {
                var EliteLeaders = Hud.Game.AliveMonsters.Where(x => x.Rarity == ActorRarity.Rare);
                var Blues        = Hud.Game.AliveMonsters.Where(x => x.Rarity == ActorRarity.Champion);
                foreach (var EliteLeader in EliteLeaders)
                {
                    var MaxHealth      = EliteLeader.MaxHealth;
                    var CurHealth      = EliteLeader.CurHealth;
                    var LifePercentage = Math.Truncate((CurHealth / MaxHealth * 100) * 10) / 10;
                    var layout         = YellowFont.GetTextLayout(LifePercentage + "%");
                    YellowFont.DrawText(layout, EliteLeader.ScreenCoordinate.X, EliteLeader.ScreenCoordinate.Y);
                }

                foreach (var Blue in Blues)
                {
                    var MaxHealth      = Blue.MaxHealth;
                    var CurHealth      = Blue.CurHealth;
                    var LifePercentage = Math.Truncate((CurHealth / MaxHealth * 100) * 10) / 10;
                    var layout         = BlueFont.GetTextLayout(LifePercentage + "%");
                    BlueFont.DrawText(layout, Blue.ScreenCoordinate.X, Blue.ScreenCoordinate.Y);
                }
            }
        }
コード例 #10
0
        public void PaintWorld(WorldLayer layer)
        {
            // Talking Obelisk part
            string ObeliskMessage = "";
            int    TenSeconds     = ((int)(Hud.Game.CurrentRealTimeMilliseconds / 10000)) % 10;
            int    OtherPlayers   = Hud.Game.NumberOfPlayersInGame - 1;
            string OPSentence     = "";
            string GenderSentence = "";

            if (OtherPlayers == 1)
            {
                OPSentence = "The other player is in town...";
            }
            else
            {
                OPSentence = "The " + OtherPlayers + " other players are in town...";
            }
            if (Hud.Game.Me.HeroIsMale)
            {
                GenderSentence = "Hep! ... Young lad...";
            }
            else
            {
                GenderSentence = "Hep! ... Young lady...";
            }

            switch (TenSeconds)
            {
            case 0:
                ObeliskMessage = "Close me!";
                break;

            case 1:
                ObeliskMessage = OPSentence;
                break;

            case 2:
                ObeliskMessage = "Please!";
                break;

            case 3:
                ObeliskMessage = "It's " + DateTime.Now.ToShortTimeString() + " now...";
                break;

            case 4:
                ObeliskMessage = "Everybody is back!";
                break;

            case 5:
                ObeliskMessage = "You can close!";
                break;

            case 6:
                ObeliskMessage = "Psssst! ... " + Hud.Game.Me.Hero.Name + "!";
                break;

            case 7:
                ObeliskMessage = "There's a draught from the rift!";
                break;

            case 8:
                ObeliskMessage = "Close me, Nephalem!";
                break;

            case 9:
                ObeliskMessage = GenderSentence;
                break;
            }

            var Rift  = Hud.Game.Quests.FirstOrDefault(q => q.SnoQuest.Sno == 337492);
            var GRift = Hud.Game.Quests.FirstOrDefault(q => q.SnoQuest.Sno == 382695);

            GardianIsDead = false;

            if (Rift != null)
            {
                if (Rift.QuestStepId == 5 || Rift.QuestStepId == 10 || Rift.QuestStepId == 34 || Rift.QuestStepId == 46)
                {
                    GardianIsDead = true;
                }
            }
            else if (GRift != null)
            {
                if (GRift.QuestStepId == 5 || GRift.QuestStepId == 10 || GRift.QuestStepId == 34 || GRift.QuestStepId == 46)
                {
                    GardianIsDead = true;
                }
            }
            else
            {
                return;
            }


            if (PlayerInTownCount == Hud.Game.NumberOfPlayersInGame && Hud.Game.RiftPercentage == 100 && Hud.Game.IsInTown && GardianIsDead && Hud.Game.NumberOfPlayersInGame != 1)
            {
                var Obelisk = Hud.Game.Actors.FirstOrDefault(x => x.SnoActor.Sno == ActorSnoEnum._x1_openworld_lootrunportal); // 345935
                if (Obelisk != null)
                {
                    ObeliskClose.Paint(layer, Obelisk, Obelisk.FloorCoordinate, ObeliskMessage);
                }
            }


            // 5% of Rift circle part
            CircleDecorator = new WorldDecoratorCollection(
                new MapShapeDecorator(Hud)
            {
                Brush        = Hud.Render.CreateBrush(255, 255, 0, 0, 2),
                ShapePainter = new CircleShapePainter(Hud),
                Radius       = CircleSize,
            }
                );

            if ((Hud.Game.Me.InGreaterRift || Hud.Game.SpecialArea == SpecialArea.Rift || Hud.Game.SpecialArea == SpecialArea.ChallengeRift) && Hud.Game.RiftPercentage < 100 && RedCircle)
            {
                var monsters = Hud.Game.AliveMonsters.OrderByDescending(x => x.SnoMonster.RiftProgression);
                foreach (var monster in monsters)
                {
                    CircleSize = 10;
NewLoop:
                    var CircleSizeYardMonsters = monsters.Where(x => x.FloorCoordinate.XYDistanceTo(monster.FloorCoordinate) <= CircleSize);
                    float RiftPercentage = 0f;
                    foreach (var CircleSizeYardMonster in CircleSizeYardMonsters)
                    {
                        RiftPercentage = RiftPercentage + CircleSizeYardMonster.SnoMonster.RiftProgression;
                        if (CircleSizeYardMonster.Rarity == ActorRarity.Rare)
                        {
                            RiftPercentage = RiftPercentage + 28.6f;                                                     // 4.4% of 650 (4 progression orb drops per yellow)
                        }
                        else if (CircleSizeYardMonster.Rarity == ActorRarity.Champion)
                        {
                            RiftPercentage = RiftPercentage + 7.15f;                                                              // 1.1% of 650 (1 progression orb drop per blue)
                        }
                    }

                    float PercentOfRift = 32.5f; // 5% of 650
                    if (Hud.Game.RiftPercentage > 95)
                    {
                        PercentOfRift = (float)(((100 - Hud.Game.RiftPercentage) / 100) * 650);                        // if less than 5% rift completion left, use that percentage instead.
                    }
                    if (RiftPercentage >= PercentOfRift)
                    {
                        CircleDecorator.Paint(layer, null, monster.FloorCoordinate, null);
                        break;
                    }
                    else if (CircleSize < 56) // Within 55 yards max
                    {
                        CircleSize++;
                        goto NewLoop;
                    }
                }
            }

            // Talked to Urshi part
            bool UrshiPanel = Hud.Render.GetUiElement("Root.NormalLayer.vendor_dialog_mainPage.riftReward_dialog.LayoutRoot.gemUpgradePane.items_list._content").Visible;

            if (UrshiPanel)
            {
                TalkedToUrshi = true;
            }
            if (Hud.Game.Me.IsInTown)
            {
                TalkedToUrshi = false;
            }
            if (Hud.Game.Me.InGreaterRift && Hud.Game.RiftPercentage == 100 && GardianIsDead && Hud.Game.Me.AnimationState == AcdAnimationState.CastingPortal && !TalkedToUrshi && Hud.Game.SpecialArea == SpecialArea.GreaterRift)
            {
                TalkToUrshiDecorator.Paint(layer, null, Hud.Game.Me.FloorCoordinate, "Talk to Urshi!");
            }
        }
コード例 #11
0
 public void Paint(WorldLayer layer, IActor actor, string text)
 {
     Decorator.Paint(layer, actor, actor.FloorCoordinate, text);
 }
コード例 #12
0
        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;
            }
        }
コード例 #13
0
        public void PaintWorld(WorldLayer layer)
        {
            List <string> missingPlayers = new List <string>();
            List <string> nemesisPlayers = new List <string>();
            bool          nemesisEquiped = false;
            bool          nemesisInGroup = false;
            bool          missingPlayer  = false;

            foreach (var player in Hud.Game.Players.OrderBy(p => p.PortraitIndex))
            {
                if (player == null)
                {
                    continue;
                }

                if (!player.IsMe && player.IsInGame)
                {
                    if (player.IsDead || player.SnoArea != Hud.Game.Me.SnoArea || !player.CoordinateKnown)
                    {
                        missingPlayers.Add(player.BattleTagAbovePortrait);
                    }
                }

                var nemesisBuff = player.Powers.GetBuff(318820);

                if (nemesisBuff == null || !nemesisBuff.Active)
                {
                }
                else
                if (player.IsMe)
                {
                    nemesisEquiped = true;
                }
                else
                {
                    nemesisPlayers.Add(player.BattleTagAbovePortrait);
                }
            }

            nemesisInGroup = nemesisPlayers.Count > 0;
            missingPlayer  = missingPlayers.Count > 0;

            string message = string.Empty;
            WorldDecoratorCollection dec = null;

            if (nemesisEquiped)
            {
                if (missingPlayer)
                {
                    message = "Wait for:\n" + string.Join("\n", missingPlayers.ToArray());
                    dec     = DecoratorOrange;
                }
                else
                {
                    message = "Take";
                    dec     = DecoratorGreen;
                }
            }
            else
            {
                dec = DecoratorRed;
                if (nemesisInGroup)
                {
                    message = "Leave for:\n" + string.Join("\n", nemesisPlayers.ToArray());
                }
                else
                {
                    message = "No nemesis :(";
                }
            }


            var shrines = Hud.Game.Shrines.Where(x => !x.IsDisabled && !x.IsOperated);

            foreach (var shrine in shrines)
            {
                if (shrine.Type == ShrineType.HealingWell)
                {
                    continue;
                }
                if (shrine.Type == ShrineType.PoolOfReflection)
                {
                    continue;
                }

                if (shrine.FloorCoordinate.Offset(0, 0, 10).IsOnScreen())
                {
                    dec.Paint(layer, null, shrine.FloorCoordinate.Offset(0, 0, 10), message);
                }
            }
        }