1. #1

    LF mod help (REPLACES FACE WITH CLASS ICON?)

    Yeh looking for some mod I saw on a video once. The guy had a completely default UI, except instead of peoples characters faces on his unitframe, it had their class icon. (He was running default UI, so no unit-frames mod was on at the time)

    here is the video btw

    http://www.youtube.com/watch?v=_RocewMhYRs

    ---------- Post added 2011-02-08 at 10:19 PM ----------

    Found it NVM

    It's this

    /run UFP = "UnitFramePortrait_Update"; UICC = "Interface\Glues\CharacterCreate\UI-CharacterCreate-Classes"; CIT = CLASS_ICON_TCOORDS
    /run hooksecurefunc(UFP,function(self) if self.portrait then local t = CIT[select(2,UnitClass(self.unit))] if t then self.portrait:SetTexture(UICC) self.portrait:SetTexCoord(unpack(t)) end end end)
    Last edited by AppleOrange; 2011-02-08 at 10:13 PM.

  2. #2
    lol that's a nice script!
    You forgot to escape out the backslashes though:

    Code:
    /run UFP = "UnitFramePortrait_Update"; UICC = "Interface\\Glues\\CharacterCreate\\UI-CharacterCreate-Classes"; CIT = CLASS_ICON_TCOORDS
    Code:
    /run hooksecurefunc(UFP,function(self) if self.portrait then local t = CIT[select(2,UnitClass(self.unit))] if t then self.portrait:SetTexture(UICC) self.portrait:SetTexCoord(unpack(t)) end end end)

  3. #3
    Deleted
    Code:
    /run debughook("UnitFramePortrait_Update",function(s)local a,t=s.portrait if a then t=CLASS_ICON_TCOORDS[({UnitClass(s.unit)})[2]]if t then a:SetTexture("Interface\\Glues\\CharacterCreate\\UI-CharacterCreate-Classes")a:SetTexCoord(unpack(t))end end end)
    Shortened to 252 characters to remove the need for multiple macros.
    Last edited by mmocba105e19de; 2011-02-08 at 11:39 PM.

  4. #4
    How do you make it turn back to default?

  5. #5
    wtf is debughook() ??!

    Dang u sure compressed that fatass into 1 tight macro ....

  6. #6
    Quote Originally Posted by Terenas Menethil View Post
    How do you make it turn back to default?
    reload your ui or log out.

    this macro isn't a perma-change, it's just one of those temp macros you hit every time you log on for the first time of your player session.

  7. #7
    Deleted
    Quote Originally Posted by Ketho View Post
    wtf is debughook() ??!

    Dang u sure compressed that fatass into 1 tight macro ....
    The same as hooksecurefunc, just without preserving secure status.

    Well, and it's shorter.

Posting Permissions

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