Add combat_ai_name

This commit is contained in:
Alexander Batalov 2023-07-24 08:29:19 +03:00
parent e0e0db219c
commit 49804a52e6
2 changed files with 19 additions and 0 deletions

View File

@ -707,6 +707,24 @@ int combat_ai_num()
return gAiPacketsLength;
}
// 0x428060
char* combat_ai_name(int packet_num)
{
int index;
if (packet_num < 0 || packet_num >= gAiPacketsLength) {
return NULL;
}
for (index = 0; index < gAiPacketsLength; index++) {
if (gAiPackets[index].packet_num == packet_num) {
return gAiPackets[index].name;
}
}
return NULL;
}
// Get ai from object
//
// 0x4280B4

View File

@ -31,6 +31,7 @@ int aiExit();
int aiLoad(File* stream);
int aiSave(File* stream);
int combat_ai_num();
char* combat_ai_name(int packet_num);
int aiGetAreaAttackMode(Object* obj);
int aiGetRunAwayMode(Object* obj);
int aiGetBestWeapon(Object* obj);