CurseForge and Overwolf are joining forces!
Awesome More Information
  • 0

    posted a message on [ChatBarMover] Need help with item linking event.
    Making my first war addon, or rather reviving an old favorite. But it's not easy, especially when there's no API documentation.

    This is the events im using so far:

    • RegisterEventHandler(SystemData.Events.INTERFACE_RELOADED, "ChatBarMover.OnLoad")
    • RegisterEventHandler(SystemData.Events.ENTER_WORLD, "ChatBarMover.OnLoad")
    • RegisterEventHandler(SystemData.Events.BEGIN_ENTER_CHAT, "ChatBarMover.ChatStart")
    • RegisterEventHandler(SystemData.Events.CHAT_REPLY, "ChatBarMover.ChatStart")
    • RegisterEventHandler(SystemData.Events.ENTER_KEY_PROCESSED, "ChatBarMover.ChatEnd")
    • RegisterEventHandler(SystemData.Events.ESCAPE_KEY_PROCESSED, "ChatBarMover.ChatEnd")

    Those cover the situations when chat is activated by pressing enter or replying, but i need some way of handling when an item or similar is linked to chat.
    I thought i could use "EA_ChatWindow.OnHyperLinkLButtonUp", but i was unsuccessful.

    So i need some help on how to do this, why oh why is warwiki dead ^_-

    Addon link: ChatBarMover - PasteyBin

    TIA ^^
    Posted in: Development Help
  • 0

    posted a message on LuaTexts Official Thread
    Great, thanks.

    Just need to figure out why I'm getting grey text as PowerColor(), I'm probably doing something wrong with the char coloring.

    This is sort of the same one but for mana, just tested it and text is also grey.

    local power_type = UnitPowerType(unit)
    if power_type == 0 then -- Mana
      Outline()
      local cur,max = Short(Power(unit),true),Short(MaxPower(unit),true)
      local r,g,b = PowerColor(power_type)
      if IsMouseOver() then
        return "|cff%02x%02x%02x%s|r / |cff%02x%02x%02x%s|r",r,g,b,cur,r,g,b,max
      elseif Percent(cur,max) < 95 then
        return "|cff%02x%02x%02x%s|r / |cff%02x%02x%02x%s|r",r,g,b,cur,r,g,b,max
      end
    end
    Posted in: Unit Frames
  • 0

    posted a message on LuaTexts Official Thread
    if not UnitPowerType(unit) == 0 then -- Not Mana


    Ho do I "!=" in that context? :D
    I know I can just > 0 and it would work, but I want to know because I'm going to need it later.

    Also i can't find the list of power types.
    0 = Mana
    1 = Rage "I think"
    Energy, Focus ?

    [Edit]
    Just finished the first of my old semi big dogtag's to lua, would be nice if you could tell me if it's correctly made. (This power is ONLY for non mana powers)
    local power_type = UnitPowerType(unit)
    if power_type > 0 then -- Not Mana
      Outline()
      local cur,max = Short(Power(unit),true),Short(MaxPower(unit),true)
      local r,g,b = PowerColor(power_type)
      if IsMouseOver() then
        return "|cff%02x%02x%02x%s|r / |cff%02x%02x%02x%s|r",r,g,b,cur,r,g,b,max
      elseif Percent(cur,max) < 95 and power_type > 1 then -- Not Mana or Rage
        return "|cff%02x%02x%02x%s|r",r,g,b,cur
      elseif Percent(cur,max) > 0 and power_type == 1 then -- Rage
        return "|cff%02x%02x%02x%s|r",r,g,b,cur
      end
    end


    There is something wrong with the PowerColor, im on my warrior setting it up and the rage text is grey, at first i thought it was because i used the runes color so i tried to change that and it was still grey.
    Can't relog yet so im not sure what colors the others powers are.

    LOVE the lua instead of dogtags, ppl learn more and it's more efficient, GJ!
    Posted in: Unit Frames
  • 0

    posted a message on ClassTimer - Official thread
    Something that has been annoying me for a long time...

    Example: Warrior's Rampage, whenever the Buff stack the bar timer resets although the buff length stay the same.
    It makes it really confusing if you use it to keep a eye on when to cast it again, the stacking as you may know has nothing to do with the timer itself.

    I tried to hack it but failed miserably, I think it?s a design bug that happens for all similar buffs.

    Hope you can fix it.
    Posted in: General AddOns
  • To post a comment, please or register a new account.