//
// PurchaseItemPopup::onPurchase from 0x10014e4f4 to 0x10014e568 (116 bytes)
//
// 1 xrefs:
// > PurchaseItemPopup::init @ 0x10014e11c
//
// 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 PurchaseItemPopup::onPurchase(PurchaseItemPopup *a1, cocos2d::CCObject *a2)
{
GameStatsManager *v3; // x0
GJPurchaseDelegate *m_delegate; // x0
v3 = GameStatsManager::sharedState();
if ( GameStatsManager::purchaseItem(v3, a1->m_storeItem->m_index.random - a1->m_storeItem->m_index.seed) )
{
m_delegate = a1->m_delegate;
if ( m_delegate )
((void (__fastcall *)(GJPurchaseDelegate *, GJStoreItem *))m_delegate->didPurchaseItem)(
m_delegate,
a1->m_storeItem);
}
((void (__fastcall *)(PurchaseItemPopup *, _QWORD))a1->setKeypadEnabled)(a1, 0);
((void (__fastcall *)(PurchaseItemPopup *, __int64))a1->removeFromParentAndCleanup)(a1, 1);
}