fBaseXtensions.XML.MoveItemTag.UpdateBackpackSlots C# (CSharp) Method

UpdateBackpackSlots() private method

private UpdateBackpackSlots ( ) : void
return void
        private void UpdateBackpackSlots()
        {
            Logger.DBLog.DebugFormat("Updating Backpack Slots!");

            // Array for what blocks are or are not blocked
            for (int iRow = 0; iRow <= 5; iRow++)
                for (int iColumn = 0; iColumn <= 9; iColumn++)
                    BackpackSlotBlocked[iColumn, iRow] = false;
            // Block off the entire of any "protected"
            foreach (InventorySquare iProtPage in CharacterSettings.Instance.ProtectedBagSlots)
                BackpackSlotBlocked[iProtPage.Column, iProtPage.Row] = true;

            // Map out all the items already in the stash
            foreach (ACDItem tempitem in ZetaDia.Me.Inventory.Backpack)
            {
                if (tempitem.BaseAddress != IntPtr.Zero)
                {
                    //StashedItems.Add(new CacheACDItem(tempitem));
                    int inventoryRow = tempitem.InventoryRow;
                    int inventoryColumn = tempitem.InventoryColumn;
                    // Mark this slot as not-free
                    BackpackSlotBlocked[inventoryColumn, inventoryRow] = true;
                    // Try and reliably find out if this is a two slot item or not
                    PluginItemTypes tempItemType = ItemFunc.DetermineItemType(tempitem.InternalName, tempitem.ItemType, tempitem.FollowerSpecialType, tempitem.ActorSNO);

                    if (ItemFunc.DetermineIsTwoSlot(tempItemType) && inventoryRow != 5)
                    {
                        BackpackSlotBlocked[inventoryColumn, inventoryRow + 1] = true;
                    }
                    else if (ItemFunc.DetermineIsTwoSlot(tempItemType) && inventoryRow == 5)
                    {
                        Logger.DBLog.DebugFormat("GSError: DemonBuddy thinks this item is 2 slot even though it's at bottom row of a stash page: " + tempitem.Name + " [" + tempitem.InternalName +
                              "] type=" + tempItemType.ToString() + " @ slot " + (inventoryRow + 1).ToString(CultureInfo.InvariantCulture) + "/" +
                              (inventoryColumn + 1).ToString(CultureInfo.InvariantCulture));
                    }
                }
            } // Loop through all stash items

            bUpdatedStashMap = true;
        }