//
// EditorUI::onTargetIDChange from 0x484558 to 0x484602 (170 bytes)
//
// 2 xrefs:
// > EditorUI::handleEditorAction @ 0x6f2120
// > EditorUI::handleEditorAction @ 0x6f2132
//
// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!
//
// Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings
// Generated at Fri, 27 Nov 2026 11:49:24 +0000
//
unsigned int __fastcall EditorUI::onTargetIDChange(EditorUI *this, cocos2d::CCObject *a2)
{
cocos2d::CCArray *v3; // r0
cocos2d::CCArray *v5; // r4
unsigned int result; // r0
unsigned int i; // r5
GameObject *v8; // r0
unsigned int j; // r6
const char **v10; // r5
int v11; // r1
int v12; // r7
cocos2d::CCString *v13; // r0
int CString; // r0
v3 = *((cocos2d::CCArray **)this + 249);
if ( v3 )
v5 = (cocos2d::CCArray *)cocos2d::CCArray::createWithObject(v3, a2);
else
v5 = *((cocos2d::CCArray **)this + 167);
result = cocos2d::CCArray::count(v5);
if ( result )
{
for ( i = 0; i < cocos2d::CCArray::count(v5); ++i )
{
v8 = (GameObject *)cocos2d::CCArray::objectAtIndex(v5, i);
result = GameObject::isTrigger(v8);
if ( !result )
return result;
}
for ( j = 0; ; ++j )
{
result = cocos2d::CCArray::count(v5);
if ( j >= result )
break;
v10 = (const char **)cocos2d::CCArray::objectAtIndex(v5, j);
if ( GameObject::isTrigger((GameObject *)v10) )
{
v11 = (int)v10[321];
if ( v11 > 0 )
{
EffectGameObject::setTargetID((EffectGameObject *)v10, (int)a2 + v11);
v12 = (*((int (__fastcall **)(const char **, int))*v10 + 60))(v10, 999);
if ( v12 )
{
v13 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat((cocos2d::CCString *)"%i", v10[321]);
CString = cocos2d::CCString::getCString(v13);
(*(void (__fastcall **)(int, int))(*(_DWORD *)v12 + 464))(v12, CString);
}
}
}
}
}
return result;
}