//
// GJRewardItem::getRandomNonMaxShardType from 0x418cbc to 0x418d22 (102 bytes)
//
// 1 xrefs:
// > GameStatsManager::completedDailyLevel @ 0x420722
//
// 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
//
SpecialRewardItem GJRewardItem::getRandomNonMaxShardType()
{
int v0; // r6
SpecialRewardItem RandomShardType; // r4
GameStatsManager *v2; // r8
int Stat; // r8
SpecialRewardItem result; // r0
char *v5; // [sp+0h] [bp+0h] BYREF
v0 = 10;
RandomShardType = GJRewardItem::getRandomShardType();
while ( 1 )
{
v2 = GameStatsManager::sharedState();
GJRewardItem::rewardItemToStat((int)&v5, RandomShardType);
Stat = GameStatsManager::getStat(v2, v5);
sub_774008(&v5);
result = RandomShardType;
if ( Stat <= 99 )
break;
--v0;
RandomShardType = GJRewardItem::getNextShardType(RandomShardType);
if ( !v0 )
return 0;
}
return result;
}