I have been trying to dump the player buffs but it has turned out to be a bit random if i receive valid results.
Code:
internal enum UnitAuras : uint
{
CGUnit_Aura = 0x00556E10, // 3.3.5a 12340
AURA_COUNT_1 = 0xDD0, // 3.3.5a 12340
AURA_COUNT_2 = 0xC54, // 3.3.5a 12340
AURA_TABLE_1 = 0xC50, // 3.3.5a 12340
AURA_TABLE_2 = 0xC58, // 3.3.5a 12340
AURA_SIZE = 0x18, // 3.3.5a 12340
AURA_SPELL_ID = 0x8 // 3.3.5a 12340
} ;
public List<int> GetBuffs()
{
List<int> auras = new List<int>();
try
{
int auraCount = ObjectManager.Memory.ReadInt(BaseAddress + (uint)Offsets.UnitAuras.AURA_COUNT_1);
uint auraTable = ObjectManager.Memory.ReadUInt(BaseAddress + (uint) Offsets.UnitAuras.AURA_TABLE_1);
if (auraCount == -1)
{
auraCount = ObjectManager.Memory.ReadInt(BaseAddress + (uint) Offsets.UnitAuras.AURA_COUNT_2);
auraTable = ObjectManager.Memory.ReadUInt(BaseAddress + (uint) Offsets.UnitAuras.AURA_TABLE_2);
}
int SpellID;
for (uint i = 0; i < auraCount; i++)
{
SpellID = ObjectManager.Memory.ReadInt(auraTable + ((uint) Offsets.UnitAuras.AURA_SIZE*i) +
(uint) Offsets.UnitAuras.AURA_SPELL_ID);
if (SpellID > 0)
{
auras.Add(SpellID);
}
}
return auras;
} catch (Exception e)
{
Console.WriteLine("Exception: GetBuffs: " + e);
return auras;
}
}
If i enter my level 80 i can get it to return valid results if i play a bit.
If i create a new level 1 char i cannot get it to return anything valid.
Any help would be very much appreciated.