uint32 value; if (unitTarget->GetPowerType() == POWER_TYPE_ENERGY) { value = 10; } else { value = } uint32 gain = count * value;