Oh hai!
ive been trying for a while now to find the correct offset addy or whatnot for the ammount of threat towards unit, ive looked at theese functions;
lua_UnitThreatSituation - 0x00598950
http://www.wowwiki.com/API_UnitThreatSituation
and
lua_UnitDetailedThreatSituation - 0x00598A30
http://www.wowwiki.com/API_UnitDetailedThreatSituation
they both call this function,
char __thiscall sub_6AE120(void *this, int a2, int a3, int a4, int a5, int a6)Code:push 0 push 0 push 0 lea eax, [ebp+var_1] push eax lea edx, [ebp+var_10] push edx call sub_6AE120 ; <".\Unit_C.cpp">
a6, a5 and a4 get's passed as 0 and i think a3 and a2 is the objects to compare
Any ideas?Code:char __thiscall sub_6AE120(void *this, int a2, int a3, int a4, int a5, int a6) { int v6; // eax@1 int v7; // ebx@1 int v8; // edi@1 void *v9; // esi@1 int v11; // eax@8 int v12; // edi@8 int v13; // eax@11 int v14; // edi@11 char result; // al@17 int v17; // eax@1 int v18; // edx@1 char v19; // zf@8 int v20; // eax@12 int v24; // [sp+10h] [bp-8h]@1 int v25; // [sp+14h] [bp-4h]@1 char v26; // [sp+Ch] [bp-Ch]@12 v8 = a2; // one of the units? v17 = *(_DWORD *)a2; v18 = *(_DWORD *)(a2 + 4); v9 = this; v24 = *(_DWORD *)a2; v25 = v18; v6 = sub_6AB420((int)((char *)this + 4072), v17, (int)&v24); v7 = v6; if ( *((_DWORD *)v9 + 1017) | *((_DWORD *)v9 + 1016) && v6 ) { if ( a3 ) *(_BYTE *)a3 = *(_BYTE *)(v6 + 40); if ( a4 ) // a4 is passed as 0 *(_BYTE *)a4 = *(_BYTE *)(v6 + 41); _ECX = a5; // And so is a5 if ( a5 ) { v11 = *(_DWORD *)v8; v19 = *(_DWORD *)v8 == *((_DWORD *)v9 + 1016); v12 = *(_DWORD *)(v8 + 4); if ( v19 && v12 == *((_DWORD *)v9 + 1017) ) { __asm { fld ds:flt_9AE124 fstp dword ptr [ecx] } } else { v13 = GetObjectByGuid(v11, v12, 8); v14 = v13; if ( !v13 ) goto LABEL_29; sub_649920(v13); __asm { fstp [ebp+arg_4] } v20 = (*(int (__thiscall **)(int, char *))(*(_DWORD *)v14 + 0x28))(v14, &v26); sub_496B80(v20); __asm { fld [ebp+arg_4] fmul st, st fcompp st(1), st fnstsw ax } if ( HIBYTE(_AX) & 1 ) { LABEL_29: _EAX = a5; a3 = *(_BYTE *)(v7 + 0x29); __asm { fild [ebp+arg_4] fmul ds:flt_9E95A8 fstp dword ptr [eax] } } else { _ECX = a5; a3 = *(_BYTE *)(v7 + 41); __asm { fild [ebp+arg_4] fmul ds:flt_9E95AC fstp dword ptr [ecx] } } } } if ( a6 ) // a6 is also 0 *(_DWORD *)a6 = *(_DWORD *)(v7 + 44); result = 1; } else { if ( a3 ) *(_BYTE *)a3 = v6 != 0; if ( a4 ) *(_BYTE *)a4 = 0; _EAX = a5; if ( a5 ) { __asm { fldz fstp dword ptr [eax] } } if ( a6 ) *(_DWORD *)a6 = 0; result = 0; } return result; }