internal override bool vmethod_0()
 {
     bool result;
     try
     {
         this.d3Item_0 = null;
         float @float = Framework.Hero.GetFloat((D3Attribute)4294963311u);
         float float2 = Framework.Hero.GetFloat((D3Attribute)4294963302u);
         float num = float2 / @float;
         if (num < 0.36f)
         {
             Class52.Class136 @class = new Class52.Class136();
             @class.int_0 = Framework.Hero.GetInt((D3Attribute)4294963259u);
             IEnumerable<D3Item> arg_8C_0 = Framework.Hero.Inventory.Where(new Func<D3Item, bool>(@class.method_0));
             if (Class52.func_0 == null)
             {
                 Class52.func_0 = new Func<D3Item, float>(Class52.smethod_1);
             }
             D3Item d3Item = arg_8C_0.OrderByDescending(Class52.func_0).FirstOrDefault<D3Item>();
             if (d3Item != null)
             {
                 this.d3Item_0 = d3Item;
                 result = true;
                 return result;
             }
         }
         result = false;
     }
     catch (Exception ex)
     {
         GClass0.smethod_0().method_4("Error in SurviveState.Run(): " + ex.Message);
         result = false;
     }
     return result;
 }
 internal static int smethod_4(D3Item d3Item_0)
 {
     int result;
     if (d3Item_0.GetFloat((D3Attribute)4294963307u) > 0f)
     {
         result = 100;
     }
     else
     {
         if (Class132.smethod_3(d3Item_0.Modelname))
         {
             result = 30;
         }
         else
         {
             if (Class132.smethod_2(d3Item_0.Modelname))
             {
                 result = 100;
             }
             else
             {
                 if (Class132.smethod_1(d3Item_0.Modelname))
                 {
                     result = 1000;
                 }
                 else
                 {
                     result = 1;
                 }
             }
         }
     }
     return result;
 }
 private Tuple<uint, uint> method_3(bool bool_4, bool bool_5, List<Tuple<uint, uint>> list_0, D3Item d3Item_1)
 {
     int num;
     int num2;
     List<D3Item> list;
     if (bool_4)
     {
         num = Framework.Hero.GetInt((D3Attribute)4294963209u);
         num2 = 7;
         list = Framework.Hero.StashItems.ToList<D3Item>();
     }
     else
     {
         num = 60;
         num2 = 10;
         list = Framework.Hero.Inventory.ToList<D3Item>();
     }
     Class51.Class131.Class133 @class = new Class51.Class131.Class133();
     @class.uint_0 = 0u;
     Tuple<uint, uint> result;
     while ((ulong)@class.uint_0 < (ulong)((long)(num / num2)))
     {
         Func<D3Item, bool> func = null;
         Func<D3Item, bool> func2 = null;
         Func<D3Item, bool> func3 = null;
         Func<Tuple<uint, uint>, bool> func4 = null;
         Func<Tuple<uint, uint>, bool> func5 = null;
         Class51.Class131.Class134 class2 = new Class51.Class131.Class134();
         class2.class133_0 = @class;
         class2.uint_0 = 0u;
         while ((ulong)class2.uint_0 < (ulong)((long)num2))
         {
             bool flag = @class.uint_0 != 0u && (@class.uint_0 + 1u) % 10u == 0u;
             if (!bool_5 || !flag)
             {
                 bool flag2 = @class.uint_0 % 10u == 0u;
                 IEnumerable<D3Item> arg_CC_0 = list;
                 if (func == null)
                 {
                     func = new Func<D3Item, bool>(class2.method_0);
                 }
                 D3Item d3Item = arg_CC_0.FirstOrDefault(func);
                 if (d3Item != null)
                 {
                     if (d3Item.Sno == d3Item_1.Sno)
                     {
                         int @int = d3Item_1.GetInt((D3Attribute)4294963507u);
                         if (@int != 0)
                         {
                             int num3 = Class132.smethod_4(d3Item) - @int;
                             if (num3 > 0)
                             {
                                 result = new Tuple<uint, uint>(d3Item.UInt32_0, d3Item.UInt32_1);
                                 return result;
                             }
                         }
                     }
                 }
                 else
                 {
                     if (!flag2)
                     {
                         IEnumerable<D3Item> arg_142_0 = list;
                         if (func2 == null)
                         {
                             func2 = new Func<D3Item, bool>(class2.method_1);
                         }
                         D3Item d3Item2 = arg_142_0.FirstOrDefault(func2);
                         if (d3Item2 != null)
                         {
                             goto IL_1C5;
                         }
                     }
                     if (bool_5)
                     {
                         IEnumerable<D3Item> arg_16C_0 = list;
                         if (func3 == null)
                         {
                             func3 = new Func<D3Item, bool>(class2.method_2);
                         }
                         D3Item d3Item3 = arg_16C_0.FirstOrDefault(func3);
                         if (d3Item3 == null)
                         {
                             if (func4 == null)
                             {
                                 func4 = new Func<Tuple<uint, uint>, bool>(class2.method_3);
                             }
                             if (list_0.FirstOrDefault(func4) == null)
                             {
                                 result = new Tuple<uint, uint>(class2.uint_0, @class.uint_0);
                                 return result;
                             }
                         }
                     }
                     else
                     {
                         if (func5 == null)
                         {
                             func5 = new Func<Tuple<uint, uint>, bool>(class2.method_4);
                         }
                         if (list_0.FirstOrDefault(func5) == null)
                         {
                             result = new Tuple<uint, uint>(class2.uint_0, @class.uint_0);
                             return result;
                         }
                     }
                 }
             }
             IL_1C5:
             class2.uint_0 += 1u;
         }
         @class.uint_0 += 1u;
     }
     result = null;
     return result;
 }
 private static bool smethod_3(D3Item d3Item_1)
 {
     return !Class132.smethod_0(d3Item_1.Modelname) && (d3Item_1.HitpointsGranted > 0f || d3Item_1.GetInt((D3Attribute)4294963494u) < InjectedWindow.Instance.class71_0.MaximumSellOrSalvageValue);
 }
 private static bool smethod_2(D3Item d3Item_1)
 {
     return d3Item_1.GetFloat((D3Attribute)4294963307u) <= 0f && (Class132.smethod_0(d3Item_1.Modelname) || d3Item_1.GetInt((D3Attribute)4294963494u) >= InjectedWindow.Instance.class71_0.MinimumItemQualityToStash);
 }
 public static void RequestSellItem(D3Item item)
 {
     Struct5 @struct = new Struct5(item);
     IntPtr intPtr = Marshal.AllocHGlobal(Marshal.SizeOf(@struct));
     Marshal.StructureToPtr(@struct, intPtr, true);
     Framework.delegate19_0(36u, intPtr, Marshal.SizeOf(@struct));
     Marshal.FreeHGlobal(intPtr);
 }
 private static bool smethod_0(D3Item d3Item_0)
 {
     bool result;
     if (!d3Item_0.CanSalvage)
     {
         result = false;
     }
     else
     {
         float num = Class100.smethod_0(d3Item_0);
         if (num < InjectedWindow.Instance.class71_0.CustomItemFactors_MaximumValue)
         {
             GClass0.smethod_0().method_5(string.Concat(new object[]
             {
                 "Salvaging item: ",
                 d3Item_0.Modelname,
                 ", ItemValue: ",
                 num,
                 " < ",
                 InjectedWindow.Instance.class71_0.CustomItemFactors_MaximumValue
             }));
             result = true;
         }
         else
         {
             GClass0.smethod_0().method_5(string.Concat(new object[]
             {
                 "Not salvaging item: ",
                 d3Item_0.Modelname,
                 ", ItemValue: ",
                 num
             }));
             result = false;
         }
     }
     return result;
 }
 public static string GetTranslation(D3Item itm)
 {
     string result;
     try
     {
         int stringAddress = 0;
         Framework.delegate21_0(out stringAddress, itm.Ptr, 1, 0);
         result = Helper.ReadString((uint)stringAddress, null);
     }
     catch (Exception ex)
     {
         Framework.smethod_0("Error in Framework.GetTranslation: " + ex.Message);
         result = string.Empty;
     }
     return result;
 }
 public bool method_0(D3Item d3Item_0)
 {
     return this.list_0.Contains(d3Item_0);
 }
 private static bool smethod_0(D3Item d3Item_0)
 {
     bool result;
     if (d3Item_0.GetFloat((D3Attribute)4294963307u) > 0f)
     {
         result = false;
     }
     else
     {
         if (Class132.smethod_0(d3Item_0.Modelname))
         {
             result = false;
         }
         else
         {
             if (InjectedWindow.Instance.class71_0.UseCustomItemFactors)
             {
                 float num = Class100.smethod_0(d3Item_0);
                 if (num < InjectedWindow.Instance.class71_0.CustomItemFactors_MaximumValue)
                 {
                     GClass0.smethod_0().method_5(string.Concat(new object[]
                     {
                         "Selling item: ",
                         d3Item_0.Modelname,
                         ", ItemValue: ",
                         num
                     }));
                     result = true;
                 }
                 else
                 {
                     GClass0.smethod_0().method_5(string.Concat(new object[]
                     {
                         "Not selling item: ",
                         d3Item_0.Modelname,
                         ", ItemValue: ",
                         num
                     }));
                     result = false;
                 }
             }
             else
             {
                 if (d3Item_0.GetInt((D3Attribute)4294963494u) < 3)
                 {
                     result = (d3Item_0.GetFloat((D3Attribute)4294963248u) > 0f || d3Item_0.GetFloat((D3Attribute)4294963356u) > 0f);
                 }
                 else
                 {
                     result = (d3Item_0.GetInt((D3Attribute)4294963494u) < InjectedWindow.Instance.class71_0.MaximumSellOrSalvageValue);
                 }
             }
         }
     }
     return result;
 }
 public bool method_2(D3Item d3Item_0)
 {
     return d3Item_0.UInt32_0 == this.uint_0 && d3Item_0.UInt32_1 == this.class133_0.uint_0 + 1u;
 }
 public bool method_1(D3Item d3Item_0)
 {
     return d3Item_0.UInt32_0 == this.uint_0 && d3Item_0.UInt32_1 == this.class133_0.uint_0 - 1u && d3Item_0.IsBigItem;
 }
 private static float smethod_1(D3Item d3Item_1)
 {
     return d3Item_1.HitpointsGranted;
 }
 public Struct5(D3Item d3Item_0)
 {
     this.uint_0 = 0u;
     this.uint_1 = 0u;
     this.uint_2 = Framework.delegate1_0(d3Item_0.GUID);
 }
 private static bool smethod_2(D3Item d3Item_0)
 {
     bool result;
     if (!d3Item_0.CanSalvage)
     {
         result = false;
     }
     else
     {
         int @int = d3Item_0.GetInt((D3Attribute)4294963494u);
         if (@int > 8 || @int >= InjectedWindow.Instance.class71_0.MaximumSellOrSalvageValue)
         {
             GClass0.smethod_0().method_5("Item: " + d3Item_0.Modelname + ", cannot be salvaged because of its quality");
             result = false;
         }
         else
         {
             result = true;
         }
     }
     return result;
 }
 private bool method_1(D3Item d3Item_0)
 {
     return d3Item_0.Modelname == this.attributeViewer_0.string_0;
 }
 private static float smethod_3(D3Item d3Item_0)
 {
     return Class100.smethod_0(d3Item_0);
 }
 public static void RequestIdentify(D3Item item)
 {
     Struct9 @struct = new Struct9(item);
     IntPtr intPtr = Marshal.AllocHGlobal(Marshal.SizeOf(@struct));
     Marshal.StructureToPtr(@struct, intPtr, true);
     Framework.delegate19_0(281u, intPtr, 12);
     Marshal.FreeHGlobal(intPtr);
 }
 internal bool method_1()
 {
     bool result;
     if (this.int_0 > Environment.TickCount)
     {
         result = true;
     }
     else
     {
         this.d3Item_0 = null;
         foreach (D3Item current in Framework.Hero.Inventory)
         {
             if (current.IsUnidentified)
             {
                 this.d3Item_0 = current;
                 result = true;
                 return result;
             }
         }
         result = !this.bool_0;
     }
     return result;
 }
 public static void SalvageItem(D3Item item)
 {
     Framework.smethod_1("Salvaging item:" + item.Modelname);
     Marshal.WriteInt32(new IntPtr(22472512), (int)item.GUID);
     Marshal.WriteInt32(new IntPtr(22472516), (int)Framework.Hero.ObjectGuid);
     Framework.delegate20_0();
 }
 public bool method_0(D3Item d3Item_0)
 {
     return d3Item_0.IsPotion && d3Item_0.CanUseItem() && d3Item_0.GetReqLevelForPotion() <= this.int_0;
 }