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:
function LeonardosWardrobeManager.OnPlayerCombatState(event, inCombat)
-- The ~= operator is "not equal to" in Lua.
if inCombat ~= LeonardosWardrobeManager.inCombat then
-- The player's state has changed. Update the stored state...
LeonardosWardrobeManager.inCombat = inCombat
-- ...and then announce the change.
if inCombat then
d("Entering combat.")
EquipOutfit(3)
d("Equipped Outfit: " .. GetOutfitName(3))
d("Outfit Index: " .. GetEquippedOutfitIndex())
else
d("Exiting combat.")
UnequipOutfit()
end
end
end
Output:
Code:
[2:57PM] Entering combat.
[2:57PM] Equipped Outfit: Paladin // outfit 3 is "not" named paladin
[2:57PM] Outfit Index: 1
Outfits: