-
Member
wow 2.4.3 offest\find address of partymembers health
Greetings, i have a problem with finding of party members health. Succesfuly i found addres of myself health base+offset etc. But i can't to find health of party members. Just i try to find exact value change it as usual in game find new and ... find nothing. Is it maybe something wrong i do ? Useing ArtMoney, ChatEngine. In the end i wanna make simple healing bot. For now it workds over finding health status of player as change window ID and finding status as "myself health per window" but its bad way. So is it maybe someone can explain me how to find party(raid)members health or maybe has offsets?
-
Contributor
IDK as in 2.4.3, but in higher version y need read raid/party info (its record contained info GIUD, class-role (aka tank, heal, dps) and party/raid role) and find by GUID party members in heap with other entity (objectMAnager)
-
Sergeant Major
Some stuff I quickly took from wRobot binaries:
PartyLeaderGUID: 0x7C75F8
Party1Guid: 0x7C6F48
Party2Guid: 0x7C6F50
Party3Guid: 0x7C6F58
Party4Guid: 0x7C6F60
Now you can iterate the ObjectManager and find the units by guid.
Realized these were vanilla values, TBC is:
Leader: 0x86F6E8
Party1: 0x86F6B0
Party2: 0x86F6B8
Party3: 0x86F6C0
Party4: 0x86F6C8
These are all relative to wowBase, of course
Last edited by bone91; 02-06-2019 at 07:17 AM.
-
Contributor
There is special structure for party members, named RemoteStats
It's exist even if member in other continent and not in ObjectManager, even offline.
Code:
struct CGPartyInfo::RemoteStats
{
int health;
int maxHealth;
POWER_TYPE powerType;
int power;
int maxPower;
int classID;
int level;
int mapID;
int areaID;
NTempest::C3Vector pos;
int connected;
};
-
Post Thanks / Like - 1 Thanks
bone91 (1 members gave Thanks to air999 for this useful post)
-
Sergeant Major
Do you have the offset for where these start? I'm trying to find raid members world position in battlegrounds when they are out of reach.
-
Contributor
Look into Script_UnitIsDead, there is call to CGPartyMemberStateRepository::GetState
Code:
signed __int64 __fastcall Script_UnitIsDead(__int64 a1)
{
__int64 v1; // rbx
__int64 v3; // rax
__int64 v4; // rax
_WORD *v5; // rax
__int64 (__fastcall *(**v6)[4])(); // rax
__int64 v7; // rax
__int64 v8; // rdx
char v9; // [rsp+20h] [rbp-18h]
unsigned __int64 v10; // [rsp+28h] [rbp-10h]
v1 = a1;
if ( !(unsigned int)lua_isstring(a1, 1i64) )
{
luaL_error(v1, "Usage: UnitIsDead(\"unit\")");
return 0i64;
}
v3 = lua_tolstring(v1, 1i64);
Script_GetGUIDFromToken(&v9, v3, 0i64);
v4 = GetObjectFromGUID(
&v9,
32i64,
"d:\\buildserver\\wow\\4\\work\\shared-checkout\\branches\\wow-patch-8_1_5-branch-fastpatch-6\\wow\\source\\uiut"
"il\\scriptevents.cpp",
2459i64);
if ( v4 )
{
if ( *(_QWORD *)(v4 + 5520) <= 0i64 || (*(_DWORD *)(v4 + 5584) >> 13) & 1 && !(unsigned __int8)sub_140B3A98C(v4) )
{
lua_pushboolean(v1, 1i64);
return 1i64;
}
}
else
{
v5 = (_WORD *)CGPartyMemberStateRepository::GetState((__int64)&v9);
if ( v5 )
{
lua_pushboolean(v1, *v5 & 4);
return 1i64;
}
if ( v10 >> 58 == 20 )
{
v6 = CActorManager::Get();
v7 = CActorManager::GetActorUnit(v6, &v9);
v8 = 0i64;
if ( v7 )
{
LOBYTE(v8) = *(_QWORD *)(v7 + 376) <= 0i64;
lua_pushboolean(v1, v8);
return 1i64;
}
}
}
lua_pushboolean(v1, 0i64);
return 1i64;
}
In CGPartyMemberStateRepository::GetState you can find address of CGPartyMemberStateRepository::m_repository, it's a hash list in live build
Code:
__int64 __fastcall CGPartyMemberStateRepository::GetState(__int64 guid)
{
__int64 result; // rax
__int64 v2; // [rsp+20h] [rbp-28h]
GetObjectFromHash(&CGPartyMemberStateRepository::m_repository, &v2, (__int64 *)guid);
result = v2;
if ( v2 )
result = *(_QWORD *)(v2 + 24);
return result;
}