I think you need only change tempHelm to tempHelm[1].sourceID.
Don't change LE_TRANSMOG_TYPE_APPEARANCE in SetPending. That value is meant to indicate whether it's an "appearance" (item) or an "illusion" (enchant). The first parameter is traditional inventory slot ID; not wardrobe category ID. In both cases that happens to be 1 for helm though, so you're good.
__________________
Grab your sword and fight the Horde!
|