Ejemplo n.º 1
0
        public static void DetermineActor(this ActorCommonData Actor)
        {
            if (Monsters.ContainsKey(Actor.Address))
            {
                if (Actor.IsElite(true))
                {
                    Actor.EliteAffixes();
                }
                return;
            }

            if (Config._.FKMinimap.OverrideLayout.ContainsKey(Actor.x090_ActorSnoId) && Actor.x08C_ActorId != -1)
            {
                Actor.Add(MapItemElement.AT_Custom, Config._.FKMinimap.OverrideLayout[Actor.x090_ActorSnoId]);
            }

            else
            {
                if (Actor.IsMonster()) // Monster, Goblins, Bosses etc
                {
                    int EliteOffset = -1;

                    if ((Actor.IsTreasureGoblin()) && Config._.FKMinimap.Allowed.Contains((int)MapItemElement.AT_Goblin))
                    {
                        Actor.Add(MapItemElement.AT_Goblin, -1, -1, true);
                    }

                    else
                    {
                        if (!Config._.FKMinimap.Allowed.Contains((int)(MapItemElement)Actor.x0B8_MonsterQuality))
                        {
                            return;
                        }

                        MapItemElement Quality = (MapItemElement)Actor.x0B8_MonsterQuality;

                        if (Controller.GameManagerData.GameManagerAccountHelper.Current.LevelAreaHelper.EliteAffixesEnabled && (Actor.IsElite(true)))
                        {
                            EliteOffset = Actor.EliteAffixes();
                        }

                        if (Actor.IsKeyWarden())
                        {
                            Quality = MapItemElement.AT_Keywardens;
                        }

                        Actor.Add(Quality, -1, EliteOffset, true);
                    }
                }

                else if (Actor.IsItem())
                {
                    if ((Actor.IsGreaterRiftSoul()) && Config._.FKMinimap.Allowed.Contains((int)MapItemElement.AT_GreaterRiftSoul)) // GR Stuff
                    {
                        Actor.Add(MapItemElement.AT_GreaterRiftSoul);
                    }

                    else if ((Actor.IsRiftSoul()) && Config._.FKMinimap.Allowed.Contains((int)MapItemElement.AT_RiftSoul))
                    {
                        Actor.Add(MapItemElement.AT_RiftSoul);
                    }
                }

                else // Dunno yet ??????
                {
                    if ((Actor.IsShrine()) && Config._.FKMinimap.Allowed.Contains((int)MapItemElement.AT_Shrines))
                    {
                        if (Actor.GetAttribute(AttributeId.GizmoHasBeenOperated) == 1)
                        {
                            Actor.Add(MapItemElement.AT_HasBeenOperated);
                        }
                        else
                        {
                            Actor.Add(MapItemElement.AT_Shrines);
                        }
                    }

                    else if ((Actor.IsPowerPylon()) && Config._.FKMinimap.Allowed.Contains((int)MapItemElement.AT_PowerPylons))
                    {
                        if (Actor.GetAttribute(AttributeId.GizmoHasBeenOperated) == 1)
                        {
                            Actor.Add(MapItemElement.AT_HasBeenOperated);
                        }
                        else
                        {
                            Actor.Add(MapItemElement.AT_PowerPylons);
                        }
                    }

                    else if (Actor.x180_GizmoType == GizmoType.Chest)
                    {
                        if ((Actor.TryCreateResplendent()) && Config._.FKMinimap.Allowed.Contains((int)MapItemElement.AT_ResplendentChest))
                        {
                            Actor.Add(MapItemElement.AT_ResplendentChest);
                        }
                        else if ((Actor.TryCreateChest()) && Config._.FKMinimap.Allowed.Contains((int)MapItemElement.AT_Chests))
                        {
                            Actor.Add(MapItemElement.AT_Chests);
                        }
                        ///  else if (Actor.TryCreateChest(true))
                        //   GameManager.MainAccount.ActorList.Monsters.Add(new IMap.IMapActor { Actor = Actor, Type = MapItemElement.AT_LootableContainers });
                        //  else if (Actor.TryCreateLootable())
                        // GameManager.MainAccount.ActorList.Monsters.Add(new IMap.IMapActor { Actor = Actor, Type = MapItemElement.AT_LoreBooks });
                    }

                    else if ((Actor.IsPoolOfReflection()) && Config._.FKMinimap.Allowed.Contains((int)MapItemElement.AT_PoolOfReflection))
                    {
                        if (Actor.GetAttribute(AttributeId.GizmoHasBeenOperated) == 1)
                        {
                            Actor.Add(MapItemElement.AT_HasBeenOperated);
                        }
                        else
                        {
                            Actor.Add(MapItemElement.AT_PoolOfReflection);
                        }
                    }
                }
            }
        }