//
// SetupRandAdvTriggerPopup::onAddChance from 0x10002ee54 to 0x10002ef20 (204 bytes)
//
// 1 xrefs:
// > SetupRandAdvTriggerPopup::init @ 0x10002ebbc
//
// 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 __fastcall SetupRandAdvTriggerPopup::onAddChance(SetupRandAdvTriggerPopup *a1, cocos2d::CCObject *a2)
{
int v3; // w20
char *v4; // x21
int v5; // w21
char *v6; // x22
char *v7[2]; // [xsp+8h] [xbp-38h] BYREF
char v8; // [xsp+1Fh] [xbp-21h]
CCTextInputNode::getString(v7, a1->m_groupIDInput);
if ( v8 < 0 )
{
v4 = v7[0];
v3 = atoi(v7[0]);
operator delete(v4);
}
else
{
v3 = atoi((const char *)v7);
}
CCTextInputNode::getString(v7, a1->m_chanceInput);
if ( v8 < 0 )
{
v6 = v7[0];
v5 = atoi(v7[0]);
operator delete(v6);
}
else
{
v5 = atoi((const char *)v7);
}
if ( v3 >= 1 && v5 >= 1 )
{
SetupRandAdvTriggerPopup::addChance(a1, v3, v5);
SetupRandAdvTriggerPopup::updateGroupIDButtons(a1);
}
}