Hello,
Another member of my team as asked mt to post this:
Code:
$TOTAL_UNIT_FIELDS = 0x59
Func _InCombat($handle, $pBase)
$incombat = _MemoryRead($pBase + ($TOTAL_UNIT_FIELDS*4),$handle,'int')
If $incombat > 8 AND $incombat <> 33554440 Then
return 1
Else
return 0
EndIf
EndFunc
It seems that they are doing something wrong.
My guess is that "If $incombat > 8 AND $incombat <> 33554440 Then" is wrong, however I dont know.
Im sure they would appreciate any form of help.
Thanks in advance.
_______________________________________--
EDIT: Would this work?
Code:
$OBJECT_END = 0x18
$UNIT_FIELD_FLAGS = $OBJECT_END + 0xD0
UNIT_FLAG_IN_COMBAT = 0x00080000 ; Dont know how to use this
_WoWGetKnownField($Handle, $pBase, $UNIT_FIELD_FLAGS)
Func _WoWGetKnownField($Handle, $ObjectBase, $FieldIndex, $Type = "dword")
Return _BMReadMemory($Handle, (_BMReadUint($Handle, ($ObjectBase + $ObjDescriptorOffset)) + ($FieldIndex * 4)), $Type)
EndFunc ;==>_WoWGetKnownField