public GameLootContainer(LootableContainer lootableContainer) { if (lootableContainer == null) { throw new ArgumentNullException(nameof(lootableContainer)); } LootableContainer = lootableContainer; _screenPosition = default; Distance = 0f; }
// Token: 0x060000B5 RID: 181 RVA: 0x0000AAAC File Offset: 0x00008CAC public GameLootContainer(LootableContainer lootableContainer) { bool flag = lootableContainer == null; if (flag) { throw new ArgumentNullException("lootableContainer"); } this.LootableContainer = lootableContainer; this.screenPosition = default(Vector3); this.Distance = 0f; }
void SetLootableContainers() { if (LocationScene.GetAllObjects <WorldInteractiveObject>(false).Count() > 0) { LootableContainerWorth = new Dictionary <Vector3, float>(); while (Objects.MoveNext()) { if (Objects.Current is LootableContainer) { LootableContainer t = Objects.Current as LootableContainer; if (LootableContainerWorth.ContainsKey(t.transform.position)) { return; } foreach (EFT.InventoryLogic.Item item in t.ItemOwner.RootItem.GetAllItems(false)) { LootableWorth += item.Template.CreditsPrice; } LootableContainerWorth.Add(t.transform.position, (LootableWorth / 1000)); LootableWorth = 0f; } } } }
// Token: 0x0600B8A0 RID: 47264 RVA: 0x00115172 File Offset: 0x00113372 public static bool IsLootableContainerValid(LootableContainer lootableContainer) { return(lootableContainer != null && lootableContainer.Template != null); }
public GameLootContainer(LootableContainer lootableContainer) { this.LootableContainer = lootableContainer ?? throw new ArgumentNullException("lootableContainer"); this.screenPosition = default; this.Distance = 0f; }
// Token: 0x060000F0 RID: 240 RVA: 0x0000D7BC File Offset: 0x0000B9BC private void OnGUI() { try { bool container = Config.ESP.ItemEsp.container; if (container) { foreach (GameLootContainer gameLootContainer in this._gameLootContainers) { bool flag = gameLootContainer.IsOnScreen && GameUtils.IsLootableContainerValid(gameLootContainer.LootableContainer); if (flag) { bool flag2 = gameLootContainer.Distance <= Misc.containerdistance; if (flag2) { Item item = \uE6E5.GetAllItems(gameLootContainer.LootableContainer.ItemOwner.RootItem, true).First <Item>(); foreach (Item item2 in \uE6E5.GetAllItems(item, false)) { string text = "RareLootContainer [" + gameLootContainer.FormattedDistance + "]"; Rendering.DrawString1(new Vector2(gameLootContainer.ScreenPosition.x - 50f, gameLootContainer.ScreenPosition.y), text, Main.containercolor, true, 8, FontStyle.Bold, 1); } } } } } bool containercontents = Config.ESP.containercontents; if (containercontents) { Dictionary <LootableContainer, int> dictionary = new Dictionary <LootableContainer, int>(); Vector2 vector; vector..ctor((float)Screen.width / 2f, (float)Screen.height / 2f); Vector3 zero = Vector3.zero; int num = -20; foreach (GameLootContainer gameLootContainer2 in this._gameLootContainers) { int num2 = (int)Vector2.Distance(Misc.MainCamera.WorldToScreenPoint(gameLootContainer2.LootableContainer.transform.position), vector); int num3 = (int)Vector3.Distance(Misc.LocalPlayer.Transform.position, gameLootContainer2.LootableContainer.transform.position); Vector3 vector2 = gameLootContainer2.LootableContainer.transform.position - Misc.MainCamera.transform.position; bool flag3 = !MonoBehaviourSingleton <PreloaderUI> .Instance.IsBackgroundBlackActive && (float)num3 <= 5000f && (float)num2 <= 5000f && Vector3.Dot(Misc.MainCamera.transform.TransformDirection(Vector3.forward), vector2) > 0f; if (flag3) { dictionary.Add(gameLootContainer2.LootableContainer, num2); } } bool flag4 = (double)dictionary.Count > 0.01; if (flag4) { dictionary = (from pair in dictionary orderby pair.Value select pair).ToDictionary((KeyValuePair <LootableContainer, int> pair) => pair.Key, (KeyValuePair <LootableContainer, int> pair) => pair.Value); LootableContainer lootableContainer = dictionary.Keys.First <LootableContainer>(); Vector3 vector3 = Camera.main.WorldToScreenPoint(lootableContainer.transform.position); int num4 = (int)Vector3.Distance(Misc.MainCamera.transform.position, lootableContainer.transform.position); Vector3 position = lootableContainer.transform.position; Vector3 vector4 = Camera.main.WorldToScreenPoint(lootableContainer.transform.position); Item item3 = \uE6E5.GetAllItems(lootableContainer.ItemOwner.RootItem, true).First <Item>(); string arg = \uE4E3.Localized(item3.Name); bool flag5 = (double)vector4.z > 0.01; if (flag5) { foreach (Item item4 in \uE6E5.GetAllItems(item3, false)) { bool flag6 = \uE6E5.GetAllItems(item3, false).First <Item>() == item4; if (flag6) { arg = \uE4E3.Localized(item4.ShortName); } else { arg = \uE4E3.Localized(item4.ShortName); } Rendering.DrawString1(new Vector2((float)Screen.width - 240f, 188.695633f - (float)num), string.Format("{0}", arg), Main.containercolor, true, 10, FontStyle.Bold, 1); num -= 20; } } } } } catch { } }