Worgen shape conditional
Terraism opened this issue ยท 4 comments
Would it be possible to add an IF/ELSE condition that detects whether you're in worgen or human form (akin to the [form:x] conditional)? I'm aware that they don't provide GetShapeshiftFormID responses, but it seems like you can confirm it via GetModelFileID:
/script local f=CreateFrame("PlayerModel");f:SetUnit("Player");local s = f:GetModelFileID();print(s);
returns codes as follows:
Form | FileID |
---|---|
Worgen, male | 307454 |
Worgen, female | 307453 |
Human, male | 1011653 |
Human, female | 1000764 |
I know I'd love to be able to toggle Running Wild only when I'm in worgen form, and mount up normally otherwise. With the conditional, it seems like it'd be doable via the advanced commands.
Hmm. It looks like that would work, but I'm unsure about the wisdom of creating a PlayerModel frame. It's a pretty heavy weight frame with a full 3d model of the player. It's not actually visible, but GetModelFileID() only works if it's "shown" which I think means it'll be taking CPU cycles being updated.
I think this is a good idea overall, and I would like to support it, but I'm going to take bit of time to think about the approach in case something better occurs to me.
I added a modelid condition and tried out [modelid:307453/307454] Running Wild and it seemed to work ok.
But I ran into a much more serious problem. Someone put a pumpkin on my head and Running Wild was no longer castable, and I can't figure out any way to test for that. So Running Wild is not really working very well in general.
LiteMount 9.0.9 has [playermodel:<modelFileID>]
condition and /litemount playermodel
command.