I use this old code to determine spell is/not cooldown?
but i can get right answer,is that something change?
SpellCooldownPtr=0x00ACD584;
Code:
public static Boolean IsUsableSpell(int spellid)
{
uint currentListObject = Memory.ReadUInt(Memory.WowBaseAddress + (uint)Offsets.Globals.SpellCooldownPtr + 0x8);
while ((currentListObject != 0) && ((currentListObject & 1) == 0))
{
int currentSpellId = Memory.ReadInt(Memory.WowBaseAddress + currentListObject + 8);
if (currentSpellId == spellid)
{
int start = Memory.ReadInt(Memory.WowBaseAddress + currentListObject + 0x10);
int cd1 = Memory.ReadInt(Memory.WowBaseAddress + currentListObject + 0x14);
int cd2 = Memory.ReadInt(Memory.WowBaseAddress + currentListObject + 0x20);
int length = cd1 + cd2;
int globalLength = Memory.ReadInt(Memory.WowBaseAddress + currentListObject + 0x2C);
float cdleft = Math.Max(Math.Max(length, globalLength) - (Memory.ReadInt(Memory.WowBaseAddress + (uint)Resources.Offsets.Globals.Timestamp) - start), 0);
if (cdleft != 0)
{
return false;
}
}
currentListObject = Memory.ReadUInt(Memory.WowBaseAddress + currentListObject + 0x4);
}
return true;
}