View Single Post
08/25/21, 01:59 PM   #1
Leonardo1123
AddOn Author - Click to view addons
Join Date: Aug 2021
Posts: 19
Question Issue with Equip Outfit? Only equipping the first slot.

Here's my code, and the following is the chat output when entering combat.

My other outfits are identical to "No Outfit" except for the dye channels, could it possibly be that they're technically null as a "style?"

Edit: I was able to rule that out as the reason.
Edit: So for more specifics, EquipOutfit() is behaving the same as EquipOutfit(-1) the same as ..(1) same as ..(2).

Thanks for any and all help! First addon.

Code:
Lua Code:
  1. function LeonardosWardrobeManager.OnPlayerCombatState(event, inCombat)
  2.     -- The ~= operator is "not equal to" in Lua.
  3.     if inCombat ~= LeonardosWardrobeManager.inCombat then
  4.         -- The player's state has changed. Update the stored state...
  5.         LeonardosWardrobeManager.inCombat = inCombat
  6.  
  7.         -- ...and then announce the change.
  8.         if inCombat then
  9.             d("Entering combat.")
  10.             EquipOutfit(3)
  11.             d("Equipped Outfit: " .. GetOutfitName(3))
  12.             d("Outfit Index: " .. GetEquippedOutfitIndex())
  13.         else
  14.             d("Exiting combat.")
  15.             UnequipOutfit()
  16.         end
  17.  
  18.     end
  19. end

Output:
Code:
[2:57PM] Entering combat.
[2:57PM] Equipped Outfit: Paladin // outfit 3 is "not" named paladin
[2:57PM] Outfit Index: 1
Outfits:

Last edited by Leonardo1123 : 08/25/21 at 02:33 PM.
  Reply With Quote