Ejemplo n.º 1
0
 public bool CanMoveItem(ItemLocationIndex index, uint x = 0u, uint y = 0u)
 {
     bool result;
     try
     {
         D3Item.MoveItemInfo moveItemInfo = default(D3Item.MoveItemInfo);
         moveItemInfo.TargetSlot = index;
         moveItemInfo.HeroObjectGuid = Framework.Hero.ObjectGuid;
         moveItemInfo.uint_0 = x;
         moveItemInfo.uint_1 = y;
         int num = D3Item.delegate8_0(this.Ptr, ref moveItemInfo, 0, 0);
         result = (num == -1);
     }
     catch (Exception)
     {
         result = false;
     }
     return result;
 }
Ejemplo n.º 2
0
 public void MoveItem(ItemLocationIndex location, uint x = 0u, uint y = 0u)
 {
     try
     {
         D3Item.MoveItemInfo moveItemInfo = default(D3Item.MoveItemInfo);
         moveItemInfo.HeroObjectGuid = Framework.Hero.ObjectGuid;
         moveItemInfo.TargetSlot = location;
         moveItemInfo.uint_0 = x;
         moveItemInfo.uint_1 = y;
         D3Item.delegate9_0(this.Ptr, ref moveItemInfo, 0);
     }
     catch (Exception)
     {
     }
 }
Ejemplo n.º 3
0
 public List<D3Item> GetItemsByLocation(ItemLocationIndex index)
 {
     IntPtr objActor = new IntPtr((long)((ulong)Framework.GetACDByGuid(this.ObjectGuid)));
     List<D3Item> list = new List<D3Item>();
     IntPtr intPtr = D3Actor.delegate3_0(objActor, (int)index, 8688512);
     if (intPtr != IntPtr.Zero)
     {
         ItemArrayContainer itemArrayContainer = new ItemArrayContainer(intPtr);
         IntPtr pointer = Marshal.ReadIntPtr(itemArrayContainer.Ptr);
         int itemCount = itemArrayContainer.ItemCount;
         for (int i = 0; i < itemCount; i++)
         {
             uint num = (uint)Marshal.ReadInt32(pointer + i * 4);
             if (num != 4294967295u)
             {
                 list.Add(new D3Item(new IntPtr((long)((ulong)Framework.GetACDByGuid(num)))));
             }
         }
     }
     return list;
 }