7.2.5 C_Garrison.GetTalentTrees = nil (w/ possible fix) #145


Open
  • tw_vincent created this issue Jun 13, 2017

    C_Garrison.GetTalentTrees seems to have been removed in 7.2.5.

     

    I *think* Line 425 of event.lua can be rewritten from

     local talentArr = C_Garrison.GetTalentTrees(LE_GARRISON_TYPE_7_0, select(3, UnitClass("player")))

     

    to

     

     local _, _, talentArr = C_Garrison.GetTalentTreeInfoForID(LE_GARRISON_TYPE_7_0, select(3, UnitClass("player")))

     

    But I'm not 100% certain, though so far the error has subsided and I haven't seen any additional problems the way I'm using addon.

  • bsmorgan posted a comment Jun 13, 2017

    vincentSDSH,

     

    You fix is better than mine, (line 432: local talentArr = nil). I googled and found https://us.battle.net/forums/en/wow/topic/20755546848 but it generates a different error.

  • tw_vincent posted a comment Jun 13, 2017

    Yeah, C_Garrison.GetCurrentGarrTalentTreeID() doesn't always contain data and may only have it in certain contexts (e.g., C_ArtifactUI.GetArtifactKnowledgeLevel() only has data if ArtifactFrame is shown)

     

  • Forge_User_32160322 posted a comment Jun 14, 2017

    I just set that variable to nil, never using talents feature anyway. :)

    no more errors after that.


    Edited Jun 14, 2017
  • Forge_User_96220691 posted a comment Jun 14, 2017

    I have no idea how to change code in Broker Garrison, but I can point how it need to be called in 7.2.5 according mine addon where I get notification for new complete talent research.

     

        local talentTrees = C_Garrison.GetTalentTreeIDsByClassID(LE_GARRISON_TYPE_7_0, self.class)
        if talentTrees then
          local completeTalentID = C_Garrison.GetCompleteTalent(LE_GARRISON_TYPE_7_0)
          if not BUILDING_ANNOUNCED[completeTalentID] then
            for treeIndex, treeID in ipairs(talentTrees) do
              local _, _, tree = C_Garrison.GetTalentTreeInfoForID(LE_GARRISON_TYPE_7_0, treeID)
              for talentIndex, talent in ipairs(tree) do
                if (talent.id == completeTalentID) then
                  self:PrintToActive(("%s ready!"):format(talent.name))
                  BUILDING_ANNOUNCED[completeTalentID] = true
                end
              end
            end
          end
        end

     


    Edited Jun 14, 2017
  • Wig0r posted a comment Jun 14, 2017

    open event.lua, around line 444 should be:

    function Garrison:FullUpdateTalents()
    local tmpTalents = {}
    local talentArr = C_Garrison.GetTalentTrees(LE_GARRISON_TYPE_7_0, select(3, UnitClass("player")))

    Change this into:
    function Garrison:FullUpdateTalents()
    local tmpTalents = {}
    --local talentArr = C_Garrison.GetTalentTrees(LE_GARRISON_TYPE_7_0, select(3, UnitClass("player")))
    local _, _, talentArr = C_Garrison.GetTalentTreeInfoForID(LE_GARRISON_TYPE_7_0, 0)

    no clue why you have to pass 0 as the second argument, C_Garrison.GetCurrentGarrTalentTreeID() only returns values when the actual talent screen is open

    Edited Jun 14, 2017

To post a comment, please login or register a new account.