I was looking for a way to check if a given spell is currently being cast by the local player. After reading this thread: http://www.mmowned.com/forums/wow-me...rice-none.html I have updated the information there and come up with the following:
Code:
<Pattern desc="IsCurrentSpellBySpellId" pattern="\x55\x8B\xEC\xA1\xAC\xA2\xA1\x00\xA8\x01\x75\x04\x85\xC0\x75\x02\x33\xC0\x8B\x4D\x08\xA8\x01\x75\x12\x85\xC0\x74\x0E\x39\x48\x20\x74\x05\x8B\x40\x04\xEB\xEE\xB0\x01\x5D\xC3" mask="xxxx????xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx" />
Code:
bool CGLocalPlayer_C::IsCurrentSpell( unsigned long SpellId )
{
typedef bool ( __cdecl * tIsCurrentSpellBySpellId ) ( unsigned long );
tIsCurrentSpellBySpellId IsCurrentSpellBySpellId = ( tIsCurrentSpellBySpellId )gpWoWX->GetFindPattern()->GetAddress("IsCurrentSpellBySpellId");
return IsCurrentSpellBySpellId(SpellId);
}