Thread: DressUpModel
View Single Post
12-20-12, 02:12 AM   #7
semlar
A Pyroguard Emberseer
 
semlar's Avatar
AddOn Author - Click to view addons
Join Date: Sep 2007
Posts: 1,060
This appears only capable of using the player's gender, but I'll leave it here anyway..
Lua Code:
  1. local RaceIDs = {
  2.     Human = 1,
  3.     Orc = 2,
  4.     Dwarf = 3,
  5.     NightElf = 4,
  6.     Scourge = 5,
  7.     Tauren = 6,
  8.     Gnome = 7,
  9.     Troll = 8,
  10.     Goblin = 9,
  11.     BloodElf = 10,
  12.     Draenei = 11,
  13.     Worgen = 22,
  14.     Pandaren = 24,
  15. }
  16.  
  17. local dum = CreateFrame('DressUpModel', nil, UIParent)
  18. dum:SetPoint('CENTER')
  19. dum:SetSize(300,300)
  20. dum:SetUnit('player')
  21. dum:SetScript('OnUpdate', function(self, elapsed)
  22.     self.e = self.e and self.e + elapsed or 0
  23.     if not self.race then self.race = next(RaceIDs) end
  24.     if self.e > 0.8 then
  25.         self:SetCustomRace(RaceIDs[self.race])
  26.         self.race = next(RaceIDs, self.race) or next(RaceIDs)
  27.         self.e = 0
  28.     end
  29. end)

The closest I could get to swapping the gender was getting the correct gender model with the player's gender's texture which lead to some horrifying results.

*cough*



Last edited by semlar : 12-20-12 at 03:04 AM.
  Reply With Quote