//
// SetupRandTriggerPopup::updateTargetID2 from 0x5058c6 to 0x50591c (86 bytes)
//
// 2 xrefs:
// > SetupRandTriggerPopup::textChanged @ 0x50598e
// > SetupRandTriggerPopup::onTargetID2Arrow @ 0x505a24
//
// This function is hookable on this platform!
//
// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings
//
void SetupRandTriggerPopup::updateTargetID2(SetupRandTriggerPopup *a1)
{
int v1; // r1
EffectGameObject *m_gameObject; // r0
unsigned int i; // r4
EffectGameObject *v5; // r0
v1 = a1->m_groupID2 & ~(a1->m_groupID2 >> 31);
if ( v1 >= 9999 )
v1 = 9999;
a1->m_groupID2 = v1;
m_gameObject = a1->m_gameObject;
if ( m_gameObject )
{
EffectGameObject::setTargetID2(m_gameObject, v1);
}
else if ( a1->m_gameObjects )
{
for ( i = 0; i < cocos2d::CCArray::count(a1->m_gameObjects); ++i )
{
v5 = (EffectGameObject *)cocos2d::CCArray::objectAtIndex(a1->m_gameObjects, i);
EffectGameObject::setTargetID2(v5, a1->m_groupID2);
}
}
}