예제 #1
0
        protected override Stream Export(BufferManager bufferManager, int count)
        {
            lock (this.ThisLock)
            {
                BufferStream bufferStream = new BufferStream(bufferManager);

                // CreationTime
                if (this.CreationTime != DateTime.MinValue)
                {
                    ItemUtilities.Write(bufferStream, (byte)SerializeId.CreationTime, this.CreationTime.ToUniversalTime().ToString("yyyy-MM-ddTHH:mm:ssZ", System.Globalization.DateTimeFormatInfo.InvariantInfo));
                }
                // ExchangeKey
                if (this.ExchangeKey != null)
                {
                    ItemUtilities.Write(bufferStream, (byte)SerializeId.ExchangeKey, this.ExchangeKey);
                }
                // ProtocolHash
                if (this.ProtocolHash != null)
                {
                    ItemUtilities.Write(bufferStream, (byte)SerializeId.ProtocolHash, this.ProtocolHash);
                }

                // Certificate
                if (this.Certificate != null)
                {
                    using (var stream = this.Certificate.Export(bufferManager))
                    {
                        ItemUtilities.Write(bufferStream, (byte)SerializeId.Certificate, stream);
                    }
                }

                bufferStream.Seek(0, SeekOrigin.Begin);
                return(bufferStream);
            }
        }
예제 #2
0
        private static Dictionary <string, ControlData> EditChoices(
            SiteSettings ss, Column column, string value)
        {
            var editChoices = column.EditChoices();

            if (column.UseSearch != true)
            {
                return(editChoices);
            }
            else if (editChoices.ContainsKey(value))
            {
                return(new Dictionary <string, ControlData>()
                {
                    { value, editChoices[value] }
                });
            }
            else
            {
                var referenceId = value.ToLong();
                if (referenceId > 0 && ss.Links?.Any() == true)
                {
                    return(new Dictionary <string, ControlData>()
                    {
                        {
                            value,
                            new ControlData(ItemUtilities.Title(referenceId, ss.Links))
                        }
                    });
                }
                else
                {
                    return(new Dictionary <string, ControlData>());
                }
            }
        }
예제 #3
0
        protected override void ExecuteCore()
        {
            var log          = new MSBuildLog(Log);
            var packageRanks = new PackageRank(PreferredPackages);

            // resolve conflicts at compile time
            var referenceItems = GetConflictTaskItems(References, ConflictItemType.Reference).ToArray();

            var compileConflictScope = new ConflictResolver <ConflictItem>(packageRanks, log);

            compileConflictScope.ResolveConflicts(referenceItems,
                                                  ci => ItemUtilities.GetReferenceFileName(ci.OriginalItem),
                                                  HandleCompileConflict);

            // resolve conflicts that class in output
            var runtimeConflictScope = new ConflictResolver <ConflictItem>(packageRanks, log);

            runtimeConflictScope.ResolveConflicts(referenceItems,
                                                  ci => ItemUtilities.GetReferenceTargetPath(ci.OriginalItem),
                                                  HandleRuntimeConflict);

            var copyLocalItems = GetConflictTaskItems(ReferenceCopyLocalPaths, ConflictItemType.CopyLocal).ToArray();

            runtimeConflictScope.ResolveConflicts(copyLocalItems,
                                                  ci => ItemUtilities.GetTargetPath(ci.OriginalItem),
                                                  HandleRuntimeConflict);

            var otherRuntimeItems = GetConflictTaskItems(OtherRuntimeItems, ConflictItemType.Runtime).ToArray();

            runtimeConflictScope.ResolveConflicts(otherRuntimeItems,
                                                  ci => ItemUtilities.GetTargetPath(ci.OriginalItem),
                                                  HandleRuntimeConflict);


            // resolve conflicts with platform (eg: shared framework) items
            // we only commit the platform items since its not a conflict if other items share the same filename.
            var platformConflictScope = new ConflictResolver <ConflictItem>(packageRanks, log);
            var platformItems         = PlatformManifests?.SelectMany(pm => PlatformManifestReader.LoadConflictItems(pm.ItemSpec, log)) ?? Enumerable.Empty <ConflictItem>();

            platformConflictScope.ResolveConflicts(platformItems, pi => pi.FileName, pi => { });
            platformConflictScope.ResolveConflicts(referenceItems.Where(ri => !referenceConflicts.Contains(ri.OriginalItem)),
                                                   ri => ItemUtilities.GetReferenceTargetFileName(ri.OriginalItem),
                                                   HandleRuntimeConflict,
                                                   commitWinner: false);
            platformConflictScope.ResolveConflicts(copyLocalItems.Where(ci => !copyLocalConflicts.Contains(ci.OriginalItem)),
                                                   ri => ri.FileName,
                                                   HandleRuntimeConflict,
                                                   commitWinner: false);
            platformConflictScope.ResolveConflicts(otherRuntimeItems,
                                                   ri => ri.FileName,
                                                   HandleRuntimeConflict,
                                                   commitWinner: false);

            ReferencesWithoutConflicts = RemoveConflicts(References, referenceConflicts);
            ReferenceCopyLocalPathsWithoutConflicts = RemoveConflicts(ReferenceCopyLocalPaths, copyLocalConflicts);
            Conflicts = CreateConflictTaskItems(allConflicts);
        }
예제 #4
0
        private void OnDrop(PointerEventData eventData)
        {
            if (m_selectedItem == null || m_selectedSlot == null)
            {
                return;
            }

            DropItem?.Invoke();

            if (ItemUtilities.TryGetSlot(eventData.pointerEnter, out var targetSlot))
            {
                if (targetSlot.IsEmpty && targetSlot.CanDropItem(m_selectedItem))
                {
                    //just add item to an empty slot
                    targetSlot.Add(m_selectedItem);
                }
                else if (targetSlot.IsStackableWith(m_selectedItem))
                {
                    if (targetSlot.TryStackItem(m_selectedItem))
                    {
                        //if stacking where successful, reset and stop here
                        ResetSelection();
                        return;
                    }

                    //targetSlot / item has already maximum stacks
                    //add selected item back to selected slot
                    m_selectedSlot.Add(m_selectedItem);
                }
                else
                {
                    if (targetSlot.CanDropItem(m_selectedItem))
                    {
                        //switch items
                        var otherItem = targetSlot.Content;
                        targetSlot.Remove();
                        m_selectedSlot.Add(otherItem);
                        targetSlot.Add(m_selectedItem);
                    }
                    else
                    {
                        m_selectedSlot.Add(m_selectedItem);
                    }
                }
            }
            else
            {
                //reset to origin, no slot available
                m_selectedSlot.Add(m_selectedItem);
            }

            //in any case reset selected slot, selected item and disable icon
            ResetSelection();
        }
예제 #5
0
        protected override void ProtectedImport(Stream stream, BufferManager bufferManager, int count)
        {
            lock (this.ThisLock)
            {
                for (; ;)
                {
                    byte id;
                    {
                        byte[] idBuffer = new byte[1];
                        if (stream.Read(idBuffer, 0, idBuffer.Length) != idBuffer.Length)
                        {
                            return;
                        }
                        id = idBuffer[0];
                    }

                    int length;
                    {
                        byte[] lengthBuffer = new byte[4];
                        if (stream.Read(lengthBuffer, 0, lengthBuffer.Length) != lengthBuffer.Length)
                        {
                            return;
                        }
                        length = NetworkConverter.ToInt32(lengthBuffer);
                    }

                    using (RangeStream rangeStream = new RangeStream(stream, stream.Position, length, true))
                    {
                        if (id == (byte)SerializeId.KeyExchangeAlgorithm)
                        {
                            this.KeyExchangeAlgorithm = EnumEx <KeyExchangeAlgorithm> .Parse(ItemUtilities.GetString(rangeStream));
                        }
                        else if (id == (byte)SerializeId.KeyDerivationAlgorithm)
                        {
                            this.KeyDerivationAlgorithm = EnumEx <KeyDerivationAlgorithm> .Parse(ItemUtilities.GetString(rangeStream));
                        }
                        else if (id == (byte)SerializeId.CryptoAlgorithm)
                        {
                            this.CryptoAlgorithm = EnumEx <CryptoAlgorithm> .Parse(ItemUtilities.GetString(rangeStream));
                        }
                        else if (id == (byte)SerializeId.HashAlgorithm)
                        {
                            this.HashAlgorithm = EnumEx <HashAlgorithm> .Parse(ItemUtilities.GetString(rangeStream));
                        }
                        else if (id == (byte)SerializeId.SessionId)
                        {
                            this.SessionId = ItemUtilities.GetByteArray(rangeStream);
                        }
                    }
                }
            }
        }
예제 #6
0
 private void CheckDragableItem(PointerEventData eventData)
 {
     if (ItemUtilities.TryGetSlot(eventData.pointerEnter, out var targetSlot))
     {
         if (!targetSlot.IsEmpty)
         {
             DragItem?.Invoke();
             m_selectedSlot = targetSlot;
             m_selectedItem = targetSlot.Content;
             m_selectedSlot.Remove();
             EnableDragableIcon(eventData);
         }
     }
 }
예제 #7
0
        protected override void ProtectedImport(Stream stream, BufferManager bufferManager, int count)
        {
            lock (this.ThisLock)
            {
                for (; ;)
                {
                    byte id;
                    {
                        byte[] idBuffer = new byte[1];
                        if (stream.Read(idBuffer, 0, idBuffer.Length) != idBuffer.Length)
                        {
                            return;
                        }
                        id = idBuffer[0];
                    }

                    int length;
                    {
                        byte[] lengthBuffer = new byte[4];
                        if (stream.Read(lengthBuffer, 0, lengthBuffer.Length) != lengthBuffer.Length)
                        {
                            return;
                        }
                        length = NetworkConverter.ToInt32(lengthBuffer);
                    }

                    using (RangeStream rangeStream = new RangeStream(stream, stream.Position, length, true))
                    {
                        if (id == (byte)SerializeId.CreationTime)
                        {
                            this.CreationTime = DateTime.ParseExact(ItemUtilities.GetString(rangeStream), "yyyy-MM-ddTHH:mm:ssZ", System.Globalization.DateTimeFormatInfo.InvariantInfo).ToUniversalTime();
                        }
                        if (id == (byte)SerializeId.ExchangeKey)
                        {
                            this.ExchangeKey = ItemUtilities.GetByteArray(rangeStream);
                        }
                        if (id == (byte)SerializeId.ProtocolHash)
                        {
                            this.ProtocolHash = ItemUtilities.GetByteArray(rangeStream);
                        }

                        else if (id == (byte)SerializeId.Certificate)
                        {
                            this.Certificate = Certificate.Import(rangeStream, bufferManager);
                        }
                    }
                }
            }
        }
        // Token: 0x060001AE RID: 430 RVA: 0x00002C14 File Offset: 0x00000E14
        public static IEnumerator PickupItems()
        {
            for (;;)
            {
                bool flag  = !DrawUtilities.ShouldRun() || !ItemOptions.AutoItemPickup;
                bool flag4 = flag;
                if (flag4)
                {
                    yield return(new WaitForSeconds(0.5f));
                }
                else
                {
                    Collider[] array = Physics.OverlapSphere(OptimizationVariables.MainPlayer.transform.position, 19f, RayMasks.ITEM);
                    int        num;
                    for (int i = 0; i < array.Length; i = num + 1)
                    {
                        Collider col   = array[i];
                        bool     flag2 = col == null || col.GetComponent <InteractableItem>() == null || col.GetComponent <InteractableItem>().asset == null;
                        bool     flag5 = !flag2;
                        if (flag5)
                        {
                            InteractableItem item  = col.GetComponent <InteractableItem>();
                            bool             flag3 = !ItemUtilities.Whitelisted(item.asset, ItemOptions.ItemFilterOptions);
                            bool             flag6 = !flag3;
                            if (flag6)
                            {
                                item.use();
                                col  = null;
                                item = null;
                            }
                            item = null;
                        }
                        num = i;
                        col = null;
                    }
                    yield return(new WaitForSeconds((float)(ItemOptions.ItemPickupDelay / 1000)));

                    array = null;
                    array = null;
                }
            }
            yield break;
        }
예제 #9
0
        public void OnPointerEnter(GameObject gbj)
        {
            if (!m_enablePreview)
            {
                return;
            }

            if (ItemUtilities.TryGetSlot(gbj, out m_currentTarget))
            {
                if (!m_currentTarget.IsEmpty)
                {
                    var popUpPosition =
                        UiUtilities.AnchoredPosition((RectTransform)m_currentTarget.transform,
                                                     m_previewPopup.RectTransform,
                                                     m_rectAnchor, m_offset);

                    m_previewPopup.transform.SetAsLastSibling();
                    m_previewPopup.Show(m_currentTarget, popUpPosition);
                }
            }
        }
        protected override void ExecuteCore()
        {
            var packageRanks     = new PackageRank(PreferredPackages);
            var packageOverrides = new PackageOverrideResolver <ConflictItem>(PackageOverrides);
            var conflicts        = new HashSet <ConflictItem>();

            var conflictItemGroup1 = GetConflictTaskItems(ItemGroup1, ConflictItemType.CopyLocal);
            var conflictItemGroup2 = GetConflictTaskItems(ItemGroup2, ConflictItemType.CopyLocal);

            using (var conflictResolver = new ConflictResolver <ConflictItem>(packageRanks, packageOverrides, Log))
            {
                var allConflicts = conflictItemGroup1.Concat(conflictItemGroup2);
                conflictResolver.ResolveConflicts(allConflicts,
                                                  ci => ItemUtilities.GetReferenceTargetPath(ci.OriginalItem),
                                                  (ConflictItem winner, ConflictItem loser) => { conflicts.Add(loser); });

                var conflictItems = conflicts.Select(i => i.OriginalItem);
                RemovedItemGroup1 = ItemGroup1.Intersect(conflictItems).ToArray();
                RemovedItemGroup2 = ItemGroup2.Intersect(conflictItems).ToArray();
            }
        }
예제 #11
0
        public static IEnumerator PickupItems()
        {
            // #if DEBUG
            DebugUtilities.Log("Starting Item Coroutine");
            //  #endif

            while (true)
            {
                if (!DrawUtilities.ShouldRun() || !ItemOptions.AutoItemPickup)
                {
                    yield return(new WaitForSeconds(0.5f));

                    continue;
                }

                Collider[] array = Physics.OverlapSphere(OptimizationVariables.MainPlayer.transform.position, 19f, RayMasks.ITEM);

                for (int i = 0; i < array.Length; i++)
                {
                    Collider col = array[i];
                    if (col == null || col.GetComponent <InteractableItem>() == null ||
                        col.GetComponent <InteractableItem>().asset == null)
                    {
                        continue;
                    }

                    InteractableItem item = col.GetComponent <InteractableItem>();

                    if (!ItemUtilities.Whitelisted(item.asset, ItemOptions.ItemFilterOptions))
                    {
                        continue;
                    }

                    item.use();
                }

                yield return(new WaitForSeconds(ItemOptions.ItemPickupDelay / 1000));
            }
        }
예제 #12
0
        protected override Stream Export(BufferManager bufferManager, int count)
        {
            lock (this.ThisLock)
            {
                BufferStream bufferStream = new BufferStream(bufferManager);

                // KeyExchangeAlgorithm
                if (this.KeyExchangeAlgorithm != 0)
                {
                    ItemUtilities.Write(bufferStream, (byte)SerializeId.KeyExchangeAlgorithm, this.KeyExchangeAlgorithm.ToString());
                }
                // KeyDerivationAlgorithm
                if (this.KeyDerivationAlgorithm != 0)
                {
                    ItemUtilities.Write(bufferStream, (byte)SerializeId.KeyDerivationAlgorithm, this.KeyDerivationAlgorithm.ToString());
                }
                // CryptoAlgorithm
                if (this.CryptoAlgorithm != 0)
                {
                    ItemUtilities.Write(bufferStream, (byte)SerializeId.CryptoAlgorithm, this.CryptoAlgorithm.ToString());
                }
                // HashAlgorithm
                if (this.HashAlgorithm != 0)
                {
                    ItemUtilities.Write(bufferStream, (byte)SerializeId.HashAlgorithm, this.HashAlgorithm.ToString());
                }
                // SessionId
                if (this.SessionId != null)
                {
                    ItemUtilities.Write(bufferStream, (byte)SerializeId.SessionId, this.SessionId);
                }

                bufferStream.Seek(0, SeekOrigin.Begin);
                return(bufferStream);
            }
        }
예제 #13
0
        protected override void ExecuteCore()
        {
            var log              = Log;
            var packageRanks     = new PackageRank(PreferredPackages);
            var packageOverrides = new PackageOverrideResolver <ConflictItem>(PackageOverrides);

            //  Treat assemblies from FrameworkList.xml as platform assemblies that also get considered at compile time
            IEnumerable <ConflictItem> compilePlatformItems = null;

            if (TargetFrameworkDirectories != null && TargetFrameworkDirectories.Any())
            {
                var frameworkListReader = new FrameworkListReader(BuildEngine4);

                compilePlatformItems = TargetFrameworkDirectories.SelectMany(tfd =>
                {
                    return(frameworkListReader.GetConflictItems(Path.Combine(tfd.ItemSpec, "RedistList", "FrameworkList.xml"), log));
                }).ToArray();
            }

            // resolve conflicts at compile time
            var referenceItems = GetConflictTaskItems(References, ConflictItemType.Reference).ToArray();

            using (var compileConflictScope = new ConflictResolver <ConflictItem>(packageRanks, packageOverrides, log))
            {
                compileConflictScope.ResolveConflicts(referenceItems,
                                                      ci => ItemUtilities.GetReferenceFileName(ci.OriginalItem),
                                                      HandleCompileConflict);

                if (compilePlatformItems != null)
                {
                    compileConflictScope.ResolveConflicts(compilePlatformItems,
                                                          ci => ci.FileName,
                                                          HandleCompileConflict);
                }
            }

            //  Remove platform items which won a conflict with a reference but subsequently lost to something else
            compilePlatformWinners.ExceptWith(allConflicts);

            // resolve analyzer conflicts
            var analyzerItems = GetConflictTaskItems(Analyzers, ConflictItemType.Analyzer).ToArray();

            using (var analyzerConflictScope = new ConflictResolver <ConflictItem>(packageRanks, packageOverrides, log))
            {
                analyzerConflictScope.ResolveConflicts(analyzerItems, ci => ci.FileName, HandleAnalyzerConflict);
            }

            // resolve conflicts that clash in output
            IEnumerable <ConflictItem> copyLocalItems;
            IEnumerable <ConflictItem> otherRuntimeItems;

            using (var runtimeConflictScope = new ConflictResolver <ConflictItem>(packageRanks, packageOverrides, log))
            {
                runtimeConflictScope.ResolveConflicts(referenceItems,
                                                      ci => ItemUtilities.GetReferenceTargetPath(ci.OriginalItem),
                                                      HandleRuntimeConflict);

                copyLocalItems = GetConflictTaskItems(ReferenceCopyLocalPaths, ConflictItemType.CopyLocal).ToArray();

                runtimeConflictScope.ResolveConflicts(copyLocalItems,
                                                      ci => ItemUtilities.GetTargetPath(ci.OriginalItem),
                                                      HandleRuntimeConflict);

                otherRuntimeItems = GetConflictTaskItems(OtherRuntimeItems, ConflictItemType.Runtime).ToArray();

                runtimeConflictScope.ResolveConflicts(otherRuntimeItems,
                                                      ci => ItemUtilities.GetTargetPath(ci.OriginalItem),
                                                      HandleRuntimeConflict);
            }


            // resolve conflicts with platform (eg: shared framework) items
            // we only commit the platform items since its not a conflict if other items share the same filename.
            using (var platformConflictScope = new ConflictResolver <ConflictItem>(packageRanks, packageOverrides, log))
            {
                var platformItems = PlatformManifests?.SelectMany(pm => PlatformManifestReader.LoadConflictItems(pm.ItemSpec, log)) ?? Enumerable.Empty <ConflictItem>();

                if (compilePlatformItems != null)
                {
                    platformItems = platformItems.Concat(compilePlatformItems);
                }

                platformConflictScope.ResolveConflicts(platformItems, pi => pi.FileName, (winner, loser) => { });
                platformConflictScope.ResolveConflicts(referenceItems.Where(ri => !referenceConflicts.Contains(ri.OriginalItem)),
                                                       ri => ItemUtilities.GetReferenceTargetFileName(ri.OriginalItem),
                                                       HandleRuntimeConflict,
                                                       commitWinner: false);
                platformConflictScope.ResolveConflicts(copyLocalItems.Where(ci => !copyLocalConflicts.Contains(ci.OriginalItem)),
                                                       ri => ri.FileName,
                                                       HandleRuntimeConflict,
                                                       commitWinner: false);
                platformConflictScope.ResolveConflicts(otherRuntimeItems,
                                                       ri => ri.FileName,
                                                       HandleRuntimeConflict,
                                                       commitWinner: false);
            }

            ReferencesWithoutConflicts = RemoveConflicts(References, referenceConflicts);
            AnalyzersWithoutConflicts  = RemoveConflicts(Analyzers, analyzerConflicts);
            ReferenceCopyLocalPathsWithoutConflicts = RemoveConflicts(ReferenceCopyLocalPaths, copyLocalConflicts);
            Conflicts = CreateConflictTaskItems(allConflicts);

            //  This handles the issue described here: https://github.com/dotnet/sdk/issues/2221
            //  The issue is that before conflict resolution runs, references to assemblies in the framework
            //  that also match an assembly coming from a NuGet package are either removed (in non-SDK targets
            //  via the ResolveNuGetPackageAssets target in Microsoft.NuGet.targets) or transformed to refer
            //  to the assembly coming from the NuGet package (for SDK projects in the ResolveLockFileReferences
            //  task).
            //  In either case, there ends up being no Reference item which will resolve to the DLL in
            //  the reference assemblies.  This is a problem if the platform item from the reference
            //  assemblies wins a conflict in the compile scope, as the reference to the assembly from
            //  the NuGet package will be removed, but there will be no reference to the Framework assembly
            //  passed to the compiler.
            //  So what we do is keep track of Platform items that win conflicts with Reference items in
            //  the compile scope, and explicitly add references to them here.

            var referenceItemSpecs = new HashSet <string>(ReferencesWithoutConflicts?.Select(r => r.ItemSpec) ?? Enumerable.Empty <string>(),
                                                          StringComparer.OrdinalIgnoreCase);

            ReferencesWithoutConflicts = SafeConcat(ReferencesWithoutConflicts,
                                                    //  The Reference item we create in this case should be without the .dll extension
                                                    //  (which is added in FrameworkListReader in order to make the framework items
                                                    //  correctly conflict with DLLs from NuGet packages)
                                                    compilePlatformWinners.Select(c => Path.GetFileNameWithoutExtension(c.FileName))
                                                    //  Don't add a reference if we already have one (especially in case the existing one has
                                                    //  metadata we want to keep, such as aliases)
                                                    .Where(simplename => !referenceItemSpecs.Contains(simplename))
                                                    .Select(r => new TaskItem(r)));
        }
 public static void DrawFilterTab(ItemOptionList OptionList)
 {
     System.Action two = null;
     System.Action tri = null;
     System.Action one = null;
     Prefab.SectionTabButton("ФИЛЬТР ПРЕДМЕТОВ", delegate
     {
         Prefab.Toggle("Оружие", ref OptionList.ItemfilterGun, 17);
         Prefab.Toggle("Оружие ближнего боя", ref OptionList.ItemfilterGunMeel, 17);
         Prefab.Toggle("Боеприпасы", ref OptionList.ItemfilterAmmo, 17);
         Prefab.Toggle("Медикаменты", ref OptionList.ItemfilterMedical, 17);
         Prefab.Toggle("Рюкзаки", ref OptionList.ItemfilterBackpack, 17);
         Prefab.Toggle("Charges", ref OptionList.ItemfilterCharges, 17);
         Prefab.Toggle("Топливо", ref OptionList.ItemfilterFuel, 17);
         Prefab.Toggle("Одежда", ref OptionList.ItemfilterClothing, 17);
         Prefab.Toggle("Провизия", ref OptionList.ItemfilterFoodAndWater, 17);
         Prefab.Toggle("Настройка фильтра", ref OptionList.ItemfilterCustom, 17);
         bool itemfilterCustom = OptionList.ItemfilterCustom;
         if (itemfilterCustom)
         {
             GUILayout.Space(5f);
             string text = "Кастомизация фильтра";
             System.Action code;
             if ((code = one) == null)
             {
                 code = (one = delegate()
                 {
                     GUILayout.BeginHorizontal(new GUILayoutOption[0]);
                     GUILayout.Space(55f);
                     OptionList.searchstring = Prefab.TextField(OptionList.searchstring, "Поиск:", 200);
                     GUILayout.Space(5f);
                     bool flag = Prefab.Button("Обновить", 276f, 25f, new GUILayoutOption[0]);
                     if (flag)
                     {
                         ItemsComponent.RefreshItems();
                     }
                     GUILayout.FlexibleSpace();
                     GUILayout.EndHorizontal();
                     Rect area = new Rect(70f, 50f, 540f, 190f);
                     string title = "Добавить";
                     ItemOptionList optionList = OptionList;
                     System.Action code2;
                     if ((code2 = two) == null)
                     {
                         code2 = (two = delegate()
                         {
                             GUILayout.Space(5f);
                             for (int i = 0; i < ItemsComponent.items.Count; i++)
                             {
                                 ItemAsset itemAsset = ItemsComponent.items[i];
                                 bool flag2 = false;
                                 bool flag3 = itemAsset.itemName.ToLower().Contains(OptionList.searchstring.ToLower());
                                 if (flag3)
                                 {
                                     flag2 = true;
                                 }
                                 bool flag4 = OptionList.searchstring.Length < 2;
                                 if (flag4)
                                 {
                                     flag2 = false;
                                 }
                                 bool flag5 = OptionList.AddedItems.Contains(itemAsset.id);
                                 if (flag5)
                                 {
                                     flag2 = false;
                                 }
                                 bool flag6 = flag2;
                                 if (flag6)
                                 {
                                     ItemUtilities.DrawItemButton(itemAsset, OptionList.AddedItems);
                                 }
                             }
                             GUILayout.Space(2f);
                         });
                     }
                     Prefab.ScrollView(area, title, ref optionList.additemscroll, code2, 20, new GUILayoutOption[0]);
                     Rect area2 = new Rect(70f, 245f, 540f, 191f);
                     string title2 = "Удалить";
                     ItemOptionList optionList2 = OptionList;
                     System.Action code3;
                     if ((code3 = tri) == null)
                     {
                         code3 = (tri = delegate()
                         {
                             GUILayout.Space(5f);
                             for (int i = 0; i < ItemsComponent.items.Count; i++)
                             {
                                 ItemAsset itemAsset = ItemsComponent.items[i];
                                 bool flag2 = false;
                                 bool flag3 = itemAsset.itemName.ToLower().Contains(OptionList.searchstring.ToLower());
                                 if (flag3)
                                 {
                                     flag2 = true;
                                 }
                                 bool flag4 = !OptionList.AddedItems.Contains(itemAsset.id);
                                 if (flag4)
                                 {
                                     flag2 = false;
                                 }
                                 bool flag5 = flag2;
                                 if (flag5)
                                 {
                                     ItemUtilities.DrawItemButton(itemAsset, OptionList.AddedItems);
                                 }
                             }
                             GUILayout.Space(2f);
                         });
                     }
                     Prefab.ScrollView(area2, title2, ref optionList2.removeitemscroll, code3, 20, new GUILayoutOption[0]);
                 });
             }
             Prefab.SectionTabButton(text, code, 0f, 20);
         }
     }, 0f, 20);
 }
    public static void Tab()
    {
        Prefab.MenuArea(new Rect(0f, 0f, 466f, 436f), "Опции", delegate
        {
            GUILayout.BeginHorizontal(new GUILayoutOption[0]);
            GUILayout.BeginVertical(new GUILayoutOption[]
            {
                GUILayout.Width(230f)
            });

            GUILayout.Space(2f);
            Prefab.Toggle("Авто подбор вещей", ref ItemOptions.AutoItemPickup, 17);
            Prefab.Toggle("Дальнее поднятие в инвентаре", ref MiscOptions.NearbyItemRaycast, 17);
            GUILayout.Space(2f);
            GUILayout.Label("Задержка: " + ItemOptions.ItemPickupDelay + "мс", Prefab._TextStyle, new GUILayoutOption[0]);
            GUILayout.Space(2f);
            ItemOptions.ItemPickupDelay = (int)Prefab.Slider(0f, 3000f, ItemOptions.ItemPickupDelay, 175);
            GUILayout.Space(2f);
            ItemUtilities.DrawFilterTab(ItemOptions.ItemFilterOptions);
            GUILayout.Label("________________", Prefab._TextStyle, new GUILayoutOption[0]);

            GUILayout.Space(2f);
            GUILayout.Label(string.Format("Метод краша сервера: {0}", MiscOptions.SCrashMethod), Prefab._TextStyle, new GUILayoutOption[0]);
            GUILayout.Space(2f);
            MiscOptions.SCrashMethod = (int)Prefab.Slider(1f, 3f, MiscOptions.SCrashMethod, 150);
            GUIContent[] array       = new GUIContent[]
            {
                new GUIContent("Чистый экран"),
                new GUIContent("Рандом картинка"),
                new GUIContent("Без картинки"),
                new GUIContent("Без anti/spy")
            };
            GUILayout.Space(2f);
            GUILayout.Label("Anti/spy метод:", Prefab._TextStyle, new GUILayoutOption[0]);
            bool flag = Prefab.List(200f, "_SpyMethods", new GUIContent(array[MiscOptions.AntiSpyMethod].text), array, new GUILayoutOption[0]);
            if (flag)
            {
                MiscOptions.AntiSpyMethod = DropDown.Get("_SpyMethods").ListIndex;
            }
            bool flag2 = MiscOptions.AntiSpyMethod == 1;
            if (flag2)
            {
                GUILayout.Space(2f);
                GUILayout.Label("Anti/spy папка:", Prefab._TextStyle, new GUILayoutOption[0]);
                MiscOptions.AntiSpyPath = Prefab.TextField(MiscOptions.AntiSpyPath, "", 225);
            }
            GUILayout.Space(2f);
            Prefab.Toggle("Предупреждать при /spy", ref MiscOptions.AlertOnSpy, 17);
            GUILayout.Space(2f);
            GUILayout.Space(2f);
            bool flag3 = Prefab.Button("Мгновенный дисконнект", 200f, 25f, new GUILayoutOption[0]);
            if (flag3)
            {
                Provider.disconnect();
            }
            GUILayout.Space(2f);

            GUILayout.Space(2f);
            if (Prefab.Button("Убрать воду", 200f, 25f, new GUILayoutOption[0]))
            {
                if (MiscOptions.Altitude == 0f)
                {
                    MiscOptions.Altitude = LevelLighting.seaLevel;
                }
                LevelLighting.seaLevel = ((LevelLighting.seaLevel == 0f) ? MiscOptions.Altitude : 0f);
            }
            GUILayout.Space(2f);
            if (Provider.cameraMode != ECameraMode.BOTH)
            {
                if (Prefab.Button("Включить 3-е лицо", 200f, 25f, new GUILayoutOption[0]))
                {
                    Provider.cameraMode = ECameraMode.BOTH;
                }
            }
            if (Provider.cameraMode == ECameraMode.BOTH)
            {
                if (Prefab.Button("Выключить 3-е лицо", 200f, 25f, new GUILayoutOption[0]))
                {
                    Provider.cameraMode = ECameraMode.VEHICLE;
                }
            }
            GUILayout.Space(2f);
            if (Prefab.Button("Отключить чит", 200f, 25f, new GUILayoutOption[0]))
            {
                File.Delete(ConfigManager.ConfigPath);
                File.Delete(LoaderCoroutines.AssetPath);
                if (File.Exists("df.log"))
                {
                    File.Delete("df.log");
                }
                PlayerCoroutines.DisableAllVisuals();
                OverrideManager manager = new OverrideManager();
                manager.OffHook();
                UnityEngine.Object.DestroyImmediate(SosiHui.BinaryOperationBinder.HookObject);
            }

            GUILayout.Space(2f);

            GUILayout.EndVertical();
            GUILayout.BeginVertical(new GUILayoutOption[0]);
            GUILayout.Label("Сменить ник:\r\n(авт.перезаход на сервер)", Prefab._TextStyle, new GUILayoutOption[0]);
            MiscOptions.NickName = Prefab.TextField(MiscOptions.NickName, "Ник: ", 145);
            GUILayout.Space(2f);
            if (Prefab.Button("Применить", 200f, 25f, new GUILayoutOption[0]))
            {
                if (Provider.isConnected)
                {
                    Characters.rename(MiscOptions.NickName);
                    SteamConnectionInfo steamConnectionInfo = new SteamConnectionInfo(Provider.currentServerInfo.ip, Provider.currentServerInfo.port, "");
                    Provider.disconnect();
                    Thread.Sleep(50);
                    MenuPlayConnectUI.connect(steamConnectionInfo, true);
                }
                else if (!Provider.isConnected)
                {
                    Characters.rename(MiscOptions.NickName);
                }
            }
            GUILayout.EndVertical();
            GUILayout.EndHorizontal();
        });
    }
예제 #16
0
        public static void Tab()
        {
            Prefab.MenuArea(new Rect(0, 0, 225, 436), "ESP", () =>
            {
                //Prefab.SectionTabButton("Global Override", () =>
                //{
                //
                //});

                Prefab.SectionTabButton("Players", () =>
                {
                    GUILayout.BeginHorizontal();
                    GUILayout.BeginVertical(GUILayout.Width(240));

                    BasicControls(ESPTarget.Players);

                    if (!ESPOptions.VisualOptions[(int)ESPTarget.Players].Enabled)
                    {
                        return;
                    }

                    GUILayout.EndVertical();
                    GUILayout.BeginVertical();
                    Prefab.Toggle("Show Player Weapon", ref ESPOptions.ShowPlayerWeapon);
                    Prefab.Toggle("Show Player Vehicle", ref ESPOptions.ShowPlayerVehicle);
                    Prefab.Toggle("Use Player Group", ref ESPOptions.UsePlayerGroup);
                    GUILayout.EndVertical();
                    GUILayout.FlexibleSpace();
                    GUILayout.EndHorizontal();
                });
                Prefab.SectionTabButton("Zombies", () =>
                {
                    BasicControls(ESPTarget.Zombies);
                });
                Prefab.SectionTabButton("Vehicles", () =>
                {
                    GUILayout.BeginHorizontal();
                    GUILayout.BeginVertical(GUILayout.Width(240));

                    BasicControls(ESPTarget.Vehicles);

                    if (!ESPOptions.VisualOptions[(int)ESPTarget.Vehicles].Enabled)
                    {
                        return;
                    }

                    GUILayout.EndVertical();
                    GUILayout.BeginVertical();

                    Prefab.Toggle("Show Vehicle Fuel", ref ESPOptions.ShowVehicleFuel);
                    Prefab.Toggle("Show Vehicle Health", ref ESPOptions.ShowVehicleHealth);
                    Prefab.Toggle("Show Vehicle Locked", ref ESPOptions.ShowVehicleLocked);
                    Prefab.Toggle("Filter Out Locked", ref ESPOptions.FilterVehicleLocked);

                    GUILayout.EndVertical();
                    GUILayout.FlexibleSpace();
                    GUILayout.EndHorizontal();
                });
                Prefab.SectionTabButton("Items", () =>
                {
                    GUILayout.BeginHorizontal();
                    GUILayout.BeginVertical(GUILayout.Width(240));

                    BasicControls(ESPTarget.Items);

                    if (!ESPOptions.VisualOptions[(int)ESPTarget.Items].Enabled)
                    {
                        return;
                    }

                    GUILayout.EndVertical();
                    GUILayout.BeginVertical();

                    Prefab.Toggle("Filter Items", ref ESPOptions.FilterItems);

                    if (ESPOptions.FilterItems)
                    {
                        GUILayout.Space(5);
                        ItemUtilities.DrawFilterTab(ItemOptions.ItemESPOptions);
                    }

                    GUILayout.EndVertical();
                    GUILayout.FlexibleSpace();
                    GUILayout.EndHorizontal();
                });
                Prefab.SectionTabButton("Storages", () =>
                {
                    BasicControls(ESPTarget.Storage);
                });
                Prefab.SectionTabButton("Beds", () =>
                {
                    GUILayout.BeginHorizontal();
                    GUILayout.BeginVertical(GUILayout.Width(240));

                    BasicControls(ESPTarget.Beds);

                    if (!ESPOptions.VisualOptions[(int)ESPTarget.Beds].Enabled)
                    {
                        return;
                    }

                    GUILayout.EndVertical();
                    GUILayout.BeginVertical();

                    Prefab.Toggle("Show Claimed", ref ESPOptions.ShowClaimed);

                    GUILayout.EndVertical();
                    GUILayout.FlexibleSpace();
                    GUILayout.EndHorizontal();
                });
                Prefab.SectionTabButton("Generators", () =>
                {
                    GUILayout.BeginHorizontal();
                    GUILayout.BeginVertical(GUILayout.Width(240));

                    BasicControls(ESPTarget.Generators);

                    if (!ESPOptions.VisualOptions[(int)ESPTarget.Generators].Enabled)
                    {
                        return;
                    }

                    GUILayout.EndVertical();
                    GUILayout.BeginVertical();

                    Prefab.Toggle("Show Generator Fuel", ref ESPOptions.ShowGeneratorFuel);
                    Prefab.Toggle("Show Generator Powered", ref ESPOptions.ShowGeneratorPowered);

                    GUILayout.EndVertical();
                    GUILayout.FlexibleSpace();
                    GUILayout.EndHorizontal();
                });
                Prefab.SectionTabButton("Sentries", () =>
                {
                    GUILayout.BeginHorizontal();
                    GUILayout.BeginVertical(GUILayout.Width(240));

                    BasicControls(ESPTarget.Sentries);

                    if (!ESPOptions.VisualOptions[(int)ESPTarget.Sentries].Enabled)
                    {
                        return;
                    }

                    GUILayout.EndVertical();
                    GUILayout.BeginVertical();

                    Prefab.Toggle("Show Sentry Item", ref ESPOptions.ShowSentryItem);

                    GUILayout.EndVertical();
                    GUILayout.FlexibleSpace();
                    GUILayout.EndHorizontal();
                });
                Prefab.SectionTabButton("Claim Flags", () =>
                {
                    BasicControls(ESPTarget.ClaimFlags);
                });
            });

            Prefab.MenuArea(new Rect(225 + 5, 0, 466 - 225 - 5, 180), "OTHER", () =>
            {
                Prefab.SectionTabButton("Radar", () =>
                {
                    Prefab.Toggle("2D Radar", ref RadarOptions.Enabled);
                    if (RadarOptions.Enabled)
                    {
                        GUILayout.Space(5);
                        string type = "";
                        if (RadarOptions.type == 1)
                        {
                            type = "Global";
                        }
                        if (RadarOptions.type == 2)
                        {
                            type = "Static Local";
                        }
                        if (RadarOptions.type == 3)
                        {
                            type = "Dynamic Local";
                        }

                        GUILayout.Label("Radar Type: " + type, Prefab._TextStyle);

                        RadarOptions.type = (int)Prefab.Slider(1, 3, RadarOptions.type, 200);


                        Prefab.Toggle("Show Players", ref RadarOptions.ShowPlayers);
                        if (RadarOptions.ShowPlayers)
                        {
                            Prefab.Toggle("Detailed Plyers", ref RadarOptions.DetialedPlayers);
                        }
                        Prefab.Toggle("Show Vehicles", ref RadarOptions.ShowVehicles);
                        if (RadarOptions.ShowVehicles)
                        {
                            Prefab.Toggle("Show Only Unlocked", ref RadarOptions.ShowVehiclesUnlocked);
                        }
                        GUILayout.Space(5);
                        GUILayout.Label("Radar Zoom Multiplier: " + Mathf.Round(RadarOptions.RadarZoom), Prefab._TextStyle);
                        Prefab.Slider(0, 10, ref RadarOptions.RadarZoom, 200);
                        if (Prefab.Button("Reset Zoom", 100))
                        {
                            RadarOptions.RadarZoom = 1;
                        }
                        GUILayout.Space(5);
                        GUILayout.Label("Radar Size: " + Mathf.RoundToInt(RadarOptions.RadarSize), Prefab._TextStyle);
                        Prefab.Slider(50, 1000, ref RadarOptions.RadarSize, 200);
                    }
                });

                Prefab.Toggle("Show Vanish Players", ref ESPOptions.ShowVanishPlayers);
                Prefab.Toggle("Mirror Camera", ref MirrorCameraOptions.Enabled);
                GUILayout.Space(5);
                if (Prefab.Button("Fix Camera", 100))
                {
                    MirrorCameraComponent.FixCam();
                }
            });

            Prefab.MenuArea(new Rect(225 + 5, 180 + 5, 466 - 225 - 5, 436 - 186), "TOGGLE", () =>
            {
                if (Prefab.Toggle("ESP", ref ESPOptions.Enabled))
                {
                    if (!ESPOptions.Enabled)
                    {
                        for (int i = 0; i < ESPOptions.VisualOptions.Length; i++)
                        {
                            ESPOptions.VisualOptions[i].Glow = false;
                        }

                        Ldr.HookObject.GetComponent <ESPComponent>().OnGUI();
                    }
                }

                Prefab.Toggle("Chams", ref ESPOptions.ChamsEnabled);

                if (ESPOptions.ChamsEnabled)
                {
                    Prefab.Toggle("Flat Chams", ref ESPOptions.ChamsFlat);
                }
                Prefab.Toggle("Ignore Z", ref ESPOptions.IgnoreZ);
                Prefab.Toggle("No Rain", ref MiscOptions.NoRain);
                Prefab.Toggle("No Snow", ref MiscOptions.NoSnow);
                Prefab.Toggle("No Flinch", ref MiscOptions.NoFlinch);
                Prefab.Toggle("No Grayscale", ref MiscOptions.NoGrayscale);
                Prefab.Toggle("Night Vision", ref MiscOptions.NightVision);
                Prefab.Toggle("Compass", ref MiscOptions.Compass);
                Prefab.Toggle("GPS", ref MiscOptions.GPS);
                Prefab.Toggle("Show Players On Map", ref MiscOptions.ShowPlayersOnMap);
            });
        }
예제 #17
0
        public static void Tab()
        {
            Prefab.MenuArea(new Rect(0, 0, 466, 436), "MORE MISC", () =>
            {
                GUILayout.BeginHorizontal();
                GUILayout.BeginVertical(GUILayout.Width(230));
                GUILayout.Space(2);
                Prefab.Toggle("Auto Item Pickup", ref ItemOptions.AutoItemPickup);

                if (ItemOptions.AutoItemPickup)
                {
                    GUILayout.Space(5);
                    GUILayout.Label("Delay: " + ItemOptions.ItemPickupDelay + "ms", Prefab._TextStyle);
                    GUILayout.Space(2);
                    ItemOptions.ItemPickupDelay = (int)Prefab.Slider(0, 3000, ItemOptions.ItemPickupDelay, 175);
                }

                GUILayout.Space(5);

                Prefab.Toggle("Oof on Death", ref WeaponOptions.OofOnDeath);

                GUILayout.Space(5);

                ItemUtilities.DrawFilterTab(ItemOptions.ItemFilterOptions);

                GUILayout.Space(5);

                GUIContent[] SpyMethods =
                {
                    new GUIContent("Remove All Visuals"),
                    new GUIContent("Random Image in Folder"),
                    new GUIContent("Send No Image"),
                    new GUIContent("No Anti-Spy")
                };

                GUILayout.Label("Anti-Spy Method:", Prefab._TextStyle);
                if (Prefab.List(200, "_SpyMethods",
                                new GUIContent(SpyMethods[MiscOptions.AntiSpyMethod].text),
                                SpyMethods))
                {
                    MiscOptions.AntiSpyMethod = DropDown.Get("_SpyMethods").ListIndex;
                }

                if (MiscOptions.AntiSpyMethod == 1)
                {
                    GUILayout.Space(2);
                    GUILayout.Label("Anti-Spy Image Folder:", Prefab._TextStyle);
                    MiscOptions.AntiSpyPath = Prefab.TextField(MiscOptions.AntiSpyPath, "", 225);
                }

                GUILayout.Space(2);
                Prefab.Toggle("Alert on Spy", ref MiscOptions.AlertOnSpy);

                GUILayout.Space(2);
                GUILayout.Label($"Min Time Between Spy: {Math.Round(MiscOptions.MinTimeBetweenSpy, 2)}s", Prefab._TextStyle);
                GUILayout.Space(2);
                MiscOptions.MinTimeBetweenSpy = Prefab.Slider(0, 10, MiscOptions.MinTimeBetweenSpy, 200);

                GUILayout.Space(4);
                Prefab.Toggle("Punch Killaura", ref MiscOptions.PunchAura);

                GUILayout.Space(5);
                Prefab.Toggle("Spinbot", ref MiscOptions.Spinbot);

                if (MiscOptions.Spinbot)
                {
                    GUILayout.Space(2);
                    Prefab.Toggle("Static Pitch", ref MiscOptions.StaticSpinbotPitch);
                    GUILayout.Space(2);
                    GUILayout.Label($"Spinbot Pitch {(!MiscOptions.StaticSpinbotPitch ? "Incr." : "")}: " + MiscOptions.SpinbotPitch, Prefab._TextStyle);
                    GUILayout.Space(2);
                    MiscOptions.SpinbotPitch = Prefab.Slider(0, 180, MiscOptions.SpinbotPitch, 200);
                    GUILayout.Space(2);
                    Prefab.Toggle("Static Yaw", ref MiscOptions.StaticSpinbotYaw);
                    GUILayout.Space(2);
                    GUILayout.Label($"Spinbot Yaw {(!MiscOptions.StaticSpinbotYaw ? "Incr." : "")}: " + MiscOptions.SpinbotYaw, Prefab._TextStyle);
                    GUILayout.Space(2);
                    MiscOptions.SpinbotYaw = Prefab.Slider(0, 360, MiscOptions.SpinbotYaw, 200);
                }

                /*GUILayout.Space(3);
                 * Prefab.Toggle("Spam Join Server", ref MiscOptions.AutoJoin);
                 * GUILayout.Space(5);
                 * MiscOptions.AutoJoinIP = Prefab.TextField(MiscOptions.AutoJoinIP, "IP:Port", 200);*/

                GUILayout.EndVertical();
                GUILayout.BeginVertical();

                GUILayout.Label("Time Acceleration: " + MiscOptions.TimeAcceleration + "x", Prefab._TextStyle);
                GUILayout.Space(2);

                MiscOptions.TimeAcceleration = (int)Prefab.Slider(1, 4, MiscOptions.TimeAcceleration, 200);

                int n = MiscOptions.TimeAcceleration;
                int v = n;

                v--;
                v |= v >> 1;
                v |= v >> 2;
                v |= v >> 4;
                v |= v >> 8;
                v |= v >> 16;
                v++;            // next power of 2

                int x = v >> 1; // previous power of 2
                MiscOptions.TimeAcceleration = (v - n) > (n - x) ? x : v;
                GUILayout.Space(5);

                Prefab.Toggle("Extended Pickup Range", ref MiscOptions.IncreaseNearbyItemDistance);

                if (MiscOptions.IncreaseNearbyItemDistance)
                {
                    GUILayout.Space(2);
                    GUILayout.Label("Range: " + MiscOptions.NearbyItemDistance, Prefab._TextStyle);
                    GUILayout.Space(2);
                    MiscOptions.NearbyItemDistance = (float)Math.Round(Prefab.Slider(0, 20, MiscOptions.NearbyItemDistance, 200), 2);
                }

                GUILayout.Space(5);

                Prefab.Toggle("Voicechat Key Pressed", ref MiscOptions.PerpetualVoiceChat);

                GUILayout.Space(5);

                Prefab.Toggle($"Zoom on Hotkey ({HotkeyUtilities.GetHotkeyString("Misc", "_Zoom")})", ref MiscOptions.ZoomOnHotkey);

                if (MiscOptions.ZoomOnHotkey)
                {
                    GUILayout.Space(2);
                    Prefab.Toggle("Zoom Instantly", ref MiscOptions.InstantZoom);
                    GUILayout.Space(2);
                    GUILayout.Label("Zoom FOV: " + MiscOptions.ZoomFOV, Prefab._TextStyle);
                    GUILayout.Space(2);
                    MiscOptions.ZoomFOV = (int)Prefab.Slider(0, 32, MiscOptions.ZoomFOV, 200);
                }

                GUILayout.Space(5);

                Prefab.Toggle("Message on Kill", ref MiscOptions.MessageOnKill);

                if (MiscOptions.MessageOnKill)
                {
                    GUILayout.Space(2);
                    MiscOptions.KillMessage = Prefab.TextField(MiscOptions.KillMessage, "Message: ", 175);
                }

                GUILayout.EndVertical();
                GUILayout.EndHorizontal();
            });
        }
예제 #18
0
        public static IEnumerator UpdateObjectList()
        {
            while (true)
            {
                if (!DrawUtilities.ShouldRun())
                {
                    yield return(new WaitForSeconds(2));

                    continue;
                }
                List <ESPObject> objects = ESPVariables.Objects;
                objects.Clear();

                List <ESPTarget> targets =
                    ESPOptions.PriorityTable.Keys.OrderByDescending(k => ESPOptions.PriorityTable[k]).ToList();

                for (int i = 0; i < targets.Count; i++)
                {
                    ESPTarget target = targets[i];
                    ESPVisual vis    = ESPOptions.VisualOptions[(int)target];

                    if (!vis.Enabled)
                    {
                        continue;
                    }

                    Vector3 pPos = OptimizationVariables.MainPlayer.transform.position;

                    switch (target)
                    {
                    case ESPTarget.Players:
                    {
                        SteamPlayer[] objarray = Provider.clients
                                                 .OrderByDescending(p => VectorUtilities.GetDistance(pPos, p.player.transform.position)).ToArray();

                        if (vis.UseObjectCap)
                        {
                            objarray = objarray.TakeLast(vis.ObjectCap).ToArray();
                        }

                        for (int j = 0; j < objarray.Length; j++)
                        {
                            SteamPlayer sPlayer = objarray[j];
                            Player      plr     = sPlayer.player;

                            if (plr.life.isDead || plr == OptimizationVariables.MainPlayer)
                            {
                                continue;
                            }

                            objects.Add(new ESPObject(target, plr, plr.gameObject));
                        }
                        break;
                    }

                    case ESPTarget.Zombies:
                    {
                        Zombie[] objarr = ZombieManager.regions.SelectMany(r => r.zombies)
                                          .OrderByDescending(obj => VectorUtilities.GetDistance(pPos, obj.transform.position)).ToArray();

                        if (vis.UseObjectCap)
                        {
                            objarr = objarr.TakeLast(vis.ObjectCap).ToArray();
                        }

                        for (int j = 0; j < objarr.Length; j++)
                        {
                            Zombie obj = objarr[j];
                            objects.Add(new ESPObject(target, obj, obj.gameObject));
                        }

                        break;
                    }

                    case ESPTarget.Items:
                    {
                        InteractableItem[] objarr = Object.FindObjectsOfType <InteractableItem>()
                                                    .OrderByDescending(obj => VectorUtilities.GetDistance(pPos, obj.transform.position)).ToArray();

                        if (vis.UseObjectCap)
                        {
                            objarr = objarr.TakeLast(vis.ObjectCap).ToArray();
                        }

                        for (int j = 0; j < objarr.Length; j++)
                        {
                            InteractableItem obj = objarr[j];

                            if (ItemUtilities.Whitelisted(obj.asset, ItemOptions.ItemESPOptions) || !ESPOptions.FilterItems)
                            {
                                objects.Add(new ESPObject(target, obj, obj.gameObject));
                            }
                        }
                        break;
                    }

                    case ESPTarget.Sentries:
                    {
                        InteractableSentry[] objarr = Object.FindObjectsOfType <InteractableSentry>()
                                                      .OrderByDescending(obj => VectorUtilities.GetDistance(pPos, obj.transform.position)).ToArray();

                        if (vis.UseObjectCap)
                        {
                            objarr = objarr.TakeLast(vis.ObjectCap).ToArray();
                        }

                        for (int j = 0; j < objarr.Length; j++)
                        {
                            InteractableSentry obj = objarr[j];
                            objects.Add(new ESPObject(target, obj, obj.gameObject));
                        }
                        break;
                    }

                    case ESPTarget.Beds:
                    {
                        InteractableBed[] objarr = Object.FindObjectsOfType <InteractableBed>()
                                                   .OrderByDescending(obj => VectorUtilities.GetDistance(pPos, obj.transform.position)).ToArray();

                        if (vis.UseObjectCap)
                        {
                            objarr = objarr.TakeLast(vis.ObjectCap).ToArray();
                        }

                        for (int j = 0; j < objarr.Length; j++)
                        {
                            InteractableBed obj = objarr[j];
                            objects.Add(new ESPObject(target, obj, obj.gameObject));
                        }
                        break;
                    }

                    case ESPTarget.ClaimFlags:
                    {
                        InteractableClaim[] objarr = Object.FindObjectsOfType <InteractableClaim>()
                                                     .OrderByDescending(obj => VectorUtilities.GetDistance(pPos, obj.transform.position)).ToArray();

                        if (vis.UseObjectCap)
                        {
                            objarr = objarr.TakeLast(vis.ObjectCap).ToArray();
                        }

                        for (int j = 0; j < objarr.Length; j++)
                        {
                            InteractableClaim obj = objarr[j];
                            objects.Add(new ESPObject(target, obj, obj.gameObject));
                        }
                        break;
                    }

                    case ESPTarget.Vehicles:
                    {
                        InteractableVehicle[] objarr = Object.FindObjectsOfType <InteractableVehicle>()
                                                       .OrderByDescending(obj => VectorUtilities.GetDistance(pPos, obj.transform.position)).ToArray();

                        if (vis.UseObjectCap)
                        {
                            objarr = objarr.TakeLast(vis.ObjectCap).ToArray();
                        }

                        for (int j = 0; j < objarr.Length; j++)
                        {
                            InteractableVehicle obj = objarr[j];

                            if (obj.isDead)
                            {
                                continue;
                            }

                            objects.Add(new ESPObject(target, obj, obj.gameObject));
                        }
                        break;
                    }

                    case ESPTarget.Storage:
                    {
                        InteractableStorage[] objarr = Object.FindObjectsOfType <InteractableStorage>()
                                                       .OrderByDescending(obj => VectorUtilities.GetDistance(pPos, obj.transform.position)).ToArray();

                        if (vis.UseObjectCap)
                        {
                            objarr = objarr.TakeLast(vis.ObjectCap).ToArray();
                        }

                        for (int j = 0; j < objarr.Length; j++)
                        {
                            InteractableStorage obj = objarr[j];
                            objects.Add(new ESPObject(target, obj, obj.gameObject));
                        }
                        break;
                    }

                    case ESPTarget.Generators:
                    {
                        InteractableGenerator[] objarr = Object.FindObjectsOfType <InteractableGenerator>()
                                                         .OrderByDescending(obj => VectorUtilities.GetDistance(pPos, obj.transform.position)).ToArray();

                        if (vis.UseObjectCap)
                        {
                            objarr = objarr.TakeLast(vis.ObjectCap).ToArray();
                        }

                        for (int j = 0; j < objarr.Length; j++)
                        {
                            InteractableGenerator obj = objarr[j];
                            objects.Add(new ESPObject(target, obj, obj.gameObject));
                        }
                        break;
                    }
                    }
                }
                yield return(new WaitForSeconds(5));
            }
        }
예제 #19
0
 public int GetHashCode(byte[] value)
 {
     return(ItemUtilities.GetHashCode(value));
 }
예제 #20
0
        protected override void ExecuteCore()
        {
            var log              = new MSBuildLog(Log);
            var packageRanks     = new PackageRank(PreferredPackages);
            var packageOverrides = new PackageOverrideResolver <ConflictItem>(PackageOverrides);

            //  Treat assemblies from FrameworkList.xml as platform assemblies that also get considered at compile time
            IEnumerable <ConflictItem> compilePlatformItems = null;

            if (TargetFrameworkDirectories != null && TargetFrameworkDirectories.Any())
            {
                var frameworkListReader = new FrameworkListReader(BuildEngine4);

                compilePlatformItems = TargetFrameworkDirectories.SelectMany(tfd =>
                {
                    return(frameworkListReader.GetConflictItems(Path.Combine(tfd.ItemSpec, "RedistList", "FrameworkList.xml"), log));
                });
            }

            // resolve conflicts at compile time
            var referenceItems = GetConflictTaskItems(References, ConflictItemType.Reference).ToArray();

            var compileConflictScope = new ConflictResolver <ConflictItem>(packageRanks, packageOverrides, log);

            compileConflictScope.ResolveConflicts(referenceItems,
                                                  ci => ItemUtilities.GetReferenceFileName(ci.OriginalItem),
                                                  HandleCompileConflict);

            if (compilePlatformItems != null)
            {
                compileConflictScope.ResolveConflicts(compilePlatformItems,
                                                      ci => ci.FileName,
                                                      HandleCompileConflict);
            }

            // resolve conflicts that class in output
            var runtimeConflictScope = new ConflictResolver <ConflictItem>(packageRanks, packageOverrides, log);

            runtimeConflictScope.ResolveConflicts(referenceItems,
                                                  ci => ItemUtilities.GetReferenceTargetPath(ci.OriginalItem),
                                                  HandleRuntimeConflict);

            var copyLocalItems = GetConflictTaskItems(ReferenceCopyLocalPaths, ConflictItemType.CopyLocal).ToArray();

            runtimeConflictScope.ResolveConflicts(copyLocalItems,
                                                  ci => ItemUtilities.GetTargetPath(ci.OriginalItem),
                                                  HandleRuntimeConflict);

            var otherRuntimeItems = GetConflictTaskItems(OtherRuntimeItems, ConflictItemType.Runtime).ToArray();

            runtimeConflictScope.ResolveConflicts(otherRuntimeItems,
                                                  ci => ItemUtilities.GetTargetPath(ci.OriginalItem),
                                                  HandleRuntimeConflict);


            // resolve conflicts with platform (eg: shared framework) items
            // we only commit the platform items since its not a conflict if other items share the same filename.
            var platformConflictScope = new ConflictResolver <ConflictItem>(packageRanks, packageOverrides, log);
            var platformItems         = PlatformManifests?.SelectMany(pm => PlatformManifestReader.LoadConflictItems(pm.ItemSpec, log)) ?? Enumerable.Empty <ConflictItem>();

            if (compilePlatformItems != null)
            {
                platformItems = platformItems.Concat(compilePlatformItems);
            }

            platformConflictScope.ResolveConflicts(platformItems, pi => pi.FileName, pi => { });
            platformConflictScope.ResolveConflicts(referenceItems.Where(ri => !referenceConflicts.Contains(ri.OriginalItem)),
                                                   ri => ItemUtilities.GetReferenceTargetFileName(ri.OriginalItem),
                                                   HandleRuntimeConflict,
                                                   commitWinner: false);
            platformConflictScope.ResolveConflicts(copyLocalItems.Where(ci => !copyLocalConflicts.Contains(ci.OriginalItem)),
                                                   ri => ri.FileName,
                                                   HandleRuntimeConflict,
                                                   commitWinner: false);
            platformConflictScope.ResolveConflicts(otherRuntimeItems,
                                                   ri => ri.FileName,
                                                   HandleRuntimeConflict,
                                                   commitWinner: false);

            ReferencesWithoutConflicts = RemoveConflicts(References, referenceConflicts);
            ReferenceCopyLocalPathsWithoutConflicts = RemoveConflicts(ReferenceCopyLocalPaths, copyLocalConflicts);
            Conflicts = CreateConflictTaskItems(allConflicts);
        }
예제 #21
0
        public void OnGUI()
        {
            if (Event.current.type != EventType.Repaint || !ESPOptions.Enabled)
                return;

            if (!DrawUtilities.ShouldRun())
                return;

            GUI.depth = 1;

            if (MainCamera == null)
                MainCamera = OptimizationVariables.MainCam;

            Vector3 localPos = OptimizationVariables.MainPlayer.transform.position;

            Vector3 aimPos = OptimizationVariables.MainPlayer.look.aim.position;
            Vector3 aimForward = OptimizationVariables.MainPlayer.look.aim.forward;

            for (int i = 0; i < ESPVariables.Objects.Count; i++)
            {
                ESPObject obj = ESPVariables.Objects[i];
                ESPVisual visual = ESPOptions.VisualOptions[(int)obj.Target];

                GameObject go = obj.GObject;

                if (!visual.Enabled)
                {
                    Highlighter highlighter = go.GetComponent<Highlighter>();
                    if (highlighter != null && highlighter != TrajectoryComponent.Highlighted)
                        highlighter.ConstantOffImmediate();

                    continue;
                }
                if (obj.Target == ESPTarget.Items && ESPOptions.FilterItems)
                    if (!ItemUtilities.Whitelisted(((InteractableItem)obj.Object).asset, ItemOptions.ItemESPOptions))
                        continue;

                Color c = ColorUtilities.getColor($"_{obj.Target}");
                LabelLocation ll = visual.Location;

                if (go == null)
                    continue;

                Vector3 position = go.transform.position;
                double dist = VectorUtilities.GetDistance(position, localPos);

                if (dist < 0.5 || (dist > visual.Distance && !visual.InfiniteDistance))
                    continue;

                Vector3 cpos = MainCamera.WorldToScreenPoint(position);

                if (cpos.z <= 0)
                    continue;

                string text = "";

                Vector3 scale = go.transform.localScale;
                Bounds b;
                switch (obj.Target)
                {
                    case ESPTarget.Players:
                    case ESPTarget.Zombies:
                        b = new Bounds(new Vector3(position.x, position.y + 1, position.z),
                            new Vector3(scale.x * 2, scale.y * 3, scale.z * 2));
                        break;
                    case ESPTarget.Vehicles:

                        b = go.transform.Find("Model_0").GetComponent<MeshRenderer>().bounds;
                        Transform child = go.transform.Find("Model_1");

                        if (child != null)
                            b.Encapsulate(child.GetComponent<MeshRenderer>().bounds);

                        break;
                    default:
                        b = go.GetComponent<Collider>().bounds;
                        break;
                }

                int size = DrawUtilities.GetTextSize(visual, dist);
                double rounded = Math.Round(dist);

                /*#if DEBUG
				DebugUtilities.Log(obj.Target.ToString()); //Holy f**k nuggets this is laggy
				#endif*/

                string outerText = $"<size={size}>";
                text = $"<size={size}>";

                switch (obj.Target)
                {
                    #region Players

                    case ESPTarget.Players:
                        {
                            Player p = (Player)obj.Object;

                            if (p.life.isDead)
                                continue;

                            if (visual.ShowName)
                                text += GetSteamPlayer(p).playerID.characterName + "\n";
                            if (RaycastUtilities.TargetedPlayer == p && RaycastOptions.EnablePlayerSelection)
                                text += "[Targeted]\n";
                            if (ESPOptions.ShowPlayerWeapon)
                                text += (p.equipment.asset != null ? p.equipment.asset.itemName : "Fists") + "\n";
                            if (ESPOptions.ShowPlayerVehicle)
                                text += (p.movement.getVehicle() != null ? p.movement.getVehicle().asset.name + "\n" : "No Vehicle\n");
                            b.size = b.size / 2;
                            b.size = new Vector3(b.size.x, b.size.y * 1.25f, b.size.z);

                            if (FriendUtilities.IsFriendly(p) && ESPOptions.UsePlayerGroup)
                                c = ColorUtilities.getColor("_ESPFriendly");

                            break;
                        }

                    #endregion

                    #region Zombies

                    case ESPTarget.Zombies:
                        {
                            if (((Zombie)obj.Object).isDead)
                                continue;

                            if (visual.ShowName)
                                text += $"Zombie\n";

                            break;
                        }

                    #endregion

                    #region Items

                    case ESPTarget.Items:
                        {
                            InteractableItem item = (InteractableItem)obj.Object;

                            if (visual.ShowName)
                                text += item.asset.itemName + "\n";

                            break;
                        }

                    #endregion

                    #region Sentries

                    case ESPTarget.Sentries:
                        {
                            InteractableSentry sentry = (InteractableSentry)obj.Object;

                            if (visual.ShowName)
                            {
                                text += "Sentry\n";
                                outerText += "Sentry\n";
                            }

                            if (ESPOptions.ShowSentryItem)
                            {
                                outerText += SentryName(sentry.displayItem, false) + "\n";
                                text += SentryName(sentry.displayItem, true) + "\n";
                            }

                            break;
                        }

                    #endregion

                    #region Beds

                    case ESPTarget.Beds:
                        {
                            InteractableBed bed = (InteractableBed)obj.Object;

                            if (visual.ShowName)
                            {
                                text += "Bed\n";
                                outerText += "Bed\n";
                            }

                            if (ESPOptions.ShowClaimed)
                            {
                                text += GetOwned(bed, true) + "\n";
                                outerText += GetOwned(bed, false) + "\n";
                            }
                            break;
                        }

                    #endregion

                    #region Claim Flags

                    case ESPTarget.ClaimFlags:
                        {
                            if (visual.ShowName)
                                text += "Claim Flag\n";

                            break;
                        }

                    #endregion

                    #region Vehicles

                    case ESPTarget.Vehicles:
                        {
                            InteractableVehicle vehicle = (InteractableVehicle)obj.Object;

                            if (vehicle.health == 0)
                                continue;

                            if (ESPOptions.FilterVehicleLocked && vehicle.isLocked)
                                continue;

                            vehicle.getDisplayFuel(out ushort displayFuel, out ushort MaxFuel);

                            float health = Mathf.Round(100 * (vehicle.health / (float)vehicle.asset.health));
                            float fuel = Mathf.Round(100 * (displayFuel / (float)MaxFuel));

                            if (visual.ShowName)
                            {
                                text += vehicle.asset.name + "\n";
                                outerText += vehicle.asset.name + "\n";
                            }

                            if (ESPOptions.ShowVehicleHealth)
                            {
                                text += $"Health: {health}%\n";
                                outerText += $"Health: {health}%\n";
                            }

                            if (ESPOptions.ShowVehicleFuel)
                            {
                                text += $"Fuel: {fuel}%\n";
                                outerText += $"Fuel: {fuel}%\n";
                            }

                            if (ESPOptions.ShowVehicleLocked)
                            {
                                text += GetLocked(vehicle, true) + "\n";
                                outerText += GetLocked(vehicle, false) + "\n";
                            }

                            break;
                        }

                    #endregion

                    #region Storage

                    case ESPTarget.Storage:
                        {
                            if (visual.ShowName)
                                text += "Storage\n";

                            break;
                        }

                    #endregion

                    #region Generators

                    case ESPTarget.Generators:
                        {
                            InteractableGenerator gen = (InteractableGenerator)obj.Object;

                            float fuel = Mathf.Round(100 * (gen.fuel / (float)gen.capacity));

                            if (ESPOptions.ShowGeneratorFuel)
                            {
                                text += $"Fuel: {fuel}%\n";
                                outerText += $"Fuel: {fuel}%\n";
                            }

                            if (ESPOptions.ShowGeneratorPowered)
                            {
                                text += GetPowered(gen, true) + "\n";
                                outerText += GetPowered(gen, false) + "\n";
                            }

                            break;
                        }

                        #endregion
                }

                if (outerText == $"<size={size}>")
                    outerText = null;

                if (visual.ShowDistance)
                {
                    text += $"{rounded}m\n";

                    if (outerText != null)
                        outerText += $"{rounded}m\n";
                }

                if (visual.ShowAngle)
                {
                    double roundedFOV = Math.Round(VectorUtilities.GetAngleDelta(aimPos, aimForward, position), 2);
                    text += $"Angle: {roundedFOV}°\n";

                    if (outerText != null)
                        outerText += $"{roundedFOV}°\n";
                }

                text += "</size>";

                if (outerText != null)
                    outerText += "</size>";

                Vector3[] vectors = DrawUtilities.GetBoxVectors(b);

                Vector2[] W2SVectors = DrawUtilities.GetRectangleLines(MainCamera, b, c);
                Vector3 LabelVector = DrawUtilities.Get2DW2SVector(MainCamera, W2SVectors, ll);

                if (MirrorCameraOptions.Enabled && W2SVectors.Any(v => MirrorCameraComponent.viewport.Contains(v)))
                {
                    Highlighter highlighter = go.GetComponent<Highlighter>();
                    if (highlighter != null)
                        highlighter.ConstantOffImmediate();

                    continue;
                }

                if (visual.Boxes)
                {
                    if (visual.TwoDimensional)
                        DrawUtilities.PrepareRectangleLines(W2SVectors, c);
                    else
                    {
                        DrawUtilities.PrepareBoxLines(vectors, c);
                        LabelVector = DrawUtilities.Get3DW2SVector(MainCamera, b, ll);
                    }
                }

                if (visual.Glow)
                {
                    Highlighter highlighter = go.GetComponent<Highlighter>() ?? go.AddComponent<Highlighter>();
                    //highlighter.OccluderOn();
                    //highlighter.SeeThroughOn();

                    highlighter.occluder = true;
                    highlighter.overlay = true;
                    highlighter.ConstantOnImmediate(c);
                    Highlighters.Add(highlighter);
                }
                else
                {
                    Highlighter highlighter = go.GetComponent<Highlighter>();
                    if (highlighter != null && highlighter != TrajectoryComponent.Highlighted)
                        highlighter.ConstantOffImmediate();
                }

                if (visual.Labels)
                    DrawUtilities.DrawLabel(ESPFont, ll, LabelVector, text, visual.CustomTextColor ? ColorUtilities.getColor($"_{obj.Target}_Text") : c, ColorUtilities.getColor($"_{obj.Target}_Outline"), visual.BorderStrength, outerText);

                if (visual.LineToObject)
                    ESPVariables.DrawBuffer2.Enqueue(new ESPBox2
                    {
                        Color = c,
                        Vertices = new[]
                        {
                            new Vector2(Screen.width / 2, Screen.height),
                            new Vector2(cpos.x, Screen.height - cpos.y)
                        }
                    });
            }

            GLMat.SetPass(0);

            GL.PushMatrix();
            GL.LoadProjectionMatrix(MainCamera.projectionMatrix);
            GL.modelview = MainCamera.worldToCameraMatrix;
            GL.Begin(GL.LINES);

            for (int i = 0; i < ESPVariables.DrawBuffer.Count; i++)
            {
                ESPBox box = ESPVariables.DrawBuffer.Dequeue();
                GL.Color(box.Color);

                Vector3[] vertices = box.Vertices;
                for (int j = 0; j < vertices.Length; j++)
                    GL.Vertex(vertices[j]);

            }
            GL.End();
            GL.PopMatrix();

            GL.PushMatrix();
            GL.Begin(GL.LINES);

            for (int i = 0; i < ESPVariables.DrawBuffer2.Count; i++)
            {
                ESPBox2 box = ESPVariables.DrawBuffer2.Dequeue();

                GL.Color(box.Color);
                Vector2[] vertices = box.Vertices;

                bool Run = true;

                for (int j = 0; j < vertices.Length; j++)
                    if (j < vertices.Length - 1)
                    {
                        Vector2 v1 = vertices[j];
                        Vector2 v2 = vertices[j + 1];

                        if (Vector2.Distance(v2, v1) > Screen.width / 2)
                        {
                            Run = false;
                            break;
                        }
                    }

                if (!Run)
                    continue;

                for (int j = 0; j < vertices.Length; j++)
                    GL.Vertex3(vertices[j].x, vertices[j].y, 0);

            }
            GL.End();
            GL.PopMatrix();
        }
예제 #22
0
        // Token: 0x06000187 RID: 391 RVA: 0x00002B7C File Offset: 0x00000D7C
        public static IEnumerator UpdateObjectList()
        {
            for (;;)
            {
                bool flag  = !DrawUtilities.ShouldRun();
                bool flag5 = flag;
                if (flag5)
                {
                    yield return(new WaitForSeconds(2f));
                }
                else
                {
                    List <ESPObject> objects = ESPVariables.Objects;
                    objects.Clear();
                    List <ESPTarget> targets = (from k in ESPOptions.PriorityTable.Keys
                                                orderby ESPOptions.PriorityTable[k] descending
                                                select k).ToList <ESPTarget>();
                    int num;
                    for (int i = 0; i < targets.Count; i = num + 1)
                    {
                        ESPTarget target = targets[i];
                        ESPVisual vis    = ESPOptions.VisualOptions[(int)target];
                        bool      flag2  = !vis.Enabled;
                        bool      flag6  = !flag2;
                        if (flag6)
                        {
                            Vector3 pPos = OptimizationVariables.MainPlayer.transform.position;
                            switch (target)
                            {
                            case ESPTarget.Игроки:
                            {
                                SteamPlayer[] objarray = (from p in Provider.clients
                                                          orderby VectorUtilities.GetDistance(pPos, p.player.transform.position) descending
                                                          select p).ToArray <SteamPlayer>();
                                bool useObjectCap = vis.UseObjectCap;
                                bool flag7        = useObjectCap;
                                if (flag7)
                                {
                                    objarray = objarray.TakeLast(vis.ObjectCap).ToArray <SteamPlayer>();
                                }
                                for (int j = 0; j < objarray.Length; j = num + 1)
                                {
                                    SteamPlayer sPlayer = objarray[j];
                                    Player      plr     = sPlayer.player;
                                    bool        flag3   = plr.life.isDead || plr == OptimizationVariables.MainPlayer;
                                    bool        flag8   = !flag3;
                                    if (flag8)
                                    {
                                        objects.Add(new ESPObject(target, plr, plr.gameObject));
                                        sPlayer = null;
                                        plr     = null;
                                    }
                                    num     = j;
                                    sPlayer = null;
                                    plr     = null;
                                }
                                break;
                            }

                            case ESPTarget.Зомби:
                            {
                                Zombie[] objarr = (from obj in ZombieManager.regions.SelectMany((ZombieRegion r) => r.zombies)
                                                   orderby VectorUtilities.GetDistance(pPos, obj.transform.position) descending
                                                   select obj).ToArray <Zombie>();
                                bool useObjectCap2 = vis.UseObjectCap;
                                bool flag9         = useObjectCap2;
                                if (flag9)
                                {
                                    objarr = objarr.TakeLast(vis.ObjectCap).ToArray <Zombie>();
                                }
                                for (int k2 = 0; k2 < objarr.Length; k2 = num + 1)
                                {
                                    Zombie obj9 = objarr[k2];
                                    objects.Add(new ESPObject(target, obj9, obj9.gameObject));
                                    obj9 = null;
                                    num  = k2;
                                    obj9 = null;
                                }
                                break;
                            }

                            case ESPTarget.Предметы:
                            {
                                InteractableItem[] objarr2 = (from obj in UnityEngine.Object.FindObjectsOfType <InteractableItem>()
                                                              orderby VectorUtilities.GetDistance(pPos, obj.transform.position) descending
                                                              select obj).ToArray <InteractableItem>();
                                bool useObjectCap3 = vis.UseObjectCap;
                                bool flag10        = useObjectCap3;
                                if (flag10)
                                {
                                    objarr2 = objarr2.TakeLast(vis.ObjectCap).ToArray <InteractableItem>();
                                }
                                for (int l = 0; l < objarr2.Length; l = num + 1)
                                {
                                    InteractableItem obj10  = objarr2[l];
                                    bool             flag4  = ItemUtilities.Whitelisted(obj10.asset, ItemOptions.ItemESPOptions) || !ESPOptions.FilterItems;
                                    bool             flag11 = flag4;
                                    if (flag11)
                                    {
                                        objects.Add(new ESPObject(target, obj10, obj10.gameObject));
                                    }
                                    obj10 = null;
                                    num   = l;
                                    obj10 = null;
                                }
                                break;
                            }

                            case ESPTarget.Турели:
                            {
                                InteractableSentry[] objarr3 = (from obj in UnityEngine.Object.FindObjectsOfType <InteractableSentry>()
                                                                orderby VectorUtilities.GetDistance(pPos, obj.transform.position) descending
                                                                select obj).ToArray <InteractableSentry>();
                                bool useObjectCap4 = vis.UseObjectCap;
                                bool flag12        = useObjectCap4;
                                if (flag12)
                                {
                                    objarr3 = objarr3.TakeLast(vis.ObjectCap).ToArray <InteractableSentry>();
                                }
                                for (int m = 0; m < objarr3.Length; m = num + 1)
                                {
                                    InteractableSentry obj11 = objarr3[m];
                                    objects.Add(new ESPObject(target, obj11, obj11.gameObject));
                                    obj11 = null;
                                    num   = m;
                                    obj11 = null;
                                }
                                break;
                            }

                            case ESPTarget.Кровати:
                            {
                                InteractableBed[] objarr4 = (from obj in UnityEngine.Object.FindObjectsOfType <InteractableBed>()
                                                             orderby VectorUtilities.GetDistance(pPos, obj.transform.position) descending
                                                             select obj).ToArray <InteractableBed>();
                                bool useObjectCap5 = vis.UseObjectCap;
                                bool flag13        = useObjectCap5;
                                if (flag13)
                                {
                                    objarr4 = objarr4.TakeLast(vis.ObjectCap).ToArray <InteractableBed>();
                                }
                                for (int n = 0; n < objarr4.Length; n = num + 1)
                                {
                                    InteractableBed obj12 = objarr4[n];
                                    objects.Add(new ESPObject(target, obj12, obj12.gameObject));
                                    obj12 = null;
                                    num   = n;
                                    obj12 = null;
                                }
                                break;
                            }

                            case ESPTarget.КлеймФлаги:
                            {
                                InteractableClaim[] objarr5 = (from obj in UnityEngine.Object.FindObjectsOfType <InteractableClaim>()
                                                               orderby VectorUtilities.GetDistance(pPos, obj.transform.position) descending
                                                               select obj).ToArray <InteractableClaim>();
                                bool useObjectCap6 = vis.UseObjectCap;
                                bool flag14        = useObjectCap6;
                                if (flag14)
                                {
                                    objarr5 = objarr5.TakeLast(vis.ObjectCap).ToArray <InteractableClaim>();
                                }
                                for (int j2 = 0; j2 < objarr5.Length; j2 = num + 1)
                                {
                                    InteractableClaim obj13 = objarr5[j2];
                                    objects.Add(new ESPObject(target, obj13, obj13.gameObject));
                                    obj13 = null;
                                    num   = j2;
                                    obj13 = null;
                                }
                                break;
                            }

                            case ESPTarget.Транспорт:
                            {
                                InteractableVehicle[] objarr6 = (from obj in UnityEngine.Object.FindObjectsOfType <InteractableVehicle>()
                                                                 orderby VectorUtilities.GetDistance(pPos, obj.transform.position) descending
                                                                 select obj).ToArray <InteractableVehicle>();
                                bool useObjectCap7 = vis.UseObjectCap;
                                bool flag15        = useObjectCap7;
                                if (flag15)
                                {
                                    objarr6 = objarr6.TakeLast(vis.ObjectCap).ToArray <InteractableVehicle>();
                                }
                                for (int j3 = 0; j3 < objarr6.Length; j3 = num + 1)
                                {
                                    InteractableVehicle obj14 = objarr6[j3];
                                    bool isDead = obj14.isDead;
                                    bool flag16 = !isDead;
                                    if (flag16)
                                    {
                                        objects.Add(new ESPObject(target, obj14, obj14.gameObject));
                                        obj14 = null;
                                    }
                                    num   = j3;
                                    obj14 = null;
                                }
                                break;
                            }

                            case ESPTarget.Ящики:
                            {
                                InteractableStorage[] objarr7 = (from obj in UnityEngine.Object.FindObjectsOfType <InteractableStorage>()
                                                                 orderby VectorUtilities.GetDistance(pPos, obj.transform.position) descending
                                                                 select obj).ToArray <InteractableStorage>();
                                bool useObjectCap8 = vis.UseObjectCap;
                                bool flag17        = useObjectCap8;
                                if (flag17)
                                {
                                    objarr7 = objarr7.TakeLast(vis.ObjectCap).ToArray <InteractableStorage>();
                                }
                                for (int j4 = 0; j4 < objarr7.Length; j4 = num + 1)
                                {
                                    InteractableStorage obj15 = objarr7[j4];
                                    objects.Add(new ESPObject(target, obj15, obj15.gameObject));
                                    obj15 = null;
                                    num   = j4;
                                    obj15 = null;
                                }
                                break;
                            }

                            case ESPTarget.Генераторы:
                            {
                                InteractableGenerator[] objarr8 = (from obj in UnityEngine.Object.FindObjectsOfType <InteractableGenerator>()
                                                                   orderby VectorUtilities.GetDistance(pPos, obj.transform.position) descending
                                                                   select obj).ToArray <InteractableGenerator>();
                                bool useObjectCap9 = vis.UseObjectCap;
                                bool flag18        = useObjectCap9;
                                if (flag18)
                                {
                                    objarr8 = objarr8.TakeLast(vis.ObjectCap).ToArray <InteractableGenerator>();
                                }
                                for (int j5 = 0; j5 < objarr8.Length; j5 = num + 1)
                                {
                                    InteractableGenerator obj16 = objarr8[j5];
                                    objects.Add(new ESPObject(target, obj16, obj16.gameObject));
                                    obj16 = null;
                                    num   = j5;
                                    obj16 = null;
                                }
                                break;
                            }

                            case ESPTarget.Животные:
                            {
                                Animal[] objarr9 = (from obj in UnityEngine.Object.FindObjectsOfType <Animal>()
                                                    orderby VectorUtilities.GetDistance(pPos, obj.transform.position) descending
                                                    select obj).ToArray <Animal>();
                                bool useObjectCap10 = vis.UseObjectCap;
                                bool flag19         = useObjectCap10;
                                if (flag19)
                                {
                                    objarr9 = objarr9.TakeLast(vis.ObjectCap).ToArray <Animal>();
                                }
                                for (int j6 = 0; j6 < objarr9.Length; j6 = num + 1)
                                {
                                    Animal obj17 = objarr9[j6];
                                    objects.Add(new ESPObject(target, obj17, obj17.gameObject));
                                    obj17 = null;
                                    num   = j6;
                                    obj17 = null;
                                }
                                break;
                            }

                            case ESPTarget.Ловшуки:
                            {
                                InteractableTrap[] objarr10 = (from obj in UnityEngine.Object.FindObjectsOfType <InteractableTrap>()
                                                               orderby VectorUtilities.GetDistance(pPos, obj.transform.position) descending
                                                               select obj).ToArray <InteractableTrap>();
                                bool useObjectCap11 = vis.UseObjectCap;
                                bool flag20         = useObjectCap11;
                                if (flag20)
                                {
                                    objarr10 = objarr10.TakeLast(vis.ObjectCap).ToArray <InteractableTrap>();
                                }
                                for (int j7 = 0; j7 < objarr10.Length; j7 = num + 1)
                                {
                                    InteractableTrap obj18 = objarr10[j7];
                                    objects.Add(new ESPObject(target, obj18, obj18.gameObject));
                                    obj18 = null;
                                    num   = j7;
                                    obj18 = null;
                                }
                                break;
                            }

                            case ESPTarget.Аирдропы:
                            {
                                Carepackage[] objarr11 = (from obj in UnityEngine.Object.FindObjectsOfType <Carepackage>()
                                                          orderby VectorUtilities.GetDistance(pPos, obj.transform.position) descending
                                                          select obj).ToArray <Carepackage>();
                                bool useObjectCap12 = vis.UseObjectCap;
                                bool flag21         = useObjectCap12;
                                if (flag21)
                                {
                                    objarr11 = objarr11.TakeLast(vis.ObjectCap).ToArray <Carepackage>();
                                }
                                for (int j8 = 0; j8 < objarr11.Length; j8 = num + 1)
                                {
                                    Carepackage obj19 = objarr11[j8];
                                    objects.Add(new ESPObject(target, obj19, obj19.gameObject));
                                    obj19 = null;
                                    num   = j8;
                                    obj19 = null;
                                }
                                break;
                            }

                            case ESPTarget.Двери:
                            {
                                InteractableDoorHinge[] objarr12 = (from obj in UnityEngine.Object.FindObjectsOfType <InteractableDoorHinge>()
                                                                    orderby VectorUtilities.GetDistance(pPos, obj.transform.position) descending
                                                                    select obj).ToArray <InteractableDoorHinge>();
                                bool useObjectCap13 = vis.UseObjectCap;
                                bool flag22         = useObjectCap13;
                                if (flag22)
                                {
                                    objarr12 = objarr12.TakeLast(vis.ObjectCap).ToArray <InteractableDoorHinge>();
                                }
                                for (int j9 = 0; j9 < objarr12.Length; j9 = num + 1)
                                {
                                    InteractableDoorHinge obj20 = objarr12[j9];
                                    objects.Add(new ESPObject(target, obj20, obj20.gameObject));
                                    obj20 = null;
                                    num   = j9;
                                    obj20 = null;
                                }
                                break;
                            }

                            case ESPTarget.Ягоды:
                            {
                                InteractableForage[] objarr13 = (from obj in UnityEngine.Object.FindObjectsOfType <InteractableForage>()
                                                                 orderby VectorUtilities.GetDistance(pPos, obj.transform.position) descending
                                                                 select obj).ToArray <InteractableForage>();
                                bool useObjectCap14 = vis.UseObjectCap;
                                bool flag23         = useObjectCap14;
                                if (flag23)
                                {
                                    objarr13 = objarr13.TakeLast(vis.ObjectCap).ToArray <InteractableForage>();
                                }
                                for (int j10 = 0; j10 < objarr13.Length; j10 = num + 1)
                                {
                                    InteractableForage obj21 = objarr13[j10];
                                    objects.Add(new ESPObject(target, obj21, obj21.gameObject));
                                    obj21 = null;
                                    num   = j10;
                                    obj21 = null;
                                }
                                break;
                            }

                            case ESPTarget.астения:
                            {
                                InteractableFarm[] objarr14 = (from obj in UnityEngine.Object.FindObjectsOfType <InteractableFarm>()
                                                               orderby VectorUtilities.GetDistance(pPos, obj.transform.position) descending
                                                               select obj).ToArray <InteractableFarm>();
                                bool useObjectCap15 = vis.UseObjectCap;
                                bool flag24         = useObjectCap15;
                                if (flag24)
                                {
                                    objarr14 = objarr14.TakeLast(vis.ObjectCap).ToArray <InteractableFarm>();
                                }
                                for (int j11 = 0; j11 < objarr14.Length; j11 = num + 1)
                                {
                                    InteractableFarm obj22 = objarr14[j11];
                                    objects.Add(new ESPObject(target, obj22, obj22.gameObject));
                                    obj22 = null;
                                    num   = j11;
                                    obj22 = null;
                                }
                                break;
                            }

                            case ESPTarget.C4:
                            {
                                InteractableCharge[] objarr15 = (from obj in UnityEngine.Object.FindObjectsOfType <InteractableCharge>()
                                                                 orderby VectorUtilities.GetDistance(pPos, obj.transform.position) descending
                                                                 select obj).ToArray <InteractableCharge>();
                                bool useObjectCap16 = vis.UseObjectCap;
                                bool flag25         = useObjectCap16;
                                if (flag25)
                                {
                                    objarr15 = objarr15.TakeLast(vis.ObjectCap).ToArray <InteractableCharge>();
                                }
                                for (int j12 = 0; j12 < objarr15.Length; j12 = num + 1)
                                {
                                    InteractableCharge obj23 = objarr15[j12];
                                    objects.Add(new ESPObject(target, obj23, obj23.gameObject));
                                    obj23 = null;
                                    num   = j12;
                                    obj23 = null;
                                }
                                break;
                            }

                            case ESPTarget.Fire:
                            {
                                InteractableFire[] objarr16 = (from obj in UnityEngine.Object.FindObjectsOfType <InteractableFire>()
                                                               orderby VectorUtilities.GetDistance(pPos, obj.transform.position) descending
                                                               select obj).ToArray <InteractableFire>();
                                bool useObjectCap17 = vis.UseObjectCap;
                                bool flag26         = useObjectCap17;
                                if (flag26)
                                {
                                    objarr16 = objarr16.TakeLast(vis.ObjectCap).ToArray <InteractableFire>();
                                }
                                for (int j13 = 0; j13 < objarr16.Length; j13 = num + 1)
                                {
                                    InteractableFire obj24 = objarr16[j13];
                                    objects.Add(new ESPObject(target, obj24, obj24.gameObject));
                                    obj24 = null;
                                    num   = j13;
                                    obj24 = null;
                                }
                                break;
                            }

                            case ESPTarget.Лампы:
                            {
                                InteractableSpot[] objarr17 = (from obj in UnityEngine.Object.FindObjectsOfType <InteractableSpot>()
                                                               orderby VectorUtilities.GetDistance(pPos, obj.transform.position) descending
                                                               select obj).ToArray <InteractableSpot>();
                                bool useObjectCap18 = vis.UseObjectCap;
                                bool flag27         = useObjectCap18;
                                if (flag27)
                                {
                                    objarr17 = objarr17.TakeLast(vis.ObjectCap).ToArray <InteractableSpot>();
                                }
                                for (int j14 = 0; j14 < objarr17.Length; j14 = num + 1)
                                {
                                    InteractableSpot obj25 = objarr17[j14];
                                    objects.Add(new ESPObject(target, obj25, obj25.gameObject));
                                    obj25 = null;
                                    num   = j14;
                                    obj25 = null;
                                }
                                break;
                            }

                            case ESPTarget.Топливо:
                            {
                                InteractableObjectResource[] objarr18 = (from obj in UnityEngine.Object.FindObjectsOfType <InteractableObjectResource>()
                                                                         orderby VectorUtilities.GetDistance(pPos, obj.transform.position) descending
                                                                         select obj).ToArray <InteractableObjectResource>();
                                bool useObjectCap19 = vis.UseObjectCap;
                                bool flag28         = useObjectCap19;
                                if (flag28)
                                {
                                    objarr18 = objarr18.TakeLast(vis.ObjectCap).ToArray <InteractableObjectResource>();
                                }
                                for (int j15 = 0; j15 < objarr18.Length; j15 = num + 1)
                                {
                                    InteractableObjectResource obj26 = objarr18[j15];
                                    objects.Add(new ESPObject(target, obj26, obj26.gameObject));
                                    obj26 = null;
                                    num   = j15;
                                    obj26 = null;
                                }
                                break;
                            }

                            case ESPTarget.Генератор_безопасной_зоны:
                            {
                                InteractableSafezone[] objarr19 = (from obj in UnityEngine.Object.FindObjectsOfType <InteractableSafezone>()
                                                                   orderby VectorUtilities.GetDistance(pPos, obj.transform.position) descending
                                                                   select obj).ToArray <InteractableSafezone>();
                                bool useObjectCap20 = vis.UseObjectCap;
                                bool flag29         = useObjectCap20;
                                if (flag29)
                                {
                                    objarr19 = objarr19.TakeLast(vis.ObjectCap).ToArray <InteractableSafezone>();
                                }
                                for (int j16 = 0; j16 < objarr19.Length; j16 = num + 1)
                                {
                                    InteractableSafezone obj27 = objarr19[j16];
                                    objects.Add(new ESPObject(target, obj27, obj27.gameObject));
                                    obj27 = null;
                                    num   = j16;
                                    obj27 = null;
                                }
                                break;
                            }

                            case ESPTarget.Генератор_Воздуха:
                            {
                                InteractableOxygenator[] objarr20 = (from obj in UnityEngine.Object.FindObjectsOfType <InteractableOxygenator>()
                                                                     orderby VectorUtilities.GetDistance(pPos, obj.transform.position) descending
                                                                     select obj).ToArray <InteractableOxygenator>();
                                bool useObjectCap21 = vis.UseObjectCap;
                                bool flag30         = useObjectCap21;
                                if (flag30)
                                {
                                    objarr20 = objarr20.TakeLast(vis.ObjectCap).ToArray <InteractableOxygenator>();
                                }
                                for (int j17 = 0; j17 < objarr20.Length; j17 = num + 1)
                                {
                                    InteractableOxygenator obj28 = objarr20[j17];
                                    objects.Add(new ESPObject(target, obj28, obj28.gameObject));
                                    obj28 = null;
                                    num   = j17;
                                    obj28 = null;
                                }
                                break;
                            }
                            }
                        }
                        num = i;
                        vis = null;
                    }
                    yield return(new WaitForSeconds(5f));

                    objects = null;
                    targets = null;
                    objects = null;
                    targets = null;
                }
            }
            yield break;
        }
예제 #23
0
 // Token: 0x06000273 RID: 627 RVA: 0x0001845C File Offset: 0x0001665C
 public static void Tab()
 {
     Prefab.MenuArea(new Rect(0f, 0f, 466f, 436f), "Опции", delegate
     {
         GUILayout.BeginHorizontal(Array.Empty <GUILayoutOption>());
         GUILayout.BeginVertical(new GUILayoutOption[]
         {
             GUILayout.Width(230f)
         });
         GUILayout.Space(2f);
         Prefab.Toggle("Авто подбор вещей", ref ItemOptions.AutoItemPickup, 17);
         GUILayout.Space(5f);
         GUILayout.Label("Задержка: " + ItemOptions.ItemPickupDelay + "мс", Prefab._TextStyle, Array.Empty <GUILayoutOption>());
         GUILayout.Space(2f);
         ItemOptions.ItemPickupDelay = (int)Prefab.Slider(0f, 3000f, (float)ItemOptions.ItemPickupDelay, 175);
         GUILayout.Space(5f);
         ItemUtilities.DrawFilterTab(ItemOptions.ItemFilterOptions);
         GUILayout.Label("________________", Prefab._TextStyle, Array.Empty <GUILayoutOption>());
         GUILayout.Space(5f);
         GUILayout.Label(string.Format("Метод краша сервера: {0}", MiscOptions.SCrashMethod), Prefab._TextStyle, Array.Empty <GUILayoutOption>());
         GUILayout.Space(2f);
         MiscOptions.SCrashMethod = (int)Prefab.Slider(1f, 3f, (float)MiscOptions.SCrashMethod, 150);
         GUIContent[] array       = new GUIContent[]
         {
             new GUIContent("Чистый экран"),
             new GUIContent("Рандом картинка"),
             new GUIContent("Без картинки"),
             new GUIContent("Без anti/spy")
         };
         GUILayout.Space(5f);
         GUILayout.Label("Anti/spy метод:", Prefab._TextStyle, Array.Empty <GUILayoutOption>());
         bool flag  = Prefab.List(200f, "_SpyMethods", new GUIContent(array[MiscOptions.AntiSpyMethod].text), array, Array.Empty <GUILayoutOption>());
         bool flag2 = flag;
         if (flag2)
         {
             MiscOptions.AntiSpyMethod = DropDown.Get("_SpyMethods").ListIndex;
         }
         bool flag3 = MiscOptions.AntiSpyMethod == 1;
         bool flag4 = flag3;
         if (flag4)
         {
             GUILayout.Space(2f);
             GUILayout.Label("Anti/spy папка:", Prefab._TextStyle, Array.Empty <GUILayoutOption>());
             MiscOptions.AntiSpyPath = Prefab.TextField(MiscOptions.AntiSpyPath, "", 225);
         }
         GUILayout.Space(5f);
         Prefab.Toggle("Предупреждать при /spy", ref MiscOptions.AlertOnSpy, 17);
         GUILayout.Space(5f);
         GUILayout.Space(5f);
         bool flag5 = Prefab.Button("Мгновенный дисконнект", 200f, 25f, Array.Empty <GUILayoutOption>());
         bool flag6 = flag5;
         if (flag6)
         {
             Provider.disconnect();
         }
         GUILayout.Space(5f);
         bool flag7 = Prefab.Button("Очистить авто краш", 200f, 25f, Array.Empty <GUILayoutOption>());
         bool flag8 = flag7;
         if (flag8)
         {
             PlayerCrashThread.CrashTargets.Clear();
         }
         GUILayout.Space(5f);
         bool flag14 = Prefab.Button("Отключить чит", 200f, 25f, Array.Empty <GUILayoutOption>());
         if (flag14)
         {
             File.Delete(ConfigManager.ConfigPath);
             File.Delete(LoaderCoroutines.AssetPath);
             bool flag15 = File.Exists("df.log");
             if (flag15)
             {
                 File.Delete("df.log");
             }
             PlayerCoroutines.DisableAllVisuals();
             OverrideManager.OffHook();
             UnityEngine.Object.DestroyImmediate(abc.HookObject);
         }
         GUILayout.Space(5f);
         GUILayout.EndVertical();
         GUILayout.BeginVertical(Array.Empty <GUILayoutOption>());
         GUILayout.EndVertical();
         GUILayout.EndHorizontal();
     });
 }
예제 #24
0
 // Token: 0x0600028E RID: 654 RVA: 0x0001A360 File Offset: 0x00018560
 public static void Tab()
 {
     Prefab.ScrollView(new Rect(0f, 0f, 225f, 436f), "ВХ", ref StatsTab.ScrollPos, delegate()
     {
         Prefab.SectionTabButton("Игроки", delegate
         {
             GUILayout.BeginHorizontal(Array.Empty <GUILayoutOption>());
             GUILayout.BeginVertical(new GUILayoutOption[]
             {
                 GUILayout.Width(240f)
             });
             VisualsTab.BasicControls(ESPTarget.Игроки);
             bool flag  = !ESPOptions.VisualOptions[0].Enabled;
             bool flag2 = !flag;
             if (flag2)
             {
                 GUILayout.EndVertical();
                 GUILayout.BeginVertical(Array.Empty <GUILayoutOption>());
                 Prefab.Toggle("Показывать оружие", ref ESPOptions.ShowPlayerWeapon, 17);
                 Prefab.Toggle("Показывать транспорт", ref ESPOptions.ShowPlayerVehicle, 17);
                 GUILayout.EndVertical();
                 GUILayout.FlexibleSpace();
                 GUILayout.EndHorizontal();
             }
         }, 0f, 20);
         Prefab.SectionTabButton("Зомби", delegate
         {
             VisualsTab.BasicControls(ESPTarget.Зомби);
         }, 0f, 20);
         Prefab.SectionTabButton("Транспорт", delegate
         {
             GUILayout.BeginHorizontal(Array.Empty <GUILayoutOption>());
             GUILayout.BeginVertical(new GUILayoutOption[]
             {
                 GUILayout.Width(240f)
             });
             VisualsTab.BasicControls(ESPTarget.Транспорт);
             bool flag  = !ESPOptions.VisualOptions[6].Enabled;
             bool flag2 = !flag;
             if (flag2)
             {
                 GUILayout.EndVertical();
                 GUILayout.BeginVertical(Array.Empty <GUILayoutOption>());
                 Prefab.Toggle("Кол-во топлива", ref ESPOptions.ShowVehicleFuel, 17);
                 Prefab.Toggle("Кол-во прочности", ref ESPOptions.ShowVehicleHealth, 17);
                 Prefab.Toggle("Показывать закрытые", ref ESPOptions.ShowVehicleLocked, 17);
                 Prefab.Toggle("Фильтровать закрытые", ref ESPOptions.FilterVehicleLocked, 17);
                 GUILayout.EndVertical();
                 GUILayout.FlexibleSpace();
                 GUILayout.EndHorizontal();
             }
         }, 0f, 20);
         Prefab.SectionTabButton("Предметы", delegate
         {
             GUILayout.BeginHorizontal(Array.Empty <GUILayoutOption>());
             GUILayout.BeginVertical(new GUILayoutOption[]
             {
                 GUILayout.Width(240f)
             });
             VisualsTab.BasicControls(ESPTarget.Предметы);
             bool flag  = !ESPOptions.VisualOptions[2].Enabled;
             bool flag2 = !flag;
             if (flag2)
             {
                 GUILayout.EndVertical();
                 GUILayout.BeginVertical(Array.Empty <GUILayoutOption>());
                 Prefab.Toggle("Фильтр предметов", ref ESPOptions.FilterItems, 17);
                 bool filterItems = ESPOptions.FilterItems;
                 bool flag3       = filterItems;
                 if (flag3)
                 {
                     GUILayout.Space(5f);
                     ItemUtilities.DrawFilterTab(ItemOptions.ItemESPOptions);
                 }
                 GUILayout.EndVertical();
                 GUILayout.FlexibleSpace();
                 GUILayout.EndHorizontal();
             }
         }, 0f, 20);
         Prefab.SectionTabButton("Ящики", delegate
         {
             VisualsTab.BasicControls(ESPTarget.Ящики);
         }, 0f, 20);
         Prefab.SectionTabButton("Кровати", delegate
         {
             GUILayout.BeginHorizontal(Array.Empty <GUILayoutOption>());
             GUILayout.BeginVertical(new GUILayoutOption[]
             {
                 GUILayout.Width(240f)
             });
             VisualsTab.BasicControls(ESPTarget.Кровати);
             bool flag  = !ESPOptions.VisualOptions[4].Enabled;
             bool flag2 = !flag;
             if (flag2)
             {
                 GUILayout.EndVertical();
                 GUILayout.BeginVertical(Array.Empty <GUILayoutOption>());
                 Prefab.Toggle("Показать занятые", ref ESPOptions.ShowClaimed, 17);
                 GUILayout.EndVertical();
                 GUILayout.FlexibleSpace();
                 GUILayout.EndHorizontal();
             }
         }, 0f, 20);
         Prefab.SectionTabButton("Генераторы", delegate
         {
             GUILayout.BeginHorizontal(Array.Empty <GUILayoutOption>());
             GUILayout.BeginVertical(new GUILayoutOption[]
             {
                 GUILayout.Width(240f)
             });
             VisualsTab.BasicControls(ESPTarget.Генераторы);
             bool flag  = !ESPOptions.VisualOptions[8].Enabled;
             bool flag2 = !flag;
             if (flag2)
             {
                 GUILayout.EndVertical();
                 GUILayout.BeginVertical(Array.Empty <GUILayoutOption>());
                 Prefab.Toggle("Кол-во топлива", ref ESPOptions.ShowGeneratorFuel, 17);
                 Prefab.Toggle("Статус работы", ref ESPOptions.ShowGeneratorPowered, 17);
                 GUILayout.EndVertical();
                 GUILayout.FlexibleSpace();
                 GUILayout.EndHorizontal();
             }
         }, 0f, 20);
         Prefab.SectionTabButton("Турели", delegate
         {
             GUILayout.BeginHorizontal(Array.Empty <GUILayoutOption>());
             GUILayout.BeginVertical(new GUILayoutOption[]
             {
                 GUILayout.Width(240f)
             });
             VisualsTab.BasicControls(ESPTarget.Турели);
             bool flag  = !ESPOptions.VisualOptions[3].Enabled;
             bool flag2 = !flag;
             if (flag2)
             {
                 GUILayout.EndVertical();
                 GUILayout.BeginVertical(Array.Empty <GUILayoutOption>());
                 Prefab.Toggle("Показывать оружие", ref ESPOptions.ShowSentryItem, 17);
                 GUILayout.EndVertical();
                 GUILayout.FlexibleSpace();
                 GUILayout.EndHorizontal();
             }
         }, 0f, 20);
         Prefab.SectionTabButton("Клейм флаги", delegate
         {
             VisualsTab.BasicControls(ESPTarget.КлеймФлаги);
         }, 0f, 20);
         Prefab.SectionTabButton("Животные", delegate
         {
             GUILayout.BeginHorizontal(new GUILayoutOption[0]);
             GUILayout.BeginVertical(new GUILayoutOption[]
             {
                 GUILayout.Width(240f)
             });
             VisualsTab.BasicControls(ESPTarget.Животные);
             bool flag = !ESPOptions.VisualOptions[3].Enabled;
             if (!flag)
             {
                 GUILayout.EndVertical();
                 GUILayout.BeginVertical(new GUILayoutOption[0]);
                 GUILayout.EndVertical();
                 GUILayout.FlexibleSpace();
                 GUILayout.EndHorizontal();
             }
         }, 0f, 20);
         Prefab.SectionTabButton("Ловушки", delegate
         {
             GUILayout.BeginHorizontal(new GUILayoutOption[0]);
             GUILayout.BeginVertical(new GUILayoutOption[]
             {
                 GUILayout.Width(240f)
             });
             VisualsTab.BasicControls(ESPTarget.Ловшуки);
             bool flag = !ESPOptions.VisualOptions[3].Enabled;
             if (!flag)
             {
                 GUILayout.EndVertical();
                 GUILayout.BeginVertical(new GUILayoutOption[0]);
                 GUILayout.EndVertical();
                 GUILayout.FlexibleSpace();
                 GUILayout.EndHorizontal();
             }
         }, 0f, 20);
         Prefab.SectionTabButton("Двери", delegate
         {
             GUILayout.BeginHorizontal(new GUILayoutOption[0]);
             GUILayout.BeginVertical(new GUILayoutOption[]
             {
                 GUILayout.Width(240f)
             });
             VisualsTab.BasicControls(ESPTarget.Двери);
             bool flag = !ESPOptions.VisualOptions[3].Enabled;
             if (!flag)
             {
                 GUILayout.EndVertical();
                 GUILayout.BeginVertical(new GUILayoutOption[0]);
                 GUILayout.EndVertical();
                 GUILayout.FlexibleSpace();
                 GUILayout.EndHorizontal();
             }
         }, 0f, 20);
         Prefab.SectionTabButton("Аирдропы", delegate
         {
             GUILayout.BeginHorizontal(new GUILayoutOption[0]);
             GUILayout.BeginVertical(new GUILayoutOption[]
             {
                 GUILayout.Width(240f)
             });
             VisualsTab.BasicControls(ESPTarget.Аирдропы);
             bool flag = !ESPOptions.VisualOptions[3].Enabled;
             if (!flag)
             {
                 GUILayout.EndVertical();
                 GUILayout.BeginVertical(new GUILayoutOption[0]);
                 GUILayout.EndVertical();
                 GUILayout.FlexibleSpace();
                 GUILayout.EndHorizontal();
             }
         }, 0f, 20);
         Prefab.SectionTabButton("Ягоды", delegate
         {
             GUILayout.BeginHorizontal(new GUILayoutOption[0]);
             GUILayout.BeginVertical(new GUILayoutOption[]
             {
                 GUILayout.Width(240f)
             });
             VisualsTab.BasicControls(ESPTarget.Ягоды);
             bool flag = !ESPOptions.VisualOptions[3].Enabled;
             if (!flag)
             {
                 GUILayout.EndVertical();
                 GUILayout.BeginVertical(new GUILayoutOption[0]);
                 GUILayout.EndVertical();
                 GUILayout.FlexibleSpace();
                 GUILayout.EndHorizontal();
             }
         }, 0f, 20);
         Prefab.SectionTabButton("Растения", delegate
         {
             GUILayout.BeginHorizontal(new GUILayoutOption[0]);
             GUILayout.BeginVertical(new GUILayoutOption[]
             {
                 GUILayout.Width(240f)
             });
             VisualsTab.BasicControls(ESPTarget.астения);
             bool flag = !ESPOptions.VisualOptions[3].Enabled;
             if (!flag)
             {
                 GUILayout.EndVertical();
                 GUILayout.BeginVertical(new GUILayoutOption[0]);
                 GUILayout.EndVertical();
                 GUILayout.FlexibleSpace();
                 GUILayout.EndHorizontal();
             }
         }, 0f, 20);
         Prefab.SectionTabButton("Взрывчатка", delegate
         {
             GUILayout.BeginHorizontal(new GUILayoutOption[0]);
             GUILayout.BeginVertical(new GUILayoutOption[]
             {
                 GUILayout.Width(240f)
             });
             VisualsTab.BasicControls(ESPTarget.C4);
             bool flag = !ESPOptions.VisualOptions[3].Enabled;
             if (!flag)
             {
                 GUILayout.EndVertical();
                 GUILayout.BeginVertical(new GUILayoutOption[0]);
                 GUILayout.EndVertical();
                 GUILayout.FlexibleSpace();
                 GUILayout.EndHorizontal();
             }
         }, 0f, 20);
         Prefab.SectionTabButton("Источники огня", delegate
         {
             GUILayout.BeginHorizontal(new GUILayoutOption[0]);
             GUILayout.BeginVertical(new GUILayoutOption[]
             {
                 GUILayout.Width(240f)
             });
             VisualsTab.BasicControls(ESPTarget.Fire);
             bool flag = !ESPOptions.VisualOptions[3].Enabled;
             if (!flag)
             {
                 GUILayout.EndVertical();
                 GUILayout.BeginVertical(new GUILayoutOption[0]);
                 GUILayout.EndVertical();
                 GUILayout.FlexibleSpace();
                 GUILayout.EndHorizontal();
             }
         }, 0f, 20);
         Prefab.SectionTabButton("Лампы", delegate
         {
             GUILayout.BeginHorizontal(new GUILayoutOption[0]);
             GUILayout.BeginVertical(new GUILayoutOption[]
             {
                 GUILayout.Width(240f)
             });
             VisualsTab.BasicControls(ESPTarget.Лампы);
             bool flag = !ESPOptions.VisualOptions[3].Enabled;
             if (!flag)
             {
                 GUILayout.EndVertical();
                 GUILayout.BeginVertical(new GUILayoutOption[0]);
                 GUILayout.EndVertical();
                 GUILayout.FlexibleSpace();
                 GUILayout.EndHorizontal();
             }
         }, 0f, 20);
         Prefab.SectionTabButton("Топливо", delegate
         {
             GUILayout.BeginHorizontal(new GUILayoutOption[0]);
             GUILayout.BeginVertical(new GUILayoutOption[]
             {
                 GUILayout.Width(240f)
             });
             VisualsTab.BasicControls(ESPTarget.Топливо);
             bool flag = !ESPOptions.VisualOptions[3].Enabled;
             if (!flag)
             {
                 GUILayout.EndVertical();
                 GUILayout.BeginVertical(new GUILayoutOption[0]);
                 GUILayout.EndVertical();
                 GUILayout.FlexibleSpace();
                 GUILayout.EndHorizontal();
             }
         }, 0f, 20);
         Prefab.SectionTabButton("Ген. СЗ", delegate
         {
             GUILayout.BeginHorizontal(new GUILayoutOption[0]);
             GUILayout.BeginVertical(new GUILayoutOption[]
             {
                 GUILayout.Width(240f)
             });
             VisualsTab.BasicControls(ESPTarget.Генератор_безопасной_зоны);
             bool flag = !ESPOptions.VisualOptions[3].Enabled;
             if (!flag)
             {
                 GUILayout.EndVertical();
                 GUILayout.BeginVertical(new GUILayoutOption[0]);
                 GUILayout.EndVertical();
                 GUILayout.FlexibleSpace();
                 GUILayout.EndHorizontal();
             }
         }, 0f, 20);
         Prefab.SectionTabButton("Ген. воздух", delegate
         {
             GUILayout.BeginHorizontal(new GUILayoutOption[0]);
             GUILayout.BeginVertical(new GUILayoutOption[]
             {
                 GUILayout.Width(240f)
             });
             VisualsTab.BasicControls(ESPTarget.Генератор_Воздуха);
             bool flag = !ESPOptions.VisualOptions[3].Enabled;
             if (!flag)
             {
                 GUILayout.EndVertical();
                 GUILayout.BeginVertical(new GUILayoutOption[0]);
                 GUILayout.EndVertical();
                 GUILayout.FlexibleSpace();
                 GUILayout.EndHorizontal();
             }
         }, 0f, 20);
     }, 20, Array.Empty <GUILayoutOption>());
     Prefab.MenuArea(new Rect(230f, 0f, 236f, 180f), "ДРУГОЕ", delegate
     {
         Prefab.SectionTabButton("Радар", delegate
         {
             Prefab.Toggle("Радар", ref RadarOptions.Enabled, 17);
             bool enabled2 = RadarOptions.Enabled;
             bool flag2    = enabled2;
             if (flag2)
             {
                 Prefab.Toggle("Центрирование игрока", ref RadarOptions.TrackPlayer, 17);
                 Prefab.Toggle("Показывать игроков", ref RadarOptions.ShowPlayers, 17);
                 Prefab.Toggle("Показывать машины", ref RadarOptions.ShowVehicles, 17);
                 bool showVehicles = RadarOptions.ShowVehicles;
                 bool flag3        = showVehicles;
                 if (flag3)
                 {
                     Prefab.Toggle("Только открытые", ref RadarOptions.ShowVehiclesUnlocked, 17);
                 }
                 GUILayout.Space(5f);
                 GUILayout.Label("Зум радара: " + Mathf.Round(RadarOptions.RadarZoom), Prefab._TextStyle, Array.Empty <GUILayoutOption>());
                 Prefab.Slider(0f, 10f, ref RadarOptions.RadarZoom, 200);
                 bool flag4 = Prefab.Button("По умолчанию", 105f, 25f, Array.Empty <GUILayoutOption>());
                 bool flag5 = flag4;
                 if (flag5)
                 {
                     RadarOptions.RadarZoom = 1f;
                 }
                 GUILayout.Space(5f);
                 GUILayout.Label("Размер радара: " + Mathf.RoundToInt(RadarOptions.RadarSize), Prefab._TextStyle, Array.Empty <GUILayoutOption>());
                 Prefab.Slider(50f, 1000f, ref RadarOptions.RadarSize, 200);
             }
         }, 0f, 20);
         Prefab.Toggle("Игроки в ванише", ref ESPOptions.ShowVanishPlayers, 17);
         Prefab.Toggle("Камера заднего вида", ref MirrorCameraOptions.Enabled, 17);
         GUILayout.Space(5f);
     });
     Prefab.MenuArea(new Rect(230f, 185f, 236f, 250f), "Переключатели", delegate
     {
         bool flag  = Prefab.Toggle("ВХ", ref ESPOptions.Enabled, 17);
         bool flag2 = flag;
         if (flag2)
         {
             bool flag3 = !ESPOptions.Enabled;
             bool flag4 = flag3;
             if (flag4)
             {
                 for (int i = 0; i < ESPOptions.VisualOptions.Length; i++)
                 {
                     ESPOptions.VisualOptions[i].Glow = false;
                 }
                 abc.HookObject.GetComponent <ESPComponent>().OnGUI();
             }
         }
         Prefab.Toggle("Чамсы", ref ESPOptions.ChamsEnabled, 17);
         bool chamsEnabled = ESPOptions.ChamsEnabled;
         bool flag5        = chamsEnabled;
         if (flag5)
         {
             Prefab.Toggle("Плоские чамсы", ref ESPOptions.ChamsFlat, 17);
         }
         Prefab.Toggle("Без дождя", ref MiscOptions.NoRain, 17);
         Prefab.Toggle("Без снега", ref MiscOptions.NoSnow, 17);
         Prefab.Toggle("No Flash", ref MiscOptions.NoFlash, 17);
         Prefab.Toggle("ПНВ", ref MiscOptions.NightVision, 17);
         Prefab.Toggle("Компасс", ref MiscOptions.Compass, 17);
         Prefab.Toggle("Карта(GPS)", ref MiscOptions.GPS, 17);
         Prefab.Toggle("Показ игроков на карте", ref MiscOptions.ShowPlayersOnMap, 17);
     });
 }
    public static IEnumerator UpdateObjectList()
    {
        for (; ;)
        {
            bool flag = !DrawUtilities.ShouldRun();
            if (flag)
            {
                yield return(new WaitForSeconds(2f));
            }
            else
            {
                List <ESPObject> objects = ESPVariables.Objects;
                objects.Clear();
                List <ESPTarget> targets = (from k in ESPOptions.PriorityTable.Keys
                                            orderby ESPOptions.PriorityTable[k] descending
                                            select k).ToList <ESPTarget>();
                int num;
                for (int i = 0; i < targets.Count; i = num + 1)
                {
                    ESPTarget target = targets[i];
                    ESPVisual vis    = ESPOptions.VisualOptions[(int)target];
                    bool      flag2  = !vis.Enabled;
                    if (!flag2)
                    {
                        Vector2 pPos = OptimizationVariables.MainPlayer.transform.position;
                        switch (target)
                        {
                        case ESPTarget.Игроки:
                        {
                            SteamPlayer[] objarray = (from p in Provider.clients
                                                      orderby VectorUtilities.GetDistance(pPos, p.player.transform.position) descending
                                                      select p).ToArray <SteamPlayer>();
                            bool useObjectCap = vis.UseObjectCap;
                            if (useObjectCap)
                            {
                                objarray = objarray.TakeLast(vis.ObjectCap).ToArray <SteamPlayer>();
                            }
                            for (int j = 0; j < objarray.Length; j = num + 1)
                            {
                                SteamPlayer sPlayer = objarray[j];
                                Player      plr     = sPlayer.player;
                                bool        flag3   = plr.life.isDead || plr == OptimizationVariables.MainPlayer;
                                if (!flag3)
                                {
                                    objects.Add(new ESPObject(target, plr, plr.gameObject));
                                    sPlayer = null;
                                    plr     = null;
                                }
                                num = j;
                            }
                            break;
                        }

                        case ESPTarget.Зомби:
                        {
                            Zombie[] objarr = (from obj in ZombieManager.regions.SelectMany((ZombieRegion r) => r.zombies)
                                               orderby VectorUtilities.GetDistance(pPos, obj.transform.position) descending
                                               select obj).ToArray <Zombie>();
                            bool useObjectCap2 = vis.UseObjectCap;
                            if (useObjectCap2)
                            {
                                objarr = objarr.TakeLast(vis.ObjectCap).ToArray <Zombie>();
                            }
                            for (int k2 = 0; k2 < objarr.Length; k2 = num + 1)
                            {
                                Zombie obj9 = objarr[k2];
                                objects.Add(new ESPObject(target, obj9, obj9.gameObject));
                                obj9 = null;
                                num  = k2;
                            }
                            break;
                        }

                        case ESPTarget.Предметы:
                        {
                            InteractableItem[] objarr2 = (from obj in UnityEngine.Object.FindObjectsOfType <InteractableItem>()
                                                          orderby VectorUtilities.GetDistance(pPos, obj.transform.position) descending
                                                          select obj).ToArray <InteractableItem>();
                            bool useObjectCap3 = vis.UseObjectCap;
                            if (useObjectCap3)
                            {
                                objarr2 = objarr2.TakeLast(vis.ObjectCap).ToArray <InteractableItem>();
                            }
                            for (int l = 0; l < objarr2.Length; l = num + 1)
                            {
                                InteractableItem obj2  = objarr2[l];
                                bool             flag4 = ItemUtilities.Whitelisted(obj2.asset, ItemOptions.ItemESPOptions) || !ESPOptions.FilterItems;
                                if (flag4)
                                {
                                    objects.Add(new ESPObject(target, obj2, obj2.gameObject));
                                }
                                obj2 = null;
                                num  = l;
                            }
                            break;
                        }

                        case ESPTarget.Турели:
                        {
                            InteractableSentry[] objarr3 = (from obj in UnityEngine.Object.FindObjectsOfType <InteractableSentry>()
                                                            orderby VectorUtilities.GetDistance(pPos, obj.transform.position) descending
                                                            select obj).ToArray <InteractableSentry>();
                            bool useObjectCap4 = vis.UseObjectCap;
                            if (useObjectCap4)
                            {
                                objarr3 = objarr3.TakeLast(vis.ObjectCap).ToArray <InteractableSentry>();
                            }
                            for (int m = 0; m < objarr3.Length; m = num + 1)
                            {
                                InteractableSentry obj3 = objarr3[m];
                                objects.Add(new ESPObject(target, obj3, obj3.gameObject));
                                obj3 = null;
                                num  = m;
                            }
                            break;
                        }

                        case ESPTarget.Кровати:
                        {
                            InteractableBed[] objarr4 = (from obj in UnityEngine.Object.FindObjectsOfType <InteractableBed>()
                                                         orderby VectorUtilities.GetDistance(pPos, obj.transform.position) descending
                                                         select obj).ToArray <InteractableBed>();
                            bool useObjectCap5 = vis.UseObjectCap;
                            if (useObjectCap5)
                            {
                                objarr4 = objarr4.TakeLast(vis.ObjectCap).ToArray <InteractableBed>();
                            }
                            for (int n = 0; n < objarr4.Length; n = num + 1)
                            {
                                InteractableBed obj4 = objarr4[n];
                                objects.Add(new ESPObject(target, obj4, obj4.gameObject));
                                obj4 = null;
                                num  = n;
                            }
                            break;
                        }

                        case ESPTarget.КлеймФлаги:
                        {
                            InteractableClaim[] objarr5 = (from obj in UnityEngine.Object.FindObjectsOfType <InteractableClaim>()
                                                           orderby VectorUtilities.GetDistance(pPos, obj.transform.position) descending
                                                           select obj).ToArray <InteractableClaim>();
                            bool useObjectCap6 = vis.UseObjectCap;
                            if (useObjectCap6)
                            {
                                objarr5 = objarr5.TakeLast(vis.ObjectCap).ToArray <InteractableClaim>();
                            }
                            for (int j2 = 0; j2 < objarr5.Length; j2 = num + 1)
                            {
                                InteractableClaim obj5 = objarr5[j2];
                                objects.Add(new ESPObject(target, obj5, obj5.gameObject));
                                obj5 = null;
                                num  = j2;
                            }
                            break;
                        }

                        case ESPTarget.Транспорт:
                        {
                            InteractableVehicle[] objarr6 = (from obj in UnityEngine.Object.FindObjectsOfType <InteractableVehicle>()
                                                             orderby VectorUtilities.GetDistance(pPos, obj.transform.position) descending
                                                             select obj).ToArray <InteractableVehicle>();
                            bool useObjectCap7 = vis.UseObjectCap;
                            if (useObjectCap7)
                            {
                                objarr6 = objarr6.TakeLast(vis.ObjectCap).ToArray <InteractableVehicle>();
                            }
                            for (int j3 = 0; j3 < objarr6.Length; j3 = num + 1)
                            {
                                InteractableVehicle obj6 = objarr6[j3];
                                bool isDead = obj6.isDead;
                                if (!isDead)
                                {
                                    objects.Add(new ESPObject(target, obj6, obj6.gameObject));
                                    obj6 = null;
                                }
                                num = j3;
                            }
                            break;
                        }

                        case ESPTarget.Ящики:
                        {
                            InteractableStorage[] objarr7 = (from obj in UnityEngine.Object.FindObjectsOfType <InteractableStorage>()
                                                             orderby VectorUtilities.GetDistance(pPos, obj.transform.position) descending
                                                             select obj).ToArray <InteractableStorage>();
                            bool useObjectCap8 = vis.UseObjectCap;
                            if (useObjectCap8)
                            {
                                objarr7 = objarr7.TakeLast(vis.ObjectCap).ToArray <InteractableStorage>();
                            }
                            for (int j4 = 0; j4 < objarr7.Length; j4 = num + 1)
                            {
                                InteractableStorage obj7 = objarr7[j4];
                                objects.Add(new ESPObject(target, obj7, obj7.gameObject));
                                obj7 = null;
                                num  = j4;
                            }
                            break;
                        }

                        case ESPTarget.Генераторы:
                        {
                            InteractableGenerator[] objarr8 = (from obj in UnityEngine.Object.FindObjectsOfType <InteractableGenerator>()
                                                               orderby VectorUtilities.GetDistance(pPos, obj.transform.position) descending
                                                               select obj).ToArray <InteractableGenerator>();
                            bool useObjectCap9 = vis.UseObjectCap;
                            if (useObjectCap9)
                            {
                                objarr8 = objarr8.TakeLast(vis.ObjectCap).ToArray <InteractableGenerator>();
                            }
                            for (int j5 = 0; j5 < objarr8.Length; j5 = num + 1)
                            {
                                InteractableGenerator obj8 = objarr8[j5];
                                objects.Add(new ESPObject(target, obj8, obj8.gameObject));
                                obj8 = null;
                                num  = j5;
                            }
                            break;
                        }

                        case ESPTarget.Животные:
                        {
                            Animal[] objarr8 = (from obj in UnityEngine.Object.FindObjectsOfType <Animal>()
                                                orderby VectorUtilities.GetDistance(pPos, obj.transform.position) descending
                                                select obj).ToArray <Animal>();
                            bool useObjectCap9 = vis.UseObjectCap;
                            if (useObjectCap9)
                            {
                                objarr8 = objarr8.TakeLast(vis.ObjectCap).ToArray <Animal>();
                            }
                            for (int j5 = 0; j5 < objarr8.Length; j5 = num + 1)
                            {
                                Animal obj8 = objarr8[j5];
                                objects.Add(new ESPObject(target, obj8, obj8.gameObject));
                                obj8 = null;
                                num  = j5;
                            }
                            break;
                        }

                        case ESPTarget.Ловшуки:
                        {
                            InteractableTrap[] objarr8 = (from obj in UnityEngine.Object.FindObjectsOfType <InteractableTrap>()
                                                          orderby VectorUtilities.GetDistance(pPos, obj.transform.position) descending
                                                          select obj).ToArray <InteractableTrap>();
                            bool useObjectCap9 = vis.UseObjectCap;
                            if (useObjectCap9)
                            {
                                objarr8 = objarr8.TakeLast(vis.ObjectCap).ToArray <InteractableTrap>();
                            }
                            for (int j5 = 0; j5 < objarr8.Length; j5 = num + 1)
                            {
                                InteractableTrap obj8 = objarr8[j5];
                                objects.Add(new ESPObject(target, obj8, obj8.gameObject));
                                obj8 = null;
                                num  = j5;
                            }
                            break;
                        }

                        case ESPTarget.Аирдропы:
                        {
                            Carepackage[] objarr8 = (from obj in UnityEngine.Object.FindObjectsOfType <Carepackage>()
                                                     orderby VectorUtilities.GetDistance(pPos, obj.transform.position) descending
                                                     select obj).ToArray <Carepackage>();
                            bool useObjectCap9 = vis.UseObjectCap;
                            if (useObjectCap9)
                            {
                                objarr8 = objarr8.TakeLast(vis.ObjectCap).ToArray <Carepackage>();
                            }
                            for (int j5 = 0; j5 < objarr8.Length; j5 = num + 1)
                            {
                                Carepackage obj8 = objarr8[j5];
                                objects.Add(new ESPObject(target, obj8, obj8.gameObject));
                                obj8 = null;
                                num  = j5;
                            }
                            break;
                        }

                        case ESPTarget.Двери:
                        {
                            InteractableDoorHinge[] objarr8 = (from obj in UnityEngine.Object.FindObjectsOfType <InteractableDoorHinge>()
                                                               orderby VectorUtilities.GetDistance(pPos, obj.transform.position) descending
                                                               select obj).ToArray <InteractableDoorHinge>();
                            bool useObjectCap9 = vis.UseObjectCap;
                            if (useObjectCap9)
                            {
                                objarr8 = objarr8.TakeLast(vis.ObjectCap).ToArray <InteractableDoorHinge>();
                            }
                            for (int j5 = 0; j5 < objarr8.Length; j5 = num + 1)
                            {
                                InteractableDoorHinge obj8 = objarr8[j5];
                                objects.Add(new ESPObject(target, obj8, obj8.gameObject));
                                obj8 = null;
                                num  = j5;
                            }
                            break;
                        }

                        case ESPTarget.Ягоды:
                        {
                            InteractableForage[] objarr8 = (from obj in UnityEngine.Object.FindObjectsOfType <InteractableForage>()
                                                            orderby VectorUtilities.GetDistance(pPos, obj.transform.position) descending
                                                            select obj).ToArray <InteractableForage>();
                            bool useObjectCap9 = vis.UseObjectCap;
                            if (useObjectCap9)
                            {
                                objarr8 = objarr8.TakeLast(vis.ObjectCap).ToArray <InteractableForage>();
                            }
                            for (int j5 = 0; j5 < objarr8.Length; j5 = num + 1)
                            {
                                InteractableForage obj8 = objarr8[j5];
                                objects.Add(new ESPObject(target, obj8, obj8.gameObject));
                                obj8 = null;
                                num  = j5;
                            }
                            break;
                        }

                        case ESPTarget.астения:
                        {
                            InteractableFarm[] objarr8 = (from obj in UnityEngine.Object.FindObjectsOfType <InteractableFarm>()
                                                          orderby VectorUtilities.GetDistance(pPos, obj.transform.position) descending
                                                          select obj).ToArray <InteractableFarm>();
                            bool useObjectCap9 = vis.UseObjectCap;
                            if (useObjectCap9)
                            {
                                objarr8 = objarr8.TakeLast(vis.ObjectCap).ToArray <InteractableFarm>();
                            }
                            for (int j5 = 0; j5 < objarr8.Length; j5 = num + 1)
                            {
                                InteractableFarm obj8 = objarr8[j5];
                                objects.Add(new ESPObject(target, obj8, obj8.gameObject));
                                obj8 = null;
                                num  = j5;
                            }
                            break;
                        }

                        case ESPTarget.C4:
                        {
                            InteractableCharge[] objarr8 = (from obj in UnityEngine.Object.FindObjectsOfType <InteractableCharge>()
                                                            orderby VectorUtilities.GetDistance(pPos, obj.transform.position) descending
                                                            select obj).ToArray <InteractableCharge>();
                            bool useObjectCap9 = vis.UseObjectCap;
                            if (useObjectCap9)
                            {
                                objarr8 = objarr8.TakeLast(vis.ObjectCap).ToArray <InteractableCharge>();
                            }
                            for (int j5 = 0; j5 < objarr8.Length; j5 = num + 1)
                            {
                                InteractableCharge obj8 = objarr8[j5];
                                objects.Add(new ESPObject(target, obj8, obj8.gameObject));
                                obj8 = null;
                                num  = j5;
                            }
                            break;
                        }

                        case ESPTarget.Fire:
                        {
                            InteractableFire[] objarr8 = (from obj in UnityEngine.Object.FindObjectsOfType <InteractableFire>()
                                                          orderby VectorUtilities.GetDistance(pPos, obj.transform.position) descending
                                                          select obj).ToArray <InteractableFire>();
                            bool useObjectCap9 = vis.UseObjectCap;
                            if (useObjectCap9)
                            {
                                objarr8 = objarr8.TakeLast(vis.ObjectCap).ToArray <InteractableFire>();
                            }
                            for (int j5 = 0; j5 < objarr8.Length; j5 = num + 1)
                            {
                                InteractableFire obj8 = objarr8[j5];
                                objects.Add(new ESPObject(target, obj8, obj8.gameObject));
                                obj8 = null;
                                num  = j5;
                            }
                            break;
                        }

                        case ESPTarget.Лампы:
                        {
                            InteractableSpot[] objarr8 = (from obj in UnityEngine.Object.FindObjectsOfType <InteractableSpot>()
                                                          orderby VectorUtilities.GetDistance(pPos, obj.transform.position) descending
                                                          select obj).ToArray <InteractableSpot>();
                            bool useObjectCap9 = vis.UseObjectCap;
                            if (useObjectCap9)
                            {
                                objarr8 = objarr8.TakeLast(vis.ObjectCap).ToArray <InteractableSpot>();
                            }
                            for (int j5 = 0; j5 < objarr8.Length; j5 = num + 1)
                            {
                                InteractableSpot obj8 = objarr8[j5];
                                objects.Add(new ESPObject(target, obj8, obj8.gameObject));
                                obj8 = null;
                                num  = j5;
                            }
                            break;
                        }

                        case ESPTarget.Топливо:
                        {
                            InteractableObjectResource[] objarr8 = (from obj in UnityEngine.Object.FindObjectsOfType <InteractableObjectResource>()
                                                                    orderby VectorUtilities.GetDistance(pPos, obj.transform.position) descending
                                                                    select obj).ToArray <InteractableObjectResource>();
                            bool useObjectCap9 = vis.UseObjectCap;
                            if (useObjectCap9)
                            {
                                objarr8 = objarr8.TakeLast(vis.ObjectCap).ToArray <InteractableObjectResource>();
                            }
                            for (int j5 = 0; j5 < objarr8.Length; j5 = num + 1)
                            {
                                InteractableObjectResource obj8 = objarr8[j5];
                                objects.Add(new ESPObject(target, obj8, obj8.gameObject));
                                obj8 = null;
                                num  = j5;
                            }
                            break;
                        }

                        case ESPTarget.Генератор_безопасной_зоны:
                        {
                            InteractableSafezone[] objarr8 = (from obj in UnityEngine.Object.FindObjectsOfType <InteractableSafezone>()
                                                              orderby VectorUtilities.GetDistance(pPos, obj.transform.position) descending
                                                              select obj).ToArray <InteractableSafezone>();
                            bool useObjectCap9 = vis.UseObjectCap;
                            if (useObjectCap9)
                            {
                                objarr8 = objarr8.TakeLast(vis.ObjectCap).ToArray <InteractableSafezone>();
                            }
                            for (int j5 = 0; j5 < objarr8.Length; j5 = num + 1)
                            {
                                InteractableSafezone obj8 = objarr8[j5];
                                objects.Add(new ESPObject(target, obj8, obj8.gameObject));
                                obj8 = null;
                                num  = j5;
                            }
                            break;
                        }

                        case ESPTarget.Генератор_Воздуха:
                        {
                            InteractableOxygenator[] objarr8 = (from obj in UnityEngine.Object.FindObjectsOfType <InteractableOxygenator>()
                                                                orderby VectorUtilities.GetDistance(pPos, obj.transform.position) descending
                                                                select obj).ToArray <InteractableOxygenator>();
                            bool useObjectCap9 = vis.UseObjectCap;
                            if (useObjectCap9)
                            {
                                objarr8 = objarr8.TakeLast(vis.ObjectCap).ToArray <InteractableOxygenator>();
                            }
                            for (int j5 = 0; j5 < objarr8.Length; j5 = num + 1)
                            {
                                InteractableOxygenator obj8 = objarr8[j5];
                                objects.Add(new ESPObject(target, obj8, obj8.gameObject));
                                obj8 = null;
                                num  = j5;
                            }
                            break;
                        }

                        case ESPTarget.NPC:
                        {
                            ResourceManager[] objarr8 = (from obj in UnityEngine.Object.FindObjectsOfType <ResourceManager>()
                                                         orderby VectorUtilities.GetDistance(pPos, obj.transform.position) descending
                                                         select obj).ToArray <ResourceManager>();
                            bool useObjectCap9 = vis.UseObjectCap;
                            if (useObjectCap9)
                            {
                                objarr8 = objarr8.TakeLast(vis.ObjectCap).ToArray <ResourceManager>();
                            }
                            for (int j5 = 0; j5 < objarr8.Length; j5 = num + 1)
                            {
                                ResourceManager obj8 = objarr8[j5];
                                objects.Add(new ESPObject(target, obj8, obj8.gameObject));
                                obj8 = null;
                                num  = j5;
                            }
                            break;
                        }
                        }
                    }
                    num = i;
                }
                yield return(new WaitForSeconds(5f));

                objects = null;
                targets = null;
            }
        }
    }