Example #1
0
 public void MoveAllBeastsToStore()
 {
     CHR.GetClass <GUI>().Click("Win_HomePetMain", "Btn_Storage");
     CHR.GetClass <Inventory>().Load();
     foreach (ItemInventory i in CHR.GetClass <Inventory>().IL)
     {
         if (i.id >= Beast.ITEM_BASE + Beast.MIN_ITEM && i.id <= Beast.ITEM_BASE + Beast.MAX_ITEM)
         {
             ItemBeast.FromItem(i).PutToBI();
         }
     }
     CHR.GetClass <GUI>().Click("Win_HomePetMain", "Btn_Storage");
 }
Example #2
0
        public void LoadInventory()
        {
            CHR.GetClass <GUI>().Click("Win_HomePetMain", "Btn_Storage");
            BIL.Clear();
            int rr  = -1;
            int BIB = Memory.RD(CHR.HNDL, MBO + OFS.GetInt("BS_InventoryBegin"));
            int BIE = Memory.RD(CHR.HNDL, MBO + OFS.GetInt("BS_InventoryEnd"));

            while (BIB < BIE)
            {
                byte[] buffer = new byte[OFS.GetInt("BS_InventoryItemSize")];
                EF.ReadProcessMemory(CHR.HNDL, BIB, buffer, buffer.Length, ref rr);
                int[] oa = new int[buffer.Length / 4];
                Buffer.BlockCopy(buffer, 0, oa, 0, buffer.Length);
                ItemBeast NBI = new ItemBeast(CHR);
                NBI.id    = oa[OFS.GetInt("BS_BI_ID") / 4];
                NBI.count = oa[OFS.GetInt("BS_BI_Count") / 4];
                BIL.Add(NBI.id, NBI);
                BIB += OFS.GetInt("BS_InventoryItemSize");
            }
            CHR.GetClass <GUI>().Click("Win_HomePetMain", "Btn_Storage");
        }
Example #3
0
 public static ItemBeast FromItem(ItemInventory i)
 {
     ItemBeast bi = new ItemBeast(i.CHR); bi.id = i.id; bi.count = i.count; return(bi);
 }