1. #1
    Deleted

    Shared Guild Data

    I would like to write an addon for guild members that shares some common data.

    Does WoW offer some functionality to save and read a Lua variables on the server?

    If not, then the addon could replicate the data on each client and synchronize using SendAddonMessage and CHAT_MSG_ADDON. That however opens whole box of new questions. Is there guide/tutorial/best practices for addon data sharing?

  2. #2
    Deleted
    Usually, a timestamped list of entries known by each client is used, with more recently timestamped entries taking priority.
    You can use libraries such as LibSyncTime to actually provide that timestamp, as the timestamps returned by WoW's own functions usually reflect the local system time instead of the server time.

  3. #3
    Depending on the amount and type of data you want to store, you could store it in the Guild Notes or Officer Notes like the EPGP addon does (and other DKP addons I believe) - This method requires you to be able to edit the notes though and might create conflict with DKP addons. The only non-guild dependent way to store data on the server, as far as I know, is using macros:
    Code:
    index = CreateMacro("name", icon, "body", perCharacter)
    newIndex = EditMacro(index, "name", icon, "body")
    index = GetMacroIndexByName("name")
    DeleteMacro(index) or DeleteMacro("name")
    If neither of those works for you, you can sacrifice the Guild Message of The Day to store it.
    Last edited by Nillerr; 2011-01-11 at 08:59 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •