• 0

    posted a message on Instaces, encounters and Bosses, any libs already?
    Thanks a lot!
    Posted in: Lua Code Discussion
  • 0

    posted a message on Instaces, encounters and Bosses, any libs already?
    Hello!

    I'm learning lua making a little addon wich shows a frame with small info on encounters.

    Right now I have a table with intances ID (mapID from GetInstanceInfo) and bosses ID (guid from UnitGUID).

    My problem is encounters with more than 1 boss (Council of Elders for example). I'm thinking on adding one level: Instance >> Encounters >> Bosses

    But I have some question.
      Is anywhere an encounter id diferent from the encounter id in the Journal?
      mapID from GetInstanceInfo is diferent that the one in the Journal, so is there a way of conect both, I mean, if I'm inside Heart of Fear is there a way of get Journal Instance ID(330) withouth opening the journal, the same way I get mapID(1009) from GetInstanceInfo?

    Resuming...what I want to do is make a table with 3 levels: Instance >> Encounters >> Bosses , but I'm troubled for mixing journal info (encounters id) and then using mapID from GetInstanceInfo, instead of Journal Instance ID.
    Stupid I know,but if I'm going to gather the info I want to do it right!

    And bytheway, if that table exist I would like to know!!! ( I know about LibBossIDs)

    Thanks and sorry for my por english!
    Posted in: Lua Code Discussion
  • 0

    posted a message on AceLocale-3.0: How to know if a string it's not found?
    Thanks a lot! That worked perfect: not sending errors and sending nil!

    Thanks again!
    Posted in: Ace3
  • 0

    posted a message on AceLocale-3.0: How to know if a string it's not found?
    Hello,

    first of all, sorry about my poor english (and my poor lua :))!

    I'm learning lua making a little addon to show a frame with tactics about a boss.

    I'm using AceLocale to translate tactics like this:
    local L = LibStub("AceLocale-3.0"):NewLocale("MyAddon", "esES", true, true)
    if not L then return end
    L["E_61243"] = "Info about Gekkan in Mogu'shan Palace."
    


    I need to know if I have tactics on a boss, show a frame if I have info, send a message if not to let me know the guid of the npc.
    I need something like this:
    if L["E_"..guid] ~= nil then
    --show frame
    else
    --send message
    end
    


    So my problem is L["E_"..guid](L["E_61243"] in this case) is returning E_61243 when didn't exists instead of nil.
    I'm confuse, setting silent to true shouldn't be returning nil if it's not found?

    Thanks for your help!
    Posted in: Ace3
  • To post a comment, please or register a new account.