• 0

    posted a message on catch events fired by another addon
    ooh! cookies! :D

    It's this addon: http://wow.curse.com/downloads/wow-addons/details/epgp-dkp-reloaded.aspx

    Help is greatly appreciated!
    Posted in: Lua Code Discussion
  • 0

    posted a message on catch events fired by another addon
    It doesn't seem to work. That is; I'm probably doing something wrong.

    This is the code in the EPGP addon:
    callbacks:Fire("MassEPAward", awarded, reason, amount)



    This is the code in my addon (EPGPreserves):
     
    function EPGPreserves:OnEnable()
        self:RegisterMessage("MassEPAward")
    end
     
    function EPGPreserves:MassEPAward(...)
        self:Print("Mass award caught!")
        self:Print("awarded"..arg1)
        self:Print("reason"..arg2)
        self:Print("amount"..arg3)
    end


    I've looked at the CallBackhandler as suggested but from that I understand how I can fire my own messages but not how to catch them in my own addon.
    Posted in: Lua Code Discussion
  • 0

    posted a message on catch events fired by another addon
    ah, thanks. I will try that!
    Posted in: Lua Code Discussion
  • 0

    posted a message on catch events fired by another addon
    If I understand correctly, an addon can fire events which can be caught in other addons?

    I'm trying to update an addon of my own whenever the epgp-addon fires a mass award. In the code of EPGP:

     
          callbacks:Fire("MassEPAward", awarded, reason, amount,
                         extras_awarded, extras_reason, extras_amount)


    So I figure that the event's name is MassEPAward is the event to catch.
    I'm figuring out how to register that event.

    A self:RegisterEvent("MassEPAward") didn't work. I assume I must do a RegisterCallback but so far I haven't been able to get my code working.
    Is there any sample code I can look at?
    Posted in: Lua Code Discussion
  • 0

    posted a message on Talent spec name
    I was wondering; is there a way to get the talent spec of a player? "affliction" for a warlock with most talentpoints in affliction etc.
    Posted in: Lua Code Discussion
  • 0

    posted a message on looking for suggestions; checking if a player has itemX
    Thanks for the help, it is really appreciated!

    Okay, I've added the .pkgmeta file (changed the --OOx2 comment to #OOx2). I have deleted the libs folder.

    Do I also have to delete the externals.xml file?
    Posted in: Lua Code Discussion
  • 0

    posted a message on looking for suggestions; checking if a player has itemX
    Okay, I think I got it now. Can one of you please verify if the files are at the correct spot? My project is http://www.wowace.com/projects/epgploot2/
    The generated zipfile looks okay.
    Posted in: Lua Code Discussion
  • 0

    posted a message on looking for suggestions; checking if a player has itemX
    checking the recursive property didn't make a difference.

    The 'mainline' directory is empty except for folders:
    .svn/props
    .svn/prop-base
    .svn/text-base
    .svn/temp
    These folders are empty as well. Is that how it should be?
    Posted in: Lua Code Discussion
  • 0

    posted a message on looking for suggestions; checking if a player has itemX
    I've added two screenshots, the first is the error I'm receiving; the second is what I try to do to fix it (which is probably the wrong place).

    The only place I am able to do that is on the "interface/addons/epgploot2/mainline" folder, the other folders don't give me the correct properties tab.
    I click the 'add' button, then select style and type native.
    The change doesn't seem to commit.
    I tried to change the properties of a file, but it doesn't give me the svn tab in the properties-dialog.
    Posted in: Lua Code Discussion
  • 0

    posted a message on looking for suggestions; checking if a player has itemX
    I'm still having trouble uploading my addon. You mentioned tortoiseSVN, so I installed it.
    However, when I try to 'import' I receive the message 'svn:eof-style not set'. I've looked at the manual files and it tells me to add it at the 'propery' tab of the project. So I followed the steps in the manual; but the property page is empty.
    Any suggestions you may have?
    Posted in: Lua Code Discussion
  • 0

    posted a message on Looting from objects instead of mobs?
    Is it possible to detect who or what you're looting? I currently check UnitName("target") if the LOOT_OPENED event fires, but it returns nil for objects such as Alexstrasza's Gift or the Four Horsemen Chest.

    I'm looking for something like this:
     
    local OurLoot = {}
     
    ..
    function OnLootOpened()
     
    if UnitExist("target") then
      --this is a dead mob being looted
         FillOurLootList(UnitGUID("target"))
     
    else
      --this is something else...
        FillOurLootList(  ???  )    
    end
     
    end
    ...
     
    function FillOurLootList(identifyer)
    -- loop through the loot and put it in
      for i..do
         OurLoot[identifyer].loot[i]=GetLootSlotLink(i)
      end
     
    end
     
    Posted in: Lua Code Discussion
  • 0

    posted a message on looking for suggestions; checking if a player has itemX
    I've installed Mercurial, PuTTy, TortoiseHG, but so far it all seems extremely complex. Is there a good GUI available (much like VisualSourceSafe?)
    Posted in: Lua Code Discussion
  • 0

    posted a message on GetItemInfo, servercache and localcache
    Quote from jerry
    Isn't that an issue that only occurs when you test your addon ? I'm pretty sure that the client get the dropped item data when a mob dies, and you don't need to check if it's in the cache.

    Looking at GroupLoot Frames code, it looks like it's implied that the client has the item data available.


    The masterlooter has the data available, but not all members in the raid have looted the corpse to receive the data. This will be especially true for 3.1, where Emblems of Heroism/Emblem of Valor tokens are looted automatically- so raiders won't have to loot the corpse at all.
    Posted in: Lua Code Discussion
  • 0

    posted a message on GetItemInfo, servercache and localcache
    The reason I sent the itemIDs is because I'm afraid to run into the messagelimit of 254 characters.
    The masterlooter sends a message to the raid with all loot in one go- on Sartharion this might be as much as 7 items.
    Posted in: Lua Code Discussion
  • 0

    posted a message on GetItemInfo, servercache and localcache
    Quote from Arrowmaster
    Maybe you should explain what you are trying to do. If you just need the icon you can use GetItemIcon(itemid) without having to worry about it being in the local cache or not.


    I'm displaying a dialog at each raider's screen; I use sendAddonMessage to send the itemID.
    Posted in: Lua Code Discussion
  • To post a comment, please or register a new account.