Originally Posted by
DurotarHeights
Oh wow, that's why I couldn't find it.
I'm staying completely out of process, so more work to do.
It's quite simple if you have the data ready. Getting the shapeshift form is easy, just a few memory reads:

Then just get the creature type (m_creatureType) from SpellShapeshiftForm.dbc:

The common ones:
Code:
public enum ShapeshiftForm {
None,
Cat = 1,
TreeOfLife = 2,
TravelForm = 3,
AquaticForm = 4,
BearForm = 5,
Ghoul = 7,
DireBearForm = 8,
TharonjaSkeleton = 10,
CreatureBear = 14,
CreatureCat = 15,
GhostWolf = 16,
Zombie = 21,
Metamorphosis = 22,
Undead = 25,
Frenzy = 26,
FlightFormEpic = 27,
Shadowform = 28,
FlightForm = 29,
Stealth = 30,
MoonkinForm = 31,
SpiritOfRedemption = 32
}
Code:
private static readonly Dictionary<ShapeshiftForm, CreatureType> _shapeshiftCreatureTypes =
new Dictionary<ShapeshiftForm, CreatureType> {
{ ShapeshiftForm.Cat, CreatureType.Beast },
{ ShapeshiftForm.TreeOfLife, CreatureType.Humanoid },
{ ShapeshiftForm.TravelForm, CreatureType.Beast },
{ ShapeshiftForm.AquaticForm, CreatureType.Beast },
{ ShapeshiftForm.BearForm, CreatureType.Beast },
{ ShapeshiftForm.Ghoul, CreatureType.Undead },
{ ShapeshiftForm.DireBearForm, CreatureType.Beast },
{ ShapeshiftForm.TharonjaSkeleton, CreatureType.Undead },
{ ShapeshiftForm.CreatureBear, CreatureType.Beast },
{ ShapeshiftForm.CreatureCat, CreatureType.Beast },
{ ShapeshiftForm.GhostWolf, CreatureType.Beast },
{ ShapeshiftForm.Zombie, CreatureType.Undead },
{ ShapeshiftForm.Metamorphosis, CreatureType.Humanoid },
{ ShapeshiftForm.Undead, CreatureType.Undead },
{ ShapeshiftForm.Frenzy, CreatureType.Beast },
{ ShapeshiftForm.FlightFormEpic, CreatureType.Beast },
{ ShapeshiftForm.FlightForm, CreatureType.Beast }
};
And if no shapeshift form is present:
Code:
if ([unitPtr + 0xC04])
creatureType = [[unitPtr+0xC04]+0x24];
else
creatureType = [[unitPtr+0x124]+0xB0] > 0 ? CreatureType.Humanoid : CreatureType.Invalid;