BagSync

BagSync

3M Downloads

Bank not synced when exiting game

frax1988 opened this issue ยท 12 comments

commented

First off all, i love this addon!

Now for my issue, when i exit game and enter again, items which i have in my bag do not show how many i have inside the bank for some reason. But when i visit a bank to 'update' then it does show for the duration i am logged in, upon logout i lose that data for some reason. Guildbank and reagentbank do work fine and always show up even upon logging out. So the issue is only on the Bank.

Hope there is a way to fix this in the future! Keep up the good work.

commented

After exiting the game and logging back in, I decided to check exactly what BagSync had stored in the bank table. This is the result:

Dump: value=BagSyncDB["Darksorrow"]["Blazii"]["bank"]
[1]={
  [6]={
    [1]="119687"
  },
  [-1]={
    [1]="112373",
    [2]="112096",
    [3]="119685",
    [4]="114440",
    [5]="119686",
    [6]="114477",
    [7]="119665",
    [8]="119680",
    [9]="109764",
    [10]="115325",
    [11]="114379",
    [12]="115333",
    [13]="114538",
    [14]="114489",
    [15]="119682",
    [16]="114489",
    [17]="119684",
    [18]="110060",
    [19]="114330",
    [20]="114371",
    [21]="114395",
    [22]="114416",
    [23]="119665",
    [24]="116110",
    [25]="112513",
    [26]="119358",
    [27]="112528",
    [28]="113031"
  }
}

Apparently it seems to strip out entire bags from the bank table, but this doesn't happen until you log back in. After exiting the game the entire bank table was still intact when inspecting the savedvariables file.

commented

I managed to track it down to the SaveBag function in AddOns\BagSync\BagSync.lua

local function SaveBag(bagname, bagid)
    if not bagname or not bagid then return nil end
    if not BS_DB then StartupDB() end
    BS_DB[bagname] = BS_DB[bagname] or {}

    --reset our tooltip data since we scanned new items (we want current data not old)
    lastItem = nil
    lastDisplayed = {}

    if GetContainerNumSlots(bagid) > 0 then
        local slotItems = {}
        for slot = 1, GetContainerNumSlots(bagid) do
            local _, count, _,_,_,_, link = GetContainerItemInfo(bagid, slot)
            if ToShortLink(link) then
                count = (count > 1 and count) or nil
                if count then
                    slotItems[slot] = format('%s,%d', ToShortLink(link), count)
                else
                    slotItems[slot] = ToShortLink(link)
                end
            end
        end
        BS_DB[bagname][bagid] = slotItems
    else
        print("nilling bag: ", bagname, bagid)
        BS_DB[bagname][bagid] = nil
    end
end

Logging in with the above print statement produced the following prints:

nilling bag:  bank 5
nilling bag:  bank 5
nilling bag:  bank 5
nilling bag:  bank 5
nilling bag:  bank 5
nilling bag:  bank 5
nilling bag:  bank 5
nilling bag:  bank 5
nilling bag:  bank 5
nilling bag:  bank 5
nilling bag:  bank 5
nilling bag:  bank 5
nilling bag:  bank 5
nilling bag:  bank 5
nilling bag:  bank 5
nilling bag:  bank 5
nilling bag:  bank 5
nilling bag:  bank 5
nilling bag:  bank 5
nilling bag:  bank 7
nilling bag:  bank 7
nilling bag:  bank 7
nilling bag:  bank 7
nilling bag:  bank 7
nilling bag:  bank 7
nilling bag:  bank 7
nilling bag:  bank 7
nilling bag:  bank 7
nilling bag:  bank 7
nilling bag:  bank 7
nilling bag:  bank 7
nilling bag:  bank 7
nilling bag:  bank 7
nilling bag:  bank 7
nilling bag:  bank 7
nilling bag:  bank 7
nilling bag:  bank 7
nilling bag:  bank 8
nilling bag:  bank 8
nilling bag:  bank 8
nilling bag:  bank 8
nilling bag:  bank 8
nilling bag:  bank 8
nilling bag:  bank 8
nilling bag:  bank 8
nilling bag:  bank 8
nilling bag:  bank 8
nilling bag:  bank 8
nilling bag:  bank 8
nilling bag:  bank 8
nilling bag:  bank 8
nilling bag:  bank 8
nilling bag:  bank 8
nilling bag:  bank 9
nilling bag:  bank 9
nilling bag:  bank 9
nilling bag:  bank 9
nilling bag:  bank 9
nilling bag:  bank 9
nilling bag:  bank 9
nilling bag:  bank 9
nilling bag:  bank 9
nilling bag:  bank 9
nilling bag:  bank 9
nilling bag:  bank 9
nilling bag:  bank 9
nilling bag:  bank 10
nilling bag:  bank 10
nilling bag:  bank 10
nilling bag:  bank 10
nilling bag:  bank 10
nilling bag:  bank 10
nilling bag:  bank 10
nilling bag:  bank 10
nilling bag:  bank 10
nilling bag:  bank 10
nilling bag:  bank 10
nilling bag:  bank 10
nilling bag:  bank 10
nilling bag:  bank 10
nilling bag:  bank 11
nilling bag:  bank 11
nilling bag:  bank 11
nilling bag:  bank 11
nilling bag:  bank 11
nilling bag:  bank 11
nilling bag:  bank 11
nilling bag:  bank 11
nilling bag:  bank 11
nilling bag:  bank 11
nilling bag:  bank 11
nilling bag:  bank 11
nilling bag:  bank 11
nilling bag:  bank 11
nilling bag:  bank 11
nilling bag:  bank 11
nilling bag:  bank 11
nilling bag:  bank 11
nilling bag:  bank 11
nilling bag:  bank 11
nilling bag:  bank 11
nilling bag:  bank 11
nilling bag:  bank 11
nilling bag:  bank 11

This doesn't always happen when you log out and then back in, but it always happens the first time you log in after opening up WoW.

commented

EDIT: See the next 3 comments where I outline what seems to be happening

I have experienced this too, and can reproduce it 100% of the time. Certain items are "forgot" as being in the bank, even though they seem to be stored in the savedvariables file correctly.

Please see the following 2 videos which document the bug.

  1. The BagSync savedvariable files have been deleted prior to logging in. This video just shows that no other addons are loaded and that the items are showing up correctly after the database is populated in that session:
    https://www.youtube.com/watch?v=vJld5dqip9k&feature=youtu.be
  2. The following video is made after exiting game and then logging back in. Nothing else was done that could cause BagSync to delete or forget items:
    https://www.youtube.com/watch?v=6D1fSlJOCes&feature=youtu.be

Below is a copy of my BagSync.lua savedvariables file. I have denoted the items that is used as test subjects in the video. Search for "Shadowmoon" and you will see 6 entries in the code. 2 in the bags and 4 in the bank.

BagSyncDB = {
    ["Darksorrow"] = {
        ["Blazii"] = {
            ["class"] = "PRIEST",
            ["bag"] = {
                {
                    "109585,6", -- [1]
                    "109129,200", -- [2]
                    "109129,70", -- [3]
                    "119134", -- [4]
                    "118922", -- [5]
                    "118935", -- [6]
                    "109127,95", -- [7]
                    "114931,17", -- [8]
                    "113800", -- [9] Shadowmoon Grips
                    "113797", -- [10] Shadowmoon Sash
                    "44446", -- [11]
                    "44446", -- [12]
                    "109125,5", -- [13]
                    "44446", -- [14]
                    "113681,30", -- [15]
                    "119092", -- [16]
                    "119093", -- [17]
                    [26] = "118332",
                    [27] = "118376",
                    [28] = "112332",
                }, -- [1]
                {
                    [11] = "118099,21",
                    [21] = "118099,60",
                    [10] = "118100,2",
                    [22] = "113578,15",
                    [9] = "118344",
                }, -- [2]
                {
                    [4] = "97985",
                    [5] = "115280,10",
                }, -- [3]
                {
                    [24] = "118632,4",
                    [25] = "114806,3",
                    [26] = "114081,4",
                    [14] = "114131,3",
                    [28] = "114807,10",
                    [15] = "114822,4",
                    [16] = "114129",
                    [17] = "114745,3",
                    [18] = "114128,3",
                    [27] = "114616,18",
                    [23] = "117452,20",
                    [21] = "110009",
                    [22] = "117452,5",
                    [12] = "118661",
                    [11] = "118656",
                }, -- [4]
                [0] = {
                    "6948", -- [1]
                    "110560", -- [2]
                    "71086", -- [3]
                    "40585", -- [4]
                    "65360", -- [5]
                    "63379", -- [6]
                    "39505", -- [7]
                    "84661", -- [8]
                    "85500", -- [9]
                    "79249,11", -- [10]
                    "113543", -- [11]
                    "118722,22", -- [12]
                    "119297,21", -- [13]
                    "119185,2", -- [14]
                    "118643", -- [15]
                    "118644", -- [16]
                },
            },
            ["guild"] = "Aegis",
            ["gold"] = 36014587,
            ["equip"] = {
                [0] = {
                    "118964", -- [1]
                    "113833", -- [2]
                    "109932", -- [3]
                    nil, -- [4]
                    "109900", -- [5]
                    "109827", -- [6]
                    "109804", -- [7]
                    "113840", -- [8]
                    "114493", -- [9]
                    "114444", -- [10]
                    "115798", -- [11]
                    "118296", -- [12]
                    "110002", -- [13]
                    "114489", -- [14]
                    "115392", -- [15]
                    "116362", -- [16]
                    "116365", -- [17]
                },
            },
            ["reagentbank"] = {
                [-3] = {
                    "120945,200", -- [1]
                    "116053", -- [2]
                    "79253", -- [3]
                    "109126,97", -- [4]
                    "79255,185", -- [5]
                    "79255,200", -- [6]
                    "115508,87", -- [7]
                    "111556,167", -- [8]
                    "79254,110", -- [9]
                    "79254,200", -- [10]
                    "79254,200", -- [11]
                    "111245,7", -- [12]
                    "79731,2", -- [13]
                    "61978,146", -- [14]
                    "43126,157", -- [15]
                    "43124,189", -- [16]
                    "115504,15", -- [17]
                    "43122,200", -- [18]
                    "43120,144", -- [19]
                    "109693,200", -- [20]
                    "43118,54", -- [21]
                    "43116,113", -- [22]
                    "39774,198", -- [23]
                    "112377,154", -- [24]
                    nil, -- [25]
                    "39469,151", -- [26]
                    nil, -- [27]
                    "109126,200", -- [28]
                    "109126,200", -- [29]
                    [33] = "120945,185",
                    [34] = "115508,200",
                    [35] = "109135,4",
                    [36] = "109134,11",
                    [37] = "109133,8",
                    [38] = "111666,18",
                    [39] = "111665,2",
                    [40] = "111595,7",
                    [41] = "111589",
                    [42] = "109132,4",
                    [43] = "109131,5",
                    [46] = "113261,5",
                    [47] = "111556,200",
                    [48] = "98619,17",
                    [49] = "82447,7",
                    [50] = "38426,8",
                    [51] = "113262,74",
                    [52] = "110609,133",
                    [55] = "113264,41",
                    [57] = "113263,42",
                    [61] = "109126,200",
                    [62] = "111557,143",
                    [63] = "111557,200",
                    [73] = "109126,200",
                    [77] = "39354,200",
                    [70] = "113111,104",
                    [74] = "39354,115",
                    [67] = "109126,200",
                    [79] = "43122,23",
                    [68] = "113588,2",
                    [84] = "114931,53",
                    [65] = "109126,200",
                    [69] = "109693,30",
                    [83] = "39354,200",
                },
            },
            ["faction"] = "Alliance",
            ["bank"] = {
                [6] = {
                    "119687", -- [1]
                },
                [7] = {
                    "118224", -- [1]
                    "119001", -- [2]
                    "86567", -- [3]
                    "86565", -- [4]
                    "113803", -- [5] Shadowmoon Shoulderguards
                    "113799", -- [6] Shadowmoon Robes
                    "113801", -- [7] Shadowmoon Cowl
                    "113802", -- [8] Shadowmoon Leggings
                    nil, -- [9]
                    nil, -- [10]
                    nil, -- [11]
                    "86591", -- [12]
                    "86570", -- [13]
                    "95566", -- [14]
                    "86583", -- [15]
                    "44803", -- [16]
                    "98087", -- [17]
                    "118918", -- [18]
                    "33292", -- [19]
                    nil, -- [20]
                    nil, -- [21]
                    nil, -- [22]
                    "86578", -- [23]
                    "86577", -- [24]
                    "86594", -- [25]
                    "86584", -- [26]
                    "6833", -- [27]
                    "90042", -- [28]
                },
                [8] = {
                    "45073", -- [1]
                    "6835", -- [2]
                    nil, -- [3]
                    nil, -- [4]
                    nil, -- [5]
                    "86590", -- [6]
                    "86579", -- [7]
                    "119151", -- [8]
                    "104304", -- [9]
                    "44800", -- [10]
                    "98080", -- [11]
                    "19028", -- [12]
                    "89196", -- [13]
                    [15] = "45992",
                    [20] = "86425",
                    [17] = "88375",
                    [18] = "46349",
                    [19] = "86125",
                    [26] = "33820",
                },
                [10] = {
                    nil, -- [1]
                    nil, -- [2]
                    "103678", -- [3]
                    "104038", -- [4]
                    nil, -- [5]
                    "79868,6", -- [6]
                    "79869,5", -- [7]
                    "87399,33", -- [8]
                    "97979", -- [9]
                    "25433", -- [10]
                    "21377,4", -- [11]
                    [13] = "102463",
                    [14] = "86569",
                    [15] = "86582",
                    [18] = "64399",
                    [19] = "63359",
                    [17] = "64398",
                    [20] = "94222,8",
                },
                [5] = {
                    "119687", -- [1]
                    "119687", -- [2]
                    "114432", -- [3]
                    "119378", -- [4]
                    "119413", -- [5]
                    "119228", -- [6]
                    "116123", -- [7]
                    "113288", -- [8]
                    "113012", -- [9]
                    "113044", -- [10]
                    "114416", -- [11]
                    "114477", -- [12]
                    "116070", -- [13]
                    "113016", -- [14]
                    "114478", -- [15]
                    "114378", -- [16]
                    "119665", -- [17]
                    "119688", -- [18]
                    "119665", -- [19]
                    "87514", -- [20]
                    "115317", -- [21]
                    "119690", -- [22]
                    "119688", -- [23]
                    "114371", -- [24]
                    "119684", -- [25]
                    "114395", -- [26]
                    "119687", -- [27]
                    "114493", -- [28]
                },
                [-1] = {
                    "112373", -- [1]
                    "112096", -- [2]
                    "119685", -- [3]
                    "114440", -- [4]
                    "119686", -- [5]
                    "114477", -- [6]
                    "119665", -- [7]
                    "119680", -- [8]
                    "109764", -- [9]
                    "115325", -- [10]
                    "114379", -- [11]
                    "115333", -- [12]
                    "114538", -- [13]
                    "114489", -- [14]
                    "119682", -- [15]
                    "114489", -- [16]
                    "119684", -- [17]
                    "110060", -- [18]
                    "114330", -- [19]
                    "114371", -- [20]
                    "114395", -- [21]
                    "114416", -- [22]
                    "119665", -- [23]
                    "116110", -- [24]
                    "112513", -- [25]
                    "119358", -- [26]
                    "112528", -- [27]
                    "113031", -- [28]
                },
                [9] = {
                    [13] = "94288,29",
                    [26] = "32506,4",
                    [14] = "71634",
                    [28] = "97981",
                    [4] = "46312",
                    [9] = "85973",
                    [5] = "21579",
                    [6] = "17904",
                    [12] = "27944",
                    [27] = "21383,10",
                },
                [11] = {
                    nil, -- [1]
                    nil, -- [2]
                    nil, -- [3]
                    nil, -- [4]
                    "15245", -- [5]
                    "89611", -- [6]
                    "21230", -- [7]
                    "21230", -- [8]
                    "21237", -- [9]
                    "21237", -- [10]
                    "21237", -- [11]
                    "20926,2", -- [12]
                    "20933,2", -- [13]
                    "20876,6", -- [14]
                    "20863,35", -- [15]
                    "20859,33", -- [16]
                    "20862,27", -- [17]
                    "20860,26", -- [18]
                    "20861,27", -- [19]
                    "21229,17", -- [20]
                    "20927,2", -- [21]
                    "20878,7", -- [22]
                    "20928,4", -- [23]
                    "20877,7", -- [24]
                    "21232", -- [25]
                    "20865,27", -- [26]
                    "20858,28", -- [27]
                    "20864,21", -- [28]
                },
            },
        },
    },
}
BagSyncOpt = {
    ["enableAuction"] = true,
    ["showGuildNames"] = false,
    ["tooltipOnlySearch"] = false,
    ["enableTooltips"] = true,
    ["enableMailbox"] = true,
    ["enableFaction"] = true,
    ["enableGuild"] = true,
    ["dbversion"] = "8.0",
    ["showTotal"] = true,
    ["enableUnitClass"] = false,
    ["enableTooltipSeperator"] = true,
    ["enableMinimap"] = true,
}
BagSyncGUILD_DB = {
    ["Darksorrow"] = {
    },
}
BagSyncTOKEN_DB = {
    ["Darksorrow"] = {
        ["Mark of the World Tree"] = {
            ["Blazii"] = 77,
            ["header"] = "Miscellaneous",
            ["icon"] = "Interface\\Icons\\inv_misc_markoftheworldtree",
        },
        ["Mogu Rune of Fate"] = {
            ["Blazii"] = 3,
            ["header"] = "Mists of Pandaria",
            ["icon"] = "Interface\\Icons\\archaeology_5_0_mogucoin",
        },
        ["Lesser Charm of Good Fortune"] = {
            ["Blazii"] = 772,
            ["header"] = "Mists of Pandaria",
            ["icon"] = "Interface\\Icons\\inv_misc_coin_18",
        },
        ["Garrison Resources"] = {
            ["Blazii"] = 3841,
            ["header"] = "Warlords of Draenor",
            ["icon"] = "Interface\\Icons\\inv_garrison_resource",
        },
        ["Valor Points"] = {
            ["Blazii"] = 0,
            ["header"] = "Dungeon and Raid",
            ["icon"] = "Interface\\Icons\\pvecurrency-valor",
        },
        ["Warforged Seal"] = {
            ["Blazii"] = 10,
            ["header"] = "Mists of Pandaria",
            ["icon"] = "Interface\\Icons\\inv_arcane_orb",
        },
        ["Mote of Darkness"] = {
            ["Blazii"] = 0,
            ["header"] = "Dungeon and Raid",
            ["icon"] = "Interface\\Icons\\spell_shadow_sealofkings",
        },
        ["Justice Points"] = {
            ["Blazii"] = 0,
            ["header"] = "Dungeon and Raid",
            ["icon"] = "Interface\\Icons\\pvecurrency-justice",
        },
        ["Epicurean's Award"] = {
            ["Blazii"] = 1,
            ["header"] = "Miscellaneous",
            ["icon"] = "Interface\\Icons\\INV_Misc_Ribbon_01",
        },
        ["Honor Points"] = {
            ["Blazii"] = 194,
            ["header"] = "Player vs. Player",
            ["icon"] = "Interface\\Icons\\PVPCurrency-Honor-Alliance",
        },
        ["Tol Barad Commendation"] = {
            ["Blazii"] = 9,
            ["header"] = "Player vs. Player",
            ["icon"] = "Interface\\Icons\\achievement_zone_tolbarad",
        },
        ["Timeless Coin"] = {
            ["Blazii"] = 3256,
            ["header"] = "Mists of Pandaria",
            ["icon"] = "Interface\\Icons\\timelesscoin",
        },
        ["Essence of Corrupted Deathwing"] = {
            ["Blazii"] = 0,
            ["header"] = "Dungeon and Raid",
            ["icon"] = "Interface\\Icons\\inv_elemental_primal_shadow",
        },
        ["Apexis Crystal"] = {
            ["Blazii"] = 15074,
            ["header"] = "Warlords of Draenor",
            ["icon"] = "Interface\\Icons\\inv_apexis_draenor",
        },
        ["Darkmoon Prize Ticket"] = {
            ["Blazii"] = 34,
            ["header"] = "Miscellaneous",
            ["icon"] = "Interface\\Icons\\inv_misc_ticket_darkmoon_01",
        },
        ["Conquest Points"] = {
            ["Blazii"] = 0,
            ["header"] = "Player vs. Player",
            ["icon"] = "Interface\\Icons\\PVPCurrency-Conquest-Alliance",
        },
        ["Elder Charm of Good Fortune"] = {
            ["Blazii"] = 20,
            ["header"] = "Mists of Pandaria",
            ["icon"] = "Interface\\Icons\\inv_misc_coin_17",
        },
        ["Ironpaw Token"] = {
            ["Blazii"] = 35,
            ["header"] = "Miscellaneous",
            ["icon"] = "Interface\\Icons\\inv_relics_idolofferocity",
        },
        ["Champion's Seal"] = {
            ["Blazii"] = 19,
            ["header"] = "Miscellaneous",
            ["icon"] = "Interface\\Icons\\Ability_Paladin_ArtofWar",
        },
        ["Seal of Tempered Fate"] = {
            ["Blazii"] = 9,
            ["header"] = "Warlords of Draenor",
            ["icon"] = "Interface\\Icons\\ability_animusorbs",
        },
    },
}
BagSyncCRAFT_DB = {
    ["Darksorrow"] = {
        ["Blazii"] = {
        },
    },
}
BagSyncBLACKLIST_DB = {
    ["Darksorrow"] = {
    },
}
commented

I cleaned up the prints a bit and added one to the BAG_UPDATE function. The following result should give you an idea of what is going on.
It would appear the BAG_UPDATE event fires for bank bags (but not all of them o.O) when logging in and/or zoning, but GetContainerNumSlots returns 0 until you actually visit the bank.

bag 0 numSlots: 16
bag 1 numSlots: 28
bag 2 numSlots: 28
bag 3 numSlots: 28
bag 4 numSlots: 28
BagSync [v8.0]   /bgs, /bagsync
BAG_UPDATE for bagID: 0
BAG_UPDATE for bagID: 5
bank 5 numSlots: 0
nilling bag:  bank 5
BAG_UPDATE for bagID: 1
BAG_UPDATE for bagID: 2
BAG_UPDATE for bagID: 3
BAG_UPDATE for bagID: 4
BAG_UPDATE for bagID: 7
bank 7 numSlots: 0
nilling bag:  bank 7
BAG_UPDATE for bagID: 8
bank 8 numSlots: 0
nilling bag:  bank 8
BAG_UPDATE for bagID: 9
bank 9 numSlots: 0
nilling bag:  bank 9
BAG_UPDATE for bagID: 10
bank 10 numSlots: 0
nilling bag:  bank 10
BAG_UPDATE for bagID: 11
bank 11 numSlots: 0
nilling bag:  bank 11

Here are the changed functions containing the prints, for reference:

local bags3 = bags3 or {}
function BagSync:BAG_UPDATE(event, bagid)
    -- -1 happens to be the primary bank slot ;)
    if (bagid > BANK_CONTAINER) then

        if not bags3[bagid] then
            print("BAG_UPDATE for bagID:", bagid)
            bags3[bagid] = true
        end
        --this will update the bank/bag slots
        local bagname

        --get the correct bag name based on it's id, trying NOT to use numbers as Blizzard may change bagspace in the future
        --so instead I'm using constants :)
        if ((bagid >= NUM_BAG_SLOTS + 1) and (bagid <= NUM_BAG_SLOTS + NUM_BANKBAGSLOTS)) then
            bagname = 'bank'
        elseif (bagid >= BACKPACK_CONTAINER) and (bagid <= BACKPACK_CONTAINER + NUM_BAG_SLOTS) then
            bagname = 'bag'
        else
            return
        end

        --now save the item information in the bag from bagupdate, this could be bag or bank
        SaveBag(bagname, bagid)

    end
end

local bags = {}
local bags2 = {}
local function SaveBag(bagname, bagid)
    if not bagname or not bagid then return nil end
    if not BS_DB then StartupDB() end
    BS_DB[bagname] = BS_DB[bagname] or {}

    --reset our tooltip data since we scanned new items (we want current data not old)
    lastItem = nil
    lastDisplayed = {}

    if not bags[bagid] then
        print(bagname, bagid, "numSlots:", GetContainerNumSlots(bagid))
        bags[bagid] = true
    end
    if GetContainerNumSlots(bagid) > 0 then
        local slotItems = {}
        for slot = 1, GetContainerNumSlots(bagid) do
            local _, count, _,_,_,_, link = GetContainerItemInfo(bagid, slot)
            if ToShortLink(link) then
                count = (count > 1 and count) or nil
                if count then
                    slotItems[slot] = format('%s,%d', ToShortLink(link), count)
                else
                    slotItems[slot] = ToShortLink(link)
                end
            end
        end
        BS_DB[bagname][bagid] = slotItems
    else
        if not bags2[bagid] then
            print("nilling bag: ", bagname, bagid)
            bags2[bagid] = true
        end
        BS_DB[bagname][bagid] = nil
    end
end
commented

So this change should fix it then? Have been waiting for this and happy to hear i'm not the only one with this problem.

commented

No, nothing of the above is a fix. Xruptor will have to come up with a fix, and hopefully the information I have provided will help him doing so.

commented

Hey folks! I'm sorry for the delay I've been away for the Holidays and since then have had to deal with issues that have cropped up. When I get a spare moment I'll take a look at this. Things have been pretty hectic for me as of late and there are a lot of decisions I need to make.

commented

Try deleting the BagSync.lua file under the WTF folder of your WOW installation. You will need to resync all the toons but it should fix the issue.

commented

Just tried deleting the BagSync.lua file but it did not do the trick unfortunately. When i exit the game and log back in the bank counter or whatever its called is reset again and i need to force an update on the bank to get it working again.

Thanks for the quick reply though!

commented

Hey, any news on this Issue?

commented

If you want a quick workaround then do the following:

  1. Open \World of Warcraft\Interface\AddOns\BagSync\BagSync.lua
  2. Find the following code (in the BagSync:BAG_UPDATE function):
        --now save the item information in the bag from bagupdate, this could be bag or bank
        SaveBag(bagname, bagid)
  1. Add the following line of code above the previous lines:
        if bagname == 'bank' and not atBank then return; end

As a result it should look like this:

        if bagname == 'bank' and not atBank then return; end
        --now save the item information in the bag from bagupdate, this could be bag or bank
        SaveBag(bagname, bagid)
  1. Relog all your characters and open their banks to save the info (this time it will be saved for good).
commented

Thanks for pointing that out Blazeflack and providing the fix. I'm still terribly busy.