//
// RewardUnlockLayer::showCollectReward from 0xa88d7c to 0xa88e5c (224 bytes)
//
// 19 xrefs:
// > GameManager::rewardedVideoHidden @ 0x718b94
// > GameManager::rewardedVideoHidden @ 0x718c78
// > LevelBrowserLayer::claimRecallChest @ 0x7fc9f4
// > SupportLayer::onGetReward @ 0x901270
// > DailyLevelPage::claimLevelReward @ 0xa6ef2c
// > GauntletSelectLayer::onPlay @ 0xa7390c
// > GJShopLayer::dialogClosed @ 0xa7d0dc
// > RewardsPage::rewardsStatusFinished @ 0xa88f50
// > SecretLayer3::onChest01 @ 0xa8c2c4
// > SecretLayer3::onChest02 @ 0xa8c3ec
// > SecretLayer4::onChest01 @ 0xa94820
// > FollowRewardPage::onSpecialItem @ 0xaaafe8
// > SecretRewardsLayer::onSpecialItem @ 0xb9e8dc
// > SecretRewardsLayer::onGoldChest @ 0xb9ebb0
// > SecretRewardsLayer::onSelectItem @ 0xb9eeb8
// > GJPathRewardPopup::onClaim @ 0xba3cec
// > SecretLayer5::claimOnlineReward @ 0xbc64e0
// > NotificationsPage::notificationRewardFinished @ 0xc5fe20
// > ??> @ 0xc4978
//
// This function is hookable on this platform (idp: arm, 32 bit: False, 64 bit: True!
//
// 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 13:00:36 +0000
//
__int64 __fastcall RewardUnlockLayer::showCollectReward(RewardUnlockLayer *this, GJRewardItem *a2)
{
cocos2d::CCObject *v3; // x0
unsigned int v6; // w20
if ( !a2 )
return 0;
v3 = *((cocos2d::CCObject **)this + 88);
if ( v3 )
cocos2d::CCObject::release(v3);
*((_QWORD *)this + 88) = a2;
cocos2d::CCObject::retain(a2);
if ( *((_BYTE *)a2 + 80) )
{
if ( *((_DWORD *)a2 + 16) != *((_DWORD *)this + 174) )
return 0;
}
(*(void (__fastcall **)(_QWORD, _QWORD))(**((_QWORD **)this + 90) + 344LL))(*((_QWORD *)this + 90), 0);
(*(void (__fastcall **)(_QWORD, _QWORD))(**((_QWORD **)this + 90) + 1056LL))(*((_QWORD *)this + 90), 0);
(*(void (__fastcall **)(_QWORD, _QWORD))(**((_QWORD **)this + 89) + 344LL))(*((_QWORD *)this + 89), 0);
v6 = *((unsigned __int8 *)this + 701);
*((_BYTE *)this + 700) = 1;
if ( !v6 )
return 1;
RewardUnlockLayer::playRewardEffect(this);
return v6;
}