示例#1
0
        public bool IsValid()
        {
            int ActorId = Actor.x000_Id;

            if (ActorId == -1 || ActorId != ACDID) //|| Actor.Address != Id)
            {
                return(false);
            }

            if (IsMonster)
            {
                return(Actor.x188_Hitpoints != 0);
            }

            if (IsItem)
            {
                return((int)Actor.x114_ItemLocation == -1);
            }

            else
            {
                if (Type == MapItemElement.AT_Chests || Type == MapItemElement.AT_ResplendentChest)
                {
                    if (Type == MapItemElement.AT_Chests)
                    {
                        return(Actor.IsValidGizmoChest());
                    }
                    else
                    {
                        return(Actor.TryCreateResplendent());
                    }
                }

                else if (Type == MapItemElement.AT_Shrines || Type == MapItemElement.AT_PowerPylons)
                {
                    return(Actor.GetAttribute(Enigma.D3.Enums.AttributeId.GizmoHasBeenOperated) != 1);
                }

                else if (Type == MapItemElement.AT_PoolOfReflection)
                {
                    return(Actor.GetAttribute(Enigma.D3.Enums.AttributeId.GizmoHasBeenOperated) != 1);
                }
            }
            return(true);
        }
示例#2
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);
                        }
                    }
                }
            }
        }