Okay everyone, so I just realized that my WoWUnit.Dead function doesn't work to well, in fact it always returns false! The weird thing is that for instance WoWUnit.Lootable that also is an UnitDynamicFlag returns true when a corpse is lootable. Here's some code:
Code:
UNIT_DYNAMIC_FLAGS = 0x4E // 0x4E * 4 = 0x138
UnitDynamicFlags.Dead = 0x20,
Code:
public bool HasDynamicFlag(Enums.UnitDynamicFlags flag)
{
return ((Memory.Read<int>(UnitDescriptor + (uint)Descriptors.eUnitFields.UNIT_DYNAMIC_FLAGS * 4)) & (int)flag) != 0;
}
Code:
public bool Dead
{
get
{
return HasDynamicFlag(Enums.UnitDynamicFlags.Dead);
}
}
public bool Lootable
{
get
{
return HasDynamicFlag(Enums.UnitDynamicFlags.Lootable);
}
}
Code:
21:21:43 Target Info: Bristleback Thornweaver
21:21:43 Combat: False
21:21:43 Casting: False
21:21:43 Dead: False
21:21:43 Facing: 1,093227
21:21:43 Faction: 111
21:21:43 GUID: 17379391016734158679
21:21:43 Level: 18
21:21:43 Lootable: True
21:21:43 Skinnable: False
21:21:43 Tagged: True
21:21:43 ------------------------------------
Notice how the Lootable = true, yet the Dead = false!