1. #1
    The Patient Buttonmasher's Avatar
    10+ Year Old Account
    Join Date
    May 2013
    Location
    Seattle, the land where we have good internet.
    Posts
    278

    Death Knight kgPanels Talent Name?

    I'm implementing talent tree backgrounds back onto the talent frame (PlayerTalentFrame), and I'm using a script through kgPanels in both OnLoad and OnEvent. However, I can't find the correct "Death Knight" name for it to load properly. The Lua goes as follows:

    self:RegisterEvent("ACTIVE_TALENT_GROUP_CHANGED")
    self:RegisterEvent("PLAYER_LOGIN")
    if UnitClass("player") == "DEATHKNIGHT" and select(2, GetSpecializationInfo(GetSpecialization())) == "Frost" then
    self:Show()
    else
    self:Hide()
    end

    I've tried all combinations of Death Knight, DEATH KNIGHT, DeathKnight, DEATHKNIGHT (the last one is the one that works for class colours.) I also tried FROST, Frost, etc. That doesn't seem to help, and I don't believe the spec is case sensitive (though I could be wrong. However, I removed the spec portion and it still didn't work.)

    Any help with this is appreciated. (Example of one of the images I'm using to replace the old Prot background:
    Comparison to old background: http://db.vanillagaming.org/?talent#L

  2. #2
    UnitClass("player") == "DEATHKNIGHT" should be if select(2,UnitClass("player")) == "DEATHKNIGHT" I think since first parameter returns some weird French stuff.
    http://wow.gamepedia.com/API_UnitClass

  3. #3
    The Patient Buttonmasher's Avatar
    10+ Year Old Account
    Join Date
    May 2013
    Location
    Seattle, the land where we have good internet.
    Posts
    278
    Quote Originally Posted by Overdispersion View Post
    UnitClass("player") == "DEATHKNIGHT" should be if select(2,UnitClass("player")) == "DEATHKNIGHT" I think since first parameter returns some weird French stuff.
    http://wow.gamepedia.com/API_UnitClass
    Worked perfectly. Thanks mate!

Posting Permissions

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