Code:
uint32 GetPartialMeleeRuneAmount(uint32 spell_id)
{
for(int i = 0; i < EFFECT_COUNT; ++i)
{
if(spells[spell_id].effectid[i] == SE_MitigateMeleeDamage)
{
return spells[spell_id].max[i];
}
}
return 0;
}
The 3 minute guess. Can't fit 50k into a sint16 which is what max[i] is there. The return value is a uint32, and with sign extension the negative 16-bit value becomes a very large unsigned 32-bit value, somewhere around 4 billion.