Seems that my buff code quits working. It's been working fine for a while but just realized today that it's off and on.
Any thoughts on what I might be doing wrong? I searched and it seems my offsets are current.
Code:
enum BuffOffsets
{
AURA_COUNT_1 = 0xDD0,
AURA_COUNT_2 = 0xC54,
AURA_TABLE_1 = 0xC50,
AURA_TABLE_2 = 0xC58,
AURA_SIZE = 0x18,
AURA_SPELL_ID = 0x8
};
public bool HasBuff(Buffs buff)
{
uint auraTable = this.BaseAddress + (uint)BuffOffsets.AURA_TABLE_1;
IntPtr _auraCountPtr = new IntPtr((long)(this.BaseAddress + (long)BuffOffsets.AURA_COUNT_1));
uint auraCount = (uint)mem.ReadUInt(_auraCountPtr);
if (auraCount > 80)
{
IntPtr _tmp1 = new IntPtr((long)(this.BaseAddress + (uint)BuffOffsets.AURA_TABLE_2));
auraTable = mem.ReadUInt(_tmp1);
IntPtr _tmp2 = new IntPtr((long)(this.BaseAddress + (uint)BuffOffsets.AURA_COUNT_2));
auraCount = mem.ReadUInt(_tmp2);
}
for (int i = 0; i <= auraCount; i++)
{
IntPtr _tmp3 = new IntPtr(auraTable + (uint)BuffOffsets.AURA_SIZE + i + (uint)BuffOffsets.AURA_SPELL_ID);
int spellId = mem.ReadInt(_tmp3);
if (spellId == (int)buff)
{
return true;
}
}
return false;
}
I found other posts that use different checks than auraCount > 80 to determine the actual buffbase such as:
Code:
IntPtr _varIntPtr = new IntPtr((long)(this.BaseAddress + 0xC58));
uint _buffBase = (uint)mem.ReadInt(_varIntPtr);
if (_buffBase == 0) ...
And neither seems to be working for me now. Any help on what i might be doing wrong?
Thanks!