1. I was working on LibBankComm-1.0, which, when finished, would scan the Guild Bank then send the contents over the addon channel to other users. The callback is GuildBankComm_ContentsChanged. You might have noticed I haven't updated or continued this Lib since May, mostly because I was concerned with Cataclysm changes.

    Right now, I am not looking for coding help per se; rather, with Cataclysm allowing a tithing system for loot, and the current long standing feature of using Guild funds to repair, I was wondering when GUILDBANKUPDATEMONEY() fires. Is it remote to the player? Meaning if you are in an instance, and someone deposits or withdraws money while in town, does the event fire for you?

    Also, there are pitfalls with the scanning, such as permissions to view the tabs, let alone depositing and withdrawing.

    I am really just looking for suggestions and tips and "watch out for..." comments.

    Myrroddin.

  2. To be honest, I don't think anyone knows yet. The best way to figure it out is to take the FrameXML source and see the context in which it checks that event, or do some testing using /eventttrace and having someone do this. I can't offer any particular advice on this system, since I'm not sure anyone quite knows how it's going to work yet. Let us know what you find out!

  3. To be honest, I don't think anyone knows yet. The best way to figure it out is to take the FrameXML source and see the context in which it checks that event, or do some testing using /eventttrace and having someone do this. I can't offer any particular advice on this system, since I'm not sure anyone quite knows how it's going to work yet. Let us know what you find out!

    Will do! I did have a couple of questions, now that I think about it. Which event is preferable to send REQUEST comms for data when the player logs in? ADDONLOADED(), VARIABLESLOADED() (being a lib, there are no SVs, but could be used as a time base), PLAYER_LOGON(), or some other? And if the player does not have permission to view the guild bank, is that known without opening the bank or guild frame using the appropriate APIs?

  4. Personally, I do almost everything in my addon's Enable event, which fires on PLAYER_LOGIN or after ADDON_LOADED in the case that we're loading on demand. This is where I do 90% of the things I need to do, including registered for events. There are some exceptions, but that's my preference.

    As for permissions for viewing the guild tab, I'm not quite sure when or how something like that is available. The easiest way is to test it out with the API call you mention and see if it gives a reasonable result.

  5. Well, I went back and forth over this code:

     function lib.eventFrame:PLAYER_GUILD_UPDATE()
        if IsInGuild() then
            lib.guildBank[guildName] = GetGuildInfo("player")   
            commSend("gBankComm", "REQUEST", "GUILD")
        else
            wipe(lib.guildBank)
            local pName = UnitName("player")
            local bankData = lib.guildBank
            lib.callbacks:Fire("GuildBankComm_PlayerGuildless", pName, bankData)
        end
     end
    

    And I realized a serious problem in that what if the player doesn't have permission to view the guild bank. GetGuildInfo("player") returns the rank index, which in turn I should pass to GuildControlGetRankFlags() and that's when I had to stop, as suddenly I am unsure what I am passing. Having looked at your code example, it works for rank 1, but what if I don't know the rank of the player, which in my case, I won't. Finding out the rank permission should answer my question above about viewing the guild bank without actually opening the guild bank frame.

    *EDIT * Also, I suppose I need to check if the player has been promoted to a rank that can access the bank.

  6. Well, I've done it! I do not know if it is finished, but it throws no errors on load. You may look at the project page on wowace; it is pending approval.

    Mr. Whitehead, I know none of your addons would use this library, but all the same, I want to thank you for helping me through the development pains of this, and my other addons.

    Thank you,

    Myrroddin of Llane.

    PS: as far as I can tell, the GUILDBANK_UPDATE_MONEY() only fires when you look at the guild bank, so it isn't constantly firing during the Cataclysm auto deposits. If I find out differently, I will let you know.

  7. I'm afraid I didn't help all that much, but I am glad you got things working!

  8. Apparently, I typed too soon. This library is working up to the last point. My brain is having pseudo-logic problems, and I just need a fresh mind to look at the problem in a different light.

    Paste Link. Here is what I am trying to do:

    1. When the player logs in, send a REQUEST across the addon com, or if the player visits the guild bank...

    2. Using LibCompress and AceSerializer-3.0 compress and serialize lib.guildBank and create a hash of UPDATE + lib.guildBank

    3. Send the hash first, then UPDATE + lib.guildBank

    4. Receive both comms, then compare hashes to make sure UPDATE + lib.guildBank was completely sent

    5. Uncompress and Deserialize UPDATE + lib.guildBank and sync comm version with local version

    Essentially, I am getting lost in my own priority of comm chatter, and how to go about doing it in the correct order.

  9. I'm not really sure how I can help you. I'd make your messages distinct and put a time limit on things so that you can always back out of what's happening.. but I don't quite understand the logic and process that you're using. Is there anything specific I can try to help with?