//
// GJEffectManager::updateTimer from 0x8b0548 to 0x8b06a0 (344 bytes)
//
// 4 xrefs:
// > GJBaseGameLayer::activateItemEditTrigger @ 0x891238
// > GJBaseGameLayer::activatePersistentItemTrigger @ 0x891404
// > GJBaseGameLayer::activatePersistentItemTrigger @ 0x891614
// > ??> @ 0x3e388
//
// 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 GJEffectManager::updateTimer(GJEffectManager *a1, int a2, double a3)
{
unsigned __int64 v3; // x7
double v4; // d1
std::_Hashtable, std::allocator>, std::__detail::_Select1st, std::equal_to, std::hash, std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, std::__detail::_Prime_rehash_policy, std::__detail::_Hashtable_traits>::size_type M_bucket_count; // x6
unsigned __int64 v6; // x7
std::_Hashtable, std::allocator>, std::__detail::_Select1st, std::equal_to, std::hash, std::__detail::_Mod_range_hashing, std::__detail::_Default_ranged_hash, std::__detail::_Prime_rehash_policy, std::__detail::_Hashtable_traits>::__bucket_type v7; // x8
std::__detail::_Hash_node_base *M_nxt; // x4
int v9; // w2
std::vector p; // [xsp+30h] [xbp+20h] BYREF
if ( a2 > 9998 )
{
v3 = 9999;
a2 = 9999;
}
else
{
if ( a2 < 0 )
a2 = 0;
v3 = a2;
}
v4 = 9999999.0;
if ( a3 > 9999999.0 || (v4 = -9999999.0, a3 < -9999999.0) )
a3 = v4;
M_bucket_count = a1->m_timerItemMap._M_h._M_bucket_count;
v6 = v3 % M_bucket_count;
v7 = a1->m_timerItemMap._M_h._M_buckets[v6];
if ( v7 )
{
M_nxt = v7->_M_nxt;
if ( a2 == LODWORD(v7->_M_nxt[1]._M_nxt) )
{
LABEL_12:
if ( v7->_M_nxt )
{
*(double *)&v7->_M_nxt[3]._M_nxt = a3;
return;
}
}
else
{
while ( M_nxt->_M_nxt )
{
v9 = (int)M_nxt->_M_nxt[1]._M_nxt;
v7 = M_nxt;
if ( v6 != v9 % M_bucket_count )
break;
M_nxt = M_nxt->_M_nxt;
if ( a2 == v9 )
goto LABEL_12;
}
}
}
memset(&p, 0, sizeof(p));
GJEffectManager::startTimer(a1, a2, a3, 0.0, 0, 0, 1, 1.0, 0, 0, &p, 0, 0);
if ( p.m_start )
operator delete(p.m_start);
}