//
// GJBaseGameLayer::getItemValue from 0x14033ceb0 to 0x14033cf33 (131 bytes)
//
// 6 xrefs:
// > GJBaseGameLayer::activateItemEditTrigger @ 0x14033d098
// > GJBaseGameLayer::activateItemEditTrigger @ 0x14033d0b4
// > GJBaseGameLayer::activateItemEditTrigger @ 0x14033d0ce
// > GJBaseGameLayer::activateItemCompareTrigger @ 0x14033d46e
// > GJBaseGameLayer::activateItemCompareTrigger @ 0x14033d54b
// > ??> @ 0x14091fc1c
//
// This function is hookable on this platform (idp: pc, 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 11:30:37 +0000
//
double __fastcall GJBaseGameLayer::getItemValue(__int64 a1, int a2, unsigned int a3)
{
int v3; // edx
int v4; // edx
int v5; // edx
int v6; // edx
double result; // xmm0_8
v3 = a2 - 1;
if ( !v3 )
return (double)(int)GJEffectManager::countForItem(*(_QWORD *)(a1 + 2408), a3);
v4 = v3 - 1;
if ( v4 )
{
v5 = v4 - 1;
if ( v5 )
{
v6 = v5 - 1;
if ( v6 )
{
if ( v6 == 1 )
return (double)*(int *)(a1 + 12644);
else
return 0.0;
}
else
{
return *(double *)(a1 + 13920);
}
}
else
{
return (double)*(int *)(a1 + 2148);
}
}
else
{
GJEffectManager::timeForItem(*(_QWORD *)(a1 + 2408), a3);
}
return result;
}