//
// DailyLevelPage::claimLevelReward from 0x915684 to 0x915804 (384 bytes)
//
// 2 xrefs:
// > DailyLevelNode::onClaimReward @ 0x9158a0
// > ??> @ 0x49260
//
// 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 DailyLevelPage::claimLevelReward(DailyLevelPage *a1, DailyLevelNode *a2, GJGameLevel *a3, cocos2d::CCPoint a4)
{
const cocos2d::CCPoint *v4; // x3
const cocos2d::CCPoint *v7; // x23
GameStatsManager *v9; // x0
GJRewardItem *v10; // x0
GJRewardItem *v11; // x22
RewardUnlockLayer *v12; // x23
GameLevelManager *v13; // x0
GameStatsManager *v14; // x0
float v15; // s2
float v16; // s3
CurrencyRewardLayer *v17; // x0
int BonusDiamonds; // [xsp+58h] [xbp+48h]
cocos2d::CCPoint v19; // [xsp+60h] [xbp+50h] BYREF
cocos2d::CCPoint v20; // 0:s0.4,4:s1.4
v7 = v4;
v9 = GameStatsManager::sharedState();
v10 = GameStatsManager::completedDailyLevel(v9, a3);
v11 = v10;
if ( v10 )
{
v12 = RewardUnlockLayer::create(v10->m_rewardType, nullptr);
a1->addChild_0(a1, v12, 100);
RewardUnlockLayer::showCollectReward(v12, v11);
}
else
{
v14 = GameStatsManager::sharedState();
BonusDiamonds = GameStatsManager::getBonusDiamonds(v14, a3->m_stars.random - a3->m_stars.seed);
cocos2d::CCPoint::CCPoint(&v19, v7);
v20.x = 0.0;
v20.y = 1.0;
v17 = CurrencyRewardLayer::create(0, 0, 0, BonusDiamonds, Icon, 0, Icon, 0, v20, (CurrencyRewardType)&v19, v15, v16);
a1->addChild_0(a1, v17, 14);
}
DailyLevelPage::exitDailyNode(a1, a2, 0.0);
v13 = GameLevelManager::sharedState();
if ( GameLevelManager::getDailyID(v13, a1->m_type) <= a3->m_dailyID.random - a3->m_dailyID.seed )
DailyLevelPage::createDailyNode(a1, nullptr, 0, 0.5, 0);
else
DailyLevelPage::downloadAndCreateNode(a1);
}