CLTClientShell->AIClientObjectManager(CurrentOffset 0x49B90)
//You can use virtual function to get the CharacFX of AI by Index
class AIClientObjectManager
{
public:
char pad_0000[16]; //0x0000
std::map<int, CharacFX*, std::less<int>, std::allocator<std::pair<int const, CharacFX*> > > m_aiObjectList; //0x0010
}
// Simple way, you can do otherwise.
void CESP_AI::Init(){
std::map<int, CharacFX*>::iterator it = _ltclientshell->GetAIObjectList()->begin();
for (it = _ltclientshell->GetAIObjectList()->begin(); it != _ltclientshell->GetAIObjectList()->end(); it++)
{
int index = it->first;
CharacFX*pAIClient = (CharacFX*)it->second;
if (pAIClient ) {
CESP_PvP::get()->DrawSkeleton(pAIObjectBase->hObject(), D3DCOLOR_ARGB(255, 255, 0, 0));
Console::get()->PlayerLog.WriteLog("%d - GetAIObjectList[ %d, %p ] => m_nHP: %d - %d", pAIClient->GetAIObjectIndex(), index, pAIClient , pAIClient->GetHP(), pAIClient->GetFullHP());
}
}
}
HOBJECT CharacFX::hObject()
{
if (!this)
return NULL;
if ((DWORD)this < 0x400000)
return NULL;
return *(HOBJECT*)((uintptr_t)this + 0x00D0);
}
unsigned int CharacFX::GetFullHP()
{
if (!this)
return NULL;
return *(unsigned int*)((uintptr_t)this + 0x18938);
}
unsigned int CharacFX::GetHP()
{
if (!this)
return NULL;
return *(unsigned int*)((uintptr_t)this + 0x1893C);
}
__int32 CharacFX::GetAIObjectIndex()
{
if (!this)
return NULL;
return *(__int32*)((uintptr_t)this + 0x17BEC);
}

