Inheritance: IEnmityEntry
        public static PlayerInfoReadResult GetPlayerInfo()
        {
            var result = new PlayerInfoReadResult();

            if (Scanner.Instance.Locations.ContainsKey("CHARMAP"))
            {
                if (Scanner.Instance.Locations.ContainsKey("PLAYERINFO"))
                {
                    PlayerInfoMap = Scanner.Instance.Locations["PLAYERINFO"];
                    if (PlayerInfoMap.ToInt64() <= 6496)
                    {
                        return result;
                    }
                    try
                    {
                        var enmityCount = MemoryHandler.Instance.GetInt16(PlayerInfoMap - MemoryHandler.Instance.Structures.PlayerInfo.EnmityCount);
                        var enmityStructure = PlayerInfoMap - MemoryHandler.Instance.Structures.PlayerInfo.EnmityStructure;
                        var enmityEntries = new List<EnmityEntry>();
                        if (enmityCount > 0 && enmityCount < 32 && enmityStructure.ToInt64() > 0)
                        {
                            for (uint i = 0; i < enmityCount; i++)
                            {
                                var address = new IntPtr(enmityStructure.ToInt64() + (i * 72));
                                var enmityEntry = new EnmityEntry
                                {
                                    ID = (uint) MemoryHandler.Instance.GetPlatformInt(address, MemoryHandler.Instance.Structures.EnmityEntry.ID),
                                    Name = MemoryHandler.Instance.GetString(address + MemoryHandler.Instance.Structures.EnmityEntry.Name),
                                    Enmity = (uint) MemoryHandler.Instance.GetInt16(address + MemoryHandler.Instance.Structures.EnmityEntry.Enmity)
                                };
                                if (enmityEntry.ID > 0)
                                {
                                    enmityEntries.Add(enmityEntry);
                                }
                            }
                        }
                        var source = MemoryHandler.Instance.GetByteArray(PlayerInfoMap, 0x256);
                        try
                        {
                            result.PlayerEntity = PlayerEntityHelper.ResolvePlayerFromBytes(source);
                            result.PlayerEntity.EnmityEntries = enmityEntries;
                        }
                        catch (Exception)
                        {
                            // ignored
                        }
                    }
                    catch (Exception)
                    {
                        // ignored
                    }
                }
            }

            return result;
        }
        public static TargetReadResult GetTargetInfo()
        {
            var result = new TargetReadResult();

            if (Scanner.Instance.Locations.ContainsKey("CHARMAP"))
            {
                try
                {
                    var targetHateStructure = (Scanner.Instance.Locations["PLAYERINFO"].GetAddress()) - MemoryHandler.Instance.Structures.TargetInfo.HateStructure;
                    var enmityEntries = new List<EnmityEntry>();

                    if (Scanner.Instance.Locations.ContainsKey("TARGET"))
                    {
                        var targetAddress = (IntPtr) Scanner.Instance.Locations["TARGET"];
                        var somethingFound = false;
                        if (targetAddress.ToInt64() > 0)
                        {
                            //var targetInfo = MemoryHandler.Instance.GetStructure<Structures.Target>(targetAddress);
                            var targetInfoSource = MemoryHandler.Instance.GetByteArray(targetAddress, 192);
                            var currentTarget = BitConverter.ToUInt32(targetInfoSource, MemoryHandler.Instance.Structures.TargetInfo.Current);
                            var mouseOverTarget = BitConverter.ToUInt32(targetInfoSource, MemoryHandler.Instance.Structures.TargetInfo.MouseOver);
                            var focusTarget = BitConverter.ToUInt32(targetInfoSource, MemoryHandler.Instance.Structures.TargetInfo.Focus);
                            var previousTarget = BitConverter.ToUInt32(targetInfoSource, MemoryHandler.Instance.Structures.TargetInfo.Previous);
                            var currentTargetID = BitConverter.ToUInt32(targetInfoSource, MemoryHandler.Instance.Structures.TargetInfo.CurrentID);
                            if (currentTarget > 0)
                            {
                                try
                                {
                                    var entry = GetTargetActorEntityFromSource(currentTarget);
                                    currentTargetID = entry.ID;
                                    if (entry.IsValid)
                                    {
                                        result.TargetsFound = true;
                                        result.TargetEntity.CurrentTarget = entry;
                                    }
                                }
                                catch (Exception)
                                {
                                    // ignored
                                }
                            }
                            if (mouseOverTarget > 0)
                            {
                                try
                                {
                                    var entry = GetTargetActorEntityFromSource(mouseOverTarget);
                                    if (entry.IsValid)
                                    {
                                        result.TargetsFound = true;
                                        result.TargetEntity.MouseOverTarget = entry;
                                    }
                                }
                                catch (Exception)
                                {
                                    // ignored
                                }
                            }
                            if (focusTarget > 0)
                            {
                                try
                                {
                                    var entry = GetTargetActorEntityFromSource(focusTarget);
                                    if (entry.IsValid)
                                    {
                                        result.TargetsFound = true;
                                        result.TargetEntity.FocusTarget = entry;
                                    }
                                }
                                catch (Exception)
                                {
                                    // ignored
                                }
                            }
                            if (previousTarget > 0)
                            {
                                try
                                {
                                    var entry = GetTargetActorEntityFromSource(previousTarget);
                                    if (entry.IsValid)
                                    {
                                        result.TargetsFound = true;
                                        result.TargetEntity.PreviousTarget = entry;
                                    }
                                }
                                catch (Exception)
                                {
                                    // ignored
                                }
                            }
                            if (currentTargetID > 0)
                            {
                                result.TargetsFound = true;
                                result.TargetEntity.CurrentTargetID = currentTargetID;
                            }
                        }
                        if (result.TargetEntity.CurrentTargetID > 0 && targetHateStructure.ToInt64() > 0)
                        {
                            for (uint i = 0; i < 16; i++)
                            {
                                try
                                {
                                    var address = new IntPtr(targetHateStructure.ToInt64() + (i * 72));
                                    var enmityEntry = new EnmityEntry
                                    {
                                        ID = (uint) MemoryHandler.Instance.GetPlatformInt(address, MemoryHandler.Instance.Structures.EnmityEntry.ID),
                                        Name = MemoryHandler.Instance.GetString(address + MemoryHandler.Instance.Structures.EnmityEntry.Name),
                                        Enmity = (uint) MemoryHandler.Instance.GetInt16(address + MemoryHandler.Instance.Structures.EnmityEntry.Enmity)
                                    };
                                    if (enmityEntry.ID <= 0)
                                    {
                                        continue;
                                    }
                                    if (string.IsNullOrWhiteSpace(enmityEntry.Name))
                                    {
                                        var pc = PCWorkerDelegate.GetEntity(enmityEntry.ID);
                                        var npc = NPCWorkerDelegate.GetEntity(enmityEntry.ID);
                                        var monster = MonsterWorkerDelegate.GetEntity(enmityEntry.ID);
                                        try
                                        {
                                            enmityEntry.Name = (pc ?? npc).Name ?? monster.Name;
                                        }
                                        catch (Exception)
                                        {
                                            // ignored
                                        }
                                    }
                                    enmityEntries.Add(enmityEntry);
                                }
                                catch (Exception)
                                {
                                    // ignored
                                }
                            }
                        }
                        result.TargetEntity.EnmityEntries = enmityEntries;
                    }
                }
                catch (Exception)
                {
                    // ignored
                }
            }

            return result;
        }