Example #1
0
 internal override bool vmethod_0()
 {
     bool result;
     if (this.int_0 < Environment.TickCount)
     {
         result = false;
     }
     else
     {
         this.int_0 = Environment.TickCount + 300;
         this.d3Spell_0 = null;
         foreach (KeyValuePair<int, D3Spell> current in Framework.Hero.GetActiveSpells())
         {
             if (Class53.dictionary_0.ContainsKey(current.Value.D3Power) && (!this.dictionary_1.ContainsKey(current.Value.D3Power) || (this.dictionary_1[current.Value.D3Power] < Environment.TickCount && current.Value.CanCast)))
             {
                 this.d3Spell_0 = current.Value;
                 break;
             }
         }
         result = (this.d3Spell_0 != null);
     }
     return result;
 }
Example #2
0
 public static void RequestSpellChange(D3Spell spell, int SlotIndex)
 {
     try
     {
         Struct8 @struct = new Struct8((int)spell.D3Power, spell.Rune, SlotIndex);
         IntPtr intPtr = Marshal.AllocHGlobal(Marshal.SizeOf(@struct));
         Marshal.StructureToPtr(@struct, intPtr, true);
         Framework.delegate19_0(107u, intPtr, Marshal.SizeOf(@struct));
         Marshal.FreeHGlobal(intPtr);
     }
     catch (Exception ex)
     {
         Framework.smethod_0("Error in Framework.RequestSpellChange(): " + ex.Message);
     }
 }
Example #3
0
 public static D3Spell GetSpellIDByIndex(int index)
 {
     uint num = Framework.delegate16_0();
     D3Spell result;
     if (num != 0u)
     {
         D3Power d3Power = (D3Power)Helper.smethod_1(num + (uint)(index * 8) + 2532u);
         int rune = (int)Helper.smethod_1(num + (uint)(index * 8) + 2536u);
         result = new D3Spell(d3Power, rune);
     }
     else
     {
         result = null;
     }
     return result;
 }
Example #4
0
 private static bool smethod_3(D3Spell d3Spell_0)
 {
     return d3Spell_0.CanCast;
 }
Example #5
0
 private static bool smethod_2(D3Spell d3Spell_0)
 {
     return !d3Spell_0.IsOnCooldown;
 }